/* ============ Tema de Halloween (se încarcă doar când e pornită din admin) ============
   Portocaliu de dovleac în loc de albastru, o bandă sus, lilieci peste prima secțiune și o pânză în colț. */

body.season-halloween {
  --accent: #e2600f; --accent-hover: #c24f0a;
  --blue: #c2410c; --blue-text: #b33d0b; --blue-soft: #fdeee3;
}
html[data-theme="dark"] body.season-halloween { --blue: #ff9a4d; --blue-text: #ffad6b; --blue-soft: #2a1b12; }
.season-halloween .hero, .season-halloween .has-bg:has(> .sec-bg) { --blue: #ff9a4d; --blue-text: #ffad6b; --accent: #e2600f; --accent-hover: #c24f0a; --blue-soft: #2a1b12; }

/* Banda de sus */
.hw-banner {
  position: relative; z-index: 61; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 16px;
  background: linear-gradient(90deg, #1b0f26, #2c1440 50%, #1b0f26); color: #ffcf9c;
  font: 600 .88rem/1.35 var(--font-body); text-align: center; border-bottom: 1px solid rgba(255, 138, 42, .35);
}
.hw-banner span { text-wrap: balance; }
.hw-pumpkin { flex: none; }

/* Lumina de lună peste prima secțiune */
.season-halloween .hero-fx::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 55% at 78% 30%, rgba(255, 128, 32, .16), transparent 70%),
              radial-gradient(ellipse 70% 60% at 15% 85%, rgba(122, 64, 196, .22), transparent 70%);
}

/* Cerul cu lilieci și pânza: peste prima secțiune, fără să încurce click-urile */
.hw-sky { position: absolute; left: 0; right: 0; top: 0; height: min(760px, 100vh); pointer-events: none; overflow: hidden; z-index: 3; color: #120a18; }
.hw-bat { position: absolute; left: -100px; width: 64px; color: #2a1238; filter: drop-shadow(0 0 1px #ffb15c) drop-shadow(0 0 2.5px rgba(255, 170, 90, .95)) drop-shadow(0 0 14px rgba(255, 120, 30, .75)); }
.hw-bat svg { display: block; width: 100%; height: auto; transform-origin: 50% 40%; }
.hw-bat.b1 { top: 150px; width: 96px; }
.hw-bat.b2 { top: 240px; width: 70px; }
.hw-bat.b3 { top: 120px; width: 58px; }
.hw-bat.b4 { top: 330px; width: 80px; }
.hw-web { position: absolute; right: 0; top: 96px; width: 170px; height: 170px; color: rgba(255, 236, 214, .22); }


/* Ștampila de pe fișă și alte detalii */
.season-halloween .ticket-stamp { color: #c2410c; border-color: #c2410c; }
.season-halloween .site-footer { border-top: 2px solid rgba(226, 96, 15, .55); }
.season-halloween .scan-beam { background: linear-gradient(180deg, transparent, rgba(255, 138, 42, .2) 70%, rgba(255, 138, 42, .55) 100%); }

@media (prefers-reduced-motion: no-preference) {
  .hw-bat { will-change: transform; transform-origin: 50% 50%; }
  .hw-bat svg { animation: hw-flap .32s ease-in-out infinite alternate; }
  .hw-bat.b2 svg { animation-duration: .27s; }
  .hw-bat.b3 svg { animation-duration: .22s; }
  @keyframes hw-flap { from { transform: scaleY(1); } to { transform: scaleY(.62); } }
  .hw-spider { animation: hw-spider 6s ease-in-out infinite; }
  @keyframes hw-spider { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(14px); } }
}
@media (prefers-reduced-motion: reduce) {
  .hw-bat.b1 { left: 62%; } .hw-bat.b2 { left: 74%; } .hw-bat.b3 { left: 54%; } .hw-bat.b4 { display: none; }
}
@media (max-width: 720px) {
  .hw-banner { font-size: .8rem; padding: 6px 12px; }
  .hw-banner .hw-pumpkin { display: none; }
  .hw-banner { flex-wrap: wrap; row-gap: 4px; }
  .hw-music { margin-left: 0; }
  .hw-web { width: 110px; height: 110px; top: 84px; }
  .hw-bat.b1 { width: 68px; } .hw-bat.b2 { width: 50px; } .hw-bat.b4 { display: none; }
}
@media print { .hw-banner, .hw-sky { display: none !important; } }

/* ============ Mai mult Halloween ============ */
/* Ceață care plutește jos în prima secțiune */
.hw-fog { position: absolute; left: 0; right: 0; bottom: 0; height: 220px; overflow: hidden; opacity: .55;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 45%, #000 70%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 45%, #000 70%, transparent); }
.hw-fog i { position: absolute; bottom: -40px; left: -50%; width: 200%; height: 200px; border-radius: 50%;
  background: radial-gradient(ellipse at 30% 60%, rgba(196, 180, 220, .32), transparent 60%), radial-gradient(ellipse at 75% 55%, rgba(160, 140, 200, .26), transparent 60%); filter: blur(14px); }
.hw-fog i + i { bottom: -70px; opacity: .7; }

/* Dovleac cu lumânare, jos în dreapta */
.hw-lantern { position: absolute; right: 13%; bottom: 4px; width: 84px; filter: drop-shadow(0 0 18px rgba(255, 120, 30, .55)); }
/* Fantoma care iese din când în când din spatele fișei */
.hw-ghost { position: absolute; left: 50%; top: 150px; width: 92px; opacity: 0; filter: drop-shadow(0 0 10px rgba(255, 255, 255, .8)) drop-shadow(0 0 26px rgba(190, 140, 255, .65)); }

/* Pânze de păianjen pe colțul unor carduri */
.season-halloween .plan-featured, .season-halloween .scan, .season-halloween .task-grid li:first-child .task { position: relative; }
.season-halloween .plan-featured::after, .season-halloween .scan::after, .season-halloween .task-grid li:first-child .task::after {
  content: ""; position: absolute; top: 0; right: 0; width: 64px; height: 64px; pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none' stroke='%23bbb' stroke-width='.7'%3E%3Cpath d='M64 0L4 60M64 0L30 64M64 0L0 30M64 0L50 64M64 0L0 8'/%3E%3Cpath d='M54 0c0 6 4 10 10 10M42 0c-1 12 9 22 22 22M28 0c-2 18 14 34 36 36M14 0c-3 25 21 48 50 50'/%3E%3C/svg%3E") no-repeat top right / contain;
}
html[data-theme="light"] .season-halloween .plan-featured::after, html[data-theme="light"] .season-halloween .task-grid li:first-child .task::after { filter: invert(1); opacity: .35; }

/* Șir de dovleci deasupra subsolului */
.season-halloween .site-footer { position: relative; }
.season-halloween .site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -26px; height: 26px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 26'%3E%3Cg transform='translate(16 2)'%3E%3Cpath d='M12 6c1-3 3-4 5-5' stroke='%235f8f3a' stroke-width='2' fill='none'/%3E%3Cellipse cx='7' cy='15' rx='6' ry='8' fill='%23d9540f'/%3E%3Cellipse cx='17' cy='15' rx='6' ry='8' fill='%23d9540f'/%3E%3Cellipse cx='12' cy='15' rx='7' ry='9' fill='%23f07a22'/%3E%3C/g%3E%3Cg transform='translate(150 10) scale(.6)'%3E%3Cpath d='M12 6c1-3 3-4 5-5' stroke='%235f8f3a' stroke-width='2' fill='none'/%3E%3Cellipse cx='7' cy='15' rx='6' ry='8' fill='%23d9540f'/%3E%3Cellipse cx='17' cy='15' rx='6' ry='8' fill='%23d9540f'/%3E%3Cellipse cx='12' cy='15' rx='7' ry='9' fill='%23f07a22'/%3E%3C/g%3E%3C/svg%3E") repeat-x left bottom / 240px 26px;
}
.season-halloween .btn:not(.btn-ghost):hover { box-shadow: 0 0 0 3px rgba(226, 96, 15, .25), 0 8px 24px -8px rgba(226, 96, 15, .8); }

/* Păianjenul care trece din când în când pe ecran (din halloween.js) */
.hw-crawler { position: fixed; left: 0; top: 0; z-index: 90; width: 60px; height: 60px; margin: -30px 0 0 -30px; cursor: pointer;
  filter: drop-shadow(0 0 2px rgba(255, 160, 80, .8)) drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.hw-crawler svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 0 4px rgba(255, 140, 60, .55)) drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); }
@media (max-width: 640px) { .hw-crawler { width: 48px; height: 48px; margin: -24px 0 0 -24px; } }
.hw-crawler.hanging::before { content: ""; position: absolute; left: 50%; bottom: 60%; width: 1px; height: 100vh; background: linear-gradient(to top, rgba(230, 230, 230, .7), rgba(230, 230, 230, .15)); }

@media (prefers-reduced-motion: no-preference) {
  .hw-fog i { animation: hw-fog 38s linear infinite alternate; }
  .hw-fog i + i { animation-duration: 52s; animation-direction: alternate-reverse; }
  @keyframes hw-fog { from { transform: translateX(0); } to { transform: translateX(25%); } }
  .hw-flame { animation: hw-flicker 2.2s infinite; }
  .hw-lantern { animation: hw-glow 2.2s infinite; }
  @keyframes hw-flicker { 0%, 100% { opacity: 1; } 18% { opacity: .78; } 22% { opacity: .95; } 55% { opacity: .7; } 60% { opacity: 1; } 82% { opacity: .85; } }
  @keyframes hw-glow { 0%, 100% { filter: drop-shadow(0 0 18px rgba(255, 120, 30, .55)); } 55% { filter: drop-shadow(0 0 10px rgba(255, 120, 30, .3)); } }
  .hw-ghost { animation: hw-boo 14s ease-in-out infinite; animation-delay: 1.5s; }
  /* iese de jos, plutește leganându-se cam 6 secunde, apoi dispare în sus */
  @keyframes hw-boo {
    0% { opacity: 0; visibility: hidden; transform: translate(0, 60px) scale(.7); }
    8% { opacity: 1; visibility: visible; transform: translate(-6px, 0) scale(1) rotate(-4deg); }
    20% { opacity: 1; transform: translate(18px, -14px) rotate(5deg); }
    32% { opacity: 1; transform: translate(-14px, -6px) rotate(-5deg); }
    44% { opacity: 1; visibility: visible; transform: translate(14px, -22px) rotate(4deg); }
    52% { opacity: 0; visibility: hidden; transform: translate(30px, -90px) scale(.85) rotate(8deg); }
    100% { opacity: 0; visibility: hidden; transform: translate(0, 60px) scale(.7); }
  }
  .hw-crawler.walking .leg.l0 { animation: hw-leg .16s ease-in-out infinite alternate; }
  .hw-crawler.walking .leg.l1 { animation: hw-leg .16s ease-in-out infinite alternate-reverse; }
  .hw-crawler .leg { transform-box: fill-box; transform-origin: 0 50%; }
  @keyframes hw-leg { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }
}
@media (prefers-reduced-motion: reduce) { .hw-ghost { opacity: 0; } }
@media (max-width: 720px) { .hw-lantern { width: 58px; bottom: 4px; right: 6%; } .hw-ghost { left: auto; right: 5%; top: 178px; width: 56px; } .hw-fog { height: 140px; } }
@media print { .hw-crawler { display: none !important; } .season-halloween .site-footer::before { display: none; } }
.hw-sound { margin-left: 6px; border: 1px solid rgba(255, 207, 156, .35); background: rgba(255, 255, 255, .06); color: inherit; border-radius: 999px; width: 30px; height: 26px; line-height: 1; font-size: .85rem; cursor: pointer; flex: none; }
.hw-sound:hover { background: rgba(255, 138, 42, .22); }
.hw-sound:focus-visible { outline: 2px solid #ffcf9c; outline-offset: 2px; }
.hw-music { margin-left: 10px; border: 1px solid rgba(255, 207, 156, .45); background: rgba(255, 122, 26, .16); color: inherit; border-radius: 999px; padding: 3px 12px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; flex: none; white-space: nowrap; }
.hw-music:hover { background: rgba(255, 122, 26, .3); }
.hw-music[aria-pressed="true"] { background: rgba(255, 122, 26, .38); border-color: #ffb36b; }
.hw-music:focus-visible { outline: 2px solid #ffcf9c; outline-offset: 2px; }
.hw-vol { display: inline-flex; align-items: center; gap: 6px; margin-left: 4px; font-size: .8rem; cursor: pointer; flex: none; }
.hw-vol[hidden] { display: none; }
.hw-vol input { -webkit-appearance: none; appearance: none; width: 96px; height: 6px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(90deg, #ff8a2a var(--p, 25%), rgba(255, 207, 156, .25) var(--p, 25%)); }
.hw-vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #ffcf9c; border: 2px solid #ff7a1a; box-shadow: 0 0 8px rgba(255, 122, 26, .6); }
.hw-vol input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #ffcf9c; border: 2px solid #ff7a1a; }
.hw-vol input:focus-visible { outline: 2px solid #ffcf9c; outline-offset: 4px; }
.hw-vol-n { min-width: 2.6em; font-variant-numeric: tabular-nums; opacity: .85; }

/* ============ Fișa de service din prima pagină, în stil de Halloween ============
   Hârtie veche de pergament, cerneală mov-închis, portocaliu de dovleac,
   pânză de păianjen în colț și un păianjen mic atârnat de fișă. */
.season-halloween .ticket {
  --ticket: #f1e2c2; --ticket-ink: #2b1736; --ticket-muted: #7b5a4c; --ticket-line: rgba(122, 74, 46, .38);
  background:
    radial-gradient(120px 90px at 88% 18%, rgba(150, 92, 40, .16), transparent 70%),
    radial-gradient(160px 120px at 8% 92%, rgba(120, 70, 30, .18), transparent 70%),
    radial-gradient(90px 70px at 60% 60%, rgba(160, 110, 50, .08), transparent 70%),
    linear-gradient(170deg, #f6e9cc 0%, #efdcb7 55%, #e6cfa3 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 0 0 1px rgba(122, 74, 46, .25) inset,
    0 2px 4px rgba(0, 0, 0, .25), 0 30px 60px -26px rgba(0, 0, 0, .85), 0 0 46px -6px rgba(255, 122, 26, .38);
}
.season-halloween .ticket::before { background: radial-gradient(circle at 5px 0, transparent 4px, #f6e9cc 4.5px) 0 0 / 10px 7px repeat-x; }
/* pânza din colțul stânga-sus */
.season-halloween .ticket::after {
  content: ""; position: absolute; left: -1px; top: -1px; width: 58px; height: 58px; z-index: 3; pointer-events: none; opacity: .42;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%232b1736' stroke-width='.9'%3E%3Cpath d='M0 0L100 30M0 0L80 80M0 0L30 100M0 0L100 0M0 0L0 100'/%3E%3Cpath d='M22 0Q20 8 22 7Q17 14 20 16Q11 19 7 22Q8 20 0 22'/%3E%3Cpath d='M46 0Q42 15 44 14Q34 28 38 32Q24 36 15 43Q16 40 0 46'/%3E%3Cpath d='M72 0Q66 22 68 21Q52 42 57 48Q37 55 24 64Q25 60 0 72'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
}
.season-halloween .ticket-head { border-bottom: 2px solid #e8641b; }
.season-halloween .ticket-title { color: #2b1736; padding-left: 26px; position: relative; margin-left: 30px; }
.season-halloween .ticket-title::before { /* liliac mic lângă titlu */
  content: ""; position: absolute; left: 0; top: 50%; width: 20px; height: 11px; margin-top: -6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 22'%3E%3Cpath fill='%23e8641b' d='M20 6c1.4 0 2.2 1 2.6 2.2L24 6l.4 3.6C27 6 32 3 40 4c-4 2-5.5 5-5.5 9-2-2-4.5-2.4-6.5-1.4-1.6-1.8-3.6-2.4-5.6-1.6L20 16l-2.4-6c-2-.8-4-.2-5.6 1.6-2-1-4.5-.6-6.5 1.4 0-4-1.5-7-5.5-9 8-1 13 2 15.6 5.6L16 6l1.4 2.2C17.8 7 18.6 6 20 6z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.season-halloween .ticket-code { color: #9a4a1a; }
.season-halloween .ticket-row { border-bottom-style: dashed; }
.season-halloween .ticket-total span:last-child { color: #c2410c; text-shadow: 0 0 14px rgba(255, 122, 26, .35); }
.season-halloween .ticket-steps::before { background: linear-gradient(90deg, #e8641b 0 52%, rgba(122, 74, 46, .35) 52%); }
.season-halloween .ticket-steps .done i { background: #e8641b; border-color: #b8460c; box-shadow: 0 0 0 3px rgba(232, 100, 27, .18), 0 0 10px rgba(255, 122, 26, .55); }
.season-halloween .ticket-steps .done { color: #2b1736; }
.season-halloween .ticket-stamp { color: #6b21a8; border-color: #6b21a8; background: color-mix(in srgb, #f1e2c2 80%, transparent); }
/* păianjen mic care atârnă de colțul din dreapta-sus al fișei și se leagănă */
.season-halloween .hero .ticket-top { position: relative; }
.season-halloween .hero .ticket-top::after {
  content: ""; position: absolute; right: -24px; top: 4px; width: 16px; height: 92px; z-index: 3; pointer-events: none; transform-origin: 50% 0; filter: drop-shadow(0 0 3px rgba(255, 150, 70, .75));
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-9 -9 18 18'%3E%3Cg stroke='%23140a1a' stroke-width='1.2' fill='none' stroke-linecap='round'%3E%3Cpath d='M-2 -1Q-6 -6 -8 -3M-2 1Q-7 0 -8 3M-2 2Q-5 6 -7 8M2 -1Q6 -6 8 -3M2 1Q7 0 8 3M2 2Q5 6 7 8'/%3E%3C/g%3E%3Cellipse cx='0' cy='1.5' rx='3' ry='3.8' fill='%23140a1a'/%3E%3Ccircle cx='0' cy='-3' r='2' fill='%23140a1a'/%3E%3Ccircle cx='-.8' cy='-3.4' r='.55' fill='%23ff7a1a'/%3E%3Ccircle cx='.8' cy='-3.4' r='.55' fill='%23ff7a1a'/%3E%3C/svg%3E") no-repeat 50% 100% / 16px 16px,
    linear-gradient(rgba(240, 230, 220, .55), rgba(240, 230, 220, .3)) no-repeat 50% 0 / 1px calc(100% - 12px);
}
@media (prefers-reduced-motion: no-preference) {
  .season-halloween .hero .ticket-top::after { animation: hw-dangle 3.4s ease-in-out infinite; }
}
@keyframes hw-dangle { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg) translateY(4px); } }

/* Fantoma se poate apăsa (doar cât se vede) */
.hw-ghost { pointer-events: auto; cursor: pointer; visibility: hidden; }
.hw-puff { position: fixed; z-index: 95; width: 34px; height: 34px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, .95), rgba(225, 210, 255, .55) 45%, rgba(200, 170, 255, 0) 70%); }
/* Liliecii se pot apăsa */
.hw-bat { pointer-events: auto; cursor: pointer; }

/* ============ Fundalul paginilor de Halloween ============
   În loc de luminile obișnuite: o lună plină palidă sus în dreapta, lumină de dovleac jos și ceață care se mișcă
   încet pe fundul ecranului. Totul stă în spatele conținutului, în zonele goale ale paginii. */
body.season-halloween { --amb-a: rgba(140, 60, 220, .09); --amb-b: rgba(255, 120, 30, .06); --amb-c: rgba(255, 120, 30, .07); --amb-dot: rgba(120, 60, 20, .07); }
html[data-theme="dark"] body.season-halloween { --amb-a: rgba(140, 60, 220, .16); --amb-b: rgba(255, 120, 30, .08); --amb-c: rgba(255, 110, 20, .12); --amb-dot: rgba(255, 170, 90, .06); }
body.season-halloween::before {
  background:
    radial-gradient(42vmax 34vmax at 8% 12%, var(--amb-a), transparent 70%),
    radial-gradient(38vmax 30vmax at 96% 52%, var(--amb-b), transparent 70%),
    radial-gradient(60vmax 26vmax at 40% 110%, var(--amb-c), transparent 70%);
}
html[data-theme="light"] body.season-halloween::before { opacity: .7; }
body.season-halloween::after {
  background:
    radial-gradient(60% 50% at 20% 100%, rgba(190, 180, 210, .07), transparent 70%),
    radial-gradient(50% 45% at 75% 100%, rgba(190, 180, 210, .06), transparent 70%),
    radial-gradient(circle at 1px 1px, var(--amb-dot) 1px, transparent 1.4px) 0 0 / 26px 26px;
  -webkit-mask-image: none; mask-image: none;
}
@media (prefers-reduced-motion: no-preference) {
  body.season-halloween::after { animation: hw-mist 26s ease-in-out infinite alternate; }
  @keyframes hw-mist { from { background-position: -6vw 0, 6vw 0, 0 0; } to { background-position: 6vw 0, -6vw 0, 0 0; } }
}
/* în perioada temei, fundalul paginilor e cel de Halloween: fără traseele de placă de bază */
html:has(> body.season-halloween)::after { display: none; }
.hw-fog { height: min(220px, 34%); }
/* liniile din pași, subsol și „Drumul meu”: dovleac și mov */
body.season-halloween { --g1: #ff7a1a; --g2: #a855f7; --g3: #ffb347; }
