body.mini-gallery-page {
    margin: 0;
    color: var(--text);
    background: #fff;
    font-family: var(--sans);
    overflow-x: hidden;
}

body.mini-gallery-page a {
    color: inherit;
    text-decoration: none;
}

.gallery-page {
    position: relative;
    overflow: hidden;
    padding: 14px 0 0;
    background: #fff;
}

.gallery-hero {
    width: min(980px, calc(100% - 48px));
    margin: 0 auto;
    padding: 0 0 34px;
    text-align: center;
}

.gallery-kicker {
    margin: 0 0 12px;
    color: #b76e79;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.gallery-hero h1 {
    margin: 0;
    color: #651347;
    font-family: var(--serif);
    font-size: clamp(56px, 6vw, 78px);
    line-height: 0.95;
}

.gallery-hero > p:not(.gallery-kicker) {
    max-width: 760px;
    margin: 18px auto 0;
    color: #342431;
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 800;
    line-height: 1.55;
}

.gallery-showcase {
    position: relative;
    z-index: 2;
    width: min(1080px, calc(100% - 56px));
    margin: 0 auto;
}

.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 12px auto 38px;
}

.gallery-filters button {
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid rgba(247, 37, 104, 0.12);
    border-radius: 999px;
    color: #651347;
    background: #fff5f7;
    box-shadow: 0 8px 18px rgba(116, 37, 70, 0.04);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, color 180ms ease, background 180ms ease;
}

.gallery-filters button:hover,
.gallery-filters button.is-active {
    color: #fff;
    background: linear-gradient(135deg, #ff5fa2, #ff8a5b);
    box-shadow: 0 12px 24px rgba(247, 37, 104, 0.16);
    transform: translateY(-2px);
}

.gallery-grid {
    display: grid;
    grid-auto-flow: dense;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 164px;
    gap: 22px;
}

.gallery-card {
    position: relative;
    display: flex;
    min-height: 0;
    padding: 0;
    border: 1px solid rgba(243, 223, 224, 0.82);
    border-radius: 28px;
    background: #fff7f4;
    box-shadow: 0 18px 42px rgba(116, 37, 70, 0.08);
    overflow: hidden;
    cursor: pointer;
    transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease, opacity 220ms ease;
    justify-content: center;
    align-items: center;
}

.gallery-card.is-hidden {
    display: none;
}

.gallery-card--large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-card--tall {
    grid-row: span 2;
}

.gallery-card--wide {
    grid-column: span 2;
}

.gallery-card img {
    display: block;
    width: 100%;
    transition: transform 520ms ease;
}

.gallery-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(74, 22, 63, 0.46), rgba(247, 37, 104, 0.1) 48%, transparent 72%);
    opacity: 0;
    transition: opacity 260ms ease;
}

.gallery-card span {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 18px;
    z-index: 2;
    color: #fffdf7;
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 260ms ease, transform 260ms ease;
    text-shadow: 0 2px 12px rgba(74, 22, 63, 0.28);
}

.gallery-card:hover,
.gallery-card:focus-visible {
    border-color: rgba(247, 37, 104, 0.24);
    box-shadow: 0 24px 56px rgba(116, 37, 70, 0.13);
    transform: translateY(-5px);
}

.gallery-card:hover img,
.gallery-card:focus-visible img {
    transform: scale(1.055);
}

@media (min-width: 1500px) {
    .gallery-showcase {
        width: min(1240px, calc(100% - 96px));
    }

    .gallery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        grid-auto-rows: 154px;
        gap: 20px;
    }
}

.gallery-card:hover::after,
.gallery-card:focus-visible::after,
.gallery-card:hover span,
.gallery-card:focus-visible span {
    opacity: 1;
    transform: translateY(0);
}

.gallery-quote {
    position: relative;
    z-index: 2;
    width: min(920px, calc(100% - 56px));
    margin: 58px auto 52px;
    padding: 34px 46px 38px;
    border: 1px solid rgba(247, 37, 104, 0.1);
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 244, 239, 0.92), rgba(255, 252, 250, 0.96));
    box-shadow: 0 18px 42px rgba(116, 37, 70, 0.06);
    text-align: center;
}

.gallery-quote span {
    display: inline-grid;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #ff5fa2, #ff8a5b);
    box-shadow: 0 12px 26px rgba(247, 37, 104, 0.14);
}

.gallery-quote p {
    margin: 0;
    color: #651347;
    font-family: var(--serif);
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 700;
    line-height: 1.22;
}

.gallery-cta {
    margin-top: 34px;
}

.gallery-cta .faq-cta__text h2 {
    max-width: 640px;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 70px;
    align-items: center;
    gap: 18px;
    padding: 34px;
    background: rgba(40, 15, 35, 0.78);
    backdrop-filter: blur(10px);
}

.gallery-lightbox[hidden] {
    display: none;
}

.gallery-lightbox figure {
    display: grid;
    justify-items: center;
    gap: 16px;
    margin: 0;
}

.gallery-lightbox img {
    display: block;
    max-width: min(980px, 100%);
    max-height: calc(100vh - 130px);
    border: 3px solid rgba(255, 255, 255, 0.78);
    border-radius: 28px;
    object-fit: contain;
    box-shadow: 0 28px 80px rgba(16, 5, 12, 0.36);
}

.gallery-lightbox figcaption {
    color: #fff7ef;
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 700;
    text-align: center;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 32px rgba(20, 7, 16, 0.18);
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover {
    background: rgba(247, 37, 104, 0.72);
    transform: translateY(-2px);
}

.gallery-lightbox__close {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 46px;
    height: 46px;
    font-size: 32px;
    line-height: 1;
}

.gallery-lightbox__nav {
    width: 58px;
    height: 58px;
}

.gallery-lightbox__nav svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 980px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 170px;
    }

    .gallery-card--wide {
        grid-column: span 2;
    }
}

@media (max-width: 720px) {
    .gallery-hero {
        width: min(100% - 36px, 620px);
        padding: 0 0 28px;
    }

    .gallery-showcase,
    .gallery-quote {
        width: min(100% - 36px, 620px);
    }

    .gallery-filters {
        justify-content: flex-start;
        margin-bottom: 28px;
        overflow-x: auto;
        padding-bottom: 8px;
        flex-wrap: nowrap;
    }

    .gallery-filters button {
        flex: 0 0 auto;
        font-size: 14px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
        gap: 18px;
    }

    .gallery-card,
    .gallery-card--large,
    .gallery-card--tall,
    .gallery-card--wide {
        grid-column: auto;
        grid-row: auto;
    }

    .gallery-card span {
        opacity: 1;
        transform: none;
    }

    .gallery-card::after {
        opacity: 1;
    }

    .gallery-quote {
        margin: 42px auto 36px;
        padding: 28px 24px 32px;
    }

    .gallery-lightbox {
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: 8px;
        padding: 18px;
    }

    .gallery-lightbox img {
        max-height: calc(100vh - 150px);
        border-radius: 20px;
    }

    .gallery-lightbox__nav {
        width: 42px;
        height: 42px;
    }

    .gallery-lightbox__close {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
    }
}
