/* =========================================================
   GALLERY PAGE
   Page-specific CSS
   Does not modify the existing style.css
========================================================= */

.gallery-page {
    overflow-x: hidden;
}


/* =========================================================
   COMMON CONTAINER
========================================================= */

.gallery-page .gallery-container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}


/* =========================================================
   GALLERY HERO
   Same structural approach as the other major pages
========================================================= */

.gallery-page .gallery-hero {
    background: #08253b;
    color: #ffffff;
    width: 100%;
}

.gallery-page .gallery-hero-inner {
    width: min(1180px, calc(100% - 48px));
    min-height: 500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.gallery-page .gallery-hero-content {
    width: min(850px, 100%);
    padding: 90px 0;
}

.gallery-page .section-label {
    color: #e4b62c;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.gallery-page .gallery-hero h1 {
    margin: 0;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(48px, 6vw, 82px);
    line-height: 0.98;
    font-weight: 700;
}

.gallery-page .gallery-hero h1 span {
    display: block;
    color: #e8b92f;
}

.gallery-page .gold-line {
    width: 70px;
    height: 4px;
    background: #e8b92f;
    margin: 32px 0 26px;
}

.gallery-page .gallery-hero p {
    max-width: 780px;
    margin: 0;
    color: #f4f4f4;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    line-height: 1.8;
}


/* =========================================================
   GALLERY LAYERS
========================================================= */

.gallery-page .gallery-layer {
    background: #f5f2eb;
    padding: 55px 0 65px;
}

.gallery-page .gallery-layer + .gallery-layer {
    padding-top: 55px;
}


/* =========================================================
   LAYER HEADING
========================================================= */

.gallery-page .layer-heading {
    display: flex;
    align-items: baseline;
    gap: 18px;
    margin-bottom: 28px;
}

.gallery-page .layer-number {
    flex: 0 0 auto;
    color: #b08a16;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
}

.gallery-page .layer-heading h2 {
    margin: 0;
    color: #09263d;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
}


/* =========================================================
   GALLERY GRID
   DESKTOP = 6 THUMBNAILS IN ONE ROW
========================================================= */

.gallery-page .gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}


/* =========================================================
   GALLERY CARD
========================================================= */

.gallery-page .gallery-card {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    height: 150px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(8, 37, 59, 0.08);
    cursor: pointer;
}

.gallery-page .gallery-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery-page .gallery-card:hover img {
    transform: scale(1.04);
}


/* =========================================================
   GALLERY ITEM
   Kept for compatibility if existing HTML uses gallery-item
========================================================= */

.gallery-page .gallery-item {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(8, 37, 59, 0.08);
    cursor: pointer;
    height: 150px;
}

.gallery-page .gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery-page .gallery-item:hover img {
    transform: scale(1.04);
}


/* =========================================================
   CLICK / VIEW INDICATOR
========================================================= */

.gallery-page .gallery-view {
    position: absolute;
    left: 50%;
    bottom: 15px;
    transform: translateX(-50%);
    padding: 8px 14px;
    background: rgba(8, 37, 59, 0.88);
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-page .gallery-card:hover .gallery-view,
.gallery-page .gallery-item:hover .gallery-view {
    opacity: 1;
}


/* =========================================================
   IMAGE POPUP / LIGHTBOX
========================================================= */

.gallery-page .gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(0, 0, 0, 0.88);
}

.gallery-page .gallery-modal.active {
    display: flex;
}

.gallery-page .gallery-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-page .gallery-modal-content img {
    display: block;
    max-width: 95vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
}


/* =========================================================
   POPUP CLOSE BUTTON
========================================================= */

.gallery-page .gallery-close {
    position: fixed;
    top: 20px;
    right: 25px;
    z-index: 10000;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #e4b62c;
    color: #09263d;
    font-family: Arial, sans-serif;
    font-size: 25px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
}

.gallery-page .gallery-close:hover {
    background: #ffffff;
}


/* =========================================================
   POPUP NAVIGATION
========================================================= */

.gallery-page .gallery-prev,
.gallery-page .gallery-next {
    position: fixed;
    top: 50%;
    z-index: 10000;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #09263d;
    font-family: Arial, sans-serif;
    font-size: 28px;
    cursor: pointer;
}

.gallery-page .gallery-prev {
    left: 22px;
}

.gallery-page .gallery-next {
    right: 22px;
}

.gallery-page .gallery-prev:hover,
.gallery-page .gallery-next:hover {
    background: #e4b62c;
}


/* =========================================================
   FOOTER PROTECTION
   Main footer remains controlled by style.css
========================================================= */

.gallery-page .site-footer {
    width: 100%;
}


/* =========================================================
   DESKTOP
========================================================= */

@media (min-width: 901px) {

    .gallery-page .gallery-hero-inner {
        width: min(1180px, calc(100% - 48px));
        min-height: 500px;
    }

    .gallery-page .gallery-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 16px;
    }

    .gallery-page .gallery-card {
        height: 150px;
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .gallery-page .gallery-container {
        width: min(100% - 36px, 760px);
    }

    .gallery-page .gallery-hero-inner {
        width: min(100% - 36px, 760px);
        min-height: auto;
    }

    .gallery-page .gallery-hero-content {
        padding: 75px 0;
    }

    .gallery-page .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .gallery-page .gallery-card {
        height: 150px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .gallery-page .gallery-container {
        width: calc(100% - 30px);
    }

    .gallery-page .gallery-hero-inner {
        width: calc(100% - 30px);
    }

    .gallery-page .gallery-hero-content {
        padding: 58px 0 62px;
    }

    .gallery-page .gallery-hero h1 {
        font-size: 46px;
        line-height: 1.02;
    }

    .gallery-page .gallery-hero h1 span {
        display: block;
    }

    .gallery-page .gallery-hero p {
        font-size: 17px;
        line-height: 1.7;
    }

    .gallery-page .gold-line {
        margin: 25px 0 22px;
    }


    /* -----------------------------------------
       GALLERY LAYERS
    ----------------------------------------- */

    .gallery-page .gallery-layer {
        padding: 48px 0 55px;
    }

    .gallery-page .gallery-layer + .gallery-layer {
        padding-top: 48px;
    }


    /* -----------------------------------------
       LAYER HEADING
    ----------------------------------------- */

    .gallery-page .layer-heading {
        gap: 14px;
        margin-bottom: 24px;
    }

    .gallery-page .layer-heading h2 {
        font-size: 34px;
    }


    /* -----------------------------------------
       MOBILE GRID
       2 THUMBNAILS PER ROW
    ----------------------------------------- */

    .gallery-page .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .gallery-page .gallery-card {
        height: 150px;
    }

    .gallery-page .gallery-item {
        height: 150px;
    }


    /* -----------------------------------------
       VIEW INDICATOR
    ----------------------------------------- */

    .gallery-page .gallery-view {
        opacity: 1;
        bottom: 10px;
        padding: 7px 10px;
        font-size: 9px;
    }


    /* -----------------------------------------
       LIGHTBOX
    ----------------------------------------- */

    .gallery-page .gallery-modal {
        padding: 15px;
    }

    .gallery-page .gallery-modal-content img {
        max-width: 96vw;
        max-height: 82vh;
    }


    /* -----------------------------------------
       CLOSE
    ----------------------------------------- */

    .gallery-page .gallery-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 22px;
    }


    /* -----------------------------------------
       PREVIOUS / NEXT
    ----------------------------------------- */

    .gallery-page .gallery-prev,
    .gallery-page .gallery-next {
        width: 40px;
        height: 40px;
        font-size: 23px;
    }

    .gallery-page .gallery-prev {
        left: 10px;
    }

    .gallery-page .gallery-next {
        right: 10px;
    }

}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    .gallery-page .gallery-container {
        width: calc(100% - 24px);
    }

    .gallery-page .gallery-hero-inner {
        width: calc(100% - 24px);
    }

    .gallery-page .gallery-hero h1 {
        font-size: 40px;
    }

    .gallery-page .layer-heading h2 {
        font-size: 31px;
    }

    .gallery-page .gallery-grid {
        gap: 10px;
    }

    .gallery-page .gallery-card,
    .gallery-page .gallery-item {
        height: 135px;
    }

}
/* =========================================================
   GALLERY LIGHTBOX
   Works with gallery.html + existing JavaScript
========================================================= */

.gallery-page .gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    padding: 30px;

    background: rgba(0, 0, 0, 0.92);

    box-sizing: border-box;
}


/* OPEN STATE */

.gallery-page .gallery-lightbox.is-open {
    display: flex;
}


/* =========================================================
   LIGHTBOX IMAGE AREA
========================================================= */

.gallery-page .gallery-lightbox-content {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: auto;
    height: auto;

    max-width: 92vw;
    max-height: 90vh;

    margin: 0;
    padding: 0;
}


.gallery-page .gallery-lightbox-content img {
    display: block;

    width: auto;
    height: auto;

    max-width: 92vw;
    max-height: 88vh;

    object-fit: contain;

    border-radius: 2px;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.gallery-page .gallery-lightbox-close {
    position: fixed;

    top: 20px;
    right: 25px;

    z-index: 100001;

    width: 46px;
    height: 46px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #e4b62c;
    color: #09263d;

    font-family: Arial, sans-serif;
    font-size: 30px;
    font-weight: 400;

    line-height: 46px;
    text-align: center;

    cursor: pointer;

    box-sizing: border-box;
}


.gallery-page .gallery-lightbox-close:hover {
    background: #ffffff;
}


/* =========================================================
   PREVIOUS / NEXT BUTTONS
========================================================= */

.gallery-page .gallery-lightbox-prev,
.gallery-page .gallery-lightbox-next {
    position: fixed;

    top: 50%;

    z-index: 100001;

    transform: translateY(-50%);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.92);
    color: #09263d;

    font-family: Arial, sans-serif;
    font-size: 34px;
    font-weight: 400;

    line-height: 1;

    cursor: pointer;

    box-sizing: border-box;
}


.gallery-page .gallery-lightbox-prev {
    left: 22px;
}


.gallery-page .gallery-lightbox-next {
    right: 22px;
}


.gallery-page .gallery-lightbox-prev:hover,
.gallery-page .gallery-lightbox-next:hover {
    background: #e4b62c;
}


/* =========================================================
   PREVENT PAGE SCROLL WHILE POPUP IS OPEN
========================================================= */

body.gallery-lightbox-open {
    overflow: hidden;
}


/* =========================================================
   MOBILE LIGHTBOX
========================================================= */

@media (max-width: 600px) {

    .gallery-page .gallery-lightbox {
        padding: 15px;
    }

    .gallery-page .gallery-lightbox-content {
        max-width: 94vw;
        max-height: 84vh;
    }

    .gallery-page .gallery-lightbox-content img {
        max-width: 94vw;
        max-height: 82vh;
    }

    .gallery-page .gallery-lightbox-close {
        top: 12px;
        right: 12px;

        width: 42px;
        height: 42px;

        font-size: 27px;
        line-height: 42px;
    }

    .gallery-page .gallery-lightbox-prev,
    .gallery-page .gallery-lightbox-next {
        width: 42px;
        height: 42px;

        font-size: 27px;
    }

    .gallery-page .gallery-lightbox-prev {
        left: 8px;
    }

    .gallery-page .gallery-lightbox-next {
        right: 8px;
    }

}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    .gallery-page .gallery-lightbox-content img {
        max-width: 92vw;
        max-height: 78vh;
    }

}