/* ======================================
   GALLERY HERO
====================================== */

.gallery-hero {
    min-height: 520px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background-color: var(--maya-black);
    background-image:
        radial-gradient(
            circle at 20% 30%,
            rgba(249, 90, 37, 0.42),
            transparent 32%
        ),
        linear-gradient(
            115deg,
            #171717 0%,
            #541d16 55%,
            #a52e1e 100%
        );
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.gallery-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(23, 23, 23, 0.14),
            rgba(23, 23, 23, 0.72)
        );
    pointer-events: none;
}

.gallery-hero .container {
    position: relative;
    z-index: 1;
}

.gallery-hero-content {
    width: min(620px, 90%);
    margin-right: 10%;
    margin-left: auto;
    color: #ffffff;
    text-align: right;
}

.gallery-hero-eyebrow {
    margin: 0 0 14px;
    color: var(--maya-yellow);
    font-weight: 800;
    font-size: 20px;
}

.gallery-hero-content h1 {
    margin: 0;
    max-width: 700px;
    color: var(--maya-white);
    font-size: clamp(44px, 6vw, 78px);
    line-height: 1.25;
}

.gallery-hero-description {
    max-width: 620px;
    margin: 24px 0 0;
    color: var(--maya-white-82);
    font-size: 19px;
    line-height: 2;
}


/* ======================================
   GALLERY SECTION
====================================== */

.gallery-section {
    padding: 32px 0 110px;
    background:
        radial-gradient(
            circle at 5% 10%,
            var(--maya-yellow-soft),
            transparent 24%
        ),
        var(--maya-white);
}

.gallery-heading {
    margin-bottom: 38px;
    text-align: center;
}

.gallery-heading h2 {
    margin: 0;
    color: #111111;
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 900;
    line-height: 1.35;
}


/* ======================================
   GALLERY GRID
====================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-flow: dense;
    grid-auto-rows: 230px;
    gap: 16px;
}

.gallery-card {
    min-width: 0;
    min-height: 0;
    padding: 0;
    position: relative;
    display: block;
    overflow: hidden;
    border: 0;
    border-radius: var(--radius-md);
    background:
        linear-gradient(
            135deg,
            var(--maya-orange),
            var(--maya-red)
        );
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-family: inherit;
    text-align: right;
    isolation: isolate;
    transition:
        transform var(--transition-normal),
        box-shadow var(--transition-normal),
        opacity var(--transition-fast);
}

.gallery-card-large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-card-tall {
    grid-column: span 1;
    grid-row: span 2;
}

.gallery-card-wide {
    grid-column: span 2;
    grid-row: span 1;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.gallery-card:focus-visible {
    outline: 4px solid var(--maya-yellow);
    outline-offset: 3px;
}



.gallery-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.55s ease;
}

.gallery-card:hover img {
    transform: scale(1.045);
}

.gallery-video-placeholder {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 30% 35%,
            var(--maya-yellow),
            transparent 24%
        ),
        linear-gradient(
            135deg,
            #3f1712,
            var(--maya-red)
        );
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            0deg,
            rgba(16, 8, 6, 0.82) 0%,
            rgba(16, 8, 6, 0.08) 62%,
            transparent 100%
        );
    pointer-events: none;
}

.gallery-card-content {
    position: absolute;
    right: 22px;
    bottom: 20px;
    left: 22px;
    z-index: 2;
    display: flex;
    color: var(--maya-white);
}

.gallery-card-content strong {
    font-size: 20px;
    line-height: 1.5;
}


.gallery-play-icon {
    width: 62px;
    height: 62px;
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    margin: auto;
    border-radius: 50%;
    background: var(--maya-yellow);
    color: var(--maya-black);
    font-size: 20px;
    box-shadow: 0 14px 35px rgba(23, 23, 23, 0.3);
    transition:
        transform var(--transition-fast),
        background var(--transition-fast);
}

.gallery-card:hover .gallery-play-icon {
    transform: scale(1.08);
    background: var(--maya-white);
}


/* ======================================
   EMPTY STATE
====================================== */

.gallery-empty {
    margin: 0;
    padding: 55px 25px;
    border: 1px dashed rgba(23, 23, 23, 0.18);
    border-radius: var(--radius-md);
    background: var(--maya-surface);
    color: var(--maya-text-muted);
    text-align: center;
    font-size: 18px;
}


/* ======================================
   LIGHTBOX
====================================== */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    padding: 28px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity var(--transition-fast),
        visibility var(--transition-fast);
}

.gallery-lightbox.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 6, 5, 0.92);
    backdrop-filter: blur(7px);
    cursor: zoom-out;
}

.gallery-lightbox-dialog {
    width: min(1050px, 100%);
    max-height: calc(100vh - 56px);
    position: relative;
    z-index: 1;
    overflow: auto;
    border-radius: var(--radius-md);
    background: var(--maya-black);
    box-shadow: var(--shadow-lg);
}

.gallery-lightbox-media {
    width: 100%;
    min-height: 260px;
    display: grid;
    place-items: center;
    background: #0b0b0b;
}

.gallery-lightbox-media img,
.gallery-lightbox-media video {
    width: 100%;
    max-height: calc(100vh - 170px);
    display: block;
    object-fit: contain;
    background: #0b0b0b;
}

.gallery-lightbox-media [hidden] {
    display: none;
}

.gallery-lightbox-dialog h2 {
    margin: 0;
    padding: 20px 28px 24px;
    color: var(--maya-white);
    font-size: 22px;
}

.gallery-lightbox-close {
    width: 46px;
    height: 46px;
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 3;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--maya-white);
    color: var(--maya-black);
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.gallery-lightbox-close:hover {
    background: var(--maya-yellow);
}

body.gallery-lightbox-open {
    overflow: hidden;
}


/* ======================================
   TABLET
====================================== */

@media (max-width: 960px) {
    .gallery-hero {
        min-height: 500px;
    }

    .gallery-hero-content {
        padding: 105px 0 75px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 220px;
    }
}


/* ======================================
   MOBILE
====================================== */

@media (max-width: 600px) {
    .gallery-hero {
        min-height: 440px;
    }

    .gallery-hero-content {
        padding: 95px 0 65px;
    }

    .gallery-hero-eyebrow {
        font-size: 17px;
    }

    .gallery-hero-content h1 {
        font-size: 40px;
    }

    .gallery-hero-description {
        font-size: 16px;
        line-height: 1.9;
    }

    .gallery-section {
        padding: 22px 0 75px;
    }

    .gallery-heading {
        margin-bottom: 28px;
    }

    .gallery-heading h2 {
        font-size: 34px;
    }


    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 160px;
        gap: 10px;
    }

    .gallery-card-large,
    .gallery-card-wide {
        grid-column: span 2;
    }

    .gallery-card-large {
        grid-row: span 2;
    }

    .gallery-card-wide {
        grid-row: span 1;
    }

    .gallery-card-tall {
        grid-column: span 1;
        grid-row: span 2;
    }

    .gallery-card {
        border-radius: var(--radius-sm);
    }

    .gallery-card-content {
        right: 14px;
        bottom: 13px;
        left: 14px;
    }

    .gallery-card-content strong {
        font-size: 16px;
    }

    .gallery-play-icon {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }

    .gallery-lightbox {
        padding: 12px;
    }

    .gallery-lightbox-dialog {
        max-height: calc(100vh - 24px);
        border-radius: var(--radius-sm);
    }

    .gallery-lightbox-dialog h2 {
        padding: 16px 18px 20px;
        font-size: 18px;
    }

    .gallery-lightbox-close {
        width: 42px;
        height: 42px;
        top: 10px;
        left: 10px;
    }
}