/* =========================================================
   DELTA ACADEMY - GALLERY PAGE
   ========================================================= */

/* ---------- HERO ---------- */
.gallery-hero {
    position: relative;
    overflow: hidden;
}

.gallery-hero .about-slider {
    position: relative;
    min-height: 520px;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
}

.gallery-hero .about-slider::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.58) 46%, rgba(0,0,0,.18) 100%);
    z-index: 1;
}

.gallery-hero .container {
    position: relative;
    z-index: 2;
}

.gallery-hero .slider-content {
    max-width: 720px;
}

.gallery-hero .hero-subtitle {
    display: inline-block;
    margin-bottom: 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.gallery-hero .title {
    margin: 0 0 14px;
    color: #fff;
    font-size: 64px;
    line-height: 1.05;
    font-weight: 800;
}

.gallery-hero .hero-text {
    margin: 0;
    color: rgba(255,255,255,.92);
    font-size: 20px;
    line-height: 1.6;
    font-weight: 500;
}

.gallery-hero .hero-text span {
    color: #e31e24;
    font-weight: 700;
}

/* ---------- GALLERY SECTION ---------- */
.delta-gallery-section {
    position: relative;
    padding: 0px 0 30px;
    background: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.gallery-card {
    position: relative;
    display: block;
    height: 330px;
    overflow: hidden;
    border-radius: 10px;
    background: #f2f2f2;
    box-shadow: 0 8px 28px rgba(0,0,0,.08);
    cursor: zoom-in;
}

.gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background .35s ease;
    pointer-events: none;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1);
    transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .35s ease;
}

.gallery-hover-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e31e24;
    color: #fff;
    font-size: 18px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.75);
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
    transform: scale(1.09);
    filter: brightness(.82);
}

.gallery-card:hover::after,
.gallery-card:focus-visible::after {
    background: rgba(0,0,0,.08);
}

.gallery-card:hover .gallery-hover-icon,
.gallery-card:focus-visible .gallery-hover-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.gallery-card:focus-visible {
    outline: 3px solid rgba(227,30,36,.35);
    outline-offset: 4px;
}

/* Images hidden until View More */
.gallery-hidden {
    display: none;
}

.gallery-card.gallery-reveal {
    animation: galleryReveal .45s ease both;
}

@keyframes galleryReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- VIEW MORE ---------- */
.gallery-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.gallery-load-more {
    min-width: 155px;
    height: 50px;
    padding: 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid #e31e24;
    border-radius: 6px;
    background: #e31e24;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: all .3s ease;
}

.gallery-load-more:hover,
.gallery-load-more:focus-visible {
    background: #111;
    border-color: #111;
    color: #fff;
    transform: translateY(-2px);
}

.gallery-load-more i {
    font-size: 13px;
    transition: transform .3s ease;
}

.gallery-load-more:hover i {
    transform: translateY(2px);
}

/* ---------- MAGNIFIC POPUP / LIGHTBOX ---------- */
.mfp-bg {
    background: #050505;
    opacity: .94;
}

.mfp-image-holder .mfp-content {
    max-width: 1180px;
}

.mfp-figure::after {
    box-shadow: none;
    background: transparent;
}

.mfp-img {
    max-height: 84vh !important;
    padding: 34px 0 !important;
}

.mfp-close {
    color: #fff !important;
    opacity: 1 !important;
    font-size: 38px !important;
}

.mfp-arrow::before,
.mfp-arrow::after {
    border-color: transparent;
}

.mfp-arrow-left::after {
    border-right-color: #fff;
}

.mfp-arrow-right::after {
    border-left-color: #fff;
}

.mfp-counter {
    color: rgba(255,255,255,.72);
}

/* ---------- TABLET ---------- */
@media (max-width: 1199px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-card {
        height: 310px;
    }
}

@media (max-width: 991px) {
    .gallery-hero .about-slider {
        min-height: 450px;
    }

    .gallery-hero .title {
        font-size: 52px;
    }

    .delta-gallery-section {
        padding: 70px 0 80px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .gallery-card {
        height: 330px;
    }
}

/* ---------- MOBILE ---------- */
@media (max-width: 767px) {
    .gallery-hero .about-slider {
        min-height: 390px;
        background-position: center center !important;
    }

    .gallery-hero .about-slider::before {
        background: rgba(0,0,0,.62);
    }

    .gallery-hero .hero-subtitle {
        margin-bottom: 10px;
        font-size: 12px;
        letter-spacing: 2px;
    }

    .gallery-hero .title {
        margin-bottom: 10px;
        font-size: 42px;
    }

    .gallery-hero .hero-text {
        font-size: 17px;
    }

    .delta-gallery-section {
        padding: 5px 0 30px;
    }

    .gallery-grid {
        gap: 14px;
    }

    .gallery-card {
        height: 240px;
        border-radius: 8px;
    }

    .gallery-hover-icon {
        width: 46px;
        height: 46px;
        font-size: 15px;
    }

    .gallery-load-more-wrap {
        margin-top: 35px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-card {
        height: 360px;
    }

    .gallery-hero .about-slider {
        min-height: 360px;
    }

    .gallery-hero .title {
        font-size: 38px;
    }
}

/* Keep the gallery and its close control above the sticky header. */
.mfp-bg.delta-gallery-lightbox {
    z-index: 10002;
}

.mfp-wrap.delta-gallery-lightbox {
    z-index: 10003;
}

.delta-gallery-lightbox > .mfp-close {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    padding: 0;
    text-align: center;
    z-index: 1046;
}