/* ==========================================================
   SS LUXURY STUDIO
   GALLERY PAGE
   ========================================================== */

.gallery-page {
    background: #fffdfb;
    color: #4f4543;
}

/* HERO */

.gallery-intro {
    padding: 82px 25px 75px;
    text-align: center;
    border-bottom: 1px solid #eee3de;
    background: linear-gradient(135deg, #fbf4f1 0%, #fffaf7 55%, #f7ece8 100%);
}

.gallery-intro-inner {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

.gallery-eyebrow {
    display: block;
    margin-bottom: 13px;
    color: #ad8176;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3.3px;
}

.gallery-intro h1 {
    margin: 0;
    color: #55494a;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(40px, 5vw, 62px);
    font-weight: normal;
    line-height: 1.1;
}

.gallery-intro h1 em,
.gallery-story h2 em,
.gallery-cta h2 em {
    color: #b8867a;
    font-weight: normal;
}

.gallery-heading-line {
    display: block;
    width: 48px;
    height: 1px;
    margin: 22px auto 20px;
    background: #bd8f82;
}

.gallery-intro p {
    max-width: 670px;
    margin: 0 auto;
    color: #7a6d69;
    font-size: 14px;
    line-height: 1.8;
}

/* SHOWCASE */

.gallery-showcase {
    padding: 55px 35px 100px;
}

.gallery-container {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
}

.gallery-filter {
    margin: 0 auto 50px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 26px;
    border-bottom: 1px solid #eee5e1;
}

.gallery-filter-button {
    position: relative;
    padding: 13px 3px 15px;
    border: 0;
    background: transparent;
    color: #786a66;
    font-family: inherit;
    font-size: 10px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    cursor: pointer;
}

.gallery-filter-button::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 0;
    height: 2px;
    background: #b88c82;
    transform: translateX(-50%);
    transition: width .25s ease;
}

.gallery-filter-button:hover,
.gallery-filter-button.active {
    color: #9b6e64;
}

.gallery-filter-button.active::after {
    width: 100%;
}

/* MASONRY-STYLE GRID */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 225px;
    grid-auto-flow: dense;
    gap: 18px;
}

.gallery-card {
    min-width: 0;
    overflow: hidden;
    background: #f5eeea;
}

.gallery-card-tall {
    grid-row: span 2;
}

.gallery-card-wide {
    grid-column: span 2;
}

.gallery-image-button {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    overflow: hidden;
    background: transparent;
    cursor: zoom-in;
}

.gallery-image-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s ease;
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    text-align: left;
    color: #fff;
    background: linear-gradient(to top, rgba(55, 42, 39, .72) 0%, rgba(55, 42, 39, .10) 58%, transparent 78%);
    opacity: 0;
    transition: opacity .35s ease;
}

.gallery-card:hover .gallery-card-overlay,
.gallery-image-button:focus-visible .gallery-card-overlay {
    opacity: 1;
}

.gallery-card:hover img {
    transform: scale(1.035);
}

.gallery-card-label {
    margin-bottom: 7px;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 2.2px;
}

.gallery-card-overlay strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: normal;
    line-height: 1.2;
}

.gallery-view-text {
    margin-top: 10px;
    padding-bottom: 3px;
    border-bottom: 1px solid rgba(255,255,255,.75);
    font-size: 9px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.gallery-card[hidden] {
    display: none;
}

.gallery-empty {
    padding: 70px 20px;
    text-align: center;
}

.gallery-empty h2 {
    margin: 0 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    font-weight: normal;
}

.gallery-empty p {
    color: #81736f;
    font-size: 13px;
}

/* BRAND STORY */

.gallery-story {
    padding: 90px 25px;
    text-align: center;
    background: #faf3f0;
    border-top: 1px solid #eee0db;
    border-bottom: 1px solid #eee0db;
}

.gallery-story-inner {
    max-width: 750px;
    margin: 0 auto;
}

.gallery-story-eyebrow,
.gallery-cta span {
    display: block;
    margin-bottom: 15px;
    color: #ad7d72;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 3px;
}

.gallery-story h2,
.gallery-cta h2 {
    margin: 0;
    color: #554744;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 4vw, 48px);
    font-weight: normal;
    line-height: 1.15;
}

.gallery-story p,
.gallery-cta p {
    max-width: 650px;
    margin: 22px auto 0;
    color: #796b67;
    font-size: 13px;
    line-height: 1.85;
}

/* CTA */

.gallery-cta {
    padding: 90px 25px 105px;
    text-align: center;
}

.gallery-cta-inner {
    max-width: 760px;
    margin: 0 auto;
}

.gallery-cta .btn {
    margin-top: 30px;
}

/* LIGHTBOX */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    padding: 45px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(43, 34, 32, .94);
}

.gallery-lightbox.open {
    display: flex;
}

.gallery-lightbox-inner {
    max-width: min(1050px, 90vw);
    max-height: 88vh;
    text-align: center;
}

.gallery-lightbox img {
    width: auto;
    max-width: 100%;
    max-height: 78vh;
    margin: 0 auto;
    object-fit: contain;
}

.gallery-lightbox-caption {
    padding-top: 15px;
    color: #fff;
}

.gallery-lightbox-caption span {
    display: block;
    margin-bottom: 5px;
    font-size: 8px;
    letter-spacing: 2.2px;
    text-transform: uppercase;
    opacity: .75;
}

.gallery-lightbox-caption strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    font-weight: normal;
}

.gallery-lightbox-close {
    position: absolute;
    top: 22px;
    right: 30px;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 34px;
    font-weight: 200;
    cursor: pointer;
}

/* RESPONSIVE */

@media (max-width: 1050px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .gallery-intro {
        padding: 62px 22px 58px;
    }

    .gallery-showcase {
        padding: 38px 18px 75px;
    }

    .gallery-filter {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-bottom: 32px;
        scrollbar-width: none;
    }

    .gallery-filter::-webkit-scrollbar {
        display: none;
    }

    .gallery-filter-button {
        flex: 0 0 auto;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 210px;
        gap: 10px;
    }

    .gallery-card-wide {
        grid-column: span 2;
    }

    .gallery-card-overlay {
        padding: 15px;
        opacity: 1;
        background: linear-gradient(to top, rgba(55,42,39,.65), transparent 65%);
    }

    .gallery-card-overlay strong {
        font-size: 17px;
    }

    .gallery-view-text {
        display: none;
    }

    .gallery-story,
    .gallery-cta {
        padding: 70px 22px;
    }

    .gallery-lightbox {
        padding: 25px 15px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 330px;
    }

    .gallery-card-tall,
    .gallery-card-wide {
        grid-row: auto;
        grid-column: auto;
    }
}
