/* ============================================================
   Trattato di Pace di Cave 1557 — Design System
   ============================================================ */

/* --- Tokens --- */
:root {
    --burgundy:    #5C1A1A;
    --burgundy-lt: #7A2525;
    --gold:        #C9A84C;
    --gold-lt:     #E0C06A;
    --cream:       #F5EDD8;
    --cream-dk:    #EAD9B8;
    --parchment:   #FAF6EE;
    --ink:         #1C1008;
    --ink-lt:      #3A2A1A;
    --slate:       #6B5A4E;
    --white:       #FFFFFF;

    --font-serif:  'Cinzel', 'Playfair Display', serif;
    --font-body:   'EB Garamond', Georgia, serif;
    --font-sans:   'Inter', system-ui, sans-serif;

    --radius-sm:   6px;
    --radius-md:   14px;
    --radius-lg:   28px;
    --shadow-sm:   0 2px 8px rgba(0,0,0,.12);
    --shadow-md:   0 6px 24px rgba(0,0,0,.18);
    --shadow-lg:   0 12px 48px rgba(0,0,0,.24);

    --transition:  all .3s cubic-bezier(.4,0,.2,1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    background: var(--parchment);
    color: var(--ink-lt);
    line-height: 1.7;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* --- Utility --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 780px; margin: 0 auto; padding: 0 1.5rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.section-pad { padding: 6rem 0; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: transparent;
    transition: background .4s ease, box-shadow .4s ease, backdrop-filter .4s ease;
}
.site-header.scrolled {
    background: rgba(28, 16, 8, .92);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 24px rgba(0,0,0,.4);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    gap: 1rem;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}
.header-logo .logo-img {
    width: 48px; height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--ink);
    border: 2px solid var(--gold);
    box-shadow: 0 0 12px rgba(201,168,76,.35);
    flex-shrink: 0;
}
.header-logo .logo-text {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--cream);
    line-height: 1.2;
    letter-spacing: .05em;
}
.header-logo .logo-text span { color: var(--gold); font-size: .8em; display: block; }

/* Desktop nav */
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a {
    font-family: var(--font-sans);
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--cream);
    padding: .5rem .9rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}
.site-nav a::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 50%; right: 50%;
    height: 1px;
    background: var(--gold);
    transition: var(--transition);
}
.site-nav a:hover { color: var(--gold); }
.site-nav a:hover::after { left: .9rem; right: .9rem; }
.site-nav a.active { color: var(--gold); }
.site-nav a.active::after { left: .9rem; right: .9rem; }

/* Social */
.header-social { display: flex; gap: .75rem; align-items: center; }
.header-social a {
    color: var(--cream);
    transition: var(--transition);
    display: flex; align-items: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.15);
}
.header-social a:hover { color: var(--gold); border-color: var(--gold); background: rgba(201,168,76,.1); }
.header-social svg { width: 18px; height: 18px; fill: currentColor; }

/* Mobile hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: var(--radius-sm);
    padding: .5rem;
    cursor: pointer;
    color: var(--cream);
    flex-shrink: 0;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: currentColor; }
.nav-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Mobile drawer */
.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(18, 10, 5, .97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    /* Hidden state: slide off-screen to the right */
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s ease;
    display: flex;           /* always flex, toggled via transform/opacity */
    overflow: hidden;
}
.mobile-drawer.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

/* Drawer header strip */
.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid rgba(201,168,76,.15);
    flex-shrink: 0;
}
.drawer-header-logo {
    font-family: var(--font-serif);
    font-size: .95rem;
    color: var(--cream);
    letter-spacing: .05em;
}
.drawer-header-logo span { color: var(--gold); font-size: .8em; display: block; }

/* Drawer nav links — scrollable area */
.mobile-drawer nav {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.5rem 1rem;
    gap: .15rem;
}
.mobile-drawer nav a {
    font-family: var(--font-serif);
    font-size: clamp(1.15rem, 5vw, 1.45rem);
    color: rgba(245,237,216,.85);
    letter-spacing: .05em;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    transition: background .2s, color .2s, padding-left .2s;
    border-left: 2px solid transparent;
    display: block;
}
.mobile-drawer nav a:hover,
.mobile-drawer nav a:focus-visible {
    color: var(--gold);
    background: rgba(201,168,76,.08);
    border-left-color: var(--gold);
    padding-left: 1.5rem;
    outline: none;
}
.mobile-drawer nav a.active {
    color: var(--gold);
    border-left-color: var(--gold);
    background: rgba(201,168,76,.06);
}

/* Drawer footer: social icons */
.drawer-social {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1.25rem 1.5rem calc(1.25rem + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(201,168,76,.15);
    flex-shrink: 0;
}
.drawer-social a {
    color: rgba(245,237,216,.6);
    transition: var(--transition);
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.12);
    display: flex; align-items: center; justify-content: center;
}
.drawer-social a:hover { color: var(--gold); border-color: var(--gold); background: rgba(201,168,76,.1); }
.drawer-social svg { width: 20px; height: 20px; fill: currentColor; }

/* Close button */
.drawer-close {
    background: none;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: var(--radius-sm);
    color: var(--cream);
    padding: .6rem;
    cursor: pointer;
    line-height: 0;
    transition: border-color .2s, color .2s;
    flex-shrink: 0;
    /* large enough touch target */
    min-width: 44px; min-height: 44px;
    display: flex; align-items: center; justify-content: center;
}
.drawer-close:hover { border-color: var(--gold); color: var(--gold); }
.drawer-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.drawer-close svg { width: 22px; height: 22px; stroke: currentColor; }

/* ============================================================
   TYPOGRAPHY SYSTEM
   ============================================================ */
.display-title {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 8vw, 6rem);
    color: var(--cream);
    line-height: 1.05;
    letter-spacing: .04em;
    text-shadow: 0 4px 32px rgba(0,0,0,.6);
}
.display-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--gold);
    font-style: italic;
}
.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--burgundy);
    letter-spacing: .04em;
    line-height: 1.1;
}
.section-title.light { color: var(--cream); }
.section-eyebrow {
    font-family: var(--font-sans);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .75rem;
}
.section-lead {
    font-family: var(--font-body);
    font-size: 1.15rem;
    color: var(--slate);
    line-height: 1.75;
    max-width: 65ch;
}
.section-lead.light { color: rgba(245, 237, 216, .8); }

/* Gold rule */
.gold-rule {
    display: block;
    height: 2px;
    width: 60px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 1.25rem auto;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: var(--ink);
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../assets/images/hero-bg.webp');
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    transition: transform 8s ease-out;
    filter: brightness(.45) saturate(1.1);
}
.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 40%,
        rgba(28,16,8,.7) 80%,
        var(--parchment) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    animation: fadeUpIn .9s ease forwards;
}
.hero-date-badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: rgba(201,168,76,.15);
    border: 1px solid rgba(201,168,76,.4);
    border-radius: 100px;
    padding: .4rem 1.2rem;
    backdrop-filter: blur(8px);
}
.hero-date-badge span {
    font-family: var(--font-sans);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold);
}
.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    z-index: 2;
    animation: bounce 2s ease infinite;
    color: var(--cream);
    opacity: .6;
}
.hero-scroll svg { width: 20px; height: 20px; stroke: currentColor; }
.hero-scroll span { font-size: .68rem; font-family: var(--font-sans); letter-spacing: .15em; text-transform: uppercase; }

@keyframes fadeUpIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: var(--font-sans);
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .9rem 2rem;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn-gold {
    background: var(--gold);
    color: var(--ink);
}
.btn-gold:hover { background: var(--gold-lt); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(201,168,76,.4); }
.btn-outline {
    background: transparent;
    color: var(--cream);
    border: 1.5px solid rgba(245,237,216,.4);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: var(--cream-dk);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: var(--slate);
    font-size: .85rem;
    min-height: 200px;
}
.card-body { padding: 1.5rem; }
.card-title {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--burgundy);
    margin-bottom: .5rem;
}
.card-text { font-size: .95rem; color: var(--slate); }

/* Nav card (homepage) */
.nav-card {
    display: block;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    background: var(--ink);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}
.nav-card:hover { transform: translateY(-8px) scale(1.01); box-shadow: var(--shadow-lg); }
.nav-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.nav-card .card-bg {
    position: absolute;
    inset: 0;
    background: var(--ink-lt);
    background-size: cover;
    background-position: center;
    transition: transform .6s ease;
    filter: brightness(.55);
}
.nav-card:hover .card-bg { transform: scale(1.05); filter: brightness(.4); }
.nav-card .card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28,16,8,.95) 30%, transparent 70%);
}
.nav-card .card-label {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.nav-card .card-eyebrow {
    font-family: var(--font-sans);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold);
}
.nav-card .card-name {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--cream);
    line-height: 1.1;
    letter-spacing: .04em;
}
.nav-card .card-arrow {
    position: absolute;
    top: 1.25rem; right: 1.25rem;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(201,168,76,.2);
    border: 1px solid rgba(201,168,76,.4);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    transition: var(--transition);
    opacity: 0;
}
.nav-card:hover .card-arrow { opacity: 1; transform: rotate(45deg); }
.nav-card .card-arrow svg { width: 16px; height: 16px; stroke: currentColor; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section-dark {
    background: var(--ink);
    color: var(--cream);
}
.section-cream {
    background: var(--cream);
    color: var(--ink-lt);
}
.section-parchment {
    background: var(--parchment);
    color: var(--ink-lt);
}

/* ============================================================
   TIMELINE (Programma)
   ============================================================ */
.timeline { position: relative; padding: 2rem 0; }
.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--gold) 10%, var(--gold) 90%, transparent);
}
/* Mobile: single-column — dot left, card right, no empty spacers */
.timeline-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 1rem;
    margin-bottom: 2.25rem;
    align-items: start;
}
.timeline-empty { display: none; }
.timeline-dot {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--burgundy);
    border: 3px solid var(--gold);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: .15rem;
    box-shadow: 0 0 0 6px rgba(201,168,76,.12);
    /* keep dot in first column regardless of HTML order */
    order: 1;
}
.timeline-dot svg { width: 16px; height: 16px; stroke: var(--gold); }
.timeline-content {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--gold);
    order: 2;
}
.timeline-date {
    font-family: var(--font-sans);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: .35rem;
}
.timeline-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--burgundy);
    margin-bottom: .5rem;
    line-height: 1.25;
}
.timeline-desc { font-size: .92rem; color: var(--slate); }
.timeline-location {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    color: var(--slate);
    margin-top: .75rem;
    flex-wrap: wrap;
}
.timeline-location svg { width: 12px; height: 12px; stroke: currentColor; flex-shrink: 0; }

/* ============================================================
   GAMES GRID (Palio)
   ============================================================ */
.game-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--burgundy);
    transition: var(--transition);
}
.game-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-top-color: var(--gold); }
.game-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(92,26,26,.08);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}
.game-title {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--burgundy);
    margin-bottom: .5rem;
}
.game-desc { font-size: .9rem; color: var(--slate); margin-bottom: .75rem; }
.game-rule {
    font-size: .8rem;
    background: rgba(201,168,76,.1);
    border-left: 2px solid var(--gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: .5rem .75rem;
    color: var(--ink-lt);
}
.game-rule strong { color: var(--burgundy); }

/* ============================================================
   ALBO D'ORO
   ============================================================ */
.albo-table { width: 100%; border-collapse: collapse; }
.albo-table thead th {
    font-family: var(--font-sans);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--gold);
    border-bottom: 1px solid rgba(201,168,76,.3);
    padding: .6rem 1rem;
    text-align: left;
}
.albo-table tbody tr { border-bottom: 1px solid rgba(92,26,26,.08); transition: background .2s; }
.albo-table tbody tr:hover { background: rgba(201,168,76,.06); }
.albo-table td { padding: .8rem 1rem; font-size: .95rem; }
.albo-table .edition { font-family: var(--font-serif); font-weight: 700; color: var(--burgundy); }
.albo-table .winner { color: var(--ink-lt); }
.albo-table .no-contest { color: var(--slate); font-style: italic; }
.albo-winner-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(201,168,76,.12);
    color: var(--gold);
    font-size: .7rem;
    font-weight: 700;
    font-family: var(--font-sans);
    letter-spacing: .1em;
    padding: .2rem .6rem;
    border-radius: 100px;
    border: 1px solid rgba(201,168,76,.3);
    text-transform: uppercase;
}

/* ============================================================
   STORIA
   ============================================================ */
.history-lead {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    line-height: 1.8;
    color: var(--ink-lt);
}
.pullquote {
    border-left: 4px solid var(--gold);
    padding: 1.25rem 1.75rem;
    background: rgba(201,168,76,.07);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-style: italic;
    color: var(--burgundy);
    margin: 2.5rem 0;
}
.person-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.person-card:hover { box-shadow: var(--shadow-md); }
.person-card .avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--burgundy);
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--gold);
    border: 2px solid var(--gold);
}
.person-card .name { font-family: var(--font-serif); font-size: 1.05rem; color: var(--burgundy); margin-bottom: .25rem; }
.person-card .role { font-size: .82rem; color: var(--slate); }

/* ============================================================
   RIEVOCAZIONE
   ============================================================ */
.event-step {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 1.5rem;
    align-items: start;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(92,26,26,.1);
}
.event-step:last-child { border-bottom: none; }
.step-num {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--burgundy);
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 6px rgba(92,26,26,.08);
}
.step-content {}
.step-title { font-family: var(--font-serif); font-size: 1.35rem; color: var(--burgundy); margin-bottom: .5rem; }
.step-desc { color: var(--slate); line-height: 1.7; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--ink);
    padding: 5rem 0 2.5rem;
    color: rgba(245,237,216,.7);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(201,168,76,.15);
    margin-bottom: 2rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-brand { }
.footer-brand-name {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--cream);
    margin-bottom: .4rem;
}
.footer-brand-sub { font-size: .85rem; color: var(--gold); margin-bottom: 1rem; }
.footer-title { font-family: var(--font-sans); font-size: .7rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { font-size: .9rem; color: rgba(245,237,216,.65); transition: var(--transition); }
.footer-links a:hover { color: var(--gold); padding-left: 4px; }
.footer-contact p { font-size: .9rem; margin-bottom: .4rem; }
.footer-contact a {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition);
    cursor: pointer;
}
.footer-contact a:hover { color: var(--gold-lt); }
.footer-social { display: flex; gap: .75rem; margin-top: 1.25rem; }
.footer-social a {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(245,237,216,.05);
    border: 1px solid rgba(245,237,216,.12);
    display: flex; align-items: center; justify-content: center;
    color: rgba(245,237,216,.7);
    transition: var(--transition);
}
.footer-social a:hover { color: var(--gold); border-color: var(--gold); background: rgba(201,168,76,.1); }
.footer-social svg { width: 18px; height: 18px; fill: currentColor; }
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: rgba(245,237,216,.6);
    text-align: center;
}
.footer-credit {
    color: rgba(245,237,216,.75);
}
.footer-credit a {
    color: var(--gold);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition);
    cursor: pointer;
}
.footer-credit a:hover {
    color: var(--cream);
    text-shadow: 0 0 10px rgba(201,168,76,0.6);
}


/* ============================================================
   MOBILE STICKY BAR
   ============================================================ */
.sticky-bar {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 998;
    padding: .85rem 1rem calc(.85rem + env(safe-area-inset-bottom));
    background: rgba(28,16,8,.97);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(201,168,76,.2);
    gap: .75rem;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.sticky-bar.visible { transform: translateY(0); }
@media (max-width: 767px) { .sticky-bar { display: flex; } }
.sticky-bar .btn { flex: 1; justify-content: center; font-size: .78rem; padding: .75rem 1rem; }

/* ============================================================
   PAGE HERO (inner pages)
   ============================================================ */
.page-hero {
    background: var(--ink);
    min-height: 50vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 4rem;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../assets/images/hero-bg.webp');
    background-size: cover;
    background-position: center;
    filter: brightness(.32) saturate(.9);
    transition: transform 6s ease-out;
}
.page-hero:hover::before { transform: scale(1.03); }
.page-hero.hero-storia::before { background-image: url('../assets/images/storia-bg.webp'); }
.page-hero.hero-rievocazione::before { background-image: url('../assets/images/rievocazione-bg.webp'); }
.page-hero.hero-palio::before { background-image: url('../assets/images/palio-bg.webp'); }
.page-hero.hero-programma::before { background-image: url('../assets/images/corteo-bg.webp'); }
.page-hero.hero-albo::before { background-image: url('../assets/images/palio-bg.webp'); }
.page-hero.hero-eventi::before { background-image: url('../assets/images/cena-rinascimentale.webp'); }

.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(28,16,8,.45) 0%, rgba(28,16,8,.85) 80%, var(--parchment) 100%);
}
.page-hero-content { position: relative; z-index: 2; }
.page-hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-style: italic;
    color: rgba(245,237,216,.85);
    margin-top: .75rem;
    max-width: 650px;
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .65s ease, transform .65s ease;
}
.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ============================================================
   GRID UTILITIES
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   MOBILE OVERRIDES
   ============================================================ */
@media (max-width: 767px) {
    .site-nav, .header-social { display: none; }
    .nav-toggle { display: flex; }
    .header-inner { height: 64px; gap: .5rem; }
    .section-pad { padding: 4rem 0; }
    .page-hero { min-height: 42vh; }
    /* Compact logo on small screens */
    .header-logo { gap: .6rem; }
    .header-logo .logo-img { width: 38px; height: 38px; }
    .header-logo .logo-text { font-size: .82rem; }
    /* Prevent horizontal scroll from shadow/overflow */
    .timeline { overflow: hidden; }
    .container { padding: 0 1rem; }
}
@media (min-width: 768px) {
    .nav-toggle { display: none; }
    /* Tablet: single column left-aligned, larger gap */
    .timeline::before { left: 20px; }
    .timeline-item {
        grid-template-columns: 60px 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    .timeline-empty { display: none; }
    .timeline-dot { order: 1; }
    .timeline-content {
        order: 2;
        text-align: left;
        border-left: 3px solid var(--gold);
        border-right: none;
        padding: 1.5rem;
    }
    .timeline-title { font-size: 1.25rem; }
    .timeline-date { font-size: .75rem; letter-spacing: .15em; }
    .timeline-location { justify-content: flex-start; }
}
@media (min-width: 1024px) {
    .timeline::before { left: 50%; transform: translateX(-50%); }
    .timeline-item {
        grid-template-columns: 1fr 60px 1fr;
        align-items: start;
    }
    .timeline-empty { display: block; }
    .timeline-item:nth-child(odd) .timeline-content { order: 1; text-align: right; border-left: none; border-right: 3px solid var(--gold); }
    .timeline-item:nth-child(odd) .timeline-dot { order: 2; }
    .timeline-item:nth-child(odd) .timeline-empty { order: 3; }
    .timeline-item:nth-child(even) .timeline-empty { order: 1; }
    .timeline-item:nth-child(even) .timeline-dot { order: 2; }
    .timeline-item:nth-child(even) .timeline-content { order: 3; text-align: left; border-left: 3px solid var(--gold); border-right: none; }
    .timeline-item:nth-child(odd) .timeline-location { justify-content: flex-end; }
    .timeline-item:nth-child(even) .timeline-location { justify-content: flex-start; }
}

/* ============================================================
   CONTRADE SECTION (Gonfaloni Showcase)
   ============================================================ */
.contrade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}
.contrada-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 1.75rem 1.25rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(201,168,76,.2);
    border-top: 4px solid var(--burgundy);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.contrada-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-top-color: var(--gold);
}
.contrada-gonfalone-wrap {
    width: 110px;
    height: 175px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.15rem;
    transition: transform .4s cubic-bezier(.4,0,.2,1);
    filter: drop-shadow(0 6px 14px rgba(0,0,0,.15));
}
.contrada-card:hover .contrada-gonfalone-wrap {
    transform: scale(1.08) translateY(-4px);
    filter: drop-shadow(0 12px 20px rgba(0,0,0,.22));
}
.contrada-gonfalone {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.contrada-name {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    color: var(--burgundy);
    margin-bottom: .25rem;
    line-height: 1.3;
}
.contrada-colors {
    font-family: var(--font-sans);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold);
}

/* ============================================================
   GAME CARDS WITH PHOTOS
   ============================================================ */
.game-card-img-top {
    position: relative;
    width: 100%;
    height: 195px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.15rem;
    background: var(--ink);
    border: 1.5px solid rgba(201,168,76,.3);
}
.game-card-img-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.game-card:hover .game-card-img-top img {
    transform: scale(1.06);
}
.game-badge-icon {
    position: absolute;
    bottom: .6rem;
    right: .6rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(28,16,8,.85);
    border: 1.5px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 4px 10px rgba(0,0,0,.3);
    backdrop-filter: blur(4px);
}

.img-balestra,
.game-card-img-top img.img-balestra,
.step-photo-frame img.img-balestra {
    object-position: center 8% !important;
}

.img-arco,
.game-card-img-top img.img-arco,
.step-photo-frame img.img-arco {
    object-position: center 15% !important;
}

.game-new-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: linear-gradient(135deg, var(--burgundy), #4a1212);
    color: var(--gold);
    font-family: var(--font-sans);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .35rem .85rem;
    border-radius: 999px;
    border: 1px solid var(--gold);
    box-shadow: var(--shadow-sm);
    margin-bottom: .75rem;
}

/* No-photo decorative placeholder for game cards */
.game-no-photo {
    position: relative;
    width: 100%;
    height: 195px;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1.15rem;
    background: linear-gradient(135deg, #e8d5a3 0%, #f5edd8 50%, #ead9b8 100%);
    border: 1.5px dashed rgba(92,26,26,.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    text-align: center;
    padding: 1rem;
}
.game-no-photo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(201,168,76,.08) 0%, transparent 70%);
    pointer-events: none;
}
.game-no-photo-icon {
    width: 64px;
    height: 64px;
    color: var(--burgundy);
    opacity: .45;
    flex-shrink: 0;
}
.game-no-photo-caption {
    font-family: var(--font-body);
    font-size: .82rem;
    color: var(--burgundy);
    opacity: .65;
    line-height: 1.4;
    font-style: italic;
    margin: 0;
}
.game-no-photo-caption span {
    font-size: .72rem;
    opacity: .8;
    font-style: normal;
    font-family: var(--font-sans);
    letter-spacing: .05em;
}


/* ============================================================
   PHOTO FEATURE & BANNER
   ============================================================ */
.history-feature-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(201,168,76,.25);
    margin: 2.5rem 0;
}
.history-feature-img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}
.history-feature-caption {
    padding: 1.1rem 1.5rem;
    font-size: .92rem;
    color: var(--slate);
    font-style: italic;
    background: var(--parchment);
    border-top: 1px solid rgba(201,168,76,.2);
    display: flex;
    align-items: center;
    gap: .75rem;
}
.history-feature-caption svg {
    width: 18px;
    height: 18px;
    stroke: var(--gold);
    flex-shrink: 0;
}

.photo-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 4.5rem 2rem;
    color: var(--cream);
    text-align: center;
    background-size: cover;
    background-position: center;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(201,168,76,.3);
    margin: 3.5rem 0;
}
.photo-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(28,16,8,.9) 0%, rgba(92,26,26,.8) 100%);
    backdrop-filter: blur(1px);
}
.photo-banner-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
}

/* ============================================================
   STEP PHOTO CARDS (Rievocazione)
   ============================================================ */
.step-media-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 1.25rem;
}
@media (min-width: 600px) {
    .step-media-grid {
        grid-template-columns: 1.1fr 1fr;
        align-items: center;
    }
}
.step-photo-frame {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid rgba(201,168,76,.3);
    height: 190px;
    background: var(--ink);
}
.step-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.step-photo-frame:hover img {
    transform: scale(1.05);
}

/* ============================================================
   PDF DOWNLOAD BANNER & FOOTER CREDITS
   ============================================================ */
.pdf-download-card {
    background: linear-gradient(135deg, #2b1111 0%, #150909 100%);
    border: 1px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    color: var(--cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg), 0 0 25px rgba(201,168,76,.15);
    margin: 3rem auto;
    max-width: 820px;
}
@media (min-width: 768px) {
    .pdf-download-card {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
        padding: 2.5rem 3rem;
    }
}
.pdf-icon-badge {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-md);
    background: rgba(201,168,76,.15);
    border: 1.5px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--gold);
}
.pdf-icon-badge svg {
    width: 34px;
    height: 34px;
}
.pdf-info h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--cream);
    margin-bottom: .4rem;
}
.pdf-info p {
    font-size: .95rem;
    color: rgba(245,237,216,.8);
    line-height: 1.5;
    margin: 0;
}
.pdf-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    flex-shrink: 0;
}

.footer-credit-sep {
    color: rgba(245,237,216,.25);
    margin: 0 .15rem;
}
.footer-credit {
    font-size: .8rem;
    color: rgba(245,237,216,.35);
}
.footer-credit a {
    color: rgba(245,237,216,.5);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color .2s ease;
}
.footer-credit a:hover {
    color: var(--gold);
}

/* ============================================================
   GALLERY PHOTO SLIDER
   ============================================================ */
.gallery-slider-section {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    background: var(--ink);
}

@media (max-width: 768px) {
    .gallery-slider-section { height: 380px; }
}

.gallery-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Individual slide — cinematic crossfade with subtle slide-in */
.gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.012);
    transition: opacity 1.1s cubic-bezier(.4,0,.2,1),
                transform 1.1s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
}
.gallery-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Background image layer with Ken Burns zoom — synced to 3.5s rhythm */
.gallery-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1.07);
    transition: transform 4.5s cubic-bezier(.25,.46,.45,.94);
    will-change: transform;
}
.gallery-slide.active .gallery-slide-bg {
    transform: scale(1.0);
}

/* Dark gradient overlay — heavier at bottom for caption readability */
.gallery-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(28, 16, 8, .15) 0%,
        rgba(28, 16, 8, .25) 40%,
        rgba(28, 16, 8, .72) 80%,
        rgba(28, 16, 8, .88) 100%
    );
}

/* Caption block — slides up with a gentle ease */
.gallery-slide-caption {
    position: absolute;
    bottom: 5.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(22px);
    text-align: center;
    width: 90%;
    max-width: 680px;
    opacity: 0;
    transition: opacity .7s cubic-bezier(.4,0,.2,1) .45s,
                transform .7s cubic-bezier(.25,.46,.45,.94) .45s;
}
.gallery-slide.active .gallery-slide-caption {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.gallery-slide-tag {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(201,168,76,.45);
    border-radius: 50px;
    padding: .22rem .85rem;
    margin-bottom: .75rem;
    backdrop-filter: blur(4px);
    background: rgba(28,16,8,.35);
}

.gallery-slide-title {
    font-family: var(--font-serif);
    font-size: clamp(1.6rem, 4.5vw, 2.6rem);
    color: var(--cream);
    line-height: 1.15;
    margin-bottom: .55rem;
    text-shadow: 0 2px 20px rgba(0,0,0,.6);
}

.gallery-slide-sub {
    font-family: var(--font-body);
    font-size: clamp(.88rem, 2vw, 1.05rem);
    color: rgba(245,237,216,.78);
    line-height: 1.55;
    text-shadow: 0 1px 8px rgba(0,0,0,.5);
}

/* Arrow navigation */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 46px; height: 46px;
    border-radius: 50%;
    border: 1.5px solid rgba(201,168,76,.45);
    background: rgba(28,16,8,.55);
    backdrop-filter: blur(8px);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.gallery-arrow:hover {
    background: rgba(201,168,76,.2);
    border-color: var(--gold);
    transform: translateY(-50%) scale(1.08);
}
.gallery-arrow-prev { left: 1.25rem; }
.gallery-arrow-next { right: 1.25rem; }

@media (max-width: 480px) {
    .gallery-arrow { width: 36px; height: 36px; }
    .gallery-arrow-prev { left: .6rem; }
    .gallery-arrow-next { right: .6rem; }
}

/* Dot indicators */
.gallery-dots {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: .55rem;
    align-items: center;
}

.gallery-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: 1.5px solid rgba(201,168,76,.6);
    background: transparent;
    cursor: pointer;
    transition: background .3s ease, transform .3s ease, border-color .3s ease;
    padding: 0;
}
.gallery-dot.active {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.35);
}
.gallery-dot:hover:not(.active) {
    background: rgba(201,168,76,.4);
    border-color: var(--gold);
}

/* Progress bar */
.gallery-progress {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(201,168,76,.15);
    z-index: 20;
}
.gallery-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--gold-lt));
    width: 0%;
    transition: width linear;
    box-shadow: 0 0 8px rgba(201,168,76,.5);
}

/* ============================================================
   HERO SLIDER — fullscreen hero with cycling photo backgrounds
   ============================================================ */
.hero-slider {
    overflow: hidden;
}

.hero-slider-track {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Individual hero slide */
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .9s cubic-bezier(.4,0,.2,1);
}
.hero-slide.active { opacity: 1; }

/* Photo bg with Ken Burns slow zoom */
.hero-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1.06);
    transition: transform 7s ease-out;
    will-change: transform;
}
.hero-slide.active .hero-slide-bg {
    transform: scale(1.0);
}

/* Dark overlay — keep text readable, heavier at top/bottom */
.hero-slider-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(to bottom,
            rgba(28,16,8,.55) 0%,
            rgba(28,16,8,.25) 40%,
            rgba(28,16,8,.35) 65%,
            rgba(28,16,8,.75) 100%
        );
    pointer-events: none;
}

/* Ensure hero content is above everything */
.hero-slider .hero-content {
    position: relative;
    z-index: 10;
}
.hero-slider .hero-scroll {
    z-index: 10;
}

/* Slide label chip — bottom-left */
.hero-slide-label {
    position: absolute;
    bottom: 5.5rem;
    left: 2rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    pointer-events: none;
}
.hero-slide-label-tag {
    font-family: var(--font-sans);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold);
}
.hero-slide-label-text {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--cream);
    text-shadow: 0 2px 12px rgba(0,0,0,.6);
    line-height: 1.2;
}

/* Arrows and dots sit at z-index 10 inside hero */
.hero-slider .gallery-arrow,
.hero-slider .gallery-dots,
.hero-slider .gallery-progress {
    z-index: 10;
}

/* Move dots up from the very bottom edge on hero */
.hero-slider .gallery-dots {
    bottom: 2.2rem;
}

/* ============================================================
   CENA RINASCIMENTALE & FAQ STYLES
   ============================================================ */
.cena-card-banner {
    background: linear-gradient(135deg, rgba(92,26,26,.08) 0%, rgba(201,168,76,.12) 100%), #fff;
    border: 1px solid rgba(201,168,76,.35);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
    margin: 3rem auto 0;
    max-width: 900px;
}

.cena-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid rgba(201,168,76,.25);
    margin-bottom: 2rem;
}

.cena-title-group {
    flex: 1;
    min-width: 260px;
}

.cena-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--gold);
    color: var(--ink);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: .3rem .8rem;
    border-radius: 999px;
    margin-bottom: .75rem;
}

.cena-price-tag {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--burgundy);
    font-weight: 700;
    line-height: 1;
}

.cena-price-sub {
    font-size: .82rem;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: .25rem;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.faq-item {
    background: #fff;
    border: 1px solid rgba(201,168,76,.3);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: border-color .25s ease, box-shadow .25s ease;
}

.faq-item:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
}

.faq-item[open] {
    border-color: var(--gold);
}

.faq-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.4rem;
    cursor: pointer;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    user-select: none;
    list-style: none;
    gap: 1rem;
    transition: background .2s ease;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-summary:hover {
    background: rgba(201,168,76,.06);
    color: var(--burgundy);
}

.faq-icon-left {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--burgundy);
    margin-right: .5rem;
    flex-shrink: 0;
}

.faq-chevron {
    width: 20px;
    height: 20px;
    color: var(--gold);
    transition: transform .25s ease;
    flex-shrink: 0;
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.4rem 1.4rem 1.4rem;
    color: #44372e;
    font-size: .98rem;
    line-height: 1.75;
    border-top: 1px solid rgba(201,168,76,.15);
    background: rgba(245,237,216,.2);
}

.faq-answer p {
    margin-top: 1rem;
    margin-bottom: 0;
}

.faq-answer ul {
    margin: .8rem 0 0 1.25rem;
    padding: 0;
    list-style-type: '🗡️ ';
}

.faq-answer ul li {
    padding-left: .35rem;
    margin-bottom: .6rem;
    line-height: 1.5;
}

.faq-answer ul li strong {
    color: var(--burgundy);
}

/* Callout Program Box */
.program-callout-box {
    background: linear-gradient(135deg, var(--parchment), #fff);
    border: 1px solid rgba(201,168,76,.4);
    border-left: 5px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.75rem;
    margin: 2.5rem auto 0;
    max-width: 820px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

/* ============================================================
   MODAL OVERLAY (FAQ SOVRAIMPRESSIONE)
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(28, 16, 8, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s cubic-bezier(.4,0,.2,1), visibility .3s cubic-bezier(.4,0,.2,1);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(201, 168, 76, 0.45);
    width: 100%;
    max-width: 720px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.94) translateY(15px);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.modal-overlay.open .modal-dialog {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, var(--burgundy), #3a0f0f);
    color: var(--cream);
    border-bottom: 2px solid var(--gold);
    flex-shrink: 0;
}

.modal-header-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--cream);
    margin: 0;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--cream);
    cursor: pointer;
    padding: .35rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .2s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 1.75rem;
    overflow-y: auto;
    background: var(--parchment);
    flex: 1;
}

.modal-footer {
    padding: 1rem 1.75rem;
    background: #fff;
    border-top: 1px solid rgba(201, 168, 76, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .modal-dialog {
        max-height: 94vh;
    }
    .modal-header {
        padding: 1rem 1.25rem;
    }
    .modal-body {
        padding: 1.25rem;
    }
    .modal-footer {
        padding: 1rem 1.25rem;
    }
}



