:root {
    --bg-top: #14142b;
    --bg-bottom: #2a1520;
    --gold: #f5d27a;
    --red: #ed1c23;
    --green: #3b8c6e;
    --white: #ffffff;
    --muted: rgba(255,255,255,0.7);
    --font: 'Poppins', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
    font-family: var(--font);
    color: var(--white);
    background: transparent;
    min-height: 100vh;
    overflow-x: hidden;
}
html { background-color: var(--bg-top); }
/* Sfondo: foto Silvia con un velo blu-viola, fisso dietro la neve e i contenuti. Velo schiarito del 5% */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: -1;
    background:
        linear-gradient(180deg, rgba(20,20,43,0.73) 0%, rgba(42,21,32,0.85) 100%),
        url('/images/Silvia.jpg') center / cover no-repeat;
}

/* Neve */
.snow { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.flake {
    position: absolute; top: -10px;
    color: rgba(255,255,255,0.75);
    animation: fall linear infinite;
    user-select: none;
}
@keyframes fall { to { transform: translateY(110vh) translateX(24px); } }

/* Intestazione */
.hero {
    position: relative; z-index: 1;
    text-align: center;
    padding: 48px 16px 24px;
    background: radial-gradient(ellipse at top, rgba(245,210,122,0.18), transparent 60%);
}
.kicker { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 8px; }
.hero h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    margin: 0 0 12px;
    text-shadow: 0 0 18px rgba(245,210,122,0.35);
    animation: glow 3s ease-in-out infinite alternate;
}
@keyframes glow {
    from { text-shadow: 0 0 10px rgba(245,210,122,0.2); }
    to { text-shadow: 0 0 24px rgba(245,210,122,0.6); }
}
.lead { max-width: 520px; margin: 0 auto; color: var(--muted); line-height: 1.5; }
/* PC: la frase introduttiva sta tutta su una riga */
@media (min-width: 900px) {
    .lead { max-width: none; white-space: nowrap; }
}
.today-line { color: var(--gold); font-size: 0.9rem; margin-top: 14px; min-height: 1.2em; }

.wrap {
    position: relative; z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 16px 16px 56px;
}
h2 { text-align: center; font-size: 1.4rem; margin: 32px 0 16px; }

/* Calendario: 25 porte. PC e tablet: griglia 5×5 */
.doors {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}
/* Calendario più largo del resto della pagina, centrato sullo schermo */
@media (min-width: 640px) {
    .wrap > section {
        position: relative; left: 50%;
        width: min(1240px, 96vw);
        transform: translateX(-50%);
    }
    .doors { gap: 18px; }
    .door-text { font-size: 0.98rem; line-height: 1.35; }
}
/* Telefono: griglia 2 colonne, con solo numero e immagine.
   Testo, nome del bambino e lente restano nella finestra che si apre al tocco. */
@media (max-width: 639px) {
    .doors { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .doors .door { font-size: 1rem; }
    .doors .door .door-text,
    .doors .door .child-name,
    .doors .door .zoom-icon { display: none; }
    /* Porte di testo: finestra bianca, numero centrato nella pillola scura che lo fa risaltare */
    .doors .door.text-door,
    .doors .door.text-door.open {
        background: #ffffff;
        color: var(--white);
        text-align: center;
    }
    .doors .door.text-door .num {
        position: relative; z-index: 1;
        color: var(--white);
        background: rgba(0,0,0,0.55);
        border-radius: 999px;
        padding: 0 8px;
    }
    .doors .door.text-door.today:not(.open) {
        animation: pulse 3.6s ease-in-out infinite;
        box-shadow: 0 0 0 3px var(--gold), 0 4px 14px rgba(245,210,122,0.4);
    }
}
.today-btn { display: none; }
.door {
    position: relative;
    aspect-ratio: 1 / 1;
    border: none;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(160deg, #3b3b5c, #252540);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease;
}
.door:hover { transform: translateY(-2px); }
.door:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.door.no-art {
    background: linear-gradient(160deg, #2e7d32, #1b4d1f);
}
.door.open {
    background: linear-gradient(160deg, #e74c3c, var(--red));
}
.door.today {
    animation: pulse 3.6s ease-in-out infinite;
    box-shadow: 0 0 0 3px var(--gold), 0 4px 14px rgba(245,210,122,0.4);
}
.door.locked { opacity: 0.55; cursor: default; }
.door.locked:hover { transform: none; }
/* Porta con il testo: bianca e fissa, con il testo sempre visibile sulla porta */
.door.text-door,
.door.text-door.open {
    background: #fefef3;
    color: #3b3b5c;
    text-align: center;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
}
.door.text-door.locked { opacity: 1; cursor: pointer; }
.door.text-door.locked:hover { transform: translateY(-2px); }
.door.text-door.today:not(.open) { animation: none; }
/* Numero delle porte di testo: stesso aspetto di quelle con disegno (pillola scura, centrato) */
.door.text-door .num {
    position: relative; z-index: 1;
    color: var(--white);
    background: rgba(0,0,0,0.55);
    border-radius: 999px;
    padding: 0 8px;
}
/* Porta con disegno: il disegno riempie la tile, il numero resta leggibile sopra */
.door .door-img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
/* Lente di ingrandimento: in basso a destra su ogni finestra */
.door .zoom-icon {
    position: absolute; right: 8px; bottom: 8px; z-index: 2;
    width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(0,0,0,0.5); color: #fff;
    pointer-events: none;
}
.door:has(.door-img) .num {
    position: relative;
    z-index: 1;
    background: rgba(0,0,0,0.55);
    border-radius: 999px;
    padding: 0 8px;
}
.door .door-text {
    display: block;
    margin-top: 4px;
    font-size: 0.68rem;
    font-weight: 400;
    line-height: 1.3;
    color: #2b2b2b;
    white-space: normal;
}
/* Imposte di legno: coprono i due lati della finestra, il disegno resta leggibile al centro.
   Il tocco le apre (classe .shutters-open) e le imposte scorrono fuori dalla finestra. */
.door .shutters {
    position: absolute; inset: 0; z-index: 1;
    pointer-events: none;
    border-radius: 12px;
    overflow: hidden;
    perspective: 700px;
}
/* Anta di porta: semitrasparente, così il disegno si vede anche da chiusa.
   Arco in alto, assi di legno, maniglia dorata. Al tocco ruota sul bordo sinistro. */
.door .shutter {
    position: absolute; top: 0; bottom: 0; left: 0;
    width: 100%;
    border-radius: 50% 50% 6px 6px / 16% 16% 6px 6px;
    background:
        radial-gradient(circle at 80% 52%, #e0b84a 0 2.5px, #8a6512 3px, transparent 3.5px),
        repeating-linear-gradient(90deg, rgba(120,70,30,0.2) 0 14px, rgba(90,50,20,0.2) 14px 15px),
        rgba(139,90,43,0.08);
    box-shadow: inset 0 0 0 2px rgba(74,44,18,0.75);
    transform-origin: left center;
    transition: transform 0.7s ease;
}
.door .shutter.right { display: none; }
.door.shutters-open .shutter.left { transform: rotateY(-100deg); }
.door.open .num::after { content: ' ✨'; }
/* Porta di oggi: stellina dorata che brilla nell'angolo e luce che scorre sopra la porta.
   Restano anche quando la porta è aperta; si fermano con "riduci movimento". */
.door.today::before {
    content: '✦';
    position: absolute; top: 4px; right: 6px;
    z-index: 3;
    color: var(--gold);
    font-size: 0.9rem;
    line-height: 1;
    text-shadow: 0 0 6px rgba(245,210,122,0.9);
    pointer-events: none;
    animation: twinkle 2s ease-in-out infinite;
}
.door.today::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 40%, rgba(255,240,180,0.45) 50%, transparent 60%);
    background-size: 250% 100%;
    background-repeat: no-repeat;
    z-index: 2;
    pointer-events: none;
    animation: sweep 3.5s ease-in-out infinite;
}
@keyframes twinkle {
    0%, 100% { opacity: 0.45; transform: scale(0.8) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.15) rotate(20deg); }
}
@keyframes sweep {
    from { background-position: 150% 0; }
    to { background-position: -50% 0; }
}
.door .child-name {
    display: block;
    max-width: 90%;
    margin: 4px auto 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--gold);
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}
.door.just-opened { animation: pop 0.6s ease; }
@keyframes pop {
    0% { transform: scale(0.9) rotate(-3deg); }
    60% { transform: scale(1.08) rotate(2deg); }
    100% { transform: scale(1) rotate(0); }
}

.note { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 14px; }

/* Galleria */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 640px) {
    .gallery { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
.gallery img {
    width: 100%; height: auto;
    border-radius: 12px;
    display: block;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

/* Invito finale */
.cta {
    text-align: center;
    margin-top: 40px;
    padding: 28px 20px;
    border-radius: 18px;
    background: rgba(255,255,255,0.06);
}
.cta h2 { margin-top: 0; }
.cta p { color: var(--muted); line-height: 1.5; }
.btn {
    display: inline-block;
    margin: 6px;
    padding: 12px 22px;
    border-radius: 12px;
    background: var(--red);
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
}
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,0.4); }

/* Finestra del disegno */
.modal {
    position: fixed; inset: 0; z-index: 10;
    background: rgba(0,0,0,0.75);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.modal[hidden] { display: none; }
.modal-box {
    position: relative;
    max-width: 460px; width: 100%;
    max-height: 92vh; overflow-y: auto;
    background: #1f1f38;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    animation: rise 0.45s ease;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: none; }
}
.modal-box img { width: 100%; height: auto; border-radius: 12px; display: block; margin-bottom: 14px; }
.modal-box h3 { margin: 0 0 8px; color: var(--gold); }
.modal-box p { margin: 0; line-height: 1.5; color: var(--muted); }
/* Card a tutto schermo: il disegno occupa tutta la finestra */
.modal.cardview { padding: 0; background: #000; }
.modal.cardview .modal-box {
    max-width: none; width: 100%; height: 100%; max-height: none;
    background: #000; border-radius: 0; padding: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.modal.cardview #modal-img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; margin: 0; }
.modal.cardview .modal-box > h3, .modal.cardview .modal-box > p { display: none; }
/* Telefono: il disegno intero al centro, sopra una copia sfocata dello stesso disegno che riempie lo schermo */
@media (max-width: 639px) {
    .modal.cardview { overflow: hidden; }
    .modal.cardview::before {
        content: ''; position: absolute; inset: -20px;
        background: var(--bg-img) center / cover no-repeat;
        filter: blur(8px) brightness(0.6);
    }
    .modal.cardview .modal-box { background: transparent; z-index: 1; }
    .modal.cardview .flip-back { background: transparent; }
}
/* Porta di testo: finestra quasi a schermo intero, con il testo grande al centro */
.modal.textview .modal-box {
    max-width: none; width: 94vw; height: 92vh; max-height: 92vh;
    display: flex; flex-direction: column; justify-content: center;
    padding: 32px clamp(20px, 6vw, 80px);
    background: #fffdf2;
    color: #1a1a1a;
}
/* Solo la filastrocca: niente titolo "Porta N" */
.modal.textview .modal-box > h3 { display: none; }
/* Testo a mano, come scritto da un bambino: corsivo dorato su crema, con riflesso come una bacchetta magica.
   La dimensione la sceglie fitModalText() in base allo spazio della finestra. */
.modal.textview #modal-text {
    white-space: pre-line;
    color: transparent;
    background: linear-gradient(120deg, #7a5a0e 0%, #b8860b 35%, #f5d27a 50%, #b8860b 65%, #7a5a0e 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 2px rgba(120,80,10,0.35));
    font-family: 'Patrick Hand', cursive;
    font-style: italic;
    line-height: 1.35;
}
/* Il tasto del retro sta sotto il testo, non sopra il titolo */
.modal.textview .flip-card { display: none; }
.modal.textview .modal-box > h3 { order: 1; }
.modal.textview #modal-text { order: 2; }
.modal.textview .flip-toggle { order: 3; align-self: center; margin: 32px 0 0; }
/* Porta girabile: davanti il disegno, dietro la filastrocca */
.flip-card { position: relative; transform-style: preserve-3d; transition: transform 0.6s ease; }
.flip-card.flipped { transform: rotateY(180deg); }
.flip-card img { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip-back {
    display: none; position: absolute; inset: 0;
    align-items: center; justify-content: center;
    background: #000;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    transform: rotateY(180deg);
}
/* Retro con disegno proprio: occupa tutta la finestra come il davanti */
.modal.cardview .flip-img-back { width: 100%; height: 100%; object-fit: contain; border-radius: 0; margin: 0; }
.flip-img-back[hidden] { display: none; }
/* Retro: stesso formato e impostazione della card (1748×1240), senza disegno */
.card-back {
    position: relative; container-type: inline-size;
    flex: none; width: 100%; max-width: calc(100dvh * 1.41); aspect-ratio: 1748 / 1240;
    background: #fefef3 url('/images/gift_card/retro-sfondo.svg') center / 100% 100% no-repeat;
    color: #111; overflow: hidden;
    font-family: Georgia, 'Times New Roman', serif;
}
.card-back .back-logo { position: absolute; top: 6%; right: 6%; width: 21%; height: auto; }
.card-back .back-poem {
    position: absolute; left: 8%; right: 8%; top: 24%; bottom: 28%; margin: 0;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Patrick Hand', cursive; font-weight: 700;
    font-size: 4.6cqw; line-height: 1.45; text-align: center; white-space: pre-line; color: #111;
}
.card-back .back-thanks { position: absolute; left: 10%; top: 79%; margin: 0; font-size: 2.3cqw; line-height: 1.2; white-space: nowrap; color: #111; }
.card-back .back-site {
    position: absolute; left: 39%; top: 89.5%; width: 58.7%; height: 6.9%; margin: 0;
    display: flex; align-items: center; justify-content: center;
    background: #f7acc8; font-size: 3.4cqw; white-space: nowrap;
}
.modal.cardview .flip-card { width: 100%; height: 100%; }
.modal.cardview .flip-back { display: flex; }
.flip-toggle {
    margin-top: 14px; padding: 10px 18px; border-radius: 999px;
    background: var(--gold); color: #1f1f38; border: none;
    font-weight: 600; cursor: pointer;
}
.flip-toggle[hidden] { display: none; }
/* Il tasto sta al centro, con fondo semitrasparente, sia sul davanti sia sul retro */
.modal.cardview .flip-toggle {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    margin: 0; z-index: 1; padding: 12px 22px;
    background: rgba(0,0,0,0.45); color: #fff; backdrop-filter: blur(3px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.modal-close {
    position: absolute; top: 10px; right: 10px; z-index: 1;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(0,0,0,0.55); border: none; color: var(--white);
    font-size: 24px; cursor: pointer; line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
    .flake, .hero h1, .door.today, .door.today::before, .door.today::after, .door.just-opened, .modal-box { animation: none; }
    .door, .door .shutter, .flip-card { transition: none; }
}

/* Scelta del disegno: carosello */
.choose { margin-top: 96px; text-align: center; }
.choose h2 { margin-top: 0; }
.choose-lead { color: var(--muted); max-width: 1000px; margin: 0 auto 16px; line-height: 1.5; }
.carousel { position: relative; display: flex; align-items: center; gap: 8px; }
.carousel-track {
    flex: 1;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 6px 4px 12px;
    scrollbar-width: thin;
}
.carousel-track:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.slide {
    flex: 0 0 160px;
    scroll-snap-align: center;
    background: rgba(255,255,255,0.06);
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 6px;
    cursor: pointer;
    color: var(--white);
    font-family: var(--font);
    -webkit-tap-highlight-color: transparent;
}
.slide img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
/* Carosello grande come le finestre del calendario, sul desktop */
@media (min-width: 640px) {
    .slide { flex: 0 0 240px; }
    /* Carosello a tutta larghezza dello schermo */
    .choose .carousel { width: 100vw; margin-left: calc(50% - 50vw); }
    /* Senza scatti: lo scorrimento con le frecce è continuo */
    .carousel-track { scroll-snap-type: none; }
    .slide { scroll-snap-align: none; }
}
.carousel-btn { transition: transform 0.25s ease, background 0.25s ease; }
.carousel-btn:hover { transform: scale(1.12); background: rgba(255,255,255,0.14); }
.slide-label { display: block; margin-top: 6px; font-size: 0.85rem; color: var(--muted); }
.slide.selected { border-color: var(--gold); }
.slide.selected .slide-label { color: var(--gold); font-weight: 600; }
.carousel-btn {
    flex: 0 0 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.5);
    color: var(--white);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}
.selected-line { margin-top: 10px; color: var(--muted); }
.selected-line strong { color: var(--gold); }
@media (max-width: 639px) {
    .carousel-btn { display: none; }
}

/* Modulo di acquisto */
.gift-form-section { margin-top: 40px; }
.gift-form-section h2 { margin: 0 0 40px; }
/* Modulo a sinistra, retro della card a destra (sul telefono uno sotto l'altro) */
.gift-layout { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
.gift-back-preview { display: flex; justify-content: center; }
.gift-back-preview .card-back { border-radius: 12px; box-shadow: 0 6px 16px rgba(0,0,0,0.35); }
/* Il testo del retro va a capo come una frase, anche con il nome dentro */
.gift-back-preview .card-back .back-poem { display: block; text-align: center; white-space: normal; top: 30%; }
/* Retro del modulo: logo al centro in alto, frase un po' più in basso e a destra,
   ringraziamento su un vetro chiaro (stile glass) e un pixel più grande */
.gift-back-preview .card-back .back-logo { left: 50%; right: auto; transform: translateX(-50%); }
.gift-back-preview .card-back .back-poem { top: 38%; left: 12%; right: 4%; }
.gift-back-preview .card-back .back-thanks {
    background: rgba(255,255,255,0.3);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 10px;
    padding: 4px 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    font-size: 2.1cqw;
}
@media (min-width: 900px) {
    .gift-layout { grid-template-columns: 1fr 1fr; }
    .gift-layout .gift-form { max-width: none; margin: 0; }
    .gift-back-preview { position: sticky; top: 24px; }
}
.gift-lead { text-align: center; color: var(--muted); margin: 0 0 16px; }
.gift-banner {
    background: var(--green);
    color: var(--white);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    text-align: center;
}
.gift-banner[hidden], .gift-error[hidden] { display: none; }
.gift-form {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255,255,255,0.06);
    padding: 20px;
    border-radius: 16px;
}
.gift-preview {
    width: 60%;
    max-width: 240px;
    align-self: center;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
    margin-bottom: 8px;
}
.gift-form label { font-size: 0.9rem; margin-top: 6px; }
.gift-form input, .gift-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.95);
    color: var(--dark);
    font-family: var(--font);
    font-size: 16px;
    box-sizing: border-box;
}
.gift-error { color: #ff8a80; font-size: 0.9rem; margin: 4px 0 0; }
.gift-submit {
    margin-top: 12px;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: var(--red);
    color: var(--white);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}
.gift-submit:disabled { opacity: 0.6; cursor: wait; }

/* Ingrandimento del disegno dal carosello */
.zoom {
    position: fixed; inset: 0; z-index: 20;
    background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center;
    padding: 12px;
}
.zoom[hidden] { display: none; }
.zoom-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; }
.zoom-box img { display: block; max-width: 96vw; max-height: 84vh; width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.zoom-label { margin: 0; color: var(--white); font-weight: 600; }
/* Contenitore del disegno: il tasto si posiziona sopra il centro dell'immagine */
.zoom-frame { position: relative; display: inline-block; max-width: 96vw; }
/* Tasto al centro del disegno, con lo stesso fondo delle finestre del calendario, un po' più grande */
.zoom-choose {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    padding: 16px 40px; border-radius: 16px; border: none; cursor: pointer;
    background: linear-gradient(160deg, #3b3b5c, #252540); color: var(--white);
    font-family: var(--font); font-size: 1.25rem; font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    white-space: nowrap;
}
.zoom-choose:hover { transform: translate(-50%, calc(-50% - 2px)); }

/* Gift: fronte e retro affiancati, stessa misura; sotto il modulo, a tutta larghezza */
.gift-layout { display: block; }
.gift-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 28px; }
.gift-face { margin: 0; }
.gift-face .gift-preview {
    width: 100%; max-width: none; height: auto; aspect-ratio: 1748 / 1240;
    object-fit: cover; margin: 0; border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}
.gift-back-preview { position: static; display: block; }
.gift-back-preview .card-back { width: 100%; max-width: none; }
.gift-layout .gift-form { max-width: none; margin: 0; padding: 28px; }
.gift-form label { font-size: 1.05rem; margin-top: 14px; }
.gift-form input { padding: 16px 18px; font-size: 1.1rem; min-height: 56px; }
.gift-form textarea { padding: 16px 18px; font-size: 1.1rem; min-height: 130px; }
@media (max-width: 639px) {
    .gift-cards { grid-template-columns: 1fr; }
}

/* Carosello: barra di scorrimento visibile in oro, frecce grandi e rientrate dal bordo */
.carousel-track {
    scrollbar-width: auto;
    scrollbar-color: var(--gold) rgba(255,255,255,0.12);
    padding-bottom: 18px;
}
.carousel-track::-webkit-scrollbar { height: 12px; }
.carousel-track::-webkit-scrollbar-track { background: rgba(255,255,255,0.12); border-radius: 6px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 6px; }
.carousel-track::-webkit-scrollbar-thumb:hover { background: #ffe39a; }
.carousel-btn {
    flex: 0 0 56px; width: 56px; height: 56px;
    display: grid; place-items: center;
    background: var(--gold);
    color: #1f1f38;
    font-size: 36px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.carousel-btn:hover { background: #ffe39a; }
@media (min-width: 640px) {
    .carousel { padding: 0 3vw; }
}

/* Responsive: sul tablet 4 colonne, con finestre più grandi e testo leggibile */
@media (min-width: 640px) and (max-width: 1023px) {
    .doors { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .door-text { font-size: 0.8rem; line-height: 1.3; }
}
/* Sul telefono il testo nelle finestre è più grande, senza uscire dal riquadro */
@media (max-width: 639px) {
    .door-text { font-size: 0.85rem; line-height: 1.35; }
}

/* Passi per regalare: numerati, con cerchi dorati */
.steps {
    list-style: none; counter-reset: step;
    max-width: 680px; margin: 22px auto 40px; padding: 0; text-align: left;
}
.steps li {
    counter-increment: step;
    position: relative;
    padding: 8px 0 8px 52px;
    color: var(--white);
    font-size: 1.05rem; line-height: 1.5;
}
.steps li::before {
    content: counter(step);
    position: absolute; left: 0; top: 8px;
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--gold); color: #1f1f38;
    font-weight: 700;
}
.steps strong { color: var(--gold); }
/* PC: la frase introduttiva resta su una riga */
@media (min-width: 900px) {
    .choose-lead { max-width: none; white-space: nowrap; }
}

/* Segnaposto del carosello: porta senza ancora il disegno, non cliccabile */
.slide.placeholder {
    cursor: default;
    display: flex; flex-direction: column; justify-content: flex-end;
    align-items: center;
    border: 2px dashed rgba(245,210,122,0.5);
    background: rgba(255,255,255,0.04);
}
.slide.placeholder:hover { border-color: rgba(245,210,122,0.5); }
.placeholder-num {
    display: grid; place-items: center;
    aspect-ratio: 1 / 1; width: 100%;
    font-size: 3rem; font-weight: 700; color: rgba(245,210,122,0.7);
}
.slide.placeholder .slide-label { margin-bottom: 4px; }

/* Stile Effatà: logo in testata, piè di pagina con i contatti del sito principale */
.site-logo-link { position: absolute; top: 14px; right: 14px; z-index: 2; }
.site-logo { display: block; width: 76px; height: 76px; border-radius: 12px; background: #fff; padding: 6px; object-fit: contain; }
.site-footer {
    margin-top: 80px; padding: 32px 16px 40px;
    text-align: center; color: var(--muted); font-size: 0.9rem; line-height: 1.6;
    border-top: 1px solid rgba(245,210,122,0.25);
}
.site-footer-logo { display: block; width: 64px; height: 64px; margin: 0 auto 8px; border-radius: 10px; background: #fff; padding: 4px; object-fit: contain; }
.site-footer-name { margin: 0 0 4px; color: var(--gold); font-weight: 600; }
.site-footer a { color: var(--white); }
.site-footer-links { margin-top: 10px; }

/* Telefono: il titolo del calendario sta più vicino alla frase introduttiva */
@media (max-width: 639px) {
    #advent-title { margin-top: 0; }
    .wrap { padding-top: 4px; }
    .today-line { margin-top: 8px; }
    .choose { margin-top: 48px; }
}

/* Telefono: il logo in alto a destra ha una fascia sua, sopra la riga "Casa Famiglia" */
@media (max-width: 639px) {
    .hero { padding-top: 104px; }
}

/* Link dell'informativa privacy nel consenso: il blu predefinito non si legge sullo sfondo scuro */
.gift-consent a { color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.gift-consent a:hover, .gift-consent a:focus-visible { color: var(--white); }
