/* =========================================================
   BATTLE CHESS SKOOL
   PREMIUM GALLERY PAGE
========================================================= */

/* =========================================================
   ROOT VARIABLES
========================================================= */
:root {
    --navy: #000e2b;
    --navy-dark: #000719;
    --navy-light: #01153e;

    --gold: #e8cd02;
    --gold-light: #f5df02;

    --white: #f7f8ff;
    --text: #eef1fb;
    --muted: #aeb8d2;

    --card: #07183b;
    --card-light: #0b2049;

    --border: rgba(232, 205, 2, 0.16);

    --container: 1320px;

    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   RESET
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    min-width: 320px;
    overflow-x: hidden;
    background:
        linear-gradient(
            180deg,
            var(--navy) 0%,
            var(--navy-light) 48%,
            var(--navy-dark) 100%
        );
    color: var(--text);
    font-family: "Poppins", sans-serif;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================================
   PAGE CONTAINER
========================================================= */
.container {
    width: min(90%, var(--container));
    margin: 0 auto;
}

/* =========================================================
   NAVBAR
========================================================= */
.site-header {
    position: relative;
    z-index: 1000;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 82px;
    padding: 0 4.5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 14, 43, 0.93);
    border-bottom: 1px solid rgba(232, 205, 2, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 1000;
}

/* =========================================================
   BRAND
========================================================= */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
}

.brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    display: block;
}

.brand-name {
    color: var(--text);
    font-family: "Cinzel", serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1.2px;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.brand:hover .brand-name {
    color: var(--gold);
}

/* =========================================================
   NAVIGATION
========================================================= */
.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-left: auto;
}

.nav-links a {
    position: relative;
    padding: 8px 0;
    color: rgba(247, 248, 255, 0.82);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* =========================================================
   MOBILE MENU BUTTON
========================================================= */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(232, 205, 2, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--gold);
    font-size: 17px;
}

/* =========================================================
   HERO
========================================================= */
.gallery-hero {
    position: relative;
    min-height: 650px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        linear-gradient(
            90deg,
            rgba(0, 14, 43, 0.96) 0%,
            rgba(0, 14, 43, 0.76) 42%,
            rgba(0, 14, 43, 0.25) 100%
        ),
        url("gallery/gallery-hero.png")
        center / cover no-repeat;
}

.gallery-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            transparent 60%,
            rgba(0, 7, 25, 0.65)
        );
    pointer-events: none;
}

.gallery-hero::after {
    content: "";
    position: absolute;
    width: 600px;
    height: 600px;
    right: -260px;
    top: 10%;
    background:
        radial-gradient(
            circle,
            rgba(232, 205, 2, 0.12),
            transparent 68%
        );
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(0, 14, 43, 0.3),
            transparent
        );
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(90%, var(--container));
    margin: 0 auto;
    padding: 150px 0 80px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    max-width: 750px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 15px;
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 4px;
}

.hero-text h1 {
    font-family: "Cinzel", serif;
    font-size: clamp(45px, 6vw, 78px);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -1px;
}

.hero-text h1 span {
    display: block;
    color: var(--gold);
}

.hero-text > p {
    max-width: 620px;
    margin-top: 24px;
    color: rgba(247, 248, 255, 0.74);
    font-size: 15px;
    line-height: 1.9;
}

.hero-tagline {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.tag-line {
    width: 50px;
    height: 2px;
    background: var(--gold);
}

.hero-tagline small {
    display: block;
    color: rgba(247, 248, 255, 0.48);
    font-size: 9px;
    letter-spacing: 3px;
}

.hero-tagline strong {
    display: block;
    margin-top: 2px;
    color: var(--white);
    font-size: 11px;
    letter-spacing: 1.4px;
}

.hero-side-text {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    color: rgba(247, 248, 255, 0.42);
    font-family: "Cinzel", serif;
    font-size: 10px;
    letter-spacing: 4px;
}

.small-gold-line {
    width: 42px;
    height: 2px;
    margin-top: 10px;
    background: var(--gold);
}

/* =========================================================
   FEATURED SECTION
========================================================= */
.featured-section {
    width: min(90%, 1260px);
    margin: 0 auto;
    padding: 110px 0 80px;
}

.featured-heading {
    margin-bottom: 40px;
}

.section-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
}

.featured-heading h2 {
    font-family: "Cinzel", serif;
    font-size: clamp(32px, 4vw, 50px);
    font-weight: 600;
    line-height: 1.1;
}

.featured-heading h2 span {
    color: var(--gold);
}

.featured-heading p {
    max-width: 650px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.85;
}

/* =========================================================
   FEATURED CARD
========================================================= */
.featured-card {
    display: grid;
    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(350px, 0.7fr);
    min-height: 540px;
    overflow: hidden;
    background:
        linear-gradient(
            135deg,
            var(--card),
            var(--card-light)
        );
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

/* =========================================================
   FEATURED IMAGE
========================================================= */
.featured-image {
    position: relative;
    min-height: 540px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s cubic-bezier(.2, .7, .2, 1);
}

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

.image-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            transparent 45%,
            rgba(0, 14, 43, 0.62)
        );
    pointer-events: none;
}

.featured-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 5px;
    background: var(--gold);
    color: var(--navy);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* =========================================================
   FEATURED CONTENT
========================================================= */
.featured-content {
    padding: 55px 45px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-pill {
    align-self: flex-start;
    padding: 7px 12px;
    border: 1px solid rgba(232, 205, 2, 0.32);
    border-radius: 5px;
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.featured-content h2 {
    margin-top: 20px;
    font-family: "Cinzel", serif;
    font-size: clamp(25px, 3vw, 40px);
    font-weight: 600;
    line-height: 1.2;
}

.featured-content > p {
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.85;
}

/* =========================================================
   EVENT DETAILS
========================================================= */
.event-details {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin-top: 28px;
}

.event-details div {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    color: var(--muted);
    font-size: 12px;
}

.event-details i {
    flex-shrink: 0;
    margin-top: 4px;
    color: var(--gold);
}

/* =========================================================
   GOLD BUTTON
========================================================= */
.gold-btn {
    width: fit-content;
    margin-top: 30px;
    padding: 13px 18px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 6px;
    background: var(--gold);
    color: var(--navy);
    font-size: 11px;
    font-weight: 800;
    transition: transform 0.3s ease, background 0.3s ease;
}

.gold-btn:hover {
    background: var(--gold-light);
    transform: translateY(-3px);
}

/* =========================================================
   MOMENTS SECTION
========================================================= */
.moments-section {
    width: min(90%, var(--container));
    margin: 0 auto;
    padding: 80px 0 120px;
}

/* =========================================================
   SECTION HEADING
========================================================= */
.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 42px;
}

.section-label {
    display: block;
    margin-bottom: 10px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
}

.section-heading h2 {
    font-family: "Cinzel", serif;
    font-size: clamp(32px, 4vw, 50px);
    font-weight: 600;
    line-height: 1.08;
}

.section-heading h2 span {
    color: var(--gold);
}

.section-heading > p {
    max-width: 420px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.85;
    text-align: right;
}

/* =========================================================
   GALLERY GRID
========================================================= */
.masonry-gallery {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

/* =========================================================
   GALLERY CARD
========================================================= */
.gallery-card {
    position: relative;
    width: 100%;
    min-width: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 13px;
    background: var(--card);
    border: 1px solid rgba(232, 205, 2, 0.11);
    cursor: pointer;
    isolation: isolate;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.22);
    transition:
        transform 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.gallery-card:hover {
    transform: translateY(-5px);
    border-color: rgba(232, 205, 2, 0.32);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.36);
}

/* LARGE IMAGE */
.gallery-card.gallery-large {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
    min-height: 470px;
}

/* TALL IMAGE */
.gallery-card.gallery-tall {
    grid-column: span 1;
    grid-row: span 2;
    aspect-ratio: auto;
    min-height: 470px;
}

/* WIDE IMAGE */
.gallery-card.gallery-wide {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}

/* NORMAL IMAGE */
.gallery-card:not(.gallery-large):not(.gallery-tall):not(.gallery-wide) {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
}

/* IMAGE WRAPPER */
.gallery-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #061535;
}

/* GALLERY IMAGE */
.gallery-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform 0.75s cubic-bezier(.2, .7, .2, 1);
}

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

/* IMAGE VIGNETTE */
.gallery-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.02) 30%,
            rgba(0, 8, 28, 0.45) 100%
        );
    pointer-events: none;
}

/* IMAGE VIEW BUTTON */
.image-view {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(0, 14, 43, 0.68);
    color: #ffffff;
    font-size: 14px;
    opacity: 0;
    transform: translateY(-8px);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease,
        background 0.3s ease,
        color 0.3s ease;
}

.gallery-card:hover .image-view {
    opacity: 1;
    transform: translateY(0);
}

.image-view:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

/* OLD OVERLAY — HIDE IT */
.gallery-overlay {
    display: none !important;
}

/* FILTER BUTTONS */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 35px;
}

.gallery-filter,
.filter-btn {
    padding: 10px 17px;
    border: 1px solid rgba(232, 205, 2, 0.18);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(247, 248, 255, 0.7);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    transition:
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease;
}

.gallery-filter:hover,
.filter-btn:hover {
    color: var(--gold);
    border-color: rgba(232, 205, 2, 0.45);
    transform: translateY(-2px);
}

.gallery-filter.active,
.filter-btn.active {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

/* HIDDEN FILTER ITEMS */
.gallery-card.hidden {
    display: none !important;
}

/* =========================================================
   EVENT CTA
========================================================= */
.gallery-event-cta {
    position: relative;
    min-height: 440px;
    overflow: hidden;
    background:
        linear-gradient(
            90deg,
            rgba(0, 14, 43, 0.96),
            rgba(0, 14, 43, 0.58)
        ),
        url("images/gallery/tournament-main.JPG")
        center / cover no-repeat;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            circle at 78% 50%,
            rgba(232, 205, 2, 0.13),
            transparent 40%
        );
}

.cta-content {
    position: relative;
    z-index: 2;
    width: min(90%, var(--container));
    min-height: 440px;
    margin: 0 auto;
    padding: 60px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.cta-content h2 {
    font-family: "Cinzel", serif;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.05;
    font-weight: 600;
}

.cta-content p {
    max-width: 460px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

/* CTA QUOTE */
.cta-quote {
    width: 330px;
    padding-left: 30px;
    border-left: 1px solid rgba(232, 205, 2, 0.4);
}

.quote-mark {
    color: var(--gold);
    font-family: Georgia, serif;
    font-size: 60px;
    line-height: 0.5;
}

.cta-quote p {
    color: var(--white);
    font-family: "Cinzel", serif;
    font-size: 18px;
}

/* =========================================================
   LIGHTBOX
========================================================= */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 45px;
    background: rgba(0, 7, 24, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 84vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
}

/* LIGHTBOX BUTTONS */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    transition:
        background 0.3s ease,
        color 0.3s ease,
        border-color 0.3s ease;
}

.lightbox-close {
    top: 22px;
    right: 22px;
}

.lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

/* =========================================================
   TABLET — 1100px
========================================================= */
@media (max-width: 1100px) {
    .navbar {
        height: 76px;
    }

    .nav-links {
        gap: 22px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .gallery-hero {
        min-height: 590px;
    }

    .featured-card {
        grid-template-columns:
            minmax(0, 1.2fr)
            minmax(320px, 0.8fr);
    }

    .featured-content {
        padding: 45px 32px;
    }

    .masonry-gallery {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 15px;
    }

    .gallery-card.gallery-large {
        grid-column: span 2;
        grid-row: span 2;
        min-height: 430px;
    }

    .gallery-card.gallery-tall {
        grid-column: span 1;
        grid-row: span 2;
        min-height: 430px;
    }

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

    .gallery-card:not(.gallery-large):not(.gallery-tall):not(.gallery-wide) {
        grid-column: span 1;
    }
}

/* =========================================================
   TABLET — 900px
========================================================= */
@media (max-width: 900px) {
    .navbar {
        height: 70px;
        padding: 0 4%;
    }

    .brand img {
        width: 51px;
        height: 51px;
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        font-size: 11px;
    }

    .hero-content {
        padding: 125px 0 60px;
    }

    .hero-side-text {
        display: none;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-image {
        min-height: 420px;
    }

    .featured-content {
        padding: 42px 35px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading > p {
        max-width: 550px;
        text-align: left;
    }

    .cta-content {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
    }

    .cta-quote {
        width: 100%;
        max-width: 500px;
    }
}

/* =========================================================
   MOBILE — 700px
========================================================= */
@media (max-width: 700px) {
    /* NAVBAR */
    .navbar {
        height: 64px;
    }

    .brand img {
        width: 46px;
        height: 46px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 64px;
        left: 0;
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin: 0;
        padding: 14px 6% 20px;
        background: rgba(0, 14, 43, 0.98);
        border-bottom: 1px solid var(--border);
        backdrop-filter: blur(15px);
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        padding: 10px 0;
        font-size: 13px;
    }

    /* HERO */
    .gallery-hero {
        min-height: 520px;
        background:
            linear-gradient(
                90deg,
                rgba(0, 14, 43, 0.92),
                rgba(0, 14, 43, 0.55)
            ),
            url("gallery/gallery-hero.png")
            center / cover no-repeat;
    }

    .hero-content {
        width: 88%;
        padding: 115px 0 55px;
        align-items: flex-start;
    }

    .hero-text h1 {
        font-size: clamp(36px, 10vw, 52px);
    }

    .hero-text > p {
        font-size: 13px;
        line-height: 1.75;
    }

    .eyebrow {
        font-size: 10px;
        letter-spacing: 3px;
    }

    /* FEATURED */
    .featured-section {
        width: 90%;
        padding: 75px 0 55px;
    }

    .featured-heading h2 {
        font-size: 31px;
    }

    .featured-image {
        min-height: 310px;
    }

    .featured-content {
        padding: 35px 25px;
    }

    .featured-content h2 {
        font-size: 26px;
    }

    /* MOMENTS */
    .moments-section {
        width: 90%;
        padding: 60px 0 80px;
    }

    .section-heading {
        margin-bottom: 30px;
    }

    .section-heading h2 {
        font-size: 31px;
    }

    /* FILTERS */
    .gallery-filters {
        gap: 7px;
        margin-bottom: 25px;
    }

    .gallery-filter,
    .filter-btn {
        padding: 8px 12px;
        font-size: 10px;
    }

    /* MOBILE GALLERY */
    .masonry-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .gallery-card.gallery-large {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }

    .gallery-card.gallery-tall {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 0;
        aspect-ratio: 3 / 4;
    }

    .gallery-card.gallery-wide {
        grid-column: span 2;
        aspect-ratio: 16 / 10;
    }

    .gallery-card:not(.gallery-large):not(.gallery-tall):not(.gallery-wide) {
        grid-column: span 1;
        aspect-ratio: 1 / 1;
    }

    .gallery-card {
        border-radius: 8px;
    }

    .image-view {
        width: 38px;
        height: 38px;
        top: 10px;
        right: 10px;
        opacity: 1;
        transform: none;
    }

    /* CTA */
    .gallery-event-cta {
        min-height: 420px;
    }

    .cta-content {
        width: 88%;
        min-height: 420px;
        padding: 50px 0;
    }

    .cta-content h2 {
        font-size: 35px;
    }

    .cta-quote {
        padding-left: 20px;
    }

    /* LIGHTBOX */
    .lightbox {
        padding: 20px;
    }

    .lightbox img {
        max-width: 94vw;
        max-height: 78vh;
    }

    .lightbox-close {
        top: 14px;
        right: 14px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }
}

/* =========================================================
   SMALL MOBILE — 430px
========================================================= */
@media (max-width: 430px) {
    .gallery-hero {
        min-height: 470px;
    }

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

    .hero-text h1 {
        font-size: 34px;
    }

    .hero-text > p {
        font-size: 12px;
    }

    .featured-heading h2 {
        font-size: 28px;
    }

    .featured-content h2 {
        font-size: 24px;
    }

    .section-heading h2 {
        font-size: 28px;
    }

    .featured-image {
        min-height: 270px;
    }

    /* ONE COLUMN */
    .masonry-gallery {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .gallery-card,
    .gallery-card.gallery-large,
    .gallery-card.gallery-tall,
    .gallery-card.gallery-wide,
    .gallery-card:not(.gallery-large):not(.gallery-tall):not(.gallery-wide) {
        grid-column: span 1;
        grid-row: span 1;
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .gallery-card.gallery-large {
        aspect-ratio: 4 / 3;
    }

    .gallery-card.gallery-tall {
        aspect-ratio: 4 / 3;
    }

    .gallery-card.gallery-wide {
        aspect-ratio: 4 / 3;
    }

    .cta-content h2 {
        font-size: 30px;
    }
}

/* =========================================================
   VERY SMALL PHONES — 360px
========================================================= */
@media (max-width: 360px) {
    .hero-text h1 {
        font-size: 30px;
    }

    .hero-text > p {
        font-size: 11px;
    }

    .gallery-filters {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-filter,
    .filter-btn {
        width: 100%;
        text-align: center;
    }

    .featured-content {
        padding: 30px 20px;
    }

    .moments-section {
        width: 92%;
    }
}

/* =========================================================
   ACCESSIBILITY
========================================================= */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================================
   IMAGE LOADING
========================================================= */
.gallery-image img,
.featured-image img {
    background: #061535;
}

/* =========================================================
   PREVENT BROKEN IMAGE OVERFLOW
========================================================= */
.gallery-card img {
    max-width: none;
}

/* =========================================================
   FOOTER SAFETY
========================================================= */
footer {
    position: relative;
    z-index: 2;
}
/* =========================================================
   SCHOOL GALLERY SECTION
========================================================= */

.school-gallery-section {
    width: 100%;
    padding: 90px 0 100px;

    background: #000e2b;
    overflow: hidden;
}


/* =========================================================
   HEADING
========================================================= */

.school-gallery-heading {
    max-width: 850px;
    margin: 0 auto 50px;

    padding: 0 25px;

    text-align: center;
}

.school-gallery-heading span {
    display: inline-block;

    margin-bottom: 12px;

    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-weight: 700;

    letter-spacing: 3px;

    color: #e8cd02;
}

.school-gallery-heading h2 {
    margin: 0 0 15px;

    font-family: "Cinzel", serif;
    font-size: clamp(32px, 4vw, 52px);

    line-height: 1.15;

    color: #ffffff;
}

.school-gallery-heading p {
    max-width: 680px;

    margin: 0 auto;

    font-family: "Poppins", sans-serif;
    font-size: 15px;

    line-height: 1.8;

    color: rgba(255, 255, 255, 0.68);
}


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

.school-gallery {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    grid-auto-rows: 280px;

    gap: 14px;

    padding: 0 14px;

    box-sizing: border-box;
}


/* =========================================================
   GALLERY ITEM
========================================================= */

.gallery-item {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    border-radius: 10px;

    background: #071738;

    cursor: pointer;
}


/* =========================================================
   IMAGE
========================================================= */

.gallery-item img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform 0.55s ease,
        filter 0.55s ease;
}


/* =========================================================
   LARGE IMAGE
========================================================= */

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


/* =========================================================
   WIDE IMAGE
========================================================= */

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


/* =========================================================
   TALL IMAGE
========================================================= */

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


/* =========================================================
   HOVER
========================================================= */

.gallery-item::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 14, 43, 0),
            rgba(0, 14, 43, 0.18)
        );

    opacity: 0;

    transition: opacity 0.4s ease;

    pointer-events: none;
}


.gallery-item:hover::after {
    opacity: 1;
}


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


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

@media (max-width: 1000px) {

    .school-gallery {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        grid-auto-rows: 250px;

        gap: 12px;
    }

}


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

@media (max-width: 700px) {

    .school-gallery-section {
        padding: 65px 0 70px;
    }

    .school-gallery-heading {
        margin-bottom: 35px;
    }

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

    .school-gallery-heading p {
        font-size: 14px;
    }


    .school-gallery {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        grid-auto-rows: 210px;

        gap: 8px;

        padding: 0 8px;
    }


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


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

}


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

@media (max-width: 450px) {

    .school-gallery {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        grid-auto-rows: 170px;

        gap: 6px;

        padding: 0 6px;
    }

    .gallery-item {
        border-radius: 7px;
    }

}