/* ============================================================
   Public Gallery (/gallery)
   Colours follow the brand colour: the page sets --gl-primary / --gl-soft / --gl-deep inline (BrandIdentity);
   the values below are only the template-pink fallbacks.
   ============================================================ */
.gl-page {
    --gl-primary: #ff67b0;
    --gl-soft: #ffeaf4;
    --gl-deep: #a8366f;
    --gl-ink: #25101b;
    --gl-muted: #6b7280;
    --gl-line: #f3d3e4;
    --gl-plum: #2a1020;
    --gl-plum-2: #16101a;
    font-family: 'DM Sans', 'Inter', system-ui, sans-serif;
    color: var(--gl-ink);
    background: #fff;
    overflow-x: clip;
}

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

.gl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Buttons ---------- */
.gl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 50px;
    padding: 0 26px;
    background: var(--gl-primary);
    border: 2px solid var(--gl-primary);
    border-radius: 14px;
    font: inherit;
    font-weight: 800;
    color: var(--gl-ink);
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}

.gl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(255, 103, 176, .28);
    color: var(--gl-ink);
}

.gl-btn:focus-visible,
.gl-chip:focus-visible,
.gl-photo:focus-visible,
.gl-expand:focus-visible,
.gl-lb-btn:focus-visible {
    outline: 3px solid var(--gl-deep);
    outline-offset: 2px;
}

.gl-btn-ghost {
    background: #fff;
    border-color: var(--gl-line);
}

.gl-btn-ghost:hover {
    border-color: var(--gl-primary);
    box-shadow: none;
}

.gl-btn-light {
    background: #fff;
    border-color: #fff;
}

.gl-btn-light:hover {
    background: var(--gl-primary);
    border-color: var(--gl-primary);
}

.gl-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.gl-actions-center {
    justify-content: center;
}

/* ---------- Hero ---------- */
.gl-hero {
    background: linear-gradient(180deg, var(--gl-soft) 0%, #fff 100%);
    padding: clamp(104px, 11vw, 132px) 0 clamp(32px, 5vw, 56px);
}

.gl-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.gl-hero-grid.is-solo {
    grid-template-columns: minmax(0, 720px);
}

.gl-breadcrumbs {
    margin-bottom: 20px;
    font-size: .85rem;
    color: var(--gl-muted);
}

.gl-breadcrumbs a {
    color: var(--gl-muted);
    text-decoration: none;
}

.gl-breadcrumbs a:hover {
    color: var(--gl-primary);
}

.gl-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 7px 14px;
    background: #fff;
    border: 1.5px solid var(--gl-line);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
    color: var(--gl-deep);
}

.gl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gl-primary);
    box-shadow: 0 0 0 4px rgba(255, 103, 176, .2);
}

.gl-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2.1rem, 4.8vw, 3.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.03em;
    overflow-wrap: anywhere;
}

.gl-accent {
    color: var(--gl-deep);
}

.gl-lead {
    max-width: 560px;
    margin: 0 0 24px;
    font-size: 1.08rem;
    line-height: 1.6;
    color: var(--gl-muted);
}

.gl-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
}

.gl-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 110px;
    padding: 12px 18px;
    background: #fff;
    border: 1.5px solid var(--gl-line);
    border-radius: 16px;
}

.gl-stat strong {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--gl-deep);
}

.gl-stat span {
    font-size: .8rem;
    font-weight: 600;
    color: var(--gl-muted);
}

/* Showcase card on the right of the hero */
.gl-hero-visual {
    display: flex;
    justify-content: center;
}

.gl-showcase {
    width: 100%;
    max-width: 440px;
    padding: 12px 12px 16px;
    background: #fff;
    border: 1.5px solid var(--gl-line);
    border-radius: 28px;
    box-shadow: 0 26px 60px rgba(168, 54, 111, .16);
    transform: rotate(1.2deg);
}

.gl-showcase-media {
    aspect-ratio: 4 / 5;
    border-radius: 20px;
}

.gl-showcase-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gl-showcase-cap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 8px 0;
}

.gl-showcase-cap strong {
    font-size: 1rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.gl-showcase-cap span {
    font-size: .88rem;
    color: var(--gl-muted);
    overflow-wrap: anywhere;
}

/* ---------- Filter bar (shown once the script runs) ---------- */
.gl-filterbar {
    display: none;
    position: sticky;
    top: 60px;
    z-index: 40;
    padding: 12px 0;
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--gl-line);
    border-bottom: 1px solid var(--gl-line);
}

.gl-js .gl-filterbar {
    display: block;
}

.gl-chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 2px 2px 4px;
    scrollbar-width: none;
}

.gl-chips::-webkit-scrollbar {
    display: none;
}

.gl-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: #fff;
    border: 1.5px solid var(--gl-line);
    border-radius: 999px;
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
    color: var(--gl-ink);
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, border-color .2s;
}

.gl-chip span {
    padding: 1px 8px;
    background: var(--gl-soft);
    border-radius: 999px;
    font-size: .75rem;
    color: var(--gl-deep);
}

.gl-chip:hover {
    border-color: var(--gl-primary);
}

.gl-chip.is-active {
    background: var(--gl-primary);
    border-color: var(--gl-primary);
}

.gl-chip.is-active span {
    background: rgba(255, 255, 255, .6);
    color: var(--gl-ink);
}

/* ---------- Grid ---------- */
.gl-section {
    padding: clamp(32px, 5vw, 56px) 0;
}

.gl-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.gl-card {
    margin: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1.5px solid var(--gl-line);
    border-radius: 22px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

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

.gl-card:hover {
    transform: translateY(-4px);
    border-color: var(--gl-primary);
    box-shadow: 0 18px 38px rgba(168, 54, 111, .14);
}

.gl-media {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--gl-soft);
}

.gl-photo {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.gl-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s;
}

.gl-card:hover .gl-photo img {
    transform: scale(1.05);
}

.gl-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .92);
    border-radius: 50%;
    color: var(--gl-deep);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .25s, transform .25s;
}

.gl-card:hover .gl-zoom,
.gl-photo:focus-visible .gl-zoom {
    opacity: 1;
    transform: none;
}

.gl-cap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 14px 16px 16px;
}

.gl-cap strong {
    font-size: .98rem;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.gl-cap-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .86rem;
    line-height: 1.5;
    color: var(--gl-muted);
    overflow-wrap: anywhere;
}

.gl-cat {
    display: inline-block;
    padding: 3px 11px;
    background: var(--gl-soft);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--gl-deep);
}

/* ---------- Before / after slider ---------- */
.gl-ba {
    --gl-pos: 50%;
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: var(--gl-soft);
    user-select: none;
    -webkit-user-select: none;
}

.gl-ba img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.gl-ba-before {
    position: absolute;
    inset: 0;
    clip-path: inset(0 calc(100% - var(--gl-pos)) 0 0);
}

.gl-ba-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--gl-pos);
    width: 3px;
    margin-left: -1.5px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, .28);
    pointer-events: none;
}

.gl-ba-knob {
    position: absolute;
    top: 50%;
    left: var(--gl-pos);
    width: 42px;
    height: 42px;
    margin: -21px 0 0 -21px;
    display: grid;
    place-items: center;
    background: var(--gl-primary);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
    color: var(--gl-ink);
    font-size: 1rem;
    pointer-events: none;
}

.gl-pill {
    position: absolute;
    top: 12px;
    padding: 4px 11px;
    background: rgba(37, 16, 27, .72);
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #fff;
    pointer-events: none;
}

.gl-pill-before {
    left: 12px;
}

.gl-pill-after {
    right: 12px;
}

.gl-ba-range {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    touch-action: pan-y;
    -webkit-appearance: none;
    appearance: none;
}

.gl-ba:focus-within {
    outline: 3px solid var(--gl-deep);
    outline-offset: -3px;
}

.gl-expand {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 4;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0;
    background: rgba(255, 255, 255, .94);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    color: var(--gl-deep);
    cursor: pointer;
    transition: transform .2s, background .2s;
}

.gl-expand:hover {
    background: var(--gl-primary);
    color: var(--gl-ink);
    transform: scale(1.08);
}

/* ---------- Footer of the grid ---------- */
.gl-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.gl-foot[hidden],
.gl-foot > [hidden] {
    display: none;
}

.gl-count {
    margin: 0;
    font-size: .9rem;
    font-weight: 600;
    color: var(--gl-muted);
}

.gl-count:empty {
    display: none;
}

.gl-disclaimer {
    margin: 22px auto 0;
    max-width: 640px;
    font-size: .82rem;
    line-height: 1.55;
    text-align: center;
    color: var(--gl-muted);
}

/* ---------- Empty state ---------- */
.gl-empty {
    max-width: 560px;
    margin: 0 auto;
    padding: 48px 28px;
    text-align: center;
    background: var(--gl-soft);
    border: 1.5px dashed var(--gl-primary);
    border-radius: 26px;
}

.gl-empty i {
    display: block;
    margin-bottom: 14px;
    font-size: 2.4rem;
    color: var(--gl-primary);
}

.gl-empty h2 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 800;
}

.gl-empty p {
    margin: 0 0 22px;
    line-height: 1.6;
    color: var(--gl-muted);
}

/* ---------- Closing banner ---------- */
.gl-banner {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: clamp(28px, 5vw, 48px);
    color: #fff;
    background: linear-gradient(135deg, var(--gl-plum) 0%, var(--gl-plum-2) 100%);
    border-radius: 28px;
}

.gl-banner::before {
    content: "";
    position: absolute;
    top: -90px;
    right: -60px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255, 103, 176, .45), transparent 70%);
    pointer-events: none;
}

.gl-banner > * {
    position: relative;
}

.gl-banner h2 {
    margin: 0 0 6px;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    font-weight: 800;
    letter-spacing: -.02em;
}

.gl-banner p {
    margin: 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, .72);
}

/* ---------- Photo viewer ---------- */
.gl-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'DM Sans', 'Inter', system-ui, sans-serif;
}

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

.gl-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 10, 18, .88);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.gl-lb-dialog {
    position: relative;
    width: min(94vw, 980px);
    max-height: 96vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.gl-lb-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
}

.gl-lb-img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 170px);
    object-fit: contain;
    border-radius: 18px;
    background: #fff;
}

.gl-ba-large {
    position: relative;
    inset: auto;
    height: calc(100vh - 170px);
    max-height: 760px;
    aspect-ratio: 4 / 5;
    max-width: 100%;
    border-radius: 18px;
}

.gl-lb-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 640px;
    text-align: center;
    color: #fff;
}

.gl-lb-info strong {
    font-size: 1.1rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.gl-lb-info p {
    margin: 0;
    font-size: .92rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .8);
    overflow-wrap: anywhere;
}

.gl-lb-count {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .6);
}

.gl-lb-btn {
    position: absolute;
    z-index: 5;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    background: rgba(255, 255, 255, .94);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
    color: var(--gl-ink, #25101b);
    font-size: 1.1rem;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.gl-lb-btn[hidden] {
    display: none;
}

.gl-lb-close {
    font-size: 1.7rem;
}

.gl-lb-btn:hover {
    background: var(--gl-primary, #ff67b0);
    transform: scale(1.06);
}

.gl-lb-close {
    top: 0;
    right: 0;
    transform: translate(40%, -40%);
}

.gl-lb-close:hover {
    transform: translate(40%, -40%) scale(1.06);
}

.gl-lb-nav {
    top: calc(50% - 85px);
    margin-top: -23px;
}

.gl-lb-prev {
    left: -23px;
}

.gl-lb-next {
    right: -23px;
}

@media (prefers-reduced-motion: reduce) {
    .gl-card,
    .gl-btn,
    .gl-photo img,
    .gl-zoom,
    .gl-expand,
    .gl-lb-btn {
        transition: none;
    }
}

/* ---------- Laptop / tablet landscape ---------- */
@media (max-width: 1199.98px) {
    .gl-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ---------- Tablet ---------- */
@media (max-width: 991.98px) {
    .gl-hero-grid {
        grid-template-columns: 1fr;
    }

    .gl-showcase {
        max-width: 400px;
        transform: none;
    }

    .gl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .gl-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------- Phone ---------- */
@media (max-width: 575.98px) {
    .gl-container {
        padding: 0 16px;
    }

    .gl-stats {
        gap: 8px;
    }

    .gl-stat {
        flex: 1 1 0;
        min-width: 0;
        padding: 10px 12px;
        border-radius: 14px;
    }

    .gl-stat strong {
        font-size: 1.35rem;
    }

    .gl-stat span {
        font-size: .72rem;
        line-height: 1.25;
    }

    .gl-actions .gl-btn {
        flex: 1 1 100%;
    }

    .gl-grid {
        gap: 12px;
    }

    .gl-card {
        border-radius: 16px;
    }

    .gl-cap {
        padding: 10px 12px 12px;
        gap: 4px;
    }

    .gl-cap strong {
        font-size: .88rem;
    }

    .gl-cap-text {
        display: none;
    }

    .gl-pill {
        top: 8px;
        padding: 3px 8px;
        font-size: .6rem;
    }

    .gl-pill-before {
        left: 8px;
    }

    .gl-pill-after {
        right: 8px;
    }

    .gl-ba-knob {
        width: 34px;
        height: 34px;
        margin: -17px 0 0 -17px;
        font-size: .85rem;
    }

    .gl-expand,
    .gl-zoom {
        width: 32px;
        height: 32px;
        right: 8px;
        bottom: 8px;
    }

    .gl-zoom {
        display: none;
    }

    .gl-lb-dialog {
        width: 100vw;
        max-height: 100vh;
        padding: 56px 12px 14px;
    }

    .gl-lb-close {
        top: 8px;
        right: 12px;
        transform: none;
    }

    .gl-lb-close:hover {
        transform: scale(1.06);
    }

    .gl-lb-nav {
        top: auto;
        bottom: 14px;
        margin-top: 0;
    }

    .gl-lb-prev {
        left: 12px;
    }

    .gl-lb-next {
        right: 12px;
    }

    .gl-lb-info {
        padding: 0 54px;
        min-height: 64px;
    }

    .gl-lb-img,
    .gl-ba-large {
        max-height: calc(100vh - 230px);
    }

    .gl-ba-large {
        height: calc(100vh - 230px);
    }
}
