/* ============================================================
   Tema Natale (THEME.1, 2026-12-05) — attivo con html[data-alu-theme="natale"].
   Caricato da VIEW/COMMON/head.php solo mentre il tema e' acceso (LIBS/class.sitetheme.php, DOCS/theming.md).
   Solo decorazione: SVG incorporati, nessuna immagine da scaricare, nessun clic intercettato (pointer-events: none),
   animazioni solo su transform/opacity/filter e ferme con prefers-reduced-motion.
   ============================================================ */
html[data-alu-theme="natale"] {
    --xmas-lights: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22120%22 height=%2222%22 viewBox=%220 0 120 22%22%3E%3Cpath d=%22M0 3 Q30 13 60 3 T120 3%22 fill=%22none%22 stroke=%22%232c3a2a%22 stroke-width=%221.6%22/%3E%3Cg%3E%3Crect x=%2213.5%22 y=%226.2%22 width=%223%22 height=%223%22 rx=%22.6%22 fill=%22%233a463a%22/%3E%3Cellipse cx=%2215%22 cy=%2213%22 rx=%223.6%22 ry=%225.2%22 fill=%22%23ff4d4d%22/%3E%3Cellipse cx=%2213.8%22 cy=%2211.4%22 rx=%221%22 ry=%221.8%22 fill=%22%23fff%22 opacity=%22.55%22/%3E%3C/g%3E%3Cg%3E%3Crect x=%2243.5%22 y=%229.4%22 width=%223%22 height=%223%22 rx=%22.6%22 fill=%22%233a463a%22/%3E%3Cellipse cx=%2245%22 cy=%2216.2%22 rx=%223.6%22 ry=%225.2%22 fill=%22%23ffd24a%22/%3E%3Cellipse cx=%2243.8%22 cy=%2214.6%22 rx=%221%22 ry=%221.8%22 fill=%22%23fff%22 opacity=%22.55%22/%3E%3C/g%3E%3Cg%3E%3Crect x=%2273.5%22 y=%226.2%22 width=%223%22 height=%223%22 rx=%22.6%22 fill=%22%233a463a%22/%3E%3Cellipse cx=%2275%22 cy=%2213%22 rx=%223.6%22 ry=%225.2%22 fill=%22%233ddc84%22/%3E%3Cellipse cx=%2273.8%22 cy=%2211.4%22 rx=%221%22 ry=%221.8%22 fill=%22%23fff%22 opacity=%22.55%22/%3E%3C/g%3E%3Cg%3E%3Crect x=%22103.5%22 y=%229.4%22 width=%223%22 height=%223%22 rx=%22.6%22 fill=%22%233a463a%22/%3E%3Cellipse cx=%22105%22 cy=%2216.2%22 rx=%223.6%22 ry=%225.2%22 fill=%22%235ab4ff%22/%3E%3Cellipse cx=%22103.8%22 cy=%2214.6%22 rx=%221%22 ry=%221.8%22 fill=%22%23fff%22 opacity=%22.55%22/%3E%3C/g%3E%3C/svg%3E");
    --xmas-holly: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2240%22 height=%2228%22 viewBox=%220 0 40 28%22%3E%3Cpath d=%22M20 15 C14 6 6 4 2 8 C5 9 5 12 3 14 C7 13 8 16 7 19 C11 16 15 17 20 15 Z%22 fill=%22%231f7a3d%22/%3E%3Cpath d=%22M20 15 C26 6 34 4 38 8 C35 9 35 12 37 14 C33 13 32 16 33 19 C29 16 25 17 20 15 Z%22 fill=%22%232a9a50%22/%3E%3Cpath d=%22M20 15 C16 11 9 9 4 10%22 stroke=%22%23145c2d%22 stroke-width=%22.9%22 fill=%22none%22/%3E%3Cpath d=%22M20 15 C24 11 31 9 36 10%22 stroke=%22%23176b34%22 stroke-width=%22.9%22 fill=%22none%22/%3E%3Ccircle cx=%2217%22 cy=%2217.5%22 r=%223.6%22 fill=%22%23d7263d%22/%3E%3Ccircle cx=%2223%22 cy=%2217.5%22 r=%223.6%22 fill=%22%23e33246%22/%3E%3Ccircle cx=%2220%22 cy=%2222%22 r=%223.6%22 fill=%22%23c41d33%22/%3E%3Ccircle cx=%2216%22 cy=%2216.4%22 r=%221%22 fill=%22%23fff%22 opacity=%22.6%22/%3E%3C/svg%3E");
    --xmas-cap: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22120%22 height=%2214%22 viewBox=%220 0 120 14%22 preserveAspectRatio=%22none%22%3E%3Cpath d=%22M0 0 H120 V4 C112 4 112 11 104 11 C97 11 98 5 90 5 C82 5 83 13 74 13 C66 13 67 6 59 6 C51 6 52 10 44 10 C36 10 37 4 29 4 C21 4 22 12 13 12 C6 12 6 5 0 5 Z%22 fill=%22%23ffffff%22/%3E%3C/svg%3E");
    --xmas-snow: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22240%22 height=%22240%22 viewBox=%220 0 240 240%22%3E%3Cg fill=%22%23ffffff%22%3E%3Ccircle cx=%2212%22 cy=%2220%22 r=%222.2%22 opacity=%22.9%22/%3E%3Ccircle cx=%2258%22 cy=%2264%22 r=%221.4%22 opacity=%22.75%22/%3E%3Ccircle cx=%22102%22 cy=%2212%22 r=%222.8%22 opacity=%22.85%22/%3E%3Ccircle cx=%22150%22 cy=%2248%22 r=%221.6%22 opacity=%22.7%22/%3E%3Ccircle cx=%22196%22 cy=%2226%22 r=%222.4%22 opacity=%22.9%22/%3E%3Ccircle cx=%22226%22 cy=%2288%22 r=%221.5%22 opacity=%22.7%22/%3E%3Ccircle cx=%2230%22 cy=%22118%22 r=%222.6%22 opacity=%22.85%22/%3E%3Ccircle cx=%2282%22 cy=%22150%22 r=%221.8%22 opacity=%22.75%22/%3E%3Ccircle cx=%22128%22 cy=%22104%22 r=%221.3%22 opacity=%22.65%22/%3E%3Ccircle cx=%22172%22 cy=%22140%22 r=%222.9%22 opacity=%22.9%22/%3E%3Ccircle cx=%22214%22 cy=%22176%22 r=%221.7%22 opacity=%22.75%22/%3E%3Ccircle cx=%2250%22 cy=%22196%22 r=%222.1%22 opacity=%22.85%22/%3E%3Ccircle cx=%22112%22 cy=%22214%22 r=%221.5%22 opacity=%22.7%22/%3E%3Ccircle cx=%22160%22 cy=%22226%22 r=%222.3%22 opacity=%22.85%22/%3E%3Ccircle cx=%228%22 cy=%22166%22 r=%221.3%22 opacity=%22.65%22/%3E%3C/g%3E%3C/svg%3E");
}

/* Testata: filo di lucine sotto la barra */
html[data-alu-theme="natale"] .navbar::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -15px;
    height: 22px;
    background: var(--xmas-lights) repeat-x 0 0 / 120px 22px;
    pointer-events: none;
    filter: drop-shadow(0 0 3px rgba(255, 214, 102, 0.55));
    animation: xmas-twinkle 2.6s ease-in-out infinite alternate;
}

/* Neve leggera sull'hero della home e sulle testate delle pagine */
html[data-alu-theme="natale"] .home-hero-intro { position: relative; overflow: hidden; }
html[data-alu-theme="natale"] .home-hero-intro::after,
html[data-alu-theme="natale"] .alu-pagehead__scene::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -240px;
    height: calc(100% + 240px);
    background: var(--xmas-snow) repeat 0 0 / 240px 240px;
    opacity: 0.75;
    pointer-events: none;
    animation: xmas-snowfall 14s linear infinite;
    z-index: 0;
}
html[data-alu-theme="natale"] .alu-pagehead__scene::before { opacity: 0.6; }
html[data-alu-theme="natale"] .alu-pagehead__inner { z-index: 1; }
html[data-alu-theme="natale"] .home-hero-intro__inner { z-index: 1; }
html[data-alu-theme="natale"] .home-hero-intro__kicker::before { content: "\2744\FE0E  "; }

/* Agrifoglio accanto ai titoli delle sezioni */
html[data-alu-theme="natale"] :is(.home-island__title, .consult-picker__title, .come-funziona-steps__title, .home-online__title, .alu-faq__title)::after {
    content: "";
    display: inline-block;
    width: 1.35em;
    height: 0.95em;
    margin-left: 0.35em;
    vertical-align: -0.05em;
    background: var(--xmas-holly) no-repeat center / contain;
}

/* Neve appoggiata sul bordo superiore delle schede */
html[data-alu-theme="natale"] .home-shortcuts__item { position: relative; }
html[data-alu-theme="natale"] .come-funziona-step { position: relative; }
html[data-alu-theme="natale"] :is(.home-shortcuts__item, .consult-picker__card, .home-feature, .come-funziona-step)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10px;
    right: 10px;
    height: 10px;
    background: var(--xmas-cap) no-repeat 0 0 / 100% 100%;
    pointer-events: none;
    filter: drop-shadow(0 1px 1px rgba(46, 29, 84, 0.12));
    z-index: 2;
}
html[data-alu-theme="natale"] .home-feature { position: relative; }

/* Tema scuro: neve meno abbagliante sulle superfici scure */
html[data-alu-theme="natale"]:is(.theme-dark, [data-bs-theme="dark"]) :is(.home-shortcuts__item, .consult-picker__card, .home-feature, .come-funziona-step)::before {
    opacity: 0.82;
}

@keyframes xmas-twinkle {
    from { filter: drop-shadow(0 0 2px rgba(255, 214, 102, 0.35)) brightness(0.92); }
    to { filter: drop-shadow(0 0 6px rgba(255, 214, 102, 0.85)) brightness(1.2); }
}
@keyframes xmas-snowfall {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-40px, 240px, 0); }
}

@media (prefers-reduced-motion: reduce) {
    html[data-alu-theme="natale"] .navbar::after,
    html[data-alu-theme="natale"] .home-hero-intro::after,
    html[data-alu-theme="natale"] .alu-pagehead__scene::before { animation: none; }
}
