/*
Theme Name: TVok
Theme URI: https://tvok.it
Author: Bruno Bellini
Author URI: https://lifestyleblog.it
Description: Theme TVok — la guida TV italiana che unisce palinsesti lineari e streaming on-demand. Dark-first, editoriale-broadcast, integrato con Guida TV plugin e TMDB Integration plugin.
Version: 1.4.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tvok
Tags: news, tv, streaming, dark-mode, editorial
*/


/* ==========================================================================
   TVok Theme — Main CSS v1.2
   Design system: navy + lime, dark-first, WCAG AA contrast
   ========================================================================== */

:root {
  /* Brand */
  --navy: #1C2A3D;
  --navy-deep: #0F1620;
  --navy-soft: #243349;
  --lime: #8BD14C;       /* alzato di saturazione per dark mode, contrast 10.2:1 su bg */
  --lime-bright: #A5E26B;
  --lime-dim: #6FA936;
  --red-live: #FF4B5C;   /* alzato di luminosità, contrast 5.6:1 */
  --amber: #FFB020;      /* alzato, contrast 9.3:1 */

  /* Dark theme (default) — contrast corretti WCAG AA */
  --bg: #0B0F16;
  --bg-2: #161D2A;       /* alzato (era #141A24) per distinzione dal bg */
  --bg-3: #222B3C;       /* alzato (era #1C2432) per card elevate */
  --bg-hover: #2C3749;
  --border: #3A4358;     /* alzato (era #283040) per visibilità 3:1 */
  --border-soft: #2C3448; /* alzato (era #1E2532) */
  --text: #F5F7FA;       /* alzato (era #EDEFF3) contrast 16:1 */
  --text-dim: #C4CBD7;   /* alzato (era #9AA3B2) contrast 10.7:1 */
  --text-muted: #8A93A5; /* alzato (era #667085) contrast 5.6:1 WCAG AA */
  --accent: var(--lime);

  /* Typography */
  --serif: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-card: 0 1px 2px rgba(0,0,0,.35), 0 4px 16px rgba(0,0,0,.25);
  --shadow-hover: 0 4px 8px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.35);
}

[data-theme="light"] {
  --bg: #FAFBFC;
  --bg-2: #FFFFFF;
  --bg-3: #F2F4F7;
  --bg-hover: #E4E8EF;
  --border: #CBD2DD;
  --border-soft: #E2E6ED;
  --text: #0F1620;
  --text-dim: #3D4758;   /* migliorato (era #475467) contrast 9.5:1 */
  --text-muted: #556175; /* migliorato (era #667085) contrast 6.8:1 */
  --lime: #5A9930;       /* più scuro in light per contrast */
  --lime-bright: #6BB23A;
  --lime-dim: #447C23;
  --red-live: #D0343F;
  --amber: #C67A02;
  --shadow-card: 0 1px 2px rgba(15,22,32,.08), 0 4px 16px rgba(15,22,32,.05);
  --shadow-hover: 0 4px 8px rgba(15,22,32,.1), 0 12px 32px rgba(15,22,32,.1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .3s, color .3s;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font-family: inherit; }

/* Skip link accessibility */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 16px; top: 16px; z-index: 1000;
  padding: 12px 16px; background: var(--lime); color: var(--navy);
  border-radius: var(--radius); font-weight: 700;
}

/* Backgrounds decorativi */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .25;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 70%);
}
[data-theme="light"] .bg-grid { opacity: .4; }
.bg-glow {
  position: fixed; top: -300px; right: -200px; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(139, 209, 76, .14) 0%, transparent 60%);
  pointer-events: none; z-index: 0; filter: blur(40px);
}

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* Utility */
.hide-mobile { display: none; }
@media (min-width: 768px) { .hide-mobile { display: initial; } }
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute; width: 1px; word-wrap: normal;
}

/* ========== HEADER ========== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; gap: 20px; height: 72px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-family: var(--serif); font-weight: 800; font-size: 22px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo img { height: 36px; width: auto; display: block; }
.footer-logo img { height: 44px; filter: brightness(1.1); }

.nav-primary {
  display: none;
  align-items: center;
  gap: 2px;
  margin-left: 12px;
}
@media (min-width: 1024px) { .nav-primary { display: flex; } }
.nav-primary a {
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all .15s;
  position: relative;
}
.nav-primary a:hover { color: var(--text); background: var(--bg-3); }
.nav-primary a.active, .nav-primary .current-menu-item > a {
  color: var(--text); background: var(--bg-3);
}
.nav-primary ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 2px; }
.nav-primary ul li,
.nav-primary li {
  list-style: none;
  padding: 0;
  margin: 0;
}
.nav-primary li::marker,
.nav-primary li::before {
  content: none;
  display: none;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-form { margin: 0; }
.search-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim); cursor: pointer;
  font-family: inherit; font-size: 13px;
  transition: all .15s; min-width: 220px;
}
.search-btn:hover, .search-btn:focus-within { border-color: var(--lime); color: var(--text); }
.search-btn input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
  min-width: 0;
}
.search-btn input::placeholder { color: var(--text-muted); }
.kbd {
  margin-left: auto; font-family: var(--mono); font-size: 11px;
  padding: 2px 6px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text-dim);
}
@media (max-width: 640px) {
  .search-btn { min-width: auto; padding: 9px; }
  .search-btn input, .kbd { display: none; }
}

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim); cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.icon-btn:hover { background: var(--bg-3); color: var(--text); border-color: var(--lime); }
.mobile-menu-btn { display: none; }
@media (max-width: 1023px) { .mobile-menu-btn { display: grid; } }

/* Mobile nav drawer */
.nav-primary.mobile-open {
  display: flex; flex-direction: column;
  position: fixed; top: 72px; left: 0; right: 0; bottom: 0; z-index: 99;
  background: var(--bg);
  padding: 20px;
  gap: 6px;
  align-items: stretch;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.nav-primary.mobile-open a { padding: 14px 16px; font-size: 16px; }

/* ========== NOW BAR TICKER ========== */
.now-bar {
  background: var(--navy);
  color: #fff;
  border-bottom: 2px solid var(--lime);
  overflow: hidden;
  position: relative;
}
.now-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 11px 0;
  font-size: 13px;
}
.live-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px; background: var(--red-live);
  border-radius: 5px; font-weight: 700;
  letter-spacing: 0.05em; font-size: 11px;
  flex-shrink: 0; color: #fff;
}
.live-pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.8); }
}
.ticker-track {
  display: flex; gap: 40px;
  animation: ticker 40s linear infinite;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,.92);
}
.ticker-track span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.ticker-track span::before {
  content: "●"; color: var(--lime); font-size: 8px;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ========== SECTIONS ========== */
.section { padding: 48px 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 32px; gap: 20px;
}
.section-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
}
.section-title .accent {
  color: var(--lime); font-style: italic; font-weight: 600;
}
.section-subtitle {
  color: var(--text-dim); font-size: 15px;
  margin-top: 8px; max-width: 540px;
  line-height: 1.5;
}
.section-link {
  color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  transition: all .15s;
  flex-shrink: 0;
}
.section-link:hover { border-color: var(--lime); color: var(--lime); }
.section-link svg { transition: transform .15s; }
.section-link:hover svg { transform: translateX(2px); }

/* ========== HERO "ADESSO IN TV" ========== */
.hero { position: relative; padding: 40px 0 0; }
.hero-intro { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--lime);
  width: fit-content;
}
.hero-kicker::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
  animation: pulse 1.5s infinite;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(40px, 7vw, 72px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--text);
  max-width: 900px;
}
.hero-title .italic {
  font-style: italic; font-weight: 600; color: var(--text-dim);
}
.hero-meta {
  display: flex; align-items: center; gap: 24px;
  margin-top: 16px;
  font-family: var(--mono); font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.hero-meta strong { color: var(--text); font-weight: 600; }

/* Channels rail: griglia 3 colonne fissa per i 9 canali principali (desktop),
   2 colonne su tablet, 1 colonna su mobile. */
.channels-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 40px;
}
@media (max-width: 1024px) {
  .channels-rail { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .channels-rail { grid-template-columns: 1fr; }
}
.channels-rail-empty {
  margin-top: 40px; padding: 40px; text-align: center;
  background: var(--bg-2); border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-dim);
}
.channel-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all .2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.channel-card:hover {
  border-color: var(--lime);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.channel-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.channel-card:hover::before { transform: scaleX(1); }

.channel-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.channel-logo {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 800;
  font-size: 13px; color: #fff;
  flex-shrink: 0; letter-spacing: -0.04em;
}
.channel-name { font-weight: 600; font-size: 14px; color: var(--text); }
.channel-number {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  margin-top: 4px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.channel-live-badge {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px;
  background: color-mix(in srgb, var(--red-live) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--red-live) 40%, transparent);
  border-radius: 5px;
  font-size: 10px; font-weight: 800;
  color: var(--red-live);
  text-transform: uppercase; letter-spacing: 0.06em;
  flex-shrink: 0;
}
.channel-live-badge::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%; background: var(--red-live);
  animation: pulse 1.5s infinite;
}

.program-now {
  font-family: var(--serif); font-weight: 600; font-size: 16px;
  color: var(--text); line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.program-genre {
  font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 600; font-family: var(--mono);
  margin-bottom: 12px;
}
.progress-wrap { margin-bottom: 12px; }
.progress-times {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-dim); margin-bottom: 5px;
  font-weight: 500;
}
.progress-bar {
  width: 100%; height: 4px;
  background: var(--bg-3); border-radius: 2px;
  overflow: hidden; position: relative;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--lime-dim), var(--lime));
  border-radius: 2px;
  transition: width 1s ease;
  box-shadow: 0 0 10px color-mix(in srgb, var(--lime) 60%, transparent);
}
.program-next {
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-dim);
}
.program-next .time {
  font-family: var(--mono); font-weight: 700;
  color: var(--text); flex-shrink: 0;
}
.program-next .title {
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-dim);
}

/* Prima serata: griglia 3x3 fissa per i 9 canali principali */
.prime-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 1024px) {
  .prime-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .prime-grid { grid-template-columns: 1fr; }
}
.prime-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.prime-card:hover {
  transform: translateY(-4px);
  border-color: var(--lime);
  box-shadow: var(--shadow-hover);
}
.poster {
  aspect-ratio: 16/10;
  position: relative;
  overflow: hidden;
  background: var(--bg-3);
}
.poster-img {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(18px, 3vw, 28px);
  color: rgba(255,255,255,.95);
  letter-spacing: -0.03em; text-align: center;
  padding: 20px; line-height: 1.05;
}
/* Watermark sigla canale per poster senza immagine (gradient canale) */
.poster-channel-watermark {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(80px, 12vw, 140px);
  color: rgba(255,255,255,.12);
  letter-spacing: -0.06em;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
/* Overlay gradient più denso per garantire leggibilità del titolo in basso */
.poster-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.55) 70%, rgba(0,0,0,.92) 100%);
}
.poster-top {
  position: absolute; top: 12px; left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 8px; z-index: 2;
}
.poster-channel {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(10px);
  border-radius: 6px;
  color: #fff; font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255,255,255,.18);
}
.recommended-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px;
  background: var(--lime); color: var(--navy);
  border-radius: 6px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.recommended-badge svg { width: 11px; height: 11px; }
.poster-bottom {
  position: absolute; bottom: 12px; left: 14px; right: 14px;
  z-index: 2;
}
.poster-time {
  font-family: var(--mono);
  font-size: 12px; font-weight: 700;
  color: var(--lime); margin-bottom: 4px;
  letter-spacing: 0.05em;
}
.poster-title {
  font-family: var(--serif); font-weight: 700;
  font-size: 19px; letter-spacing: -0.02em;
  line-height: 1.15; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.prime-body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.prime-meta {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: var(--text-dim);
  font-family: var(--mono);
  flex-wrap: wrap;
  font-weight: 500;
}
.prime-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); }
.rating {
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--amber); font-weight: 700;
}
.streaming-inline {
  display: flex; align-items: center; gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.streaming-label {
  font-size: 10px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 700;
  flex-shrink: 0;
}
.streaming-logos {
  display: flex; gap: 5px; flex-wrap: wrap;
}
.streaming-logo {
  width: 26px; height: 26px;
  border-radius: 5px;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #fff;
}

/* ========== NOTIZIARIO ========== */
.notiziario { position: relative; }
.notiziario::before {
  content: ""; position: absolute; top: -30px; left: 50%;
  transform: translateX(-50%);
  width: 60%; max-width: 400px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  opacity: .6;
}
.notiziario-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--lime);
}
.notiziario-head .masthead {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.notiziario-title {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.03em; line-height: 1;
  color: var(--text); font-style: italic;
}
.notiziario-title .accent { color: var(--lime); font-style: italic; font-weight: 600; }
.notiziario-meta {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 700;
  flex-wrap: wrap;
}
.notiziario-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--text-muted); }
.date-badge {
  padding: 5px 11px; background: var(--lime); color: var(--navy);
  border-radius: 4px; font-weight: 800;
}

.ultimora-strip {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--lime) 30%, var(--border));
  margin-bottom: 28px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.ultimora-strip::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px; background: var(--red-live);
  animation: pulse 1.5s infinite;
}
.ultimora-label {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px;
  background: var(--red-live);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em; color: #fff;
  text-transform: uppercase;
}
.ultimora-label::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%; background: #fff;
  animation: pulse 1.5s infinite;
}
.ultimora-content {
  flex: 1; min-width: 0;
  color: #fff; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ultimora-content .ago {
  font-family: var(--mono); font-size: 11px;
  color: var(--lime); font-weight: 700; flex-shrink: 0;
}

.newsroom {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px; margin-bottom: 32px;
}
@media (max-width: 1024px) { .newsroom { grid-template-columns: 1fr; } }

.stories { display: flex; flex-direction: column; gap: 20px; }
.story-lead {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all .2s;
  min-height: 280px;
}
.story-lead:hover {
  transform: translateY(-2px);
  border-color: var(--lime);
  box-shadow: var(--shadow-hover);
}
@media (max-width: 600px) { .story-lead { grid-template-columns: 1fr; } }
.story-lead-img {
  background: linear-gradient(135deg, #1E40AF 0%, #0C1E4A 100%);
  position: relative; min-height: 220px;
}
.story-lead-img::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0,0,0,.4) 100%);
}
.exclusive-badge {
  position: absolute; top: 14px; left: 14px;
  padding: 5px 10px;
  background: var(--lime); color: var(--navy);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 2;
}
.story-lead-body {
  padding: 28px;
  display: flex; flex-direction: column; justify-content: center;
  gap: 12px;
}
.story-cat {
  font-family: var(--mono); font-size: 11px;
  font-weight: 800; letter-spacing: 0.12em;
  color: var(--lime); text-transform: uppercase;
}
.story-lead-title {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(22px, 2.8vw, 30px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--text);
}
.story-excerpt {
  color: var(--text-dim);
  font-size: 14.5px; line-height: 1.6;
}
.story-byline {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--text-dim);
  font-family: var(--mono);
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
  font-weight: 500;
}
.story-byline .author { color: var(--text); font-weight: 700; }

.stories-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 540px) { .stories-grid { grid-template-columns: 1fr; } }
.story-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all .2s;
  display: flex; flex-direction: column;
}
.story-card:hover { transform: translateY(-2px); border-color: var(--lime); }
.story-card-img { aspect-ratio: 16/9; position: relative; background: var(--bg-3); }
.story-card-body {
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 8px; flex: 1;
}
.story-card-title {
  font-family: var(--serif); font-weight: 700; font-size: 16px;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-card-meta {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--text-dim);
  padding-top: 8px;
  border-top: 1px dashed var(--border-soft);
  font-weight: 500;
}
.story-card-meta .author { color: var(--text); font-weight: 700; }

.newsroom-aside { display: flex; flex-direction: column; gap: 24px; }

.timeline-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative; overflow: hidden;
}
.timeline-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red-live), var(--lime));
}
.timeline-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.timeline-head h3 {
  font-family: var(--serif); font-weight: 800; font-size: 18px;
  letter-spacing: -0.02em; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.timeline-head h3::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red-live);
  animation: pulse 1.5s infinite;
}
.timeline-head .live-now {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.1em; color: var(--text-dim); text-transform: uppercase;
}
.timeline {
  display: flex; flex-direction: column;
  position: relative; margin-left: 8px;
}
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 4px;
  width: 1px; background: var(--border);
}
.timeline-item {
  position: relative;
  padding-left: 22px; padding-bottom: 16px;
  cursor: pointer; text-decoration: none; color: inherit;
  display: block;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute; left: 0; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--bg-2);
  border: 2px solid var(--text-muted);
  z-index: 1;
}
.timeline-item:first-child::before {
  background: var(--red-live); border-color: var(--red-live);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red-live) 30%, transparent);
}
.timeline-item:hover .ti-title { color: var(--lime); }
.ti-time {
  font-family: var(--mono); font-size: 10.5px; font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 3px;
}
.ti-time.now { color: var(--red-live); }
.ti-title {
  font-family: var(--serif); font-weight: 600;
  font-size: 14px; line-height: 1.35;
  color: var(--text);
  transition: color .15s;
}
.ti-cat {
  display: inline-block;
  font-family: var(--mono); font-size: 9.5px; font-weight: 800;
  color: var(--lime); text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 3px;
}

.editoriale {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  border: 1px solid color-mix(in srgb, var(--lime) 35%, transparent);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #fff;
  position: relative; overflow: hidden;
  cursor: pointer;
}
.editoriale::before {
  content: "\201C";
  position: absolute; top: -20px; right: 14px;
  font-family: var(--serif); font-size: 160px;
  color: var(--lime);
  opacity: .2;
  font-style: italic;
  line-height: 1;
  pointer-events: none;
}
.ed-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px;
  font-weight: 800; letter-spacing: 0.15em;
  color: var(--lime); text-transform: uppercase;
  margin-bottom: 14px;
}
.ed-label::before { content: ""; width: 16px; height: 2px; background: var(--lime); }
.ed-title {
  font-family: var(--serif); font-weight: 700; font-style: italic;
  font-size: 22px; letter-spacing: -0.02em; line-height: 1.25;
  margin-bottom: 12px;
  color: #fff;
}
.ed-body {
  font-size: 14px; line-height: 1.65;
  color: rgba(255,255,255,.88);
  margin-bottom: 16px;
}
.ed-sign {
  display: flex; align-items: center; gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.ed-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--lime); color: var(--navy);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 800; font-size: 14px;
  flex-shrink: 0;
}
.ed-author { font-family: var(--serif); font-weight: 700; font-size: 14px; color: #fff; }
.ed-role {
  font-family: var(--mono); font-size: 10.5px;
  color: rgba(255,255,255,.68);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-top: 1px;
  font-weight: 600;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.cat-tile {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  transition: all .15s;
  font-size: 14px; font-weight: 600;
  font-family: var(--serif);
}
.cat-tile:hover {
  border-color: var(--lime);
  background: var(--bg-hover);
  transform: translateY(-2px);
}
.cat-tile .cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cat-tile .cat-count {
  margin-left: auto;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-dim); font-weight: 600;
}

/* ========== PLATFORMS ========== */
.platforms {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative; overflow: hidden;
}
.platforms::before {
  content: ""; position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, color-mix(in srgb, var(--lime) 15%, transparent) 0%, transparent 70%);
  pointer-events: none;
}
.platforms-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: 24px; position: relative;
}
.platforms-tabs {
  display: flex; gap: 4px; padding: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-wrap: wrap;
}
.platform-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: transparent; border: none;
  border-radius: 8px;
  color: var(--text-dim);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .15s;
}
.platform-tab:hover { color: var(--text); }
.platform-tab.active {
  background: var(--bg-3); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border);
}
.platform-tab .p-icon {
  width: 18px; height: 18px;
  border-radius: 4px;
  display: grid; place-items: center;
  font-size: 9px; font-weight: 800; color: #fff;
}
.platform-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; position: relative;
}
.platform-list[hidden] { display: none; }
.platform-item {
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer; transition: transform .2s ease;
  text-decoration: none; color: inherit;
}
.platform-item:hover { transform: translateY(-3px); }
.poster-sm {
  aspect-ratio: 2/3;
  border-radius: 10px;
  position: relative; overflow: hidden;
  transition: all .2s ease;
}
.platform-item:hover .poster-sm {
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.pos-num {
  position: absolute; top: 8px; left: 8px;
  font-family: var(--serif); font-weight: 800;
  font-size: 32px; color: var(--lime);
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
  z-index: 2;
}
.item-title {
  font-family: var(--serif); font-weight: 600;
  font-size: 14px; line-height: 1.25; color: var(--text);
}
.item-meta {
  font-size: 11.5px; color: var(--text-dim); font-family: var(--mono);
  font-weight: 500;
}
.empty-state {
  padding: 30px; text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  grid-column: 1 / -1;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ========== FOOTER ========== */
.site-footer {
  margin-top: 80px;
  background: var(--navy-deep);
  color: rgba(255,255,255,.82);
  border-top: 2px solid var(--lime);
  padding: 50px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px; margin-bottom: 32px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
.footer-about p { margin-top: 14px; font-size: 14px; line-height: 1.65; max-width: 320px; color: rgba(255,255,255,.75); }
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--lime);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col a {
  display: block; padding: 5px 0;
  color: rgba(255,255,255,.75);
  text-decoration: none; font-size: 13.5px;
  transition: color .15s;
}
.footer-col a:hover { color: var(--lime); }
.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  font-size: 11.5px; color: rgba(255,255,255,.6);
  font-family: var(--mono);
  font-weight: 500;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-dim);
  font-family: var(--mono);
  margin: 20px 0;
  flex-wrap: wrap;
  font-weight: 500;
}
.breadcrumbs a { color: var(--text-dim); text-decoration: none; transition: color .15s; }
.breadcrumbs a:hover { color: var(--lime); }
.breadcrumbs .sep { opacity: .5; }

/* ========== SINGLE POST (NEWS) ========== */
.single-post { position: relative; }
.post-header-hero {
  position: relative;
  min-height: 400px;
  padding: 60px 0 40px;
  background-color: var(--navy);
  background-size: cover;
  background-position: center;
  color: #fff;
}
.post-header-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,15,22,.4) 0%, rgba(11,15,22,.9) 100%);
}
.post-header-inner { position: relative; z-index: 1; }
.post-header-hero .breadcrumbs { color: rgba(255,255,255,.8); }
.post-header-hero .breadcrumbs a { color: rgba(255,255,255,.8); }
.post-header-hero .breadcrumbs a:hover { color: var(--lime); }
.post-cat-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px;
  background: var(--lime); color: var(--navy);
  border-radius: 5px;
  font-family: var(--mono); font-size: 11px;
  font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 14px;
}
.post-title {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(30px, 5vw, 54px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 900px;
  margin-bottom: 16px;
  color: #fff;
}
.post-lede {
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
  color: rgba(255,255,255,.9);
  max-width: 720px;
  margin-bottom: 24px;
}
.post-byline-hero {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 13px;
}
.byline-avatar { width: 40px; height: 40px; border-radius: 50%; }
.byline-author { color: rgba(255,255,255,.95); font-weight: 600; }
.byline-meta {
  color: rgba(255,255,255,.7);
  font-size: 12px;
  margin-top: 2px;
  display: flex; align-items: center; gap: 8px;
  font-weight: 500;
}
.byline-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.5); }

.post-body-grid {
  display: grid; grid-template-columns: 1fr 300px;
  gap: 40px; margin: 40px 0 60px;
}
@media (max-width: 1024px) { .post-body-grid { grid-template-columns: 1fr; } }
.post-content {
  max-width: 720px;
  font-size: 17px; line-height: 1.75;
  color: var(--text);
}
.post-content p { margin-bottom: 20px; }
.post-content h2 {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.02em;
  margin: 32px 0 14px;
  line-height: 1.25;
  color: var(--text);
}
.post-content h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: 20px;
  margin: 24px 0 12px;
  color: var(--text);
}
.post-content a { color: var(--lime); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 500; }
.post-content a:hover { color: var(--lime-bright); }
.post-content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 4px solid var(--lime);
  background: var(--bg-2);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text);
}
.post-content ul, .post-content ol { margin: 0 0 20px 24px; color: var(--text); }
.post-content li { margin-bottom: 6px; }
.post-content img { border-radius: var(--radius); margin: 20px 0; }

.post-footer { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.post-tags { font-size: 13px; color: var(--text-dim); }
.post-tags .tag-label { font-family: var(--mono); text-transform: uppercase; font-size: 11px; margin-right: 8px; color: var(--text-dim); font-weight: 700; }
.post-tags a {
  display: inline-block; padding: 5px 11px;
  margin-right: 6px; margin-bottom: 6px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-dim); text-decoration: none;
  font-size: 12px; font-weight: 500;
  transition: all .15s;
}
.post-tags a:hover { border-color: var(--lime); color: var(--lime); background: var(--bg-hover); }

.post-aside { display: flex; flex-direction: column; gap: 20px; align-self: flex-start; position: sticky; top: 90px; }
@media (max-width: 1024px) { .post-aside { position: static; } }
.aside-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative; overflow: hidden;
}
.aside-card.accent { border-color: color-mix(in srgb, var(--lime) 45%, var(--border)); }
.aside-card.accent::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: linear-gradient(90deg, var(--lime), transparent);
}
.aside-title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.aside-icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--lime) 22%, transparent);
  color: var(--lime);
  border-radius: 8px;
  flex-shrink: 0;
}
.aside-icon svg { width: 15px; height: 15px; }
.aside-title h3 {
  font-family: var(--mono); font-size: 11px; font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
}
.aside-related {
  display: grid; grid-template-columns: 60px 1fr;
  gap: 10px; padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  text-decoration: none; color: inherit;
}
.aside-related:last-child { border-bottom: none; }
.aside-related:hover .ar-title { color: var(--lime); }
.ar-thumb { width: 60px; height: 60px; border-radius: var(--radius-sm); background: var(--bg-3); }
.ar-title { font-family: var(--serif); font-weight: 600; font-size: 13.5px; line-height: 1.35; margin-bottom: 4px; transition: color .15s; color: var(--text); }
.ar-time { font-family: var(--mono); font-size: 10.5px; color: var(--text-dim); font-weight: 500; }

/* ========== SINGLE FILM / SERIE ========== */
.film-hero, .serie-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding-bottom: 40px;
}
.film-hero .backdrop, .serie-hero .backdrop {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  height: 520px;
  background-color: var(--navy);
}
.film-hero .backdrop::before, .serie-hero .backdrop::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, transparent 0%, rgba(11,15,22,.6) 50%, var(--bg) 90%);
}
.film-hero .backdrop::after, .serie-hero .backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,15,22,.35) 0%, transparent 20%, rgba(11,15,22,.7) 60%, var(--bg) 100%);
}
[data-theme="light"] .film-hero .backdrop::after,
[data-theme="light"] .serie-hero .backdrop::after {
  background: linear-gradient(180deg, rgba(250,251,252,.5) 0%, transparent 20%, rgba(250,251,252,.8) 60%, var(--bg) 100%);
}

.film-hero-inner, .serie-hero-inner {
  padding-top: 40px;
  display: grid; grid-template-columns: 280px 1fr;
  gap: 40px; align-items: flex-end;
  min-height: 460px;
}
@media (max-width: 768px) {
  .film-hero-inner, .serie-hero-inner {
    grid-template-columns: 1fr; gap: 24px;
    min-height: auto; padding-top: 20px;
  }
}
.film-poster, .serie-poster {
  aspect-ratio: 2/3;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--navy), var(--navy-deep));
  position: relative; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 800; font-size: 32px;
  color: rgba(255,255,255,.95);
  letter-spacing: -0.03em;
  text-align: center; padding: 20px; line-height: 1.05;
}
@media (max-width: 768px) {
  .film-poster, .serie-poster { max-width: 220px; margin: 0 auto; }
}
.film-info, .serie-info { padding-bottom: 20px; }

.film-kicker, .serie-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 11px;
  background: color-mix(in srgb, var(--lime) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--lime) 45%, transparent);
  border-radius: 6px;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 16px;
}
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  background: color-mix(in srgb, var(--red-live) 22%, transparent);
  color: var(--red-live);
  border: 1px solid color-mix(in srgb, var(--red-live) 40%, transparent);
  border-radius: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-left: 8px;
}
.status-pill::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red-live);
  animation: pulse 1.5s infinite;
}
.film-title, .serie-title {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(42px, 6vw, 72px);
  letter-spacing: -0.04em; line-height: 0.95;
  color: var(--text);
  margin-bottom: 8px;
}
.film-tagline, .serie-sub {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-dim);
  margin-bottom: 20px;
}
.film-meta, .serie-meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 14px; color: var(--text-dim);
  margin-bottom: 20px;
  font-weight: 500;
}
.film-meta .dot, .serie-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); }
.film-meta strong, .serie-meta strong { color: var(--text); font-weight: 700; }
.meta-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  background: var(--bg-3); border: 1px solid var(--border);
  border-radius: 6px; font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
}
.rating-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  background: color-mix(in srgb, var(--amber) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent);
  color: var(--amber); border-radius: 6px;
  font-weight: 800; font-size: 13px;
}
.film-genres, .serie-genres {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.genre-tag {
  padding: 6px 12px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12.5px; color: var(--text-dim);
  text-decoration: none;
  font-weight: 500;
  transition: all .15s;
}
.genre-tag:hover { border-color: var(--lime); color: var(--lime); background: var(--bg-hover); }

.film-cta, .serie-cta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cta-tonight {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--lime); color: var(--navy);
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 800; font-size: 14px;
  transition: all .15s;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--lime) 35%, transparent);
}
.cta-tonight:hover { transform: translateY(-2px); background: var(--lime-bright); }
.cta-tonight .ct-time { font-family: var(--mono); font-size: 16px; font-weight: 800; }
.cta-tonight .ct-ch { opacity: .85; font-weight: 600; font-size: 13px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 17px;
  background: var(--lime); color: var(--navy);
  border: none; border-radius: var(--radius);
  font-family: inherit; font-size: 14px; font-weight: 800;
  text-decoration: none; cursor: pointer;
  transition: all .15s;
}
.btn:hover { background: var(--lime-bright); transform: translateY(-1px); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); font-weight: 600; }
.btn-ghost:hover { background: var(--bg-3); border-color: var(--lime); transform: none; color: var(--lime); }

.film-body, .serie-body {
  display: grid; grid-template-columns: 1fr 360px;
  gap: 40px; margin-top: 40px; margin-bottom: 60px;
}
@media (max-width: 1024px) {
  .film-body, .serie-body { grid-template-columns: 1fr; }
}
.film-main, .serie-main { display: flex; flex-direction: column; gap: 40px; }
.film-section h2, .serie-section h2 {
  font-family: var(--serif); font-weight: 700; font-size: 24px;
  letter-spacing: -0.02em; margin-bottom: 16px;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.film-section h2::before, .serie-section h2::before {
  content: "";
  width: 4px; height: 22px;
  background: var(--lime); border-radius: 2px;
}
.overview { font-size: 16px; line-height: 1.75; color: var(--text); max-width: 720px; }
.overview p { margin-bottom: 14px; }

.film-aside, .serie-aside {
  display: flex; flex-direction: column; gap: 20px;
  align-self: flex-start;
  position: sticky; top: 90px;
}
@media (max-width: 1024px) { .film-aside, .serie-aside { position: static; } }

.providers-group { margin-bottom: 14px; }
.providers-group:last-child { margin-bottom: 0; }
.pg-label {
  font-family: var(--mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-dim); font-weight: 800;
  margin-bottom: 8px;
}
.provider-chips { display: flex; flex-direction: column; gap: 6px; }
.provider-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none; color: var(--text);
  transition: all .15s;
  font-size: 13.5px; font-weight: 500;
}
.provider-chip:hover { border-color: var(--lime); transform: translateX(2px); background: var(--bg-3); }
.provider-chip .logo {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff;
  flex-shrink: 0; overflow: hidden;
  background: #fff;
}
.provider-chip .price {
  margin-left: auto;
  font-family: var(--mono); font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 500;
}

/* Channel colors */
.ch-rai1 { background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%); }
.ch-rai2 { background: linear-gradient(135deg, #C62828 0%, #8E0000 100%); }
.ch-rai3 { background: linear-gradient(135deg, #F57C00 0%, #B53D00 100%); }
.ch-c5   { background: linear-gradient(135deg, #1976D2 0%, #0D47A1 100%); }
.ch-i1   { background: linear-gradient(135deg, #D32F2F 0%, #B71C1C 100%); }
.ch-r4   { background: linear-gradient(135deg, #5E35B1 0%, #311B92 100%); }
.ch-la7  { background: linear-gradient(135deg, #00796B 0%, #004D40 100%); }
.ch-tv8  { background: linear-gradient(135deg, #FF6F00 0%, #E65100 100%); }
.ch-n9   { background: linear-gradient(135deg, #616161 0%, #2C2C2C 100%); }
.ch-iris { background: linear-gradient(135deg, #F57C00 0%, #BF360C 100%); }
.ch-la5  { background: linear-gradient(135deg, #EC407A 0%, #880E4F 100%); }
.ch-nf   { background: #E50914; }
.ch-pv   { background: #00A8E1; }
.ch-dp   { background: #0F2A5E; }
.ch-rp   { background: #1E40AF; }
.ch-now  { background: #0066CC; }
.ch-ap   { background: #1A1A1A; }
.ch-md   { background: #FF6200; }
.ch-pp   { background: #0064FF; }
.ch-sk   { background: #0084FF; }
.ch-tv   { background: #00B0E8; }

/* ========== GUIDA SETTIMANA ========== */
.page-intro { padding: 32px 0 24px; }
.page-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 11px;
  background: color-mix(in srgb, var(--lime) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--lime) 45%, transparent);
  border-radius: 6px;
  color: var(--lime);
  font-family: var(--mono); font-size: 11px; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 12px;
}
.page-title {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.03em; line-height: 1;
  color: var(--text); margin-bottom: 12px;
}
.page-title .accent { color: var(--lime); font-style: italic; font-weight: 600; }
.page-sub { color: var(--text-dim); font-size: 15px; max-width: 520px; line-height: 1.55; }

.day-picker-wrap {
  position: sticky; top: 72px; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0; margin-bottom: 20px;
}
.day-picker { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.day-picker::-webkit-scrollbar { display: none; }
.day-btn {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 14px; min-width: 64px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
  cursor: pointer; transition: all .15s;
  font-family: inherit; text-decoration: none;
}
.day-btn:hover { border-color: color-mix(in srgb, var(--lime) 50%, var(--border)); color: var(--text); background: var(--bg-3); }
.day-btn.active { background: var(--lime); border-color: var(--lime); color: var(--navy); }
.day-btn.active .day-label, .day-btn.active .day-date { color: var(--navy); }
.day-label { font-family: var(--mono); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }
.day-date { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--text); line-height: 1; }
.day-btn.today::before { content: "OGGI"; display: block; font-family: var(--mono); font-size: 9px; font-weight: 800; letter-spacing: 0.1em; color: var(--lime); margin-bottom: 1px; }
.day-btn.today.active::before { color: var(--navy); }

.filters-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 28px; align-items: center;
}
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  color: var(--text-dim);
  cursor: pointer; transition: all .15s;
  font-family: inherit;
}
.filter-chip:hover { border-color: var(--lime); color: var(--text); background: var(--bg-3); }
.filter-chip.active {
  background: color-mix(in srgb, var(--lime) 18%, transparent);
  border-color: var(--lime); color: var(--lime);
}
.filter-chip .count { font-family: var(--mono); font-size: 10.5px; opacity: .8; font-weight: 500; }

.rec-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  border: 1px solid color-mix(in srgb, var(--lime) 35%, transparent);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  display: flex; gap: 16px; align-items: center;
  position: relative; overflow: hidden;
}
.rec-banner::before {
  content: ""; position: absolute; top: -50px; right: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, color-mix(in srgb, var(--lime) 18%, transparent) 0%, transparent 70%);
  pointer-events: none;
}
.rec-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--lime); color: var(--navy);
  display: grid; place-items: center;
  flex-shrink: 0; position: relative;
}
.rec-icon svg { width: 24px; height: 24px; }
.rec-content h3 {
  font-family: var(--serif); font-weight: 700; font-size: 17px;
  color: #fff; margin-bottom: 4px;
}
.rec-content p { font-size: 13.5px; color: rgba(255,255,255,.8); line-height: 1.45; }

.slots { display: flex; flex-direction: column; gap: 32px; padding-bottom: 60px; }
.slot { display: flex; flex-direction: column; gap: 10px; }
.slot-head {
  display: flex; align-items: baseline; gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.slot-time {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.02em;
  color: var(--text);
}
.slot-range { font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); font-weight: 600; }
.slot-count { margin-left: auto; font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); font-weight: 600; }

.prog-row {
  display: grid; grid-template-columns: 60px 44px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .15s;
  text-decoration: none; color: inherit;
}
.prog-row:hover {
  border-color: color-mix(in srgb, var(--lime) 50%, var(--border));
  transform: translateX(2px);
  background: var(--bg-3);
}
.prog-time {
  font-family: var(--mono);
  font-size: 13.5px; font-weight: 700;
  color: var(--text); letter-spacing: -0.01em;
}
.prog-ch {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--serif); font-weight: 800;
  font-size: 11px; color: #fff;
  letter-spacing: -0.04em; flex-shrink: 0;
}
.prog-info { min-width: 0; }
.prog-title {
  font-family: var(--serif); font-weight: 600; font-size: 15px;
  color: var(--text); line-height: 1.3;
  margin-bottom: 3px;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.prog-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-dim);
  flex-wrap: wrap;
  font-weight: 500;
}
.prog-meta .ch-name { font-weight: 700; color: var(--text); }
.prog-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); }
.prog-meta .genre {
  font-family: var(--mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
}
.prog-badges { display: flex; gap: 4px; flex-shrink: 0; }
.prog-badge {
  padding: 4px 9px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 9.5px; font-weight: 800;
  color: #fff;
  letter-spacing: 0.06em;
}
.prog-badge.premiere {
  background: color-mix(in srgb, var(--red-live) 22%, transparent);
  color: var(--red-live);
  border: 1px solid color-mix(in srgb, var(--red-live) 45%, transparent);
}
.prog-badge.film {
  background: color-mix(in srgb, var(--amber) 22%, transparent);
  color: var(--amber);
  border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent);
}
.prog-badge.live {
  background: color-mix(in srgb, var(--lime) 22%, transparent);
  color: var(--lime);
  border: 1px solid color-mix(in srgb, var(--lime) 45%, transparent);
}
@media (max-width: 600px) {
  .prog-row { grid-template-columns: 52px 40px 1fr; }
  .prog-badges { display: none; }
  .prog-ch { width: 40px; height: 40px; }
}

/* ========== ARCHIVE / SEARCH ========== */
.archive-header { padding: 40px 0 30px; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.archive-title {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.03em; line-height: 1;
  color: var(--text);
}
.archive-title .accent { color: var(--lime); font-style: italic; font-weight: 600; }
.archive-description { color: var(--text-dim); margin-top: 10px; font-size: 15px; max-width: 640px; line-height: 1.55; }
.archive-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px; margin-bottom: 60px;
}

/* Pagination */
.pagination, .navigation {
  display: flex; justify-content: center;
  gap: 6px; margin: 40px 0 60px;
}
.pagination .page-numbers, .navigation .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-dim); text-decoration: none;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  transition: all .15s;
}
.pagination .page-numbers:hover, .navigation .page-numbers:hover {
  border-color: var(--lime); color: var(--lime);
}
.pagination .current, .navigation .current {
  background: var(--lime); border-color: var(--lime); color: var(--navy);
}

/* 404 */
.error-404 { text-align: center; padding: 80px 20px; }
.error-404 h1 {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(80px, 15vw, 160px);
  color: var(--lime); line-height: 1;
  letter-spacing: -0.04em;
}
.error-404 p { color: var(--text-dim); font-size: 18px; margin: 20px 0 30px; line-height: 1.55; }

/* Focus states per accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Selection */
::selection {
  background: var(--lime);
  color: var(--navy);
}

/* ==========================================================================
   v1.4.0 — Banner miniatura programma EPG (Adesso in TV)
   Mostrato solo quando il plugin Guida TV Pro estrae <icon> dal <programme>.
   Cropping 16:10 con sfumatura inferiore per fondersi nella card.
   ========================================================================== */

.channel-card.has-banner {
  padding-top: 0; /* il banner sostituisce il padding superiore */
}

.channel-card-banner {
  position: relative;
  width: calc(100% + 32px);
  margin: -1px -16px 14px;       /* deborda sui bordi della card */
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.channel-card-banner img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.channel-card.has-banner:hover .channel-card-banner img {
  transform: scale(1.04);
}

/* Sfumatura per garantire continuità visiva con la card e leggibilità */
.channel-card-banner-fade {
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0) 55%,
    color-mix(in srgb, var(--bg-2) 70%, transparent) 100%);
}

/* Su card con banner, la barra accent al top deve stare sopra l'immagine */
.channel-card.has-banner::before {
  z-index: 2;
}
