/* ============================================================
   HTL Web TV — foglio di stile
   Palette HTL: blu navy profondo per fondi e superfici, teal/ciano
   come accento e come banda dell'header.
   Il tema (chiaro/scuro) è gestito con variabili CSS: il default
   è scuro su :root, la variante chiara sotto [data-theme="light"].
   Il pulsante tema in header commuta l'attributo data-theme su <html>.
   ============================================================ */

/* ---- Font Montserrat (subset locali, offline) ---- */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/montserrat-vietnamese.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/montserrat-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Palette / tema scuro (default) ---- */
:root {
  --page-bg: #081530;
  --text: #F2F5FA;
  --mut: #94A8CC;
  --dim: #6B81AC;
  --border: rgba(17,149,175,0.22);
  --panel-bg: #0E2145;
  --input-bg: rgba(255,255,255,0.05);
  --input-border: rgba(17,149,175,0.35);
  --hero-bg: radial-gradient(1100px 500px at 75% -10%, rgba(17,149,175,0.30), transparent 65%), linear-gradient(150deg, #16306B 0%, #102454 55%, #081530 100%);
  --grad-end: #8CDCEC;
  --accent-strong: #4FC2DA;
  --ghost-border: rgba(242,245,250,0.25);
  --player-shadow: 0 30px 80px rgba(0,0,0,0.6);
  --ticker-bg: rgba(11,42,94,0.25);
  --ticker-text: #8CDCEC;
  --card-bg: rgba(255,255,255,0.03);
  --card-border: rgba(17,149,175,0.18);
  --strip-bg: linear-gradient(transparent, rgba(5,14,35,0.97) 55%);
  --chip-bg: rgba(255,255,255,0.04);
  --chip-color: #94A8CC;
  --chip-border: rgba(17,149,175,0.3);
  --brand-tag: rgba(255,255,255,0.78); /* "WEB TV" accanto al marchio */

  /* Accenti fissi, indipendenti dal tema */
  --accent: #1195AF;
  --accent-2: #4FC2DA;
  --accent-dark: #082146;
  --live: #FF5A5A;

  /* Banda header teal: stessa identità in tema chiaro e scuro.
     È il teal campionato dal logo HTL, opaco perché il PNG del marchio
     porta con sé lo stesso fondo e deve fondersi senza stacchi. */
  --header-bg: #00829C;
  --header-text: #FFFFFF;
  --header-mut: rgba(255,255,255,0.86);
  --header-border: rgba(255,255,255,0.18);
  --header-hover: rgba(255,255,255,0.14);
  --header-active: rgba(255,255,255,0.22);
  --header-field-bg: rgba(255,255,255,0.16);
  --header-field-border: rgba(255,255,255,0.34);
  --logo-navy: #1C4E81;      /* navy campionato dal marchio HTL */

  /* Banda footer blu: è il navy del marchio HTL per il footer (#0E4C85),
     così il fondo incorporato nel PNG si fonde senza stacchi. */
  --footer-bg: #0E4C85;
  --footer-text: #FFFFFF;
  --footer-mut: rgba(255,255,255,0.80);
  --footer-dim: rgba(255,255,255,0.66);
  --footer-border: rgba(255,255,255,0.20);
  --footer-link-hover: #8CDCEC;
}

[data-theme="light"] {
  --page-bg: #F4F7FC;
  --text: #0B1A33;
  --mut: #3C4E70;
  --dim: #5D6E8E;
  --border: #DBE3F0;
  --panel-bg: #FFFFFF;
  --input-bg: #FFFFFF;
  --input-border: #C3D1E6;
  --hero-bg: radial-gradient(1000px 560px at 65% 25%, rgba(17,149,175,0.20), transparent 60%), linear-gradient(160deg, #DDE6F5 0%, #F4F7FC 70%);
  --grad-end: #0C7A92;
  --accent-strong: #0C7A92;
  --ghost-border: rgba(11,42,94,0.35);
  --player-shadow: 0 30px 70px rgba(11,42,94,0.25);
  --ticker-bg: rgba(17,149,175,0.08);
  --ticker-text: #0C7A92;
  --card-bg: #FFFFFF;
  --card-border: #DBE3F0;
  --strip-bg: linear-gradient(transparent, rgba(232,238,248,0.97) 55%);
  --chip-bg: #FFFFFF;
  --chip-color: #3C4E70;
  --chip-border: #C3D1E6;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: var(--page-bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #8CDCEC; }
::selection { background: var(--accent); color: var(--page-bg); }
button { font-family: 'Montserrat', sans-serif; }

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes gridmove { from { background-position: 0 0; } to { background-position: 0 48px; } }
@keyframes barwave { 0%,100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

.page { min-height: 100vh; background: var(--page-bg); color: var(--text); transition: background 0.3s, color 0.3s; }
.wrap { max-width: 1240px; margin: 0 auto; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  color: var(--header-text);
}
.header-inner { max-width: 1240px; margin: 0 auto; padding: 14px 32px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
/* Marchio HTL: immagine unica (icona + lettering) sulla banda teal. */
.brand-logo { display: block; width: 114px; height: 40px; }
.brand-tag { align-self: flex-end; padding-bottom: 5px; font-size: 10.5px; letter-spacing: 4px; font-weight: 600; color: var(--brand-tag); }

.nav { display: flex; gap: 6px; margin-left: 12px; align-items: center; }
.nav-btn {
  padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14px;
  color: var(--header-mut); background: transparent; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 7px; transition: background 0.15s, color 0.15s;
}
.nav-btn:hover { background: var(--header-hover); color: var(--header-text); }
.nav-btn.active { color: var(--header-text); background: var(--header-active); }
.nav-link { padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--header-mut); }
.nav-link:hover { background: var(--header-hover); color: var(--header-text); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.6s infinite; }

.channels-wrap { position: relative; }
.channels-panel {
  position: absolute; top: calc(100% + 10px); left: 0; width: 460px; padding: 14px;
  border-radius: 16px; background: var(--panel-bg); border: 1px solid var(--border);
  box-shadow: 0 24px 70px rgba(0,0,0,0.45); display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
}
.channels-panel[hidden] { display: none; }
.channel-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: none; background: transparent; cursor: pointer; text-align: left; }
.channel-item:hover { background: rgba(17,149,175,0.12); }
/* Tile canali: solo contorno colorato — bordo e icona nel colore del canale
   (--c), con una velatura appena accennata dello stesso colore. */
.channel-tile { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--c, var(--border)); color: var(--c, var(--text)); background: color-mix(in srgb, var(--c, transparent) 12%, transparent); }
.channel-name { display: block; font-weight: 700; font-size: 13.5px; color: var(--text); }
.channel-count { display: block; font-size: 11.5px; color: var(--dim); font-weight: 600; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.search-input {
  width: 210px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--header-field-border);
  background: var(--header-field-bg); color: var(--header-text); font-family: 'Montserrat', sans-serif; font-size: 13.5px; outline: none;
}
.search-input::placeholder { color: rgba(255,255,255,0.72); }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--header-field-border);
  background: var(--header-field-bg); color: var(--header-text); font-size: 16px; cursor: pointer;
}
.theme-toggle:hover { border-color: #FFFFFF; background: var(--header-active); }
.btn-pill-accent {
  padding: 9px 20px; border-radius: 999px; border: none;
  background: #FFFFFF; color: var(--logo-navy); font-weight: 700; font-size: 13.5px; cursor: pointer;
}
.btn-pill-accent:hover { filter: brightness(0.94); }

/* ---- Sezioni pagina (mostrate/nascoste via JS) ---- */
.screen[hidden] { display: none; }

/* ---- Bottoni pill (usati anche nel 404) ---- */
.btn-cta { padding: 13px 28px; border-radius: 999px; border: none; background: linear-gradient(120deg, #1195AF, #4FC2DA); color: #082146; font-weight: 700; font-size: 15px; cursor: pointer; box-shadow: 0 8px 32px rgba(17,149,175,0.35); transition: transform 0.15s, box-shadow 0.15s; }
.btn-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(17,149,175,0.5); }
.btn-ghost { padding: 13px 24px; border-radius: 999px; border: 1px solid var(--ghost-border); background: transparent; color: var(--text); font-weight: 600; font-size: 15px; cursor: pointer; }
.btn-ghost:hover { border-color: #4FC2DA; color: #1195AF; }

/* ---- Hero home: anteprima live + palinsesto di oggi ---- */
.home-hero { max-width: 1240px; margin: 0 auto; padding: 40px 32px 0; }
.hero-card { display: grid; grid-template-columns: 1fr 380px; border-radius: 18px; overflow: hidden; border: 1px solid var(--card-border); background: var(--card-bg); }
.hero-live { position: relative; display: block; background: linear-gradient(135deg, #0B2A5E, #123566); min-height: 430px; cursor: pointer; }
.hero-live-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.hero-live-btn { width: 80px; height: 80px; border-radius: 50%; background: rgba(242,245,250,0.94); display: flex; align-items: center; justify-content: center; font-size: 28px; color: #0B2A5E; box-shadow: 0 0 0 14px rgba(17,149,175,0.22); }
.hero-live-badges { position: absolute; top: 18px; left: 18px; display: flex; gap: 8px; }
.hero-badge-live { display: flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 5px; background: #FF5A5A; color: #FFFFFF; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.hero-badge-live .live-dot { background: #fff; }
.hero-badge-viewers { padding: 4px 12px; border-radius: 5px; background: rgba(5,14,35,0.7); color: #F2F5FA; font-size: 11px; font-weight: 700; }
.hero-live-caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 40px 22px 18px; background: linear-gradient(transparent, rgba(5,14,35,0.92)); color: #F2F5FA; }
.hero-live-title { font-size: 24px; font-weight: 700; margin: 0; }
.hero-live-sub { font-size: 13px; color: #94A8CC; margin-top: 4px; }

.today-panel { border-left: 1px solid var(--card-border); padding: 24px 26px; display: flex; flex-direction: column; }
.today-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: 2px; color: var(--dim); margin-bottom: 16px; }
.today-list { display: flex; flex-direction: column; flex: 1; }
.today-item { display: flex; gap: 14px; padding: 10px 0 10px 14px; border-left: 3px solid var(--card-border); }
.today-item.live { border-left-color: #FF5A5A; }
.today-time { font-weight: 700; font-size: 12px; color: var(--dim); width: 42px; flex-shrink: 0; }
.today-item.live .today-time { color: #FF5A5A; }
.today-title { font-weight: 700; font-size: 13.5px; line-height: 1.35; }
.today-sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; font-weight: 600; }
.today-btn { margin-top: 16px; padding: 11px; border-radius: 999px; border: 1.5px solid var(--input-border); background: transparent; color: var(--text); font-weight: 700; font-size: 12.5px; cursor: pointer; text-align: center; display: block; }
.today-btn:hover { border-color: #4FC2DA; color: #1195AF; }

/* ---- On demand ---- */
.ondemand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.cont-card { cursor: pointer; }
.cont-thumb { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; transition: transform 0.2s; }
.cont-card:hover .cont-thumb { transform: translateY(-3px); }
.dur-badge { position: absolute; bottom: 6px; right: 6px; padding: 2px 7px; border-radius: 4px; background: rgba(5,14,35,0.85); font-size: 10px; font-weight: 700; color: #F2F5FA; }
.progress-bar { position: absolute; bottom: 0; left: 0; height: 3px; background: #1195AF; }
.cont-title { font-weight: 700; font-size: 12.5px; margin-top: 8px; color: var(--text); line-height: 1.35; }

/* ---- Ticker ---- */
.ticker { margin-top: 48px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--ticker-bg); display: flex; align-items: center; gap: 16px; overflow: hidden; }
/* Etichetta della fonte: fissa a sinistra, fuori dal nastro che scorre. */
.ticker-source { flex: 0 0 auto; align-self: stretch; display: flex; align-items: center; padding: 10px 16px; background: var(--accent); color: var(--accent-dark); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; white-space: nowrap; }
.ticker-viewport { flex: 1 1 auto; overflow: hidden; padding: 10px 0; }
.ticker-track { display: flex; width: max-content; animation: ticker 60s linear infinite; font-size: 13px; font-weight: 600; white-space: nowrap; }
.ticker-group { display: flex; gap: 48px; padding-right: 48px; }
.ticker-track a, .ticker-track span { color: var(--ticker-text); text-decoration: none; }
.ticker-track a:hover { color: var(--accent-strong); text-decoration: underline; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-viewport { overflow-x: auto; }
}

/* ---- Sezioni generiche ---- */
.section { max-width: 1240px; margin: 0 auto; padding: 56px 32px 24px; }
.section-lead { margin-bottom: 36px; }
.section-lead h2 { font-size: 30px; font-weight: 700; margin: 0 0 8px; }
.section-lead p { font-size: 15px; color: var(--mut); margin: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.section-head h1, .section-head h2 { font-size: 28px; font-weight: 700; margin: 0; }
.link-accent { font-weight: 600; font-size: 14px; color: #1195AF; }

/* ---- Accessi rapidi ---- */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.quick-card { border-radius: 16px; padding: 32px; border: 1px solid var(--card-border); background: var(--card-bg); cursor: pointer; transition: transform 0.2s, border-color 0.2s; }
.quick-card:hover { transform: translateY(-4px); border-color: rgba(79,194,218,0.6); }
.quick-icon { width: 44px; height: 44px; border-radius: 11px; background: linear-gradient(135deg, #0B2A5E, #4FC2DA); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.quick-title { font-weight: 700; font-size: 17px; margin-bottom: 6px; }
.quick-desc { font-size: 13.5px; color: var(--mut); line-height: 1.55; }
.quick-more { font-weight: 700; font-size: 13.5px; color: #1195AF; margin-top: 14px; }

/* ---- Chip di filtro ---- */
/* Menu a scorrimento orizzontale: con molte aree/argomenti i chip non vanno
   più a capo su tante righe, ma si scorrono su un'unica riga (touch/trackpad).
   Senza JS resta comunque scorrevole; il JS aggiunge frecce e sfumature. */
.chip-row {
  display: flex; gap: 10px; flex-wrap: nowrap;
  overflow-x: auto; overflow-y: hidden;
  margin-bottom: 32px; padding-bottom: 2px;
  scroll-behavior: smooth; scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;            /* Firefox */
  overscroll-behavior-x: contain;
}
.chip-row::-webkit-scrollbar { display: none; }   /* WebKit */
.chip {
  flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--chip-border);
  background: var(--chip-bg); color: var(--chip-color); font-weight: 600; font-size: 13.5px;
  font-family: 'Montserrat', sans-serif; cursor: pointer;
}
.chip:hover { border-color: #4FC2DA; }
.chip.active { background: linear-gradient(120deg, #1195AF, #4FC2DA); color: #082146; border-color: transparent; }
.chip-row.sm .chip { padding: 7px 14px; font-size: 12.5px; }
/* Chip di categoria: pallino nel colore del canale; da attivo si riempie
   del colore, col testo (--ink) scelto per contrasto. "Tutti" resta teal. */
.chip.chip-cat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: 0 0 auto; margin-right: 8px; }
.chip.chip-cat:hover { border-color: var(--c); }
.chip.chip-cat.active { background: var(--c); color: var(--ink); border-color: transparent; }
.chip.chip-cat.active::before { display: none; }

/* Contenitore aggiunto dal JS: sfumature ai bordi + frecce di scorrimento. */
/* min-width:0 è essenziale quando lo scroller vive dentro una griglia/flex
   (es. la colonna della pagina Podcast): senza, la colonna si allarga fino a
   contenere tutti i chip e sfonda la pagina invece di lasciarli scorrere. */
.chip-scroller { position: relative; margin-bottom: 32px; min-width: 0; }
.chip-scroller .chip-row { margin-bottom: 0; }
/* Sfumature che segnalano "c'è dell'altro" a sinistra/destra. */
.chip-scroller::before, .chip-scroller::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 48px; z-index: 1;
  pointer-events: none; opacity: 0; transition: opacity 0.18s ease;
}
.chip-scroller::before { left: 0; background: linear-gradient(90deg, var(--page-bg), rgba(0,0,0,0)); }
.chip-scroller::after { right: 0; background: linear-gradient(270deg, var(--page-bg), rgba(0,0,0,0)); }
.chip-scroller.can-left::before { opacity: 1; }
.chip-scroller.can-right::after { opacity: 1; }
/* Frecce: compaiono solo se la riga trabocca ed è scorrevole in quel verso. */
.chip-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--chip-border); background: var(--panel-bg); color: var(--text);
  cursor: pointer; padding: 0; font-size: 15px; line-height: 1;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18); transition: opacity 0.18s ease, border-color 0.18s ease;
}
.chip-nav:hover { border-color: #4FC2DA; }
.chip-nav.prev { left: -6px; }
.chip-nav.next { right: -6px; }
.chip-nav[hidden] { display: none; }
/* Le frecce sono un vantaggio col mouse: su touch si scorre col dito. */
@media (hover: none) { .chip-nav { display: none; } }

/* ---- Griglia video ---- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.video-card { border-radius: 16px; overflow: hidden; border: 1px solid var(--card-border); background: var(--card-bg); cursor: pointer; transition: transform 0.2s, border-color 0.2s; }
.video-card:hover { transform: translateY(-4px); border-color: rgba(79,194,218,0.6); }
.video-thumb { position: relative; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; }
.play-circle { width: 48px; height: 48px; border-radius: 50%; background: rgba(8,21,48,0.55); border: 1.5px solid rgba(242,245,250,0.7); display: flex; align-items: center; justify-content: center; color: #F2F5FA; font-size: 15px; }
.thumb-dur { position: absolute; bottom: 10px; right: 10px; padding: 3px 8px; border-radius: 5px; background: rgba(5,14,35,0.8); color: #F2F5FA; font-size: 11.5px; font-weight: 700; }
.thumb-cat { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 5px; background: rgba(17,149,175,0.9); color: #082146; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; }
.video-body { padding: 16px 18px 18px; }
.video-title { font-weight: 700; font-size: 15.5px; line-height: 1.35; text-wrap: pretty; }
.video-doctor { font-size: 13px; color: var(--mut); margin-top: 8px; }
.video-views { font-size: 12px; color: var(--dim); margin-top: 4px; font-weight: 600; }
.no-results { padding: 48px; text-align: center; color: var(--dim); font-weight: 600; }

/* ---- Diretta ---- */
.diretta-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.player-live { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid rgba(17,149,175,0.4); background: linear-gradient(135deg, #0B2A5E 0%, #123566 70%); aspect-ratio: 16/9; box-shadow: var(--player-shadow); }
.player-live-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.player-live-btn { width: 88px; height: 88px; border-radius: 50%; background: rgba(242,245,250,0.94); display: flex; align-items: center; justify-content: center; font-size: 30px; color: #0B2A5E; box-shadow: 0 0 0 16px rgba(17,149,175,0.25); cursor: pointer; }
.badge-live { position: absolute; top: 16px; left: 16px; padding: 5px 12px; border-radius: 6px; background: #FF5A5A; color: #FFFFFF; font-size: 11.5px; font-weight: 700; letter-spacing: 1.5px; }
.badge-viewers { position: absolute; top: 16px; right: 16px; padding: 5px 12px; border-radius: 6px; background: rgba(5,14,35,0.7); color: #F2F5FA; font-size: 11.5px; font-weight: 700; }
.player-controls { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 18px; display: flex; align-items: center; gap: 14px; background: linear-gradient(transparent, rgba(5,14,35,0.85)); color: #F2F5FA; }
.player-track { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.2); }
.player-track > div { height: 100%; border-radius: 2px; background: #FF5A5A; }
.player-time { font-size: 12px; color: #94A8CC; font-weight: 600; }
.diretta-meta { margin-top: 20px; }
.diretta-meta h1 { font-size: 28px; font-weight: 700; margin: 0 0 8px; }
.diretta-meta p { font-size: 14px; color: var(--mut); line-height: 1.6; max-width: 640px; }
.side-card { border-radius: 16px; border: 1px solid var(--card-border); background: var(--card-bg); padding: 22px; }
.side-card-title { font-weight: 700; font-size: 16px; margin-bottom: 16px; }
.schedule-list { display: flex; flex-direction: column; gap: 14px; }
.schedule-item { display: flex; gap: 14px; align-items: flex-start; }
.schedule-when { flex-shrink: 0; width: 52px; text-align: center; padding: 6px 0; border-radius: 9px; background: rgba(17,149,175,0.12); color: #1195AF; }
.schedule-day { font-weight: 700; font-size: 14px; }
.schedule-time { font-size: 11px; font-weight: 700; }
.schedule-title { font-weight: 700; font-size: 13.5px; line-height: 1.35; }
.schedule-area { font-size: 12px; color: var(--dim); margin-top: 3px; font-weight: 600; }
.btn-remind { width: 100%; margin-top: 18px; padding: 11px; border-radius: 999px; border: 1px solid rgba(17,149,175,0.4); background: transparent; color: #1195AF; font-weight: 700; font-size: 13px; cursor: pointer; }
.btn-remind:hover { background: rgba(17,149,175,0.1); }

/* ---- Serie ---- */
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.series-card { border-radius: 16px; overflow: hidden; border: 1px solid var(--card-border); background: var(--card-bg); cursor: pointer; transition: transform 0.2s, border-color 0.2s; }
.series-card:hover { transform: translateY(-4px); border-color: rgba(79,194,218,0.6); }
.series-thumb { position: relative; aspect-ratio: 3/2; display: flex; align-items: flex-end; padding: 16px; }
.series-badge { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 5px; background: rgba(5,14,35,0.75); color: #8CDCEC; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; }
.series-dots { display: flex; gap: 5px; }
.series-dots span { width: 26px; height: 4px; border-radius: 2px; background: rgba(242,245,250,0.45); }
.series-dots span:first-child { background: rgba(242,245,250,0.9); }
.series-body { padding: 16px 18px 18px; }
.series-title { font-weight: 700; font-size: 15.5px; line-height: 1.35; text-wrap: pretty; }
.series-desc { font-size: 13px; color: var(--mut); margin-top: 8px; line-height: 1.5; }
.series-freq { font-size: 12px; color: var(--dim); margin-top: 8px; font-weight: 600; }
.series-card { display: block; color: inherit; }
.series-card:hover { color: inherit; }

/* ---- Serie: dettaglio con episodi ---- */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--dim); margin-bottom: 20px; }
.breadcrumb a { color: var(--mut); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-strong); }
.breadcrumb span[aria-current] { color: var(--text); }
.serie-detail { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: center; margin-bottom: 40px; }
.serie-detail-hero { position: relative; width: 300px; max-width: 100%; border-radius: 16px; aspect-ratio: 3/2; display: flex; align-items: flex-end; padding: 16px; overflow: hidden; }
.serie-detail-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.serie-detail-cat { position: static; display: inline-flex; align-self: flex-start; margin-bottom: 12px; }
.serie-detail-info h1 { font-size: 30px; font-weight: 700; line-height: 1.2; margin: 0; text-wrap: pretty; }
.serie-detail-desc { font-size: 15px; line-height: 1.6; color: var(--mut); margin: 12px 0 0; max-width: 620px; }
.serie-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--dim); margin-top: 16px; }
.serie-detail-play { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; margin-top: 22px; padding: 9px 20px 9px 10px; border-radius: 999px; border: 1px solid rgba(17,149,175,0.4); background: rgba(17,149,175,0.10); color: var(--accent-strong); font-weight: 700; font-size: 14px; cursor: pointer; transition: background 0.2s; }
.serie-detail-play:hover { background: rgba(17,149,175,0.18); }
.serie-detail-play .play-circle { width: 38px; height: 38px; font-size: 13px; }
.serie-eps-title { font-size: 20px; font-weight: 700; margin: 0 0 16px; }
.episode-list { display: flex; flex-direction: column; gap: 10px; }
.episode-item { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--card-border); background: var(--card-bg); cursor: pointer; transition: border-color 0.2s, transform 0.2s; }
.episode-item:hover { border-color: rgba(79,194,218,0.6); transform: translateX(3px); }
.episode-num { flex-shrink: 0; width: 44px; text-align: center; font-weight: 700; font-size: 17px; color: var(--accent-strong); line-height: 1; }
.episode-num span { display: block; font-size: 9.5px; letter-spacing: 1px; color: var(--dim); margin-bottom: 2px; }
.episode-thumb { position: relative; flex-shrink: 0; width: 108px; aspect-ratio: 16/9; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.episode-thumb .play-circle { width: 34px; height: 34px; font-size: 11px; }
.episode-info { flex: 1; min-width: 0; }
.episode-title { font-weight: 700; font-size: 15px; line-height: 1.35; text-wrap: pretty; }
.episode-sub { font-size: 12.5px; color: var(--dim); margin-top: 4px; font-weight: 600; }
.episode-dur { flex-shrink: 0; font-size: 12.5px; color: var(--mut); font-weight: 600; width: 48px; text-align: right; }

/* ---- Podcast ---- */
.podcast-grid { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: stretch; }
/* Le colonne devono poter restringersi, così il menu chip scorre invece di
   allargare la colonna (min-width:auto è il default degli item di grid/flex). */
.podcast-grid > * { min-width: 0; }
.podcast-hero { border-radius: 16px; padding: 28px; background: linear-gradient(150deg, #0B2A5E, #0C7A92); color: #F2F5FA; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.podcast-hero-icon { width: 56px; height: 56px; border-radius: 14px; background: rgba(242,245,250,0.14); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.podcast-hero-title { font-weight: 700; font-size: 20px; margin-bottom: 8px; }
.podcast-hero-desc { font-size: 14px; line-height: 1.6; color: rgba(242,245,250,0.85); }
.podcast-avail { display: flex; align-items: center; gap: 12px; }
.podcast-avail .label { font-size: 12.5px; font-weight: 700; letter-spacing: 1px; color: rgba(242,245,250,0.8); }
.podcast-avail .pill { padding: 4px 10px; border-radius: 5px; background: rgba(5,14,35,0.4); font-size: 11.5px; font-weight: 700; }
.podcast-list { display: flex; flex-direction: column; gap: 10px; }
.podcast-item { display: flex; align-items: center; gap: 18px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--card-border); background: var(--card-bg); cursor: pointer; transition: border-color 0.2s; }
.podcast-item:hover { border-color: rgba(79,194,218,0.6); }
.podcast-play { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: linear-gradient(120deg, #1195AF, #4FC2DA); display: flex; align-items: center; justify-content: center; color: #082146; font-size: 15px; }
.podcast-info { flex: 1; min-width: 0; }
.podcast-title { font-weight: 700; font-size: 15px; }
.podcast-sub { font-size: 12.5px; color: var(--dim); margin-top: 3px; font-weight: 600; }
.podcast-eq { display: flex; gap: 3px; align-items: flex-end; height: 18px; flex-shrink: 0; }
.podcast-eq span { width: 3px; border-radius: 2px; background: var(--accent-strong); }
.podcast-dur { font-size: 12.5px; color: var(--mut); font-weight: 600; width: 48px; text-align: right; flex-shrink: 0; }

/* ---- CTA ---- */
.cta { max-width: 1240px; margin: 104px auto 112px; padding: 0 32px; }
.cta-inner { border-radius: 20px; padding: 44px 48px; background: linear-gradient(120deg, #0B2A5E 0%, #0C7A92 55%, #1195AF 100%); display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; color: #F2F5FA; }
.cta-title { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.cta-desc { font-size: 15px; color: rgba(242,245,250,0.85); max-width: 520px; line-height: 1.6; }
.cta-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; max-width: 100%; }
/* Su schermi stretti il pulsante va a capo sotto il campo, invece di far
   sbordare il form fuori dal riquadro della CTA. */
.cta-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Solo il campo della riga email: se il selettore fosse `.cta-form input`
   colpirebbe anche la checkbox del consenso, che diventerebbe larga 260px
   spingendo il testo lontano dalla casella. */
.cta-form-row input { padding: 13px 18px; border-radius: 999px; border: none; width: 260px; flex: 1 1 200px; min-width: 0; font-family: 'Montserrat', sans-serif; font-size: 14px; outline: none; }
.cta-form button { padding: 13px 26px; border-radius: 999px; border: none; background: #082146; color: #8CDCEC; font-weight: 700; font-size: 14.5px; font-family: 'Montserrat', sans-serif; cursor: pointer; }
.cta-form button:hover { background: #04102B; }

/* ---- Footer (legato al tema: chiaro in light, near-black in dark) ---- */
.site-footer { border-top: 1px solid var(--footer-border); background: var(--footer-bg); color: var(--footer-text); }
.footer-inner { max-width: 1240px; margin: 0 auto; padding: 56px 32px 36px; display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer-about { max-width: 440px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
/* Marchio HTL su fondo blu: immagine unica, altezza fissa e larghezza
   automatica per non alterare le proporzioni dell'originale (253x97). */
.footer-logo { display: block; height: 48px; width: auto; flex-shrink: 0; }
.footer-brand-tag { align-self: flex-end; padding-bottom: 6px; font-size: 10px; letter-spacing: 3.5px; font-weight: 600; color: var(--footer-mut); }
.footer-desc { font-size: 13.5px; line-height: 1.65; color: var(--footer-mut); margin: 0 0 20px; }
.footer-org { display: flex; align-items: flex-start; gap: 14px; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; color: var(--footer-mut); }
.footer-contact a { color: var(--footer-mut); text-decoration: none; }
.footer-contact a:hover { color: var(--footer-link-hover); }
.footer-cols { display: flex; gap: 56px; font-size: 14px; }
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col-title { font-weight: 700; color: var(--footer-text); letter-spacing: 0.5px; margin-bottom: 2px; }
.footer-col a { color: var(--footer-dim); text-decoration: none; }
.footer-col a:hover { color: var(--footer-link-hover); }
.footer-disclaimer { max-width: 1240px; margin: 0 auto; padding: 4px 32px 24px; font-size: 12px; line-height: 1.6; color: var(--footer-dim); }
.footer-copy { text-align: center; padding: 18px 32px; font-size: 12px; color: var(--footer-dim); border-top: 1px solid var(--footer-border); }

/* ---- Torna su (scroll to top) ---- */
.scroll-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(17,149,175,0.45);
  background: var(--accent-strong); color: #082146;
  font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 0.25s, transform 0.25s, background 0.2s;
}
.scroll-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.scroll-top:hover { background: var(--accent); }
.scroll-top[hidden] { display: none; }
@media (max-width: 900px) {
  .scroll-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

/* ---- Player modal ---- */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(4,10,26,0.85); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 40px; }
.modal-overlay[hidden] { display: none; }
.modal { width: min(960px, 100%); border-radius: 18px; overflow: hidden; border: 1px solid rgba(17,149,175,0.4); background: #082146; color: #F2F5FA; box-shadow: 0 40px 120px rgba(0,0,0,0.8); }
.modal-stage { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #0B2A5E, #123566); display: flex; align-items: center; justify-content: center; }
.modal-play { width: 84px; height: 84px; border-radius: 50%; background: rgba(242,245,250,0.94); display: flex; align-items: center; justify-content: center; font-size: 28px; color: #0B2A5E; }
.modal-close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%; background: rgba(8,21,48,0.7); display: flex; align-items: center; justify-content: center; color: #F2F5FA; font-size: 15px; cursor: pointer; border: none; }
.modal-controls { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 18px; display: flex; align-items: center; gap: 14px; background: linear-gradient(transparent, rgba(5,14,35,0.85)); }
.modal-track { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.2); }
.modal-track > div { width: 32%; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #1195AF, #4FC2DA); }
.modal-body { padding: 20px 24px; }
.modal-title { font-weight: 700; font-size: 18px; }
.modal-sub { font-size: 13.5px; color: #94A8CC; margin-top: 6px; }

/* ---- Responsive ---- */
/* ---- Reset per i controlli resi come <a> (link reali per la SEO) ---- */
/* Molti "bottoni"/card ora sono ancore: neutralizziamo il colore/underline
   ereditati dai link e preserviamo l'aspetto originale, anche in hover. */
.brand, .nav-btn, .quick-card, .hero-play, .btn-cta, .btn-ghost,
.chip, .channel-item, .thumb-cat, .video-card, .series-card, .podcast-item {
  text-decoration: none;
}
.brand { color: inherit; }
.brand:hover { color: inherit; }
.nav-btn { text-decoration: none; }
.nav-btn:hover { color: var(--header-text); }
.nav-btn.active, .nav-btn.active:hover { color: var(--header-text); }
.nav-link:hover { color: var(--header-text); }
.quick-card, .quick-card:hover { color: var(--text); }
.chip { display: inline-flex; align-items: center; }
.chip:hover { color: var(--chip-color); }
.chip.active, .chip.active:hover { color: #082146; }
.channel-item.active { background: rgba(17,149,175,0.12); }
.btn-cta { display: inline-flex; align-items: center; }
.btn-cta:hover { color: #082146; }
.btn-ghost { display: inline-flex; align-items: center; }
.thumb-cat:hover { color: #082146; }
.search-form { margin: 0; display: flex; }

@media (max-width: 900px) {
  .header-inner { flex-wrap: wrap; gap: 14px; }
  .nav { margin-left: 0; order: 3; width: 100%; flex-wrap: wrap; }
  .search-input { width: 150px; }
  .hero-card { grid-template-columns: 1fr; }
  .today-panel { border-left: none; border-top: 1px solid var(--card-border); }
  .hero-live { min-height: 300px; }
  .quick-grid { grid-template-columns: 1fr; }
  .diretta-grid, .podcast-grid { grid-template-columns: 1fr; }
  .channels-panel { width: 320px; grid-template-columns: 1fr; }
  .serie-detail { grid-template-columns: 1fr; gap: 20px; }
  .serie-detail-info h1 { font-size: 24px; }
  .episode-thumb { display: none; }
}

/* ---------- Consenso newsletter (CTA, su fondo teal) ---------- */
.cta-consent { display: flex; gap: 9px; align-items: flex-start; max-width: 380px; font-size: 12px; line-height: 1.5; color: rgba(242,245,250,0.85); }
.cta-consent input { width: 15px; height: 15px; margin: 2px 0 0; flex: 0 0 auto; accent-color: #8CDCEC; cursor: pointer; }
.cta-consent a { color: #D3F0F9; text-decoration: underline; }

/* ---------- Pagine legali (privacy, cookie, note legali) ---------- */
.legal { max-width: 820px; }
.legal h1 { font-size: 32px; font-weight: 700; margin: 0 0 6px; }
.legal h2 { font-size: 20px; font-weight: 700; margin: 32px 0 10px; }
.legal p, .legal li { font-size: 15px; line-height: 1.7; color: var(--text); }
.legal ul { margin: 10px 0; padding-left: 20px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--accent-strong); text-decoration: underline; }
.legal code { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 5px; padding: 1px 6px; font-size: 13px; }
.legal-updated { color: var(--mut); font-size: 13px; margin: 0 0 24px; }
.legal-note { margin-top: 32px; padding: 14px 16px; border-radius: 10px; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--mut); font-size: 13.5px; }
.legal-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border: 1px solid var(--card-border); vertical-align: top; }
.legal-table th { background: var(--card-bg); font-weight: 700; }
