.gallery-section {
    background: var(--sub);
}

.gallery-masonry {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 1fr;
    gap: 18px;
}

.gallery-intro { margin: 14px 0 0; color: var(--ink-soft); font-size: 1.08rem; }

.gallery-work {
    position: relative;
    min-height: 420px;
    padding: 0;
    overflow: hidden;
    text-align: left;
    background: var(--white);
    border: 0;
    border-radius: var(--radius-large);
    box-shadow: var(--shadow);
}
.gallery-work { transition:transform .25s ease,box-shadow .25s ease; }
.gallery-work:hover { transform:translateY(-5px);box-shadow:0 28px 64px rgba(64,55,47,.16); }

.gallery-work:nth-child(2) {
    min-height: 520px;
}

.gallery-work img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-work:hover img {
    transform: scale(1.05);
}

.gallery-work span {
    position: absolute;
    right: 18px;
    bottom: 18px;
    left: 18px;
    display: grid;
    gap: 2px;
    padding: 18px;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.88);
    border-radius: 22px;
}

.gallery-work strong {
    font-size: 1.2rem;
}

.gallery-work small {
    color: var(--ink-soft);
    font-weight: 800;
}

.gallery-work .gallery-category { width:fit-content; margin-bottom:4px; padding:5px 10px; color:var(--primary); background:var(--gold); border-radius:999px; font-size:.78rem; font-weight:900; }
.gallery-modal #galleryModalArtist { display:inline-flex; padding:5px 10px; background:var(--gold); border-radius:999px; }
.gallery-modal #galleryModalStudent { display:block; margin:8px 0 4px; color:var(--ink-soft); font-weight:800; }

.gallery-modal .modal-content {
    overflow: hidden;
    background: var(--background);
    border: 0;
    border-radius: 30px;
}

.gallery-modal img {
    display: block;
    width: 100%;
    height: min(62vh, 680px);
    object-fit: contain;
}

.gallery-modal-media { position:relative; background:#201f1d; }
.gallery-slide-control { position:absolute; top:50%; z-index:2; display:grid; width:48px; height:48px; padding:0; place-items:center; color:var(--primary); background:rgba(255,255,255,.92); border:0; border-radius:50%; box-shadow:0 8px 24px rgba(0,0,0,.2); transform:translateY(-50%); }
.gallery-slide-control.previous { left:16px; }
.gallery-slide-control.next { right:16px; }
.gallery-slide-control:hover { background:var(--gold); }
.gallery-slide-control[hidden],.gallery-slide-count[hidden] { display:none; }
.gallery-slide-count { position:absolute; right:18px; bottom:16px; z-index:2; padding:6px 11px; color:#fff; background:rgba(0,0,0,.62); border-radius:999px; font-size:.82rem; font-weight:900; }

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    background: var(--white);
    border: 0;
    border-radius: 50%;
}

.gallery-modal .modal-body p {
    margin-bottom: 4px;
    color: #9C7B25;
    font-weight: 900;
}

.gallery-modal .modal-body h3 {
    margin-bottom: 8px;
    font-size: clamp(1.3rem, 2.4vw, 1.65rem);
    line-height: 1.3;
}

.gallery-modal .modal-body span {
    color: var(--ink-soft);
}

@media (max-width: 640px) {
    .gallery-modal img { height: 52vh; }
    .gallery-slide-control { width:42px; height:42px; }
    .gallery-slide-control.previous { left:10px; }
    .gallery-slide-control.next { right:10px; }
}
