/* =====================================================================
   Vesti stagionali del sito (Natale, Befana, Pasqua, Primavera, Autunno,
   Halloween). Si attivano dal pannello: Impostazioni → Aspetto.
   Caricato solo quando una veste è attiva. I disegni sono in img/tema/.
   ===================================================================== */
.tema-natale{--t-hat:url(img/tema/natale-cappello.svg);--t-fest:url(img/tema/natale-luci-a.svg);--t-scena:url(img/tema/natale-scena.svg)}
.tema-befana{--t-hat:url(img/tema/befana-cappello.svg);--t-fest:url(img/tema/befana-festone.svg);--t-scena:url(img/tema/befana-scena.svg)}
.tema-pasqua{--t-hat:url(img/tema/pasqua-cappello.svg);--t-fest:url(img/tema/pasqua-festone.svg);--t-scena:url(img/tema/pasqua-scena.svg)}
.tema-primavera{--t-hat:url(img/tema/primavera-cappello.svg);--t-fest:url(img/tema/primavera-festone.svg);--t-scena:url(img/tema/primavera-scena.svg)}
.tema-autunno{--t-hat:url(img/tema/autunno-cappello.svg);--t-fest:url(img/tema/autunno-festone.svg);--t-scena:url(img/tema/autunno-scena.svg)}
.tema-halloween{--t-hat:url(img/tema/halloween-cappello.svg);--t-fest:url(img/tema/halloween-festone.svg);--t-scena:url(img/tema/halloween-scena.svg)}

/* cappellino sulla testa del logo */
.tema .brand{position:relative}
.tema .brand::after{content:"";position:absolute;left:41.2%;top:-23%;width:19%;aspect-ratio:5/4;background:var(--t-hat) center/contain no-repeat;pointer-events:none;transform-origin:50% 90%;animation:t-hat 6s ease-in-out infinite}
@keyframes t-hat{0%,100%{transform:rotate(-2deg)}50%{transform:rotate(2.5deg)}}

/* festone fisso nella parte bassa della testata (la testata si allunga: non copre nulla) */
.tema .top{padding-bottom:26px}
.tema .top::after{content:"";position:absolute;left:0;right:0;bottom:0;height:26px;background:var(--t-fest) repeat-x 0 0/140px 26px;pointer-events:none;z-index:2}
.tema-natale .top::before{content:"";position:absolute;left:0;right:0;bottom:0;height:26px;background:url(img/tema/natale-luci-b.svg) repeat-x 0 0/140px 26px;pointer-events:none;z-index:2;animation:t-luci 1.6s ease-in-out infinite alternate}
.tema-natale .top::after{animation:t-luci 1.6s ease-in-out infinite alternate-reverse}
@keyframes t-luci{from{opacity:.25}to{opacity:1}}

/* scenetta sopra il piè di pagina */
/* La scena (alberelli ecc.) sta sopra il piè di pagina: il margine le riserva lo spazio, così non copre la fine della pagina. */
.tema .foot{position:relative;margin-top:72px}
.tema .foot::before{content:"";position:absolute;left:0;right:0;bottom:100%;height:62px;background:var(--t-scena) repeat-x left bottom/auto 100%;pointer-events:none}
@media (min-width:760px){.tema .foot{margin-top:106px}.tema .foot::before{height:96px}.tema .top{padding-bottom:30px}.tema .top::after,.tema-natale .top::before{height:30px;background-size:162px 30px}}
@media (max-width:1079px){.tema .nav{height:calc(100vh - 98px);height:calc(100dvh - 98px)}}

/* particelle che cadono (neve, petali, foglie…) */
.tema-fx{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:40}
.tema-nota{position:fixed;left:12px;bottom:12px;z-index:90;background:#fff3cd;color:#664d03;border:1px solid #e6cf84;border-radius:99px;padding:5px 12px;font:600 13px/1.3 Inter,system-ui,sans-serif;box-shadow:0 4px 14px rgba(0,0,0,.15)}

@media (prefers-reduced-motion:reduce){.tema .brand::after,.tema-natale .top::before,.tema-natale .top::after{animation:none}}
@media print{.tema .brand::after,.tema .top::after,.tema .top::before,.tema .foot::before,.tema-fx{display:none}}
