.school-gallery-hero {
    padding: 150px 0 90px;
    background: radial-gradient(circle at 90% 10%, rgba(30, 80, 180, 0.08), transparent 35%), #f8faff;
}

.gallery-hero-top {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 70px;
    align-items: center;
}

.gallery-hero-copy {
    max-width: 650px;
}

.gallery-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px;
    border-radius: 40px;
    background: #eaf1ff;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.gallery-hero-copy h1 {
    margin: 25px 0;
    font-family: "Poppins", sans-serif;
    font-size: clamp(45px, 5vw, 72px);
    line-height: 1.08;
}

.gallery-hero-copy h1 span {
    display: block;
    color: var(--blue);
}

.gallery-hero-copy p {
    max-width: 570px;
    color: var(--gray);
    font-size: 17px;
    line-height: 1.9;
}

.gallery-hero-actions {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 35px;
}

.gallery-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 24px;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
}

.gallery-primary-btn:hover {
    transform: translateY(-3px);
}

.gallery-media-count {
    display: flex;
    flex-direction: column;
}

.gallery-media-count strong {
    font-family: "Poppins", sans-serif;
    font-size: 22px;
}

.gallery-media-count span {
    color: var(--gray);
    font-size: 12px;
}



.gallery-hero-feature {
    position: relative;
    min-height: 530px;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.12);
}

.gallery-hero-feature img {
    width: 100%;
    height: 100%;
    min-height: 530px;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.gallery-hero-feature:hover img {
    transform: scale(1.04);
}

.hero-feature-overlay {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 45px 40px 35px;
    color: #fff;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.85),
            rgba(0, 0, 0, 0));
}

.hero-feature-overlay span {
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 800;
    opacity: 0.8;
}

.hero-feature-overlay h3 {
    margin: 8px 0 0;
    font-family: "Poppins", sans-serif;
    font-size: 28px;
}

.hero-feature-overlay>i {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: var(--blue);
}



.gallery-featured-section {
    padding: 100px 0 110px;
    background: #fff;
}

.gallery-featured-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 50px;
    margin-bottom: 40px;
}

.gallery-featured-heading h2 {
    margin: 10px 0 0;
    font-family: "Poppins", sans-serif;
    font-size: 40px;
    line-height: 1.2;
}

.gallery-featured-heading p {
    max-width: 480px;
    margin: 0;
    color: var(--gray);
    line-height: 1.8;
}



.gallery-section-tag {
    color: var(--blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}


.media-stage-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.75fr;
    gap: 20px;
    height: 600px;
}

.stage-main-media {
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    cursor: pointer;
}

.stage-main-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.stage-main-media:hover img {
    transform: scale(1.04);
}

.stage-main-overlay {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 45px;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
}

.stage-main-overlay span {
    font-size: 11px;
    letter-spacing: 2px;
    font-weight: 800;
}

.stage-main-overlay h2 {
    max-width: 500px;
    margin: 8px 0 0;
    font-family: "Poppins", sans-serif;
    font-size: 36px;
}

.stage-view-btn {
    width: 55px;
    height: 55px;
    flex: 0 0 55px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--blue);
    cursor: pointer;
    transition: 0.3s;
}

.stage-view-btn:hover {
    transform: scale(1.08);
}


.stage-side-media {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
}

.stage-small-card {
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    cursor: pointer;
}

.stage-small-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.stage-small-card:hover img {
    transform: scale(1.06);
}

.stage-small-overlay {
    position: absolute;
    inset: auto 0 0;
    padding: 25px;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.stage-small-overlay span,
.video-label span {
    display: block;
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 800;
    opacity: 0.75;
}

.stage-small-overlay h3 {
    margin: 5px 0 0;
    font-family: "Poppins", sans-serif;
    font-size: 20px;
}

.video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--blue);
    font-size: 20px;
    transform: translate(-50%, -50%);
    transition: 0.3s;
}

.video-card:hover .video-play {
    transform: translate(-50%, -50%) scale(1.08);
}

.video-label {
    position: absolute;
    left: 25px;
    bottom: 25px;
    color: #fff;
}

.video-label strong {
    display: block;
    margin-top: 5px;
    font-family: "Poppins", sans-serif;
}


.school-bento-gallery {
    padding: 105px 0 100px;
    background: #f7f9fc;
}

.bento-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 28px;
}

.bento-heading h2 {
    margin: 10px 0 10px;
    font-family: "Poppins", sans-serif;
    font-size: 40px;
    line-height: 1.2;
}

.bento-heading p {
    max-width: 620px;
    margin: 0;
    color: var(--gray);
    line-height: 1.8;
}

.bento-counter {
    color: #8791a5;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}


/* GALLERY FILTERS */

.gallery-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding: 18px 0 24px;
    border-top: 1px solid #e4e9f2;
    border-bottom: 1px solid #e4e9f2;
}

.gallery-filter {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 44px;
    padding: 10px 20px;

    border: 1px solid #dce2ed;
    border-radius: 30px;

    outline: none;

    background: #ffffff;
    color: #536078;

    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        color 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

/* NORMAL HOVER */

.gallery-filter:hover {
    border-color: #1e50b4;
    background: #ffffff;
    color: #1e50b4;
    transform: translateY(-2px);
}



.gallery-filter.active {
    border-color: #1e50b4 !important;
    background: #1e50b4 !important;
    color: #ffffff !important;

    box-shadow: 0 8px 22px rgba(30, 80, 180, 0.25);

    transform: translateY(-1px);
}

/* ACTIVE TAB HOVER */

.gallery-filter.active:hover {
    border-color: #1e50b4 !important;
    background: #1e50b4 !important;
    color: #ffffff !important;

    box-shadow: 0 10px 25px rgba(30, 80, 180, 0.30);

    transform: translateY(-2px);
}


.gallery-filter.active::after {
    position: absolute;

    content: "";

    left: 18px;
    right: 18px;
    bottom: -24px;

    height: 3px;

    border-radius: 10px;

    background: #1e50b4;

    opacity: 1;
}

/* ICON */

.gallery-filter i {
    font-size: 11px;
}



@media (max-width: 768px) {

    .gallery-filters {
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;

        margin-bottom: 30px;

        padding: 16px 2px 24px;

        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .gallery-filters::-webkit-scrollbar {
        display: none;
    }

    .gallery-filter {
        flex: 0 0 auto;

        min-height: 42px;

        padding: 9px 17px;

        font-size: 13px;
    }

    .gallery-filter.active {
        background: #1e50b4 !important;
        color: #ffffff !important;

        box-shadow: 0 6px 16px rgba(30, 80, 180, 0.24);
    }

    .gallery-filter.active::after {
        left: 15px;
        right: 15px;
        bottom: -24px;

        height: 3px;
    }
}

/* BENTO GRID */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 260px;
    gap: 18px;
}

.bento-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #ddd;
    cursor: pointer;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s ease;
}

.bento-item:hover img {
    transform: scale(1.07);
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-wide {
    grid-column: span 2;
}

.bento-tall {
    grid-row: span 2;
}



.bento-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 25px;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), transparent 55%);
}

.bento-overlay span {
    display: block;
    margin-bottom: 6px;
    font-size: 10px;
    letter-spacing: 1.5px;
    font-weight: 800;
    opacity: 0.75;
}

.bento-overlay h3 {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 20px;
}

.bento-expand {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--blue);
    cursor: pointer;
}


.bento-video-play {
    position: absolute;
    top: 22px;
    left: 22px;
    z-index: 2;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
}

.video-duration {
    position: absolute;
    top: 22px;
    right: 22px;
    z-index: 2;
    padding: 6px 9px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}


.gallery-load-more {
    display: flex;
    justify-content: center;
    margin-top: 45px;
}

#loadMoreGallery {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: 1px solid #dce2ed;
    border-radius: 8px;
    background: #fff;
    color: var(--dark);
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

#loadMoreGallery:hover {
    border-color: var(--blue);
    color: var(--blue);
}


.gallery-final-cta {
    padding: 120px 20px;
    text-align: center;
}

.gallery-cta-content {
    max-width: 800px;
    margin: auto;
}

.gallery-cta-content h2 {
    margin: 15px 0 20px;
    font-family: "Poppins", sans-serif;
    font-size: 48px;
    line-height: 1.15;
}

.gallery-cta-content h2 span {
    color: var(--blue);
}

.gallery-cta-content p {
    max-width: 650px;
    margin: 0 auto 35px;
    color: var(--gray);
    line-height: 1.9;
}

.gallery-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}



.school-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(4, 9, 20, 0.94);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.3s;
}

.school-gallery-lightbox.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gallery-lightbox-inner {
    position: relative;
    width: min(1100px, 100%);
}

#galleryLightboxMedia {
    display: flex;
    justify-content: center;
}

#galleryLightboxMedia img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
}

#galleryLightboxMedia video {
    width: 100%;
    max-height: 75vh;
    background: #000;
    border-radius: 12px;
}

.gallery-lightbox-close {
    position: absolute;
    top: -60px;
    right: 0;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #111;
    cursor: pointer;
    font-size: 18px;
}

.gallery-lightbox-caption {
    margin-top: 15px;
    color: #fff;
}

.gallery-lightbox-caption span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
    opacity: 0.65;
}

.gallery-lightbox-caption h3 {
    margin: 5px 0 0;
    font-family: "Poppins", sans-serif;
    font-size: 22px;
}



@media (max-width: 991px) {
    .gallery-hero-top {
        grid-template-columns: 1fr;
    }

    .gallery-hero-copy {
        max-width: 750px;
    }

    .gallery-hero-feature {
        min-height: 500px;
    }

    .gallery-hero-feature img {
        min-height: 500px;
    }

    .gallery-featured-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .media-stage-grid {
        height: 500px;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 768px) {
    .school-gallery-hero {
        padding: 120px 0 60px;
    }

    .gallery-hero-copy h1 {
        font-size: 42px;
    }

    .gallery-hero-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .gallery-hero-feature {
        min-height: 390px;
        border-radius: 20px;
    }

    .gallery-hero-feature img {
        min-height: 390px;
    }

    /* Featured Media */

    .gallery-featured-section {
        padding: 75px 0 80px;
    }

    .gallery-featured-heading {
        gap: 15px;
        margin-bottom: 30px;
    }

    .gallery-featured-heading h2 {
        font-size: 32px;
    }

    .gallery-featured-heading p {
        font-size: 14px;
        line-height: 1.8;
    }

    .media-stage-grid {
        height: auto;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stage-main-media {
        height: 390px;
        border-radius: 20px;
    }

    .stage-main-overlay {
        padding: 30px 25px;
    }

    .stage-main-overlay h2 {
        font-size: 27px;
    }

    .stage-view-btn {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .stage-side-media {
        height: auto;
        grid-template-rows: none;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stage-small-card {
        height: 260px;
        border-radius: 20px;
    }

    /* School Moments */

    .school-bento-gallery {
        padding: 75px 0 80px;
    }

    .bento-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 25px;
    }

    .bento-heading h2 {
        font-size: 32px;
    }

    .bento-heading p {
        font-size: 14px;
    }

    .bento-counter {
        display: none;
    }

    /* Mobile tabs */

    .gallery-filters {
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-bottom: 30px;
        padding: 16px 2px 20px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .gallery-filters::-webkit-scrollbar {
        display: none;
    }

    .gallery-filter {
        flex: 0 0 auto;
        min-height: 42px;
        padding: 9px 17px;
        font-size: 13px;
    }

    .gallery-filter.active {
        box-shadow: 0 6px 16px rgba(30, 80, 180, 0.24);
    }

    .gallery-filter.active::after {
        right: 15px;
        bottom: -21px;
        left: 15px;
    }

    /* Gallery */

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 280px;
        gap: 15px;
    }

    .bento-large,
    .bento-wide,
    .bento-tall {
        grid-column: auto;
        grid-row: auto;
    }

    .bento-large {
        height: 390px;

    }


    /* CTA */

    .gallery-final-cta {
        padding: 90px 20px;
    }

    .gallery-cta-content h2 {
        font-size: 36px;
    }

    /* Lightbox */

    .school-gallery-lightbox {
        padding: 20px;
    }

    .gallery-lightbox-close {
        top: -55px;
    }
}



@media (max-width: 480px) {
    .gallery-hero-copy h1 {
        font-size: 36px;
    }

    .gallery-hero-copy p {
        font-size: 15px;
    }

    .gallery-primary-btn {
        width: 100%;
        justify-content: center;
    }

    .gallery-featured-heading h2,
    .bento-heading h2 {
        font-size: 29px;
    }

    .stage-main-media {
        height: 340px;
    }

    .stage-main-overlay {
        padding: 25px 20px;
    }

    .stage-main-overlay h2 {
        font-size: 23px;
    }

    .stage-small-card {
        height: 235px;
    }

    .bento-large {
        height: 340px;
    }

    .bento-overlay {
        padding: 20px;
    }

    .bento-overlay h3 {
        font-size: 18px;
    }

    .gallery-cta-content h2 {
        font-size: 31px;
    }
}

/* SCROLL ANIMATIONS */

.reveal {
    opacity: 0;
    transform: translateY(70px);
    transition: opacity .8s ease, transform .8s ease;
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Left */

.reveal-left {
    opacity: 0;
    transform: translateX(-70px);
    transition: opacity .8s ease, transform .8s ease;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* Right */

.reveal-right {
    opacity: 0;
    transform: translateX(70px);
    transition: opacity .8s ease, transform .8s ease;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Scale */

.reveal-scale {
    opacity: 0;
    transform: scale(.9);
    transition: opacity .8s ease, transform .8s ease;
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger */

.delay-1 {
    transition-delay: .15s;
}

.delay-2 {
    transition-delay: .30s;
}

.delay-3 {
    transition-delay: .45s;
}

.delay-4 {
    transition-delay: .60s;
}

.delay-5 {
    transition-delay: .75s;
}