.bip-gallery-page {
    --bip-ink: #28302d;
    --bip-muted: #68706c;
    --bip-accent: #9b624c;
    --bip-accent-dark: #744635;
    --bip-cream: #f4f2eb;
    --bip-line: #e3e0d7;
    --bip-white: #ffffff;
    --bip-soft: #faf9f6;
    color: var(--bip-ink);
    background: var(--bip-white);
    font-family: inherit;
    line-height: 1.65;
}

.bip-gallery-page *,
.bip-gallery-page *::before,
.bip-gallery-page *::after {
    box-sizing: border-box;
}

.bip-gallery-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.bip-gallery-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(76px, 10vw, 132px) 0 clamp(68px, 8vw, 108px);
    background:
        radial-gradient(circle at 88% 15%, rgba(155, 98, 76, 0.13), transparent 26%),
        linear-gradient(135deg, #f7f4ed 0%, #f1eee5 100%);
    border-bottom: 1px solid var(--bip-line);
}

.bip-gallery-hero::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -120px;
    bottom: -150px;
    border: 1px solid rgba(116, 70, 53, 0.2);
    border-radius: 50%;
}

.bip-gallery-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 930px;
}

.bip-gallery-kicker,
.bip-gallery-meta {
    margin: 0 0 12px;
    color: var(--bip-accent-dark);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.bip-gallery-hero h1 {
    max-width: 850px;
    margin: 0;
    color: var(--bip-ink);
    font-size: clamp(2.45rem, 6vw, 5.2rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.bip-gallery-hero-copy {
    max-width: 760px;
    margin: 24px 0 0;
    color: #4d5652;
    font-size: clamp(1.06rem, 2vw, 1.28rem);
    line-height: 1.75;
}

.bip-gallery-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.bip-gallery-hero-pills span {
    padding: 9px 15px;
    border: 1px solid rgba(40, 48, 45, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    color: var(--bip-ink);
    font-size: 0.92rem;
    font-weight: 600;
}

.bip-gallery-section {
    padding: clamp(58px, 8vw, 100px) 0;
}

.bip-gallery-intro {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 36px 72px;
    align-items: end;
    margin-bottom: 40px;
}

.bip-gallery-intro h2,
.bip-gallery-cta h2,
.bip-gallery-empty h2 {
    margin: 0;
    color: var(--bip-ink);
    font-size: clamp(1.9rem, 4vw, 3.15rem);
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.bip-gallery-intro > p {
    margin: 0;
    color: var(--bip-muted);
    font-size: 1.02rem;
}

.bip-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 34px;
    padding-top: 28px;
    border-top: 1px solid var(--bip-line);
}

.bip-gallery-filter {
    appearance: none;
    border: 1px solid var(--bip-line);
    border-radius: 999px;
    padding: 9px 16px;
    background: var(--bip-white);
    color: var(--bip-ink);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.bip-gallery-filter:hover,
.bip-gallery-filter:focus-visible {
    border-color: var(--bip-accent);
    outline: none;
    transform: translateY(-1px);
}

.bip-gallery-filter.is-active {
    background: var(--bip-ink);
    border-color: var(--bip-ink);
    color: var(--bip-white);
}

.bip-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px;
}

.bip-gallery-card {
    overflow: hidden;
    border: 1px solid var(--bip-line);
    border-radius: 20px;
    background: var(--bip-white);
    box-shadow: 0 12px 32px rgba(40, 48, 45, 0.06);
}

.bip-gallery-card[hidden] {
    display: none !important;
}

.bip-gallery-card-images {
    display: grid;
    gap: 3px;
    min-height: 300px;
    background: var(--bip-cream);
}

.bip-gallery-card-images.has-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bip-gallery-card-images.has-one {
    grid-template-columns: 1fr;
}

.bip-gallery-image-button {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 300px;
    padding: 0;
    overflow: hidden;
    border: 0;
    background: var(--bip-cream);
    cursor: zoom-in;
}

.bip-gallery-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
    transition: transform .35s ease;
}

.bip-gallery-image-button:hover .bip-gallery-image,
.bip-gallery-image-button:focus-visible .bip-gallery-image {
    transform: scale(1.025);
}

.bip-gallery-image-button:focus-visible {
    outline: 3px solid rgba(155, 98, 76, 0.45);
    outline-offset: -3px;
}

.bip-gallery-zoom {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--bip-ink);
    font-size: 1.4rem;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

.bip-gallery-card-body {
    padding: 26px 28px 30px;
}

.bip-gallery-card-body h2 {
    margin: 0;
    color: var(--bip-ink);
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    line-height: 1.18;
    letter-spacing: -0.02em;
}

.bip-gallery-book {
    margin: 8px 0 0;
    color: var(--bip-accent-dark);
    font-weight: 600;
}

.bip-gallery-note {
    margin: 15px 0 0;
    color: var(--bip-muted);
}

.bip-gallery-card-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 19px;
    color: var(--bip-accent-dark) !important;
    font-weight: 700;
    text-decoration: none !important;
}

.bip-gallery-card-link:hover,
.bip-gallery-card-link:focus-visible {
    text-decoration: underline !important;
    text-underline-offset: 4px;
}

.bip-gallery-empty {
    padding: 48px;
    border: 1px dashed #c8c4b9;
    border-radius: 18px;
    background: var(--bip-soft);
    text-align: center;
}

.bip-gallery-empty p {
    margin: 14px auto 0;
    max-width: 650px;
    color: var(--bip-muted);
}

.bip-gallery-cta-section {
    padding: 0 0 clamp(64px, 9vw, 110px);
}

.bip-gallery-cta {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(270px, .85fr);
    gap: 36px 60px;
    align-items: center;
    padding: clamp(34px, 5vw, 58px);
    border-radius: 24px;
    background: var(--bip-ink);
    color: var(--bip-white);
}

.bip-gallery-cta h2 {
    color: var(--bip-white);
}

.bip-gallery-cta .bip-gallery-kicker {
    color: #d8b7a9;
}

.bip-gallery-cta p:not(.bip-gallery-kicker) {
    margin: 16px 0 0;
    max-width: 700px;
    color: rgba(255,255,255,.78);
}

.bip-gallery-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.bip-gallery-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 19px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.bip-gallery-button:hover,
.bip-gallery-button:focus-visible {
    transform: translateY(-1px);
}

.bip-gallery-button-primary {
    background: var(--bip-accent);
    color: var(--bip-white) !important;
}

.bip-gallery-button-primary:hover,
.bip-gallery-button-primary:focus-visible {
    background: #ad7058;
}

.bip-gallery-button-secondary {
    border-color: rgba(255,255,255,.34);
    background: transparent;
    color: var(--bip-white) !important;
}

.bip-gallery-button-secondary:hover,
.bip-gallery-button-secondary:focus-visible {
    border-color: rgba(255,255,255,.7);
    background: rgba(255,255,255,.06);
}

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

.bip-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: grid;
    place-items: center;
    padding: 28px;
}

.bip-gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 23, 21, .92);
}

.bip-gallery-lightbox-dialog {
    position: relative;
    z-index: 1;
    max-width: min(1200px, 94vw);
    max-height: 90vh;
}

.bip-gallery-lightbox-dialog img {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 20px 70px rgba(0,0,0,.34);
}

.bip-gallery-lightbox-close {
    position: fixed;
    z-index: 2;
    top: 18px;
    right: 20px;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

body.bip-gallery-lightbox-open {
    overflow: hidden;
}

@media (max-width: 900px) {
    .bip-gallery-intro,
    .bip-gallery-cta {
        grid-template-columns: 1fr;
    }

    .bip-gallery-cta-actions {
        justify-content: flex-start;
    }

    .bip-gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .bip-gallery-container {
        width: min(100% - 28px, 1180px);
    }

    .bip-gallery-hero {
        padding-top: 62px;
    }

    .bip-gallery-hero h1 {
        font-size: clamp(2.25rem, 12vw, 3.6rem);
    }

    .bip-gallery-section {
        padding-top: 52px;
    }

    .bip-gallery-intro {
        gap: 20px;
        margin-bottom: 30px;
    }

    .bip-gallery-card {
        border-radius: 16px;
    }

    .bip-gallery-card-images.has-two {
        grid-template-columns: 1fr 1fr;
    }

    .bip-gallery-card-images,
    .bip-gallery-image-button,
    .bip-gallery-image {
        min-height: 220px;
    }

    .bip-gallery-card-body {
        padding: 22px;
    }

    .bip-gallery-cta {
        padding: 30px 24px;
        border-radius: 18px;
    }

    .bip-gallery-cta-actions,
    .bip-gallery-button {
        width: 100%;
    }

    .bip-gallery-lightbox {
        padding: 14px;
    }
}
