#sec-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 6rem 1.5rem 5rem 1.5rem;
    background: linear-gradient(
        rgb(36, 36, 36) 0%,
        #3c3c3c 50%,
        #404040 100%
    );
}

#sec-2 .sec-2-header {
    max-width: 980px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0 auto 3rem auto;
}

#sec-2 .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
    font-size: 0.8rem;
    opacity: 0.8;
    color: var(--light-col, #f3f3f3);
}

#sec-2 h2 {
    margin: 0;
}

#sec-2 p {
    margin: 0;
    color: #e6e6e6;
}

#gallery-grid {
    width: 100%;
    max-width: 1200px;
    columns: 3 280px;
    column-gap: 1.5rem;
}

.gallery-card {
    display: inline-block;
    width: 100%;
    margin: 0 0 1.5rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    cursor: zoom-in;
    break-inside: avoid;
    /* Safari Performance Fix - Hardware Acceleration */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform, box-shadow;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.gallery-card img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: #0a0a0a;
    /* Safari: Prevent image from causing repaints */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.gallery-card:hover,
.gallery-card:focus-visible {
    -webkit-transform: translateY(-4px) translateZ(0);
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.12);
    outline: none;
}

#lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
}

#lightbox.active {
    display: flex;
}

#lightbox .lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

#lightbox img {
    display: block;
    max-width: 92vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 45px 140px rgba(0, 0, 0, 0.55);
    background: #050505;
}

#lightbox-close {
    position: absolute;
    top: 0.4rem;
    right: 0.6rem;
    border: none;
    background: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0.1rem 0.35rem;
    text-decoration: none;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
    transition: transform 0.18s ease, opacity 0.18s ease;
    z-index: 4;
}

#lightbox-close:hover {
    transform: scale(1.08);
    opacity: 0.9;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: white;
    font-size: 2.4rem;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 999px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 0.18s ease, opacity 0.18s ease;
    z-index: 3;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    pointer-events: auto;
}

.nav-btn:hover {
    transform: translateY(-50%) scale(1.06);
    opacity: 0.9;
}

#lb-prev { left: -3.5rem; }
#lb-next { right: -3.5rem; }

@media (max-width: 1024px) {
    #gallery-grid {
        columns: 2 240px;
    }

    #lb-prev { left: 0.4rem; }
    #lb-next { right: 0.4rem; }
}

@media (max-width: 680px) {
    #gallery-grid {
        columns: 1;
    }

    #sec-2 {
        padding-inline: 1rem;
    }

    #lb-prev { left: 0.2rem; }
    #lb-next { right: 0.2rem; }

    #lightbox img {
        max-width: 94vw;
        max-height: 82vh;
    }
}
