/* IL PERSICONE — Decorazioni tema NATALE (caricato solo con tema natalizio attivo) */

/* Palline appese */
.xd-hang { position: absolute; inset: 0 0 auto 0; height: 0; z-index: 3; pointer-events: none; }
.intro .xd-hang { z-index: 3; }
.xd-bauble {
  position: absolute; top: 0; width: var(--size); transform-origin: 50% 0;
  animation: xdSwing 4s ease-in-out infinite alternate;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .45));
}
.xd-bauble .xd-string { display: block; width: 1px; height: var(--len); margin: 0 auto; background: linear-gradient(rgba(230, 207, 156, .1), rgba(230, 207, 156, .85)); }
.xd-bauble svg { display: block; width: 100%; height: auto; margin-top: -2px; }
.xd-bauble.is-star svg { animation: xdTwinkle 2.6s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(246, 226, 176, .7)); }
@keyframes xdSwing { from { transform: rotate(-4deg); } to { transform: rotate(4deg); } }
@keyframes xdTwinkle { 50% { filter: drop-shadow(0 0 18px rgba(246, 226, 176, 1)); transform: scale(1.06); } }
.hero .xd-hang { top: calc(var(--header-h) - 10px); }
.page-hero .xd-hang { top: calc(var(--header-h) - 10px); }

/* Agrifoglio */
.xd-holly { position: absolute; width: 58px; pointer-events: none; z-index: 3; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .4)); }
.xd-holly svg { width: 100%; height: auto; display: block; }
.brand { position: relative; }
.xd-holly--logo { width: 40px; left: -14px; top: -10px; transform: rotate(-24deg); }
.scrolled .xd-holly--logo { width: 32px; }
.xd-holly--tl { top: -16px; left: -14px; transform: rotate(-28deg); }
.xd-holly--tr { top: -16px; right: -14px; transform: rotate(28deg) scaleX(-1); }
.xd-holly--card-tl { top: -18px; left: -18px; width: 70px; transform: rotate(-28deg); }
.xd-holly--card-br { bottom: -14px; right: -16px; width: 62px; transform: rotate(150deg); }
.form-card, .menu-card { overflow: visible; position: relative; }
.ss-dialog .xd-holly { top: 12px; left: 12px; width: 52px; transform: rotate(-20deg); }

/* Fiocchi nei titoletti */
.xd-flake { display: inline-flex; width: 14px; height: 14px; color: var(--gold-l); animation: xdSpin 9s linear infinite; }
.xd-flake svg { width: 100%; height: 100%; }
.eyebrow .xd-flake { margin-right: -4px; }
@keyframes xdSpin { to { transform: rotate(360deg); } }
.xd-divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 20px; color: var(--gold); }
.xd-divider i { width: 60px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.xd-divider i:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.xd-divider > svg { width: 13px; height: 13px; opacity: .8; }
.xd-divider span { width: 20px; height: 20px; display: inline-flex; animation: xdTwinkle 2.6s ease-in-out infinite; }
.xd-divider span svg { width: 100%; height: 100%; }
.section-head.center .xd-divider, .center .xd-divider { justify-content: center; }

/* Lucine sotto la barra */
.xd-lights { position: absolute; left: 0; right: 0; bottom: -9px; height: 12px; display: flex; justify-content: space-around; pointer-events: none; }
.xd-lights::before { content: ""; position: absolute; left: 0; right: 0; top: 1px; height: 6px; border-bottom: 1px solid rgba(40, 20, 15, .8); border-radius: 0 0 50% 50% / 0 0 100% 100%; }
.xd-lights span { position: relative; width: 7px; height: 11px; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; top: 2px; animation: xdBulb 1.8s ease-in-out infinite alternate; }
.xd-lights span:nth-child(4n+1) { background: #ff4b55; color: #ff4b55; }
.xd-lights span:nth-child(4n+2) { background: #ffd36b; color: #ffd36b; }
.xd-lights span:nth-child(4n+3) { background: #56d37a; color: #56d37a; }
.xd-lights span:nth-child(4n+4) { background: #fff6e0; color: #fff6e0; }
@keyframes xdBulb { from { opacity: .35; box-shadow: none; } to { opacity: 1; box-shadow: 0 0 8px 2px currentColor; } }
.xmas-bar::after { display: none; }

/* Colline innevate nel footer */
.site-footer { padding-top: clamp(110px, 12vw, 150px); }
.xd-hills { position: absolute; left: 0; right: 0; top: 0; height: 110px; pointer-events: none; }
.xd-hills svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.xd-trees span { position: absolute; bottom: 18px; color: rgba(201, 169, 110, .28); width: auto; aspect-ratio: 40 / 56; }
.xd-trees svg { width: 100%; height: 100%; display: block; }

/* Icone nelle tessere natalizie */
.xd-card-ico { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(14, 11, 10, .55); border: 1px solid rgba(230, 207, 156, .4); color: var(--gold-l); backdrop-filter: blur(4px); transition: transform .5s var(--ease); }
.xd-card-ico svg { width: 18px; height: 18px; }
.xmas-card:hover .xd-card-ico { transform: rotate(-12deg) scale(1.12); }

/* Scintille del mouse */
.xd-spark { position: fixed; z-index: 3500; pointer-events: none; color: var(--gold-l); text-shadow: 0 0 6px rgba(246, 226, 176, .9); transform: translate(-50%, -50%); animation: xdSpark .9s ease-out forwards; }
@keyframes xdSpark { to { opacity: 0; transform: translate(calc(-50% + var(--dx)), 30px) scale(.3); } }

/* Responsive */
@media (max-width: 1024px) {
  .hero .xd-bauble:nth-child(n+4), .page-hero .xd-bauble:nth-child(n+4) { display: none; }
  .intro .xd-bauble:nth-child(3), .intro .xd-bauble:nth-child(4) { display: none; }
}
@media (max-width: 640px) {
  .xd-bauble { --size: 30px !important; }
  .hero .xd-bauble:nth-child(1), .page-hero .xd-bauble:nth-child(1) { display: none; }
  .intro .xd-bauble:nth-child(2), .intro .xd-bauble:nth-child(5) { display: none; }
  .xd-holly--card-tl { width: 52px; } .xd-holly--card-br { width: 46px; }
  .xd-trees span:nth-child(odd) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .xd-bauble, .xd-flake, .xd-lights span, .xd-divider span { animation: none !important; }
}
