﻿

/* GALLERY

    */
:root {
    --bg: rgba(255,255,255,.70);
    --card: #fff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: rgba(226,232,240,.95);
    --pill: #ffffff;
    --pillActive: #0b1b46;
    --pillActiveInk: #ffffff;
    --shadow: 0 18px 60px rgba(15, 23, 42, .15);
    --shadowSoft: 0 12px 34px rgba(15, 23, 42, .10);
    --radiusXL: 22px;
    --radiusLG: 16px;
}

.gallery-wrap {
    max-width: 1100px;
    margin: 26px auto 70px;
    padding: 0 18px;
}

.gallery-panel {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radiusXL);
    padding: 26px 18px 18px;
    box-shadow: 0 18px 80px rgba(15, 23, 42, .08);
    backdrop-filter: blur(10px);
}

.gallery-kicker {
    text-align: center;
    letter-spacing: .18em;
    font-weight: 800;
    font-size: 12px;
    color: #8a93a6;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.gallery-title {
    text-align: center;
    font-weight: 800;
    font-size: clamp(24px, 3.2vw, 42px);
    margin: 0;
    color: var(--ink);
}

.gallery-subtitle {
    text-align: center;
    max-width: 620px;
    margin: 10px auto 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

/* Topic pills */
.gallery-topics {
    margin: 18px auto 14px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.gpill {
    border: 1px solid var(--line);
    background: var(--pill);
    color: #1f2a44;
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
    transition: transform .08s ease, box-shadow .18s ease, background .18s ease;
    user-select: none;
}

    .gpill:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 26px rgba(15, 23, 42, .10);
    }

    .gpill.is-active {
        background: var(--pillActive);
        color: var(--pillActiveInk);
        border-color: rgba(11,27,70,.18);
    }

/* Carousel stage */
.gallery-stage {
    position: relative;
    height: 380px;
    margin: 14px auto 10px;
    max-width: 900px;
    display: grid;
    place-items: center;
}

.gcard {
    position: absolute;
    width: min(680px, 88vw);
    height: 330px;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.55);
    background: #dbe3ef;
    transform-origin: center;
    transition: transform 320ms cubic-bezier(.2,.8,.2,1), opacity 220ms ease;
}

    .gcard img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        filter: saturate(1.04) contrast(1.04);
    }

.gmeta {
    position: absolute;
    inset: auto 14px 14px 14px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 10px;
    pointer-events: none;
}

.gchip {
    background: rgba(15,23,42,.55);
    color: #fff;
    border-radius: 999px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 750;
    backdrop-filter: blur(7px);
    text-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* Stack positions */
.pos-0 {
    transform: translateX(0) translateY(0) scale(1);
    opacity: 1;
    z-index: 5;
}

.pos-1 {
    transform: translateX(-250px) translateY(22px) scale(.88);
    opacity: .92;
    z-index: 4;
}

.pos-2 {
    transform: translateX(250px) translateY(22px) scale(.88);
    opacity: .92;
    z-index: 3;
}

.pos-3 {
    transform: translateX(-430px) translateY(36px) scale(.78);
    opacity: .65;
    z-index: 2;
}

.pos-4 {
    transform: translateX(430px) translateY(36px) scale(.78);
    opacity: .65;
    z-index: 1;
}

@media (max-width: 860px) {
    .pos-1 {
        transform: translateX(-180px) translateY(22px) scale(.90);
        opacity: .85;
    }

    .pos-2 {
        transform: translateX(180px) translateY(22px) scale(.90);
        opacity: .85;
    }

    .pos-3 {
        transform: translateX(-300px) translateY(36px) scale(.78);
        opacity: .50;
    }

    .pos-4 {
        transform: translateX(300px) translateY(36px) scale(.78);
        opacity: .50;
    }
}

@media (max-width: 560px) {
    .gallery-stage {
        height: 340px;
    }

    .gcard {
        height: 300px;
        border-radius: 22px;
    }

    .pos-3, .pos-4 {
        opacity: 0;
        transform: translateX(0) translateY(0) scale(.7);
    }
}

/* Bottom controls */
.gallery-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.gbtn {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    box-shadow: var(--shadowSoft);
    display: grid;
    place-items: center;
    transition: transform .08s ease, box-shadow .18s ease, background .18s ease;
}

    .gbtn:hover {
        transform: translateY(-1px);
        box-shadow: 0 16px 40px rgba(15, 23, 42, .14);
        background: #f7f9ff;
    }

    .gbtn:active {
        transform: translateY(1px);
    }

    .gbtn svg {
        width: 18px;
        height: 18px;
    }

.gallery-caption {
    min-width: 220px;
    max-width: 520px;
    text-align: center;
    color: var(--muted);
    font-weight: 650;
    font-size: 13px;
}

.gallery-footer-note {
    margin-top: 12px;
    text-align: center;
    color: #8591a6;
    font-size: 12px;
}

.gallery-footer {
    text-align: center;
    padding: 22px 0 40px;
    color: #9aa5b1;
}
