/* ============================================================
   NATALE.CSS — tema natalizio soft per testoeaccordi.it
   Da caricare DOPO stiletea.css. Per disattivare: togliere il <link>.
   Palette: verde #1b5e3a, rosso #a4161a / #c1272d, oro #f0b429
   ============================================================ */

/* ---- 1. TOKEN: ricolora tutto il sito dai colori base ---- */
:root {
  --primary:      #1b5e3a;
  --primary2:     #134429;
  --primary-tint: #e8f4ec;
  --amber:        #f0b429;
  --amber2:       #d99a0b;
  --amber-tint:   #fff5d9;
  --bordeaux:     #a4161a;
  --sage:         #2b7a50;
}

/* ---- 2. HEADER: menu attivo rosso + filo di lucine ---- */
nav a.active { background: #c1272d; border-color: #c1272d; color: #fff; }
nav a.active:hover { background: #a4161a; }

header::before,
header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 22px;
  pointer-events: none;
  background-repeat: repeat-x;
  background-size: 120px 22px;
  filter: drop-shadow(0 0 3px rgba(255, 210, 100, .55));
}
/* gruppo A: filo + lampadine rossa e verde */
header::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='22' viewBox='0 0 120 22'%3E%3Cpath d='M0 3Q30 15 60 3Q90 15 120 3' fill='none' stroke='%232a5d3a' stroke-width='1.4'/%3E%3Crect x='18.5' y='7.3' width='3' height='3' fill='%23333'/%3E%3Cellipse cx='20' cy='13.5' rx='3' ry='4.2' fill='%23e63946'/%3E%3Crect x='78.5' y='7.3' width='3' height='3' fill='%23333'/%3E%3Cellipse cx='80' cy='13.5' rx='3' ry='4.2' fill='%232dc653'/%3E%3C/svg%3E");
  animation: xmasTwinkleA 2.4s ease-in-out infinite alternate;
}
/* gruppo B: lampadine oro e azzurra (si accendono a turno con A) */
header::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='22' viewBox='0 0 120 22'%3E%3Crect x='38.5' y='7.3' width='3' height='3' fill='%23333'/%3E%3Cellipse cx='40' cy='13.5' rx='3' ry='4.2' fill='%23ffd166'/%3E%3Crect x='98.5' y='7.3' width='3' height='3' fill='%23333'/%3E%3Cellipse cx='100' cy='13.5' rx='3' ry='4.2' fill='%234cc9f0'/%3E%3C/svg%3E");
  animation: xmasTwinkleB 2.4s ease-in-out infinite alternate;
}
@keyframes xmasTwinkleA { from { opacity: 1; }   to { opacity: .45; } }
@keyframes xmasTwinkleB { from { opacity: .45; } to { opacity: 1; } }

/* ---- 3. CAPPELLINO DI BABBO NATALE SUL LOGO ----
   Se non cade nel punto giusto, ritocca queste 3 variabili. */
.site-brand {
  position: relative;
  /* posizione in % rispetto al logo: --hat-x = orizzontale, --hat-y = dove poggia il cappellino (dall'alto) */
  --hat-w: 19%;
  --hat-x: 7%;
  --hat-y: 76%;
}
.site-brand::after {
  content: '';
  position: absolute;
  left: var(--hat-x);
  top: var(--hat-y);
  width: var(--hat-w);
  aspect-ratio: 100 / 80;
  transform: translate(-50%, -100%) rotate(-14deg);
  transform-origin: 50% 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 80'%3E%3Cpath d='M5 68C10 30 35 6 70 10C66 28 82 48 96 68Z' fill='%23d62828'/%3E%3Crect x='2' y='60' width='96' height='17' rx='8.5' fill='%23fff' stroke='%23e3e3e3'/%3E%3Ccircle cx='71' cy='11' r='9' fill='%23fff' stroke='%23e3e3e3'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25));
}

/* ---- 4. PALCO (hero + alfabeto): verde profondo, neve al posto delle note ---- */
.top-stage {
  background-image: linear-gradient(110deg, #0d3524 0%, #14532d 28%, #1f6b45 52%, #14532d 76%, #0d3524 100%);
}
.alphabet-band::after {
  background: radial-gradient(circle, rgba(230, 70, 80, .30), transparent 65%);
}

/* scritta sopra il titolo */
.hero h1::before {
  content: '\2726  Buone Feste  \2726';
  display: block;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
  text-shadow: none;
}
.hero-eyebrow::before,
.hero-eyebrow::after { content: '\2744\FE0E'; }
.search-form .search-btn { background: #c1272d; }
.search-form .search-btn:hover { background: #a4161a; box-shadow: 0 4px 14px rgba(193, 39, 45, .5); }

/* il testo sotto la ricerca resta sopra la neve */
.search-guide-text { position: relative; z-index: 1; }

/* le note ♪♫ diventano fiocchi di neve che scendono */
.notes span:nth-child(n) {
  color: transparent;
  text-shadow: none;
  bottom: auto;
  top: -70px;
  animation-name: xmasSnowFall;
}
.notes span::before {
  content: '\2744\FE0E';
  display: block;
  font-size: calc(var(--s) * .55);
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 0 10px rgba(255, 255, 255, .55);
}
.notes span:nth-child(4n+2)::before { content: '\2745\FE0E'; }
.notes span:nth-child(5n)::before   { content: '\2726\FE0E'; color: rgba(240, 180, 41, .95); text-shadow: 0 0 10px rgba(240, 180, 41, .6); }
@keyframes xmasSnowFall {
  0%   { transform: translate(0, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: .9; }
  50%  { transform: translate(24px, calc(var(--h) * .5)) rotate(180deg); }
  90%  { opacity: .8; }
  100% { transform: translate(-16px, var(--h)) rotate(360deg); opacity: 0; }
}

/* puntini di neve fitti, 4 strati a velocità diverse (effetto profondità) */
.notes::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .75;
  background-image:
    radial-gradient(2px 2px at 30px 40px,  #fff, transparent),
    radial-gradient(2px 2px at 120px 90px, #fff, transparent),
    radial-gradient(3px 3px at 80px 150px, #fff, transparent),
    radial-gradient(2px 2px at 200px 60px, #fff, transparent);
  background-size: 180px 180px, 240px 240px, 300px 300px, 360px 360px;
  animation: xmasSnowDots 14s linear infinite;
}
@keyframes xmasSnowDots {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 0 180px, 0 240px, 0 300px, 0 360px; }
}

/* ---- 5. DIVISORI: bastoncino di zucchero ---- */
.section-divider {
  height: 8px;
  border-radius: 4px;
  background: repeating-linear-gradient(-45deg, #c1272d 0 9px, #ffffff 9px 18px);
  box-shadow: 0 0 0 1px #ecd5d5;
}

/* ---- 6. BOX COLORATI: rosso / verde / oro ---- */
/* rosso */
.top-songs-box,
.raccolte-box {
  --tone: #a4161a; --tone2: #e5737a;
  background-image: linear-gradient(125deg, #fff7f6 0%, #f7d0d2 50%, #fff7f6 100%);
}
/* verde */
.latest-songs,
.canzonieri-box,
.canzoni-richieste-box,
.npo-box {
  --tone: #1f6b45; --tone2: #5cb98a;
  background-image: linear-gradient(125deg, #f2faf5 0%, #c8e6d3 50%, #f2faf5 100%);
}
/* oro */
.top-artists,
.vetrina-amazon-box {
  --tone: #b8860b; --tone2: #f0c040;
  background-image: linear-gradient(125deg, #fffaf0 0%, #fde6a8 50%, #fffaf0 100%);
}
/* Sanremo (selettore più specifico nel CSS originale) */
main > div.home-split:nth-of-type(2) > .canzonieri-box {
  --tone: #a4161a; --tone2: #e5737a;
  background-image: linear-gradient(125deg, #fff7f6 0%, #f7d0d2 50%, #fff7f6 100%);
}
/* simboli grandi sullo sfondo dei box */
.top-songs-box        { --glyph: '🎄'; }
.raccolte-box         { --glyph: '🎁'; }
.latest-songs         { --glyph: '\2744\FE0E'; }
.canzonieri-box       { --glyph: '🔔'; }
.canzoni-richieste-box{ --glyph: '⛄'; }
.npo-box              { --glyph: '\2764\FE0E'; }
.top-artists          { --glyph: '⭐'; }
.vetrina-amazon-box   { --glyph: '🎅'; }

/* ---- 7. IN EVIDENZA: cappuccio di neve ---- */
.featured-song { position: relative; }
.featured-song::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 13px;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 11px 0, #f4f8fb 10px, transparent 11px) 0 0 / 22px 13px repeat-x;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18));
}

/* ---- 8. BOX "CANZONI NATALIZIE" accanto al nuovo album completo ---- */
.featured-natale { border: 2px solid #c1272d; }
.featured-natale .featured-label { background: #fde8e9; color: #a4161a; }
.featured-natale .featured-content h2 { color: #a4161a; }
.featured-natale .featured-button { background: #c1272d; }
.featured-natale .featured-button:hover,
.featured-natale .featured-button:focus-visible { background: var(--amber); color: #1a1a1a; }
.featured-duo .featured-song a.xmas-img {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 110px;
  min-height: 110px;
  align-self: stretch;
  background: linear-gradient(135deg, #a4161a, #1b5e3a);
}
.xmas-img span {
  font-size: 54px;
  line-height: 1;
  animation: xmasBob 3s ease-in-out infinite;
}
@keyframes xmasBob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-5px) rotate(4deg); } }
@media (max-width: 768px) {
  .featured-duo .featured-song a.xmas-img { flex: 0 0 84px; min-height: 84px; }
  .xmas-img span { font-size: 40px; }
}

/* ---- 9. FOOTER: bordo bastoncino + augurio ---- */
.site-footer {
  border-top: 8px solid transparent;
  border-image: repeating-linear-gradient(-45deg, #c1272d 0 10px, #ffffff 10px 20px) 8;
}
.site-footer::after {
  content: '🎄 Buone Feste da Testo e Accordi 🎄';
  display: block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--amber);
}

/* ---- 10. PAGINE INTERNE (canzone, artista, lettera, menu, Sanremo) ---- */

/* neve leggera su hero, frase guida e fascia alfabeto
   (esclusa la home, che ha già il suo palco con la neve) */
.search-guide-text:not(.top-stage *) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero:not(.top-stage *)::after,
.alphabet-band:not(.top-stage *)::after,
.search-guide-text:not(.top-stage *)::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .7;
  background-image:
    radial-gradient(2px 2px at 30px 40px,  #fff, transparent),
    radial-gradient(2px 2px at 120px 90px, #fff, transparent),
    radial-gradient(3px 3px at 80px 150px, #fff, transparent),
    radial-gradient(2px 2px at 200px 60px, #fff, transparent);
  background-size: 180px 180px, 240px 240px, 300px 300px, 360px 360px;
  animation: xmasSnowDots 16s linear infinite;
}

/* pagina canzone: cappuccio di neve sul blocco testo/accordi */
.song-block { position: relative; }
.song-block::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 13px;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 11px 0, #ffffff 10px, transparent 11px) 0 0 / 22px 13px repeat-x;
  filter: drop-shadow(0 1px 0 #c9d8e4);
}

/* fasce laterali dei box e pannello autoscroll nei colori natalizi */
.more-songs-box   { border-left-color: #1b5e3a; }
.song-search-box  { border-left-color: #c1272d; }
.song-share-box   { border-left-color: #d4a017; }
.autoscroll-panel { background: rgba(19, 68, 41, .92); }

/* breadcrumb: spazio sotto il filo di lucine, così non lo copre */
.breadcrumb { position: relative; margin-top: 30px; }

/* ---- 11. ACCESSIBILITÀ: niente movimento se richiesto dal dispositivo ---- */
@media (prefers-reduced-motion: reduce) {
  header::before,
  header::after,
  .notes::after,
  .xmas-img span,
  .hero:not(.top-stage *)::after,
  .alphabet-band:not(.top-stage *)::after,
  .search-guide-text:not(.top-stage *)::after { animation: none; }
}
