﻿/* =========================================================
   XFSPL GALLERY
========================================================= */

.xfspl-gallery-page {
    --gallery-navy: #0B1F3A;
    --gallery-dark: #06172C;
    --gallery-blue: #1557B0;
    --gallery-gold: #D4A72C;
    --gallery-bg: #F7F9FC;
    --gallery-text: #172033;
    --gallery-muted: #687588;
    --gallery-border: #E1E7EF;
    --gallery-white: #ffffff;
    background: var(--gallery-bg);
    color: var(--gallery-text);
}


/* =========================================================
   HERO
========================================================= */

.gallery-hero {
    position: relative;
    min-height: 450px;
    display: flex;
    align-items: center;
    background: linear-gradient( 90deg, rgba(6,23,44,.97) 0%, rgba(6,23,44,.85) 48%, rgba(6,23,44,.40) 100% ), url('/images/gallery-bg.jpg') center / cover no-repeat;
    overflow: hidden;
}


.gallery-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient( circle at 80% 30%, rgba(212,167,44,.15), transparent 30% );
}


.gallery-hero .container {
    position: relative;
    z-index: 2;
}


.gallery-hero-content {
    max-width: 680px;
    padding: 75px 0;
}


.gallery-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--gallery-gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    margin-bottom: 18px;
}


.gallery-hero h1 {
    color: #fff;
    font-family: "Manrope", sans-serif;
    font-size: clamp(44px, 5vw, 68px);
    line-height: 1.05;
    font-weight: 800;
    margin: 0 0 22px;
}


    .gallery-hero h1 span {
        color: var(--gallery-gold);
    }


.gallery-hero p {
    max-width: 600px;
    color: rgba(255,255,255,.76);
    font-size: 17px;
    line-height: 1.8;
    margin: 0 0 28px;
}


.gallery-breadcrumb {
    display: flex;
    align-items: center;
    gap: 11px;
    color: rgba(255,255,255,.62);
    font-size: 13px;
}


    .gallery-breadcrumb a {
        color: #fff;
        text-decoration: none;
    }


    .gallery-breadcrumb i {
        color: var(--gallery-gold);
    }


/* =========================================================
   INTRO
========================================================= */

.gallery-intro {
    padding: 80px 0 45px;
    background: #fff;
}


.gallery-heading {
    max-width: 760px;
    margin: auto;
    text-align: center;
}


.gallery-section-label {
    display: inline-block;
    color: var(--gallery-gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
    margin-bottom: 12px;
}


.gallery-heading h2 {
    font-family: "Manrope", sans-serif;
    font-size: clamp(32px, 4vw, 45px);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 17px;
}


    .gallery-heading h2 span {
        color: var(--gallery-blue);
    }


.gallery-heading p {
    color: var(--gallery-muted);
    font-size: 16px;
    line-height: 1.8;
    margin: 0;
}


/* =========================================================
   ALBUM SECTION
========================================================= */

.gallery-albums {
    padding: 55px 0 90px;
    background: var(--gallery-bg);
}


.album-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}


/* =========================================================
   ALBUM CARD
========================================================= */

.album-card {
    background: #fff;
    border: 1px solid var(--gallery-border);
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(11,31,58,.06);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}


    .album-card:hover {
        transform: translateY(-8px);
        border-color: rgba(212,167,44,.6);
        box-shadow: 0 22px 45px rgba(11,31,58,.14);
    }


/* =========================================================
   ALBUM COVER
========================================================= */

.album-cover {
    position: relative;
    height: 265px;
    overflow: hidden;
    background: linear-gradient( 145deg, #0B1F3A, #1557B0 );
}


    .album-cover img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .5s ease;
    }


.album-card:hover .album-cover img {
    transform: scale(1.06);
}


.album-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.85);
    font-size: 55px;
    background: linear-gradient( 145deg, #0B1F3A, #1557B0 );
}


.album-cover img:not([src=""]) ~ .album-placeholder {
    opacity: 0;
}


.album-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6,23,44,.45);
    opacity: 0;
    transition: opacity .3s ease;
}


.album-card:hover .album-overlay {
    opacity: 1;
}


.album-view {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gallery-gold);
    color: var(--gallery-navy);
    font-size: 18px;
}


.album-count {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 7px 12px;
    border-radius: 50px;
    background: rgba(6,23,44,.82);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   ALBUM INFO
========================================================= */

.album-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 22px;
}


.album-category {
    color: var(--gallery-gold);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
}


.album-info h3 {
    font-family: "Manrope", sans-serif;
    font-size: 20px;
    font-weight: 800;
    margin: 5px 0 6px;
}


.album-info p {
    color: var(--gallery-muted);
    font-size: 12px;
    margin: 0;
}


.album-arrow {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gallery-bg);
    color: var(--gallery-blue);
    transition: all .25s ease;
}


.album-card:hover .album-arrow {
    background: var(--gallery-gold);
    color: var(--gallery-navy);
    transform: translateX(3px);
}


/* =========================================================
   ALBUM MODAL
========================================================= */

.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}


    .gallery-modal.active {
        display: block;
    }


.gallery-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(3,12,25,.86);
    backdrop-filter: blur(8px);
}


.gallery-modal-content {
    position: relative;
    z-index: 2;
    width: min(1100px, 92%);
    max-height: 90vh;
    overflow-y: auto;
    margin: 5vh auto;
    background: #fff;
    border-radius: 20px;
    padding: 30px;
}


.gallery-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--gallery-navy);
    color: #fff;
    cursor: pointer;
    z-index: 5;
}


.gallery-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-right: 55px;
    margin-bottom: 25px;
}


    .gallery-modal-header span {
        color: var(--gallery-gold);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 1.5px;
    }


    .gallery-modal-header h2 {
        font-family: "Manrope", sans-serif;
        font-size: 30px;
        font-weight: 800;
        margin: 4px 0 0;
    }


#modalCount {
    color: var(--gallery-muted);
    font-size: 13px;
    letter-spacing: 0;
}


/* =========================================================
   MODAL IMAGE GRID
========================================================= */

.modal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}


.modal-gallery-item {
    position: relative;
    height: 190px;
    border-radius: 12px;
    overflow: hidden;
    background: #EAF2FC;
    cursor: pointer;
}


    .modal-gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .35s ease;
    }


    .modal-gallery-item:hover img {
        transform: scale(1.06);
    }


.modal-image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6,23,44,.45);
    color: #fff;
    opacity: 0;
    transition: opacity .25s ease;
}


.modal-gallery-item:hover .modal-image-overlay {
    opacity: 1;
}


.modal-gallery-item.image-error {
    display: flex;
    align-items: center;
    justify-content: center;
}


    .modal-gallery-item.image-error::after {
        content: "Photo Coming Soon";
        color: var(--gallery-muted);
        font-size: 12px;
        font-weight: 700;
    }


/* =========================================================
   LIGHTBOX
========================================================= */

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2,10,22,.96);
}


    .image-lightbox.active {
        display: flex;
    }


#lightboxImage {
    max-width: 86vw;
    max-height: 84vh;
    object-fit: contain;
    border-radius: 8px;
}


.lightbox-close {
    position: fixed;
    top: 25px;
    right: 30px;
    width: 45px;
    height: 45px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}


.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: var(--gallery-gold);
    color: var(--gallery-navy);
    cursor: pointer;
    font-size: 18px;
}


.lightbox-prev {
    left: 30px;
}


.lightbox-next {
    right: 30px;
}


.lightbox-counter {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.8);
    font-size: 13px;
}


/* =========================================================
   CTA
========================================================= */

.gallery-cta {
    padding: 75px 0;
    background: linear-gradient( 110deg, var(--gallery-dark), var(--gallery-navy) );
}


.gallery-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
}


.gallery-cta h2 {
    color: #fff;
    font-family: "Manrope", sans-serif;
    font-size: clamp(30px, 4vw, 43px);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 10px;
}


    .gallery-cta h2 span {
        color: var(--gallery-gold);
    }


.gallery-cta p {
    color: rgba(255,255,255,.7);
    margin: 0;
}


.gallery-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 0 24px;
    border-radius: 8px;
    background: var(--gallery-gold);
    color: var(--gallery-navy);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
    transition: all .25s ease;
}


    .gallery-btn:hover {
        background: #e4bd55;
        color: var(--gallery-navy);
        transform: translateY(-2px);
    }


/* =========================================================
   BODY LOCK
========================================================= */

.gallery-no-scroll {
    overflow: hidden;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1199px) {

    .album-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 991px) {

    .album-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modal-gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}


@media (max-width: 767px) {

    .gallery-hero {
        min-height: 390px;
    }

    .gallery-hero-content {
        padding: 60px 0;
    }

    .gallery-hero h1 {
        font-size: 42px;
    }

    .gallery-hero p {
        font-size: 15px;
    }

    .gallery-intro {
        padding: 60px 0 35px;
    }

    .gallery-albums {
        padding: 40px 0 65px;
    }

    .album-grid {
        grid-template-columns: 1fr;
    }

    .album-cover {
        height: 280px;
    }

    .gallery-modal-content {
        width: 95%;
        padding: 20px;
        margin: 3vh auto;
        max-height: 94vh;
    }

    .modal-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modal-gallery-item {
        height: 150px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 42px;
        height: 42px;
    }

    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }
}


@media (max-width: 480px) {

    .gallery-hero h1 {
        font-size: 36px;
    }

    .gallery-modal-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .modal-gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .modal-gallery-item {
        height: 125px;
    }

    .gallery-cta {
        padding: 60px 0;
    }

    .gallery-btn {
        width: 100%;
    }
}


.album-date {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

    .album-date i {
        color: #d4a72c;
    }

.album-modal-date {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
}

    .album-modal-date i {
        color: #d4a72c;
    }