﻿/*==============================================================
    GALLERY PAGE
    Page-specific styles only
==============================================================*/


/*==============================================================
    GALLERY HERO
==============================================================*/

/*.inner-hero--gallery {
    background-color: #f8f1e5;
    background-image: linear-gradient( 90deg, #f8f1e5 0%, #f8f1e5 40%, rgba(248, 241, 229, .98) 46%, rgba(248, 241, 229, .92) 50%, rgba(248, 241, 229, .72) 55%, rgba(248, 241, 229, .42) 60%, rgba(248, 241, 229, .16) 65%, rgba(248, 241, 229, 0) 70% ), url('/images/gallery/gallery-hero.png');
    background-repeat: no-repeat;*/
    /*
       Critical change:
       contain the complete artwork vertically.
    */
    /*background-size: 100% 100%, auto 100%;
    background-position: center, right center;
}*/
/*==============================================================
    GALLERY HERO
    Full artwork + seamless transition
==============================================================*/

.inner-hero--gallery {
    position: relative;
    background-image: none;
    background-color: #f7efe2;
    overflow: hidden;
}


    /*--------------------------------------------------------------
    ARTWORK AREA
--------------------------------------------------------------*/

    .inner-hero--gallery .inner-hero__media {
        position: absolute;
        inset: 0 0 0 auto;
        z-index: 0;
        width: 62%;
        overflow: hidden;
        background: transparent;
        pointer-events: none;
    }


    /*--------------------------------------------------------------
    ARTWORK

    Same technique that solved Donation:
    height controls the image;
    width is calculated naturally.

    Therefore the complete vertical artwork remains visible.
--------------------------------------------------------------*/

    .inner-hero--gallery .inner-hero__image {
        position: absolute;
        top: 0;
        right: 0;
        display: block;
        width: auto;
        max-width: none;
        height: 100%;
        /*
        Fade the ACTUAL artwork edge rather than
        an oversized object-fit container.
    */

        -webkit-mask-image: linear-gradient( 90deg, transparent 0%, rgba(0, 0, 0, .08) 9%, rgba(0, 0, 0, .28) 18%, rgba(0, 0, 0, .56) 28%, rgba(0, 0, 0, .82) 38%, #000 50%, #000 100% );
        mask-image: linear-gradient( 90deg, transparent 0%, rgba(0, 0, 0, .08) 9%, rgba(0, 0, 0, .28) 18%, rgba(0, 0, 0, .56) 28%, rgba(0, 0, 0, .82) 38%, #000 50%, #000 100% );
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-size: 100% 100%;
        mask-size: 100% 100%;
    }


    /*--------------------------------------------------------------
    READABILITY / TRANSITION OVERLAY
--------------------------------------------------------------*/

    .inner-hero--gallery .inner-hero__overlay {
        z-index: 1;
        background: linear-gradient( 90deg, rgba(247, 239, 226, 1) 0%, rgba(247, 239, 226, .98) 31%, rgba(247, 239, 226, .72) 42%, rgba(247, 239, 226, .25) 51%, transparent 60% );
    }


    /*--------------------------------------------------------------
    LIVE HERO CONTENT
--------------------------------------------------------------*/

    .inner-hero--gallery .inner-hero__content {
        position: relative;
        z-index: 2;
    }
/*==============================================================
    INTRODUCTION
==============================================================*/

.gallery-intro {
    background: radial-gradient( circle at 100% 15%, rgba(214, 163, 61, .07), transparent 26% ), linear-gradient( 180deg, var(--color-ivory-light) 0%, var(--color-white) 100% );
}

    .gallery-intro .section-heading {
        margin-bottom: 0;
    }


/*==============================================================
    EXPLORE GALLERY
==============================================================*/

.gallery-explore {
    padding-top: 34px;
    padding-bottom: 38px;
    background: linear-gradient( 180deg, var(--color-white) 0%, var(--color-cream) 100% );
    border-top: 1px solid rgba(214, 163, 61, .13);
    border-bottom: 1px solid rgba(214, 163, 61, .18);
}

    .gallery-explore .section-heading {
        margin-bottom: 24px;
    }

.gallery-explore__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.gallery-explore__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    color: var(--color-brown);
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(214, 163, 61, .28);
    border-radius: 999px;
    font-size: .76rem;
    font-weight: var(--fw-semibold);
    letter-spacing: .035em;
    transition: transform var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

    .gallery-explore__link:hover {
        transform: translateY(-2px);
        color: var(--color-white);
        background: var(--color-brown);
        border-color: var(--color-brown);
    }


/*==============================================================
    GALLERY GROUP
==============================================================*/

.gallery-group {
    scroll-margin-top: calc(var(--header-height) + 20px);
    padding-top: 42px;
    padding-bottom: 46px;
}

.gallery-group__header {
    max-width: 820px;
    margin: 0 auto 24px;
    text-align: center;
}

.gallery-group__eyebrow {
    margin: 0 0 8px;
    color: var(--color-gold-dark);
    font-size: .72rem;
    font-weight: var(--fw-bold);
    letter-spacing: .18em;
    text-transform: uppercase;
}

.gallery-group__title {
    margin: 0 0 12px;
    color: var(--color-brown);
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 2.6vw, 2.35rem);
    font-weight: var(--fw-medium);
    line-height: 1.12;
    letter-spacing: .005em;
}

.gallery-group__description {
    max-width: 720px;
    margin: 0 auto;
    color: var(--color-text-light);
    font-size: .92rem;
    line-height: 1.7;
}


/*==============================================================
    GROUP VISUAL DIFFERENTIATION
==============================================================*/

#gallery-classes {
    background: linear-gradient( 180deg, var(--color-white) 0%, #fffaf3 100% );
}

.gallery-group--services {
    background: radial-gradient( circle at 100% 0%, rgba(214, 163, 61, .08), transparent 25% ), linear-gradient( 180deg, #f8f3e9 0%, #fffdf9 100% );
}

.gallery-group--sunshine {
    background: radial-gradient( circle at 10% 20%, rgba(190, 145, 58, .07), transparent 26% ), linear-gradient( 180deg, #fffaf1 0%, #f8f4eb 100% );
}

.gallery-group--celebrations {
    background: radial-gradient( circle at 90% 15%, rgba(128, 57, 38, .06), transparent 25% ), linear-gradient( 180deg, #fffdf9 0%, #f6efe3 100% );
}


/*==============================================================
    GALLERY CATEGORY
==============================================================*/


  

/*==============================================================
    FLEXIBLE MASONRY GALLERY
==============================================================*/

.gallery-grid {
    columns: 4;
    column-gap: 16px;
}

.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 16px;
    break-inside: avoid;
    overflow: hidden;
    background: var(--color-ivory);
    border: 1px solid rgba(214, 163, 61, .18);
    border-radius: var(--radius-medium);
    box-shadow: 0 4px 16px rgba(51, 39, 25, .055);
    cursor: zoom-in;
    transition: transform var(--transition-medium), border-color var(--transition-medium), box-shadow var(--transition-medium);
}

    .gallery-item::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient( 180deg, transparent 62%, rgba(2, 10, 22, .16) 100% );
        opacity: 0;
        transition: opacity var(--transition-medium);
        pointer-events: none;
    }

    .gallery-item:hover {
        transform: translateY(-3px);
        border-color: rgba(214, 163, 61, .42);
        box-shadow: 0 10px 26px rgba(51, 39, 25, .10);
    }

        .gallery-item:hover::after {
            opacity: 1;
        }

    .gallery-item img {
        display: block;
        width: 100%;
        height: auto;
        transition: transform var(--transition-slow);
    }

    .gallery-item:hover img {
        transform: scale(1.035);
    }


/*==============================================================
    OPTIONAL VISUAL ACCENT FOR FIRST IMAGE
==============================================================*/

/*
    The first photo naturally gets slightly more visual
    prominence without forcing a fixed grid layout.
*/

.gallery-category .gallery-item:first-child {
    border-color: rgba(214, 163, 61, .30);
}


/*==============================================================
    RESPONSIVE
==============================================================*/

@media (max-width: 1100px) {

    .gallery-grid {
        columns: 3;
    }
}


@media (max-width: 768px) {

    .gallery-explore {
        padding-top: 30px;
        padding-bottom: 32px;
    }

    .gallery-explore__nav {
        gap: 9px;
    }

    .gallery-explore__link {
        padding: 9px 15px;
        font-size: .72rem;
    }


    .gallery-group__header {
        margin-bottom: 28px;
    }

    .gallery-category {
        padding-top: 28px;
    }

        .gallery-category + .gallery-category {
            margin-top: 38px;
        }
    .gallery-grid {
        columns: 4;
        column-gap: 16px;
        margin-bottom: 18px;
    }

    .gallery-item {
        margin-bottom: 14px;
    }
}


@media (max-width: 520px) {

    .gallery-explore__nav {
        align-items: stretch;
        flex-direction: column;
    }

    .gallery-explore__link {
        width: 100%;
    }


    .gallery-group__header {
        text-align: left;
    }

    .gallery-group__description {
        margin: 0;
    }

    .gallery-category__header {
        padding-left: 16px;
    }

    .gallery-category__title {
        font-size: 1.75rem;
    }

    .gallery-grid {
        columns: 1;
    }

    .gallery-item {
        margin-bottom: 14px;
    }
}
/*==============================================================
    GALLERY SUBTOPICS
==============================================================*/

.gallery-subtopics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    margin: -2px 0 28px;
}

    .gallery-subtopics span {
        display: inline-flex;
        align-items: center;
        padding: 6px 11px;
        color: var(--color-brown);
        background: rgba(255, 255, 255, .68);
        border: 1px solid rgba(214, 163, 61, .22);
        border-radius: 999px;
        font-size: .68rem;
        font-weight: var(--fw-semibold);
        letter-spacing: .035em;
    }

@media (max-width: 520px) {

    .gallery-subtopics {
        justify-content: flex-start;
        margin-bottom: 22px;
    }
}
/*==============================================================
    GALLERY LIGHTBOX
==============================================================*/

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 28px 72px;
    background: rgba(2, 10, 22, .94);
    backdrop-filter: blur(4px);
}

    .gallery-lightbox.is-open {
        display: flex;
    }


/*==============================================================
    LIGHTBOX STAGE
==============================================================*/

.gallery-lightbox__stage {
    position: relative;
    display: flex;
    width: min(1100px, 88vw);
    height: min(760px, 84vh);
    align-items: center;
    justify-content: center;
}

.gallery-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-medium);
    box-shadow: 0 20px 70px rgba(0, 0, 0, .40);
}


/*==============================================================
    CLOSE BUTTON
==============================================================*/

.gallery-lightbox__close {
    position: absolute;
    top: 22px;
    right: 28px;
    z-index: 2;
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--color-white);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

    .gallery-lightbox__close:hover {
        transform: scale(1.05);
        background: rgba(214, 163, 61, .16);
        border-color: rgba(214, 163, 61, .55);
    }


/*==============================================================
    PREVIOUS / NEXT
==============================================================*/

.gallery-lightbox__nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: inline-flex;
    width: 48px;
    height: 56px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--color-white);
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius-medium);
    font-size: 2.2rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

    .gallery-lightbox__nav:hover {
        background: rgba(214, 163, 61, .14);
        border-color: rgba(214, 163, 61, .50);
    }

.gallery-lightbox__nav--prev {
    left: 22px;
}

.gallery-lightbox__nav--next {
    right: 22px;
}


/*==============================================================
    IMAGE COUNTER
==============================================================*/

.gallery-lightbox__counter {
    position: absolute;
    left: 50%;
    bottom: -32px;
    color: rgba(255, 255, 255, .72);
    font-size: .72rem;
    font-weight: var(--fw-medium);
    letter-spacing: .08em;
    transform: translateX(-50%);
}


/*==============================================================
    BODY LOCK WHILE LIGHTBOX IS OPEN
==============================================================*/

body.gallery-lightbox-open {
    overflow: hidden;
}


/*==============================================================
    RESPONSIVE LIGHTBOX
==============================================================*/

@media (max-width: 768px) {

    .gallery-lightbox {
        padding: 24px 54px;
    }

    .gallery-lightbox__stage {
        width: 100%;
        height: 78vh;
    }

    .gallery-lightbox__nav {
        width: 40px;
        height: 48px;
        font-size: 1.8rem;
    }

    .gallery-lightbox__nav--prev {
        left: 8px;
    }

    .gallery-lightbox__nav--next {
        right: 8px;
    }

    .gallery-lightbox__close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}


@media (max-width: 480px) {

    .gallery-lightbox {
        padding: 54px 14px 48px;
    }

    .gallery-lightbox__stage {
        height: 72vh;
    }

    .gallery-lightbox__nav {
        top: auto;
        bottom: 18px;
        width: 44px;
        height: 42px;
        transform: none;
    }

    .gallery-lightbox__nav--prev {
        left: calc(50% - 54px);
    }

    .gallery-lightbox__nav--next {
        right: calc(50% - 54px);
    }

    .gallery-lightbox__counter {
        bottom: -28px;
    }
}