.clg-gallery{
    column-count:4;
    column-gap:20px;
    padding:0 18px;
    width:100%;
    box-sizing:border-box;
}

.clg-item-card{
    break-inside:avoid;
    margin-bottom:20px;
    position:relative;
    overflow:hidden;
    border-radius:18px;
    cursor:pointer;
    box-shadow:0 12px 34px rgba(0,0,0,.18);
}

.clg-item-card img{
    width:100%;
    display:block;
}

.clg-overlay{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.45);
    display:flex;
    align-items:flex-end;
    padding:20px;
    color:#fff;
    opacity:0;
    transition:.25s ease;
}

.clg-item-card:hover .clg-overlay{
    opacity:1;
}

.clg-modal{
    position:fixed;
    inset:0;
    z-index:999999;
    display:none;
}

.clg-modal.active{
    display:block;
}

.clg-modal-backdrop{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.72);
}

.clg-modal-content{
    position:fixed;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    width:min(1200px,92vw);
    max-height:90vh;
    overflow:auto;
    background:#fff;
    border-radius:26px;
    z-index:2;
}

.clg-modal-grid{
    display:grid;
    grid-template-columns:1.35fr 1fr;
}

.clg-modal-image-wrap{
    background:#111;
}

.clg-modal-image-wrap img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}

.clg-modal-info{
    padding:42px;
}

.clg-buttons{
    display:flex;
    gap:12px;
    flex-wrap:wrap;
    margin-top:28px;
}

.clg-btn-primary,
.clg-btn-secondary{
    padding:14px 22px;
    border-radius:999px;
    text-decoration:none;
    transition:.25s ease;
    font-weight:600;
}

.clg-btn-primary{
    background:#c86842;
    color:#fff;
}

.clg-btn-primary:hover{
    background:#111111;
    color:#fff;
}

.clg-btn-secondary{
    background:#111111;
    color:#fff;
}

.clg-btn-secondary:hover{
    background:#c86842;
    color:#fff;
}

.clg-close{
    position:absolute;
    top:16px;
    right:16px;
    width:44px;
    height:44px;
    border:none;
    border-radius:50%;
    background:rgba(255,255,255,.92);
    font-size:26px;
    cursor:pointer;
    z-index:5;
}

@media(max-width:1200px){
    .clg-gallery{
        column-count:3;
    }
}

@media(max-width:900px){

    .clg-gallery{
        column-count:2;
        padding:0 14px;
    }

    .clg-modal-grid{
        grid-template-columns:1fr;
    }

    .clg-modal-content{
        width:92vw;
    }
}

@media(max-width:600px){

    .clg-gallery{
        column-count:1;
        padding:0 12px;
    }

    .clg-modal-info{
        padding:28px;
    }
}
