/* vivipiacenza.it · tema di Natale (dal 3/12/2026; bozze in concept/temi-stagionali, scelta la 3, «tema deciso»).
   Si carica solo nei giorni del tema (_inc/temi.php → testa.php), sopra style.css, con la classe tema-natale sul body:
   lucine quadrate sotto la testata, conto alla rovescia nella barra nera, occhielli a pacchetto, voce Natale rossa,
   nastro e fiocco sul pannello «In evidenza», fiocchetti sui dadi delle date, bordi a bastoncino di zucchero, grigio ghiaccio,
   neve a quadratini e, in home, la fascia «Natale in provincia» con l'albero di dadi. Solo CSS e piccoli SVG, niente immagini. */
.tema-natale {
  --oro: #F0B323;
  --notte: #0B1422;
  --notte-2: #13233A;
  --ghiaccio: #EEF3F7;
  --brina: #D8E2EB;
}

/* ---------- Segni comuni ---------- */

/* Lucine: quadratini appesi al filo sotto la testata (rosso, oro acceso, bianco) */
.tema-natale .testata::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 26px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='99' height='26' viewBox='0 0 99 26'%3E%3Cpath d='M0 0Q49.5 18 99 0' fill='none' stroke='%23111' stroke-width='1.5'/%3E%3Crect x='14.5' y='5' width='4' height='3' fill='%23111'/%3E%3Crect x='11.5' y='8' width='10' height='10' fill='%23D0102B'/%3E%3Crect x='42.5' y='6' width='14' height='14' fill='%23F0B323' opacity='.28'/%3E%3Crect x='47.5' y='9' width='4' height='3' fill='%23111'/%3E%3Crect x='44.5' y='12' width='10' height='10' fill='%23F0B323'/%3E%3Crect x='80.5' y='5' width='4' height='3' fill='%23111'/%3E%3Crect x='77.75' y='8.75' width='8.5' height='8.5' fill='%23fff' stroke='%23111' stroke-width='1.5'/%3E%3C/svg%3E") 0 -2px / 99px 26px repeat-x;
}
.tema-natale .nav.aperta { z-index: 2; }

/* Occhielli: il quadratino diventa un pacchetto (rosso col nastro bianco; bianco col nastro rosso sul rosso e sulle foto) */
.tema-natale .occhiello::before {
  width: 17px; height: 17px; border: 0; margin-top: -3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M9 4.5 4.5 0.5 3.5 4.5zM9 4.5 13.5 0.5 14.5 4.5z' fill='%23D0102B'/%3E%3Crect x='1' y='4.5' width='16' height='3.5' fill='%23D0102B'/%3E%3Crect x='2' y='9' width='14' height='9' fill='%23D0102B'/%3E%3Crect x='8' y='4.5' width='2' height='13.5' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tema-natale .su-rosso .occhiello::before,
.tema-natale .tessera .occhiello::before,
.tema-natale .fascia-natale .occhiello::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M9 4.5 4.5 0.5 3.5 4.5zM9 4.5 13.5 0.5 14.5 4.5z' fill='%23fff'/%3E%3Crect x='1' y='4.5' width='16' height='3.5' fill='%23fff'/%3E%3Crect x='2' y='9' width='14' height='9' fill='%23fff'/%3E%3Crect x='8' y='4.5' width='2' height='13.5' fill='%23D0102B'/%3E%3C/svg%3E");
}
.tema-natale .tessera .occhiello::before { background-color: transparent; }

/* Conto alla rovescia nella barra nera */
.conto-natale { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; white-space: nowrap; }
.conto-natale b { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 5px; background: var(--rosso); font: 800 13px/1 var(--titoli); }
.conto-natale::before {
  content: ""; width: 15px; height: 15px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M9 4.5 4.5 0.5 3.5 4.5zM9 4.5 13.5 0.5 14.5 4.5z' fill='%23F0B323'/%3E%3Crect x='1' y='4.5' width='16' height='3.5' fill='%23F0B323'/%3E%3Crect x='2' y='9' width='14' height='9' fill='%23F0B323'/%3E%3Crect x='8' y='4.5' width='2' height='13.5' fill='%23111'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* La voce Natale del menu, in rosso col pacchetto */
.tema-natale .nav a[href="/natale"] { display: inline-flex; align-items: center; gap: 7px; color: var(--rosso); }
.tema-natale .nav a[href="/natale"]::before {
  content: ""; width: 13px; height: 13px; flex: none; margin-top: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M9 4.5 4.5 0.5 3.5 4.5zM9 4.5 13.5 0.5 14.5 4.5z' fill='%23D0102B'/%3E%3Crect x='1' y='4.5' width='16' height='3.5' fill='%23D0102B'/%3E%3Crect x='2' y='9' width='14' height='9' fill='%23D0102B'/%3E%3Crect x='8' y='4.5' width='2' height='13.5' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Neve a dadi: quadratini bianchi che scendono (fascia e newsletter) ---------- */

.neve { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.neve i { position: absolute; width: var(--l); height: var(--l); background: #fff; opacity: var(--o); animation: neve-cade var(--d) linear var(--r) infinite; }
@keyframes neve-cade {
  from { top: -4%; transform: translateX(0) rotate(0deg); }
  50% { transform: translateX(14px) rotate(45deg); }
  to { top: 104%; transform: translateX(-6px) rotate(90deg); }
}
@media (prefers-reduced-motion: reduce) { .neve i { animation: none; } }

/* ---------- Pacchetti e strisce (su tutte le pagine) ---------- */

/* i blocchi rossi diventano pacchetti: nastro bianco e fiocco sul pannello «In evidenza» */
.tema-natale .in-evidenza .pannello { padding-right: 78px; }
.tema-natale .in-evidenza .pannello::before {
  content: ""; position: absolute; top: 0; bottom: 0; right: 38px; width: 16px; background: #fff;
  box-shadow: inset 3px 0 0 rgba(163, 12, 33, .16), inset -3px 0 0 rgba(163, 12, 33, .16);
}
/* il fiocco a cavallo del bordo alto, centrato sul nastro */
.tema-natale .in-evidenza .pannello::after {
  content: ""; position: absolute; right: 4px; top: -28px; width: 84px; height: 46px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 46'%3E%3Cpath d='M42 28 6 3 2 42zM42 28 78 3 82 42z' fill='%23fff' stroke='%23A30C21' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M42 28 15 14 13 35zM42 28 69 14 71 35z' fill='%23A30C21' opacity='.2'/%3E%3Crect x='34' y='20' width='16' height='16' fill='%23fff' stroke='%23A30C21' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* il dado della data con il fiocco: ogni appuntamento è un regalo */
.tema-natale .card-foto .dado::before,
.tema-natale .fascia-natale .dado::before {
  content: ""; position: absolute; left: 50%; top: -15px; width: 34px; height: 18px; transform: translateX(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 18'%3E%3Cpath d='M17 13 3 2 2 16zM17 13 31 2 32 16z' fill='%23D0102B'/%3E%3Crect x='13' y='9' width='8' height='8' fill='%23A30C21'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tema-natale .card-foto { margin-top: 12px; }
.tema-natale .card-foto .foto { overflow: hidden; }
.tema-natale .card-foto .dado { z-index: 1; overflow: visible; }

.tema-natale .sezione-testa { border-bottom: 0; position: relative; }
.tema-natale .sezione-testa::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 6px;
  background: repeating-linear-gradient(-45deg, var(--rosso) 0 9px, #fff 9px 18px);
  box-shadow: 0 0 0 1px var(--rosso) inset;
}
.tema-natale .banda-rossa .wrap { position: relative; z-index: 1; }

/* piè di pagina con il bordo a bastoncino di zucchero */
.tema-natale .piede { border-top: 10px solid; border-image: repeating-linear-gradient(-45deg, var(--rosso) 0 12px, #fff 12px 24px) 10; }

/* ---------- Palette invernale e fascia «Natale in provincia» (home) ---------- */

.tema-natale .sezione.grigia { background: var(--ghiaccio); }
.tema-natale .apertura { padding-top: clamp(40px, 5vw, 72px); }

.fascia-natale {
  position: relative; overflow: hidden; color: #fff; padding: clamp(44px, 5vw, 72px) 0 clamp(48px, 5vw, 76px);
  background:
    radial-gradient(ellipse 60% 70% at 88% 18%, rgba(240, 179, 35, .16), transparent 70%),
    linear-gradient(180deg, var(--notte) 0%, var(--notte-2) 100%);
}
/* la neve che si posa: un bordo di quadratini bianchi in fondo alla fascia */
.fascia-natale::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14'%3E%3Cg fill='%23fff'%3E%3Crect x='0' y='6' width='120' height='8'/%3E%3Crect x='8' y='0' width='10' height='6'/%3E%3Crect x='34' y='2' width='8' height='4'/%3E%3Crect x='58' y='0' width='14' height='6'/%3E%3Crect x='92' y='3' width='9' height='3'/%3E%3C/g%3E%3C/svg%3E") 0 100% / 120px 14px repeat-x;
}
.fn-griglia { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; }
.fn-testo .occhiello { color: var(--oro); }
.fn-testo h2 { font-size: clamp(52px, 6.4vw, 92px); line-height: .95; letter-spacing: -.035em; margin: 14px 0 16px; }
.fn-testo h2 em { font-style: normal; color: var(--rosso); }
.fn-testo p { font-size: 19px; color: #C9D3DE; max-width: 44ch; margin-bottom: 22px; }
.fn-testo p b { color: #fff; }
.fascia-natale .chip { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .75); }
.fascia-natale .chip:hover { background: #fff; color: var(--nero); }
.fascia-natale .chip .n { opacity: .7; }
.fn-albero { width: clamp(170px, 15vw, 220px); height: auto; margin-right: clamp(0px, 3vw, 40px); }
.fn-weekend { grid-column: 1 / -1; margin-top: 18px; }
.fn-weekend-testa { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 2px solid rgba(255, 255, 255, .35); padding-bottom: 12px; margin-bottom: 22px; }
.fn-weekend-testa h3 { font-size: 24px; }
.fn-weekend-testa .freccia-link { color: var(--oro); }
.fn-weekend-testa .freccia-link:hover { color: #fff; }
.fn-tessere { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.fascia-natale .sagra { position: relative; border-color: #fff; color: var(--nero); }
.fascia-natale .sagra .foto { aspect-ratio: 16 / 9; }
.fascia-natale .sagra h3 { font-size: 20px; }
.fascia-natale .sagra .dado { position: absolute; left: 0; top: 0; z-index: 1; width: 62px; padding: 8px 0 9px; }
.fascia-natale .sagra .dado .n { font-size: 26px; }
.fascia-natale .sagra .dado::before { top: -14px; }
.fascia-natale .sagra { margin-top: 12px; }
.fascia-natale .sagra .foto { overflow: hidden; }

/* newsletter del Natale */
.tema-natale .banda-rossa { background: linear-gradient(180deg, var(--rosso) 0%, #B80D25 100%); }

/* ---------- Telefono ---------- */

@media (max-width: 980px) {
  .fn-griglia { grid-template-columns: minmax(0, 1fr) auto; }
  .fn-tessere { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .conto-natale .lungo { display: none; }
  .tema-natale .barra-alta .meteo a { display: none; }
  .fascia-natale { padding-top: 36px; }
  .fn-griglia { grid-template-columns: minmax(0, 1fr) 92px; gap: 0 12px; align-items: start; }
  .fn-testo { grid-column: 1 / -1; grid-row: 1; }
  .fn-albero { grid-column: 2; grid-row: 1; width: 92px; margin: 34px 0 0; justify-self: end; }
  .fn-testo h2 { font-size: 54px; margin-right: 96px; }
  .fn-testo p { font-size: 17px; }
  .fn-weekend { margin-top: 26px; }
  .neve i:nth-child(2n) { display: none; }   /* al telefono metà neve: sul testo disturbava */
  .fn-weekend-testa { flex-direction: column; align-items: flex-start; gap: 6px; }
  .fn-tessere { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .fascia-natale .sagra { scroll-snap-align: start; }
  .tema-natale .in-evidenza .pannello { padding-right: 70px; }
}
