/* hidden attribute MUST win over any display: rule */
[hidden]{display:none !important}

/* ============================================
   PERSIANA TV — Design System
   Brand palette: Sapphire teal + Cooper bronze on Rich Black
   ============================================ */

:root {
  /* Brand */
  --sapphire: #12A3A9;
  --sapphire-glow: rgba(18, 163, 169, 0.35);
  --caribbean: #1B656E;
  --cooper: #A8763E;
  --cooper-glow: rgba(168, 118, 62, 0.35);
  --rich-black: #09131A;
  --gunmetal: #2D3142;
  --rose-quartz: #A7A2A9;
  --seasalt: #F7F9F9;

  /* Semantic */
  --bg: var(--rich-black);
  --bg-2: #0d1922;
  --surface: #131e28;
  --surface-2: #1a2531;
  --surface-3: #243042;
  --border: rgba(167, 162, 169, 0.08);
  --border-strong: rgba(167, 162, 169, 0.18);
  --text: var(--seasalt);
  --text-muted: var(--rose-quartz);
  --text-dim: rgba(167, 162, 169, 0.55);
  --primary: var(--sapphire);
  --primary-deep: var(--caribbean);
  --premium: var(--cooper);
  --live: #ff3848;

  /* Typography */
  --font-fa: 'Vazirmatn', 'IRANSans', system-ui, sans-serif;
  --font-en: 'Inter', system-ui, -apple-system, sans-serif;
  --font: var(--font-fa), var(--font-en);

  /* Layout */
  --maxw: 1440px;
  --rail-gap: 14px;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 14px 40px rgba(0,0,0,0.55);
  --shadow-glow: 0 14px 40px var(--sapphire-glow);

  /* Transitions */
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* ============================================
   Base & Reset
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html { background: var(--bg); }

body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(18,163,169,0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(168,118,62,0.08), transparent 60%),
    radial-gradient(800px 400px at 50% 100%, rgba(27,101,110,0.10), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* Film-grain texture overlay across whole site */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

html[lang="fa"] body { font-family: 'Vazirmatn', system-ui, sans-serif; }
html[lang="en"] body { font-family: 'Inter', system-ui, -apple-system, sans-serif; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--sapphire); color: var(--rich-black); }

/* RTL/LTR */
html[dir="rtl"] .swap { flex-direction: row-reverse; }

/* ============================================
   Top navigation
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(9,19,26,0.95), rgba(9,19,26,0.75) 80%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 18px;
  color: var(--text);
  white-space: nowrap;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--gunmetal);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px var(--sapphire-glow);
  overflow: hidden;
  flex-shrink: 0;
}
.brand-mark svg { width: 78%; height: 78%; display: block; }
.ch-glyph svg { width: 100%; height: 100%; display: block; }
.brand-name { font-weight: 900; }
.brand-sub  { color: var(--text-muted); font-weight: 500; font-size: 12px; margin-inline-start: 6px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-muted);
  transition: all .2s var(--ease);
  white-space: nowrap;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-active { background: var(--surface-3); color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 3px;
  font-size: 12px;
  font-weight: 700;
}
.lang-switch button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: .5px;
}
.lang-switch button.is-on {
  background: linear-gradient(135deg, var(--sapphire), var(--caribbean));
  color: var(--rich-black);
}

.btn-search {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  display: grid; place-items: center;
}
.btn-search:hover { color: var(--text); border-color: var(--sapphire); }

.btn-live-cta {
  background: linear-gradient(135deg, var(--sapphire), var(--caribbean));
  color: var(--rich-black);
  border: 0;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px var(--sapphire-glow);
  transition: transform .2s var(--ease);
}
.btn-live-cta:hover { transform: translateY(-1px); }
.btn-live-cta::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rich-black);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .35; transform: scale(.85); } }

/* ============================================
   Layout shells
   ============================================ */
main { display: block; }
.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: 28px 0; }
.section h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section h2 .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sapphire);
  box-shadow: 0 0 14px var(--sapphire-glow);
}
.section h2 .live-dot { background: var(--live); animation: pulse 1.4s ease-in-out infinite; }
.section h2 .premium-dot { background: var(--cooper); box-shadow: 0 0 14px var(--cooper-glow); }
.section .more {
  margin-inline-start: auto;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}
.section .more:hover { color: var(--sapphire); }

/* ============================================
   HERO (cinematic, with poster collage)
   ============================================ */
.hero {
  position: relative;
  margin: 18px 0 8px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 580px;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: stretch;
}
@media (max-width: 980px) { .hero { grid-template-columns: 1fr; min-height: 520px; } .hero-collage { display: none !important; } }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.1) contrast(1.05);
  z-index: -2;
  animation: heroPan 30s ease-in-out infinite alternate;
}
@keyframes heroPan {
  0%   { transform: scale(1.05) translate(0,0); }
  100% { transform: scale(1.12) translate(-2%, -1%); }
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(9,19,26,0.95) 0%, rgba(9,19,26,0.7) 30%, rgba(9,19,26,0.15) 65%, rgba(9,19,26,0.4) 100%),
    linear-gradient(0deg, rgba(9,19,26,0.98) 0%, transparent 50%, rgba(9,19,26,0.4) 100%),
    radial-gradient(circle at 75% 30%, rgba(168,118,62,0.15), transparent 50%);
  z-index: -1;
}
html[dir="rtl"] .hero::after {
  background:
    linear-gradient(-90deg, rgba(9,19,26,0.95) 0%, rgba(9,19,26,0.7) 30%, rgba(9,19,26,0.15) 65%, rgba(9,19,26,0.4) 100%),
    linear-gradient(0deg, rgba(9,19,26,0.98) 0%, transparent 50%, rgba(9,19,26,0.4) 100%),
    radial-gradient(circle at 25% 30%, rgba(168,118,62,0.15), transparent 50%);
}
.hero-content {
  position: relative;
  padding: 56px 44px 46px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: center;
  z-index: 1;
}

/* Hero poster collage on the right side */
.hero-collage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 10px;
  padding: 30px;
  z-index: 1;
}
.hero-collage .tile {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  transition: transform .4s var(--ease);
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}
.hero-collage .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-collage .tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(9,19,26,0.85));
}
.hero-collage .tile-tag {
  position: absolute; bottom: 8px; inset-inline-start: 10px;
  font-size: 10px; font-weight: 900; letter-spacing: 0.5px;
  color: var(--seasalt);
  z-index: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}
.hero-collage .tile:nth-child(1) { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.hero-collage .tile:nth-child(2) { grid-column: 3; grid-row: 1; }
.hero-collage .tile:nth-child(3) { grid-column: 3; grid-row: 2; }
.hero-collage .tile:nth-child(4) { grid-column: 1; grid-row: 3 / span 2; }
.hero-collage .tile:nth-child(5) { grid-column: 2 / span 2; grid-row: 3 / span 2; }
.hero-collage .tile:hover { transform: scale(1.04); z-index: 2; }
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(18,163,169,0.18);
  border: 1px solid rgba(18,163,169,0.4);
  color: var(--sapphire);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  width: fit-content;
}
.hero-channel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.hero-channel .chip {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  padding: 4px 10px;
  border-radius: 8px;
  color: var(--text);
}
.hero-title {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.5px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .badge-imdb {
  background: var(--cooper);
  color: var(--rich-black);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 900;
  font-size: 11px;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 540px;
  line-height: 1.65;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 14px;
  transition: transform .2s var(--ease), background .2s, border-color .2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--sapphire), var(--caribbean));
  color: var(--rich-black);
  box-shadow: 0 10px 28px var(--sapphire-glow);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  background: rgba(247,249,249,0.08);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(247,249,249,0.14); border-color: var(--sapphire); }
.btn-cooper {
  background: linear-gradient(135deg, var(--cooper), #815626);
  color: var(--rich-black);
  box-shadow: 0 10px 28px var(--cooper-glow);
}
.btn-cooper:hover { transform: translateY(-2px); }

/* ============================================
   Rail (horizontal scrolling)
   ============================================ */
.rail-wrap { position: relative; }
.rail {
  display: flex;
  gap: var(--rail-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 8px;
  padding: 6px 2px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 999px; }
.rail::-webkit-scrollbar-track { background: transparent; }
.rail > * { scroll-snap-align: start; flex: 0 0 auto; }

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  position: relative;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--sapphire);
  box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 0 1px var(--sapphire-glow);
}

/* Shared thumb overlay (vignette) used by .thumb children */
.thumb-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 30%, rgba(9,19,26,0.65) 100%),
    radial-gradient(circle at 50% 100%, transparent 40%, rgba(9,19,26,0.4));
  pointer-events: none;
}
.hover-play {
  position: absolute;
  top: 50%; inset-inline-start: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 50px; height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sapphire), var(--caribbean));
  color: var(--rich-black);
  display: grid; place-items: center;
  opacity: 0; transition: all .3s var(--ease);
  box-shadow: 0 10px 26px rgba(0,0,0,0.5), 0 0 0 4px rgba(247,249,249,0.12);
  pointer-events: none;
  z-index: 2;
}
html[dir="rtl"] .hover-play { transform: translate(50%, -50%) scale(0.7); }
.card:hover .hover-play, .card-poster:hover .hover-play {
  opacity: 1; transform: translate(-50%, -50%) scale(1);
}
html[dir="rtl"] .card:hover .hover-play, html[dir="rtl"] .card-poster:hover .hover-play {
  transform: translate(50%, -50%) scale(1);
}

/* Now Live card */
.card-live { width: 320px; }
.card-live .thumb {
  aspect-ratio: 16/9;
  position: relative;
  background: linear-gradient(135deg, var(--gunmetal), var(--rich-black));
  overflow: hidden;
}
.card-live .thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.card-live:hover .thumb img { transform: scale(1.06); }
.live-badge {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: var(--live);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.live-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: white; animation: pulse 1.2s ease-in-out infinite; }
.card-live .body { padding: 12px 14px 14px; display: flex; gap: 10px; align-items: center; }
.card-live .ch-logo {
  width: 38px; height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
  display: grid; place-items: center;
  font-weight: 900;
  font-size: 14px;
  color: var(--rich-black);
}
.card-live .ch-info { min-width: 0; flex: 1; }
.card-live .ch-name { font-size: 12px; color: var(--text-muted); font-weight: 700; }
.card-live .prog-name {
  font-size: 14px; font-weight: 800;
  white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
}
.card-live .progress {
  height: 3px;
  border-radius: 2px;
  background: var(--surface-3);
  margin-top: 8px;
  overflow: hidden;
}
.card-live .progress > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--sapphire), var(--cooper));
}
.card-live .timeleft { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* Movie/Show card (poster) */
.card-poster { width: 210px; }
.card-poster .poster {
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, var(--gunmetal), var(--rich-black));
  position: relative;
  overflow: hidden;
}
.card-poster .poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease), filter .3s;
}
.card-poster:hover .poster img { transform: scale(1.07); filter: brightness(0.85); }
.card-poster .pgrad {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 50%, rgba(9,19,26,0.98) 100%),
    linear-gradient(90deg, rgba(9,19,26,0.4) 0%, transparent 30%);
  pointer-events: none;
}
.card-poster .ptitle {
  position: absolute; inset: auto 12px 32px;
  font-size: 14px; font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,.85);
  line-height: 1.2;
}
.card-poster .ptime {
  position: absolute; bottom: 10px; inset-inline-start: 12px;
  font-size: 11px; color: var(--text-muted); font-weight: 700;
  display: inline-flex; gap: 4px; align-items: center;
}
.hover-play-poster {
  width: 60px; height: 60px;
}
.card-poster .body { padding: 10px 12px 12px; }
.card-poster .meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 8px; }
.card-poster .meta .sep { opacity: .4; }
.card-poster .badge-corner {
  position: absolute; top: 10px; inset-inline-end: 10px;
  background: var(--cooper);
  color: var(--rich-black);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
}

/* Tonight card (wide) */
.card-tonight { width: 320px; }
.card-tonight .thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--gunmetal), var(--rich-black)); position: relative; overflow: hidden; }
.card-tonight .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card-tonight:hover .thumb img { transform: scale(1.06); }
.card-tonight .time-chip {
  position: absolute; top: 10px; inset-inline-end: 10px;
  background: rgba(9,19,26,0.85);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}
.card-tonight .body { padding: 12px 14px 14px; }
.card-tonight .title { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.card-tonight .sub { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.card-tonight .ch-pill {
  background: var(--surface-3);
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
}

/* Channel card */
.card-channel {
  width: 220px;
  padding: 26px 18px 18px;
  text-align: center;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(18,163,169,0.10), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: block;
  cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s, background .25s;
  position: relative;
  overflow: hidden;
}
.card-channel:hover {
  transform: translateY(-4px);
  border-color: var(--sapphire);
  box-shadow: 0 18px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(18,163,169,0.3);
}
.card-channel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(18,163,169,0.08));
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.card-channel:hover::before { opacity: 1; }
.card-channel .ch-glyph-wrap {
  margin: 0 auto 14px;
  position: relative;
  display: inline-block;
}
.card-channel:hover .ch-glyph-wrap::after {
  content: "";
  position: absolute; inset: -7px;
  border-radius: 28px;
  border: 2px solid var(--sapphire);
  animation: ringPulse 1.4s ease-out infinite;
  pointer-events: none;
}
.card-channel .ch-name-lg { font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.card-channel .ch-genre {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
}
.card-channel .ch-status {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--live);
  background: rgba(255,56,72,0.1);
  border: 1px solid rgba(255,56,72,0.3);
  padding: 4px 10px;
  border-radius: 999px;
}
.card-channel .ch-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--live); animation: pulse 1.2s ease-in-out infinite;
}
@keyframes ringPulse {
  0% { opacity: 1; transform: scale(.95); }
  100% { opacity: 0; transform: scale(1.15); }
}

/* News card */
.card-news {
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-news .thumb { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--gunmetal), var(--rich-black)); overflow: hidden; }
.card-news .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-news .body { padding: 14px 16px 16px; }
.card-news .cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--cooper);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.card-news .title { font-size: 15px; font-weight: 800; line-height: 1.4; margin-bottom: 8px; }
.card-news .meta { font-size: 11px; color: var(--text-muted); display: flex; justify-content: space-between; }

/* ============================================
   Footer
   ============================================ */
.footer {
  margin-top: 60px;
  padding: 40px 0 22px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.4));
}
.footer .grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.footer h4 { font-size: 13px; font-weight: 800; margin: 0 0 12px; color: var(--text); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer a { color: var(--text-muted); font-size: 13px; }
.footer a:hover { color: var(--sapphire); }
.footer-about { color: var(--text-muted); font-size: 13px; line-height: 1.7; }
.footer-bottom {
  max-width: var(--maxw);
  margin: 22px auto 0;
  padding: 16px 28px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}
.socials { display: flex; gap: 8px; }
.socials a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-muted);
}
.socials a:hover { color: var(--sapphire); border-color: var(--sapphire); }

/* ============================================
   Schedule (EPG)
   ============================================ */
.epg-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 0;
}
.epg-toolbar input,
.epg-toolbar select {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
}
.epg-toolbar input { min-width: 240px; }
.epg-toolbar input:focus, .epg-toolbar select:focus { outline: 2px solid var(--sapphire); }
.epg-day {
  display: flex; gap: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 4px;
  border: 1px solid var(--border-strong);
}
.epg-day button {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}
.epg-day button.is-on { background: var(--surface-3); color: var(--text); }

.epg {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  position: relative;
  max-height: 80vh;
  scroll-behavior: smooth;
}
.epg::-webkit-scrollbar { height: 10px; }
.epg::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.epg::-webkit-scrollbar-thumb { background: var(--sapphire, #12A3A9); border-radius: 5px; }
.epg-times {
  display: grid;
  grid-template-columns: 220px repeat(24, 120px);
  width: calc(220px + 24 * 120px);
  position: sticky;
  top: 0;
  background: var(--surface-2, #16242f);
  border-bottom: 2px solid var(--sapphire, #12A3A9);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  z-index: 10;
  height: 38px;
  align-items: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}
.epg-times > div { padding: 10px 12px; border-inline-start: 1px solid var(--border); }
.epg-times > div:first-child { border-inline-start: 0; background: var(--surface); }
.epg-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  width: calc(220px + 24 * 120px);
  border-bottom: 1px solid var(--border);
  position: relative;
  min-height: 64px;
}
.epg-row:hover { background: rgba(18,163,169,0.04); }
.epg-channel {
  padding: 14px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
  position: sticky;
  inset-inline-start: 0;
  z-index: 5;
}
.epg-channel .lg {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--rich-black);
  font-weight: 900;
  font-size: 12px;
  flex-shrink: 0;
}
.epg-channel .nm { font-size: 13px; font-weight: 800; }
.epg-channel .gn { font-size: 11px; color: var(--text-muted); }
.epg-track {
  position: relative;
  width: calc(24 * 120px);
  min-width: calc(24 * 120px);
  height: 64px;
  background-image: linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 120px 100%;
  background-repeat: repeat;
}
.epg-prog {
  position: absolute;
  top: 8px; bottom: 8px;
  border-radius: 8px;
  z-index: 1;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.epg-prog:hover { background: var(--gunmetal); border-color: var(--sapphire); }
.epg-prog .pn { font-size: 12px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.epg-prog .pt { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.epg-prog.is-live {
  background: linear-gradient(135deg, rgba(18,163,169,0.25), rgba(27,101,110,0.25));
  border-color: var(--sapphire);
  box-shadow: 0 0 0 1px var(--sapphire) inset;
}
.epg-prog.is-movie { background: linear-gradient(135deg, rgba(168,118,62,0.18), rgba(45,49,66,0.4)); border-color: rgba(168,118,62,0.5); }
.now-line-old-removed {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--live);
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(255,56,72,0.6);
}
.now-line::before {
  content: "";
  position: absolute;
  top: -4px; inset-inline-start: -5px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 4px rgba(255,56,72,0.25);
}

/* ============================================
   Live page
   ============================================ */
.live-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  margin-top: 22px;
}
@media (max-width: 980px) { .live-grid { grid-template-columns: 1fr; } }
.player {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  border: 1px solid var(--border);
}
.player-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.7);
}
.player::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.85));
  z-index: 1;
}
.player-overlay {
  position: absolute; inset: auto 0 0 0;
  padding: 26px 30px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.player-info { max-width: 70%; }
.player-info .live {
  display: inline-flex; gap: 6px; align-items: center;
  background: var(--live);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}
.player-info .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: white; animation: pulse 1.2s ease-in-out infinite; }
.player-info h2 { font-size: 24px; margin: 8px 0 4px; font-weight: 900; }
.player-info p { color: var(--text-muted); margin: 0; font-size: 13px; }
.player-controls { display: flex; gap: 10px; }
.player-btn {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(247,249,249,0.12);
  border: 1px solid rgba(247,249,249,0.2);
  color: var(--text);
  display: grid; place-items: center;
  backdrop-filter: blur(8px);
}
.player-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sapphire), var(--caribbean));
  color: var(--rich-black);
  display: grid; place-items: center;
  z-index: 3;
  font-size: 28px;
  border: 0;
  box-shadow: 0 14px 40px var(--sapphire-glow);
}
.player-play:hover { transform: scale(1.05); }

.live-side {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  max-height: 720px;
  overflow-y: auto;
}
.live-side h3 { margin: 0 0 12px; font-size: 14px; font-weight: 800; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }
.ch-list-item {
  display: flex; gap: 12px; align-items: center;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: background .2s;
}
.ch-list-item:hover { background: var(--surface-2); }
.ch-list-item.is-active { background: linear-gradient(90deg, rgba(18,163,169,0.18), transparent); border: 1px solid rgba(18,163,169,0.3); }
.ch-list-item .lg { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; color: var(--rich-black); font-size: 13px; flex-shrink: 0; }
.ch-list-item .meta { min-width: 0; flex: 1; }
.ch-list-item .nm { font-size: 13px; font-weight: 800; }
.ch-list-item .pg { font-size: 11px; color: var(--text-muted); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }

.up-next {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-top: 18px;
}
.up-next h3 { margin: 0 0 14px; font-size: 14px; font-weight: 800; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; }
.up-row { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.up-row:last-child { border-bottom: 0; }
.up-row .t { font-weight: 800; color: var(--sapphire); font-size: 13px; min-width: 64px; }
.up-row .pn { font-weight: 700; font-size: 14px; }
.up-row .pd { font-size: 12px; color: var(--text-muted); }

/* ============================================
   Channels grid (page)
   ============================================ */
.channels-hero {
  padding: 50px 0 24px;
  text-align: center;
}
.channels-hero h1 { font-size: clamp(34px, 4vw, 48px); font-weight: 900; margin: 0 0 10px; }
.channels-hero p { color: var(--text-muted); margin: 0 auto; max-width: 640px; }
.filter-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center; margin: 22px 0 12px;
}
.filter-pill {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  transition: all .2s;
}
.filter-pill:hover { color: var(--text); }
.filter-pill.is-on { background: linear-gradient(135deg, var(--sapphire), var(--caribbean)); color: var(--rich-black); border-color: transparent; }
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 12px 0 30px;
}

/* ============================================
   Channel detail page
   ============================================ */
.ch-detail-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  margin: 26px 0 20px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
@media (max-width: 700px) { .ch-detail-hero { grid-template-columns: 1fr; text-align: center; } }
.ch-detail-hero .ch-logo-xl {
  width: 220px; height: 220px;
  border-radius: 32px;
  display: grid; place-items: center;
  font-weight: 900;
  font-size: 60px;
  color: var(--rich-black);
}
.ch-detail-hero h1 { font-size: 38px; margin: 0 0 8px; font-weight: 900; }
.ch-detail-hero p { color: var(--text-muted); margin: 0 0 16px; max-width: 600px; line-height: 1.7; }
.ch-detail-hero .actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================
   News page
   ============================================ */
.news-hero {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 22px;
  margin: 22px 0;
}
@media (max-width: 900px) { .news-hero { grid-template-columns: 1fr; } }
.news-feature {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.news-feature .thumb { position: absolute; inset: 0; }
.news-feature .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-feature::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(9,19,26,0.95) 0%, rgba(9,19,26,0.4) 50%, transparent);
}
.news-feature .body {
  position: absolute; inset: auto 0 0 0;
  padding: 30px;
  z-index: 1;
}
.news-feature .cat { color: var(--cooper); font-weight: 900; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; }
.news-feature h2 { font-size: 28px; margin: 8px 0; line-height: 1.25; font-weight: 900; }
.news-feature .meta { color: var(--text-muted); font-size: 12px; }

.news-side { display: flex; flex-direction: column; gap: 12px; }
.news-side .item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  cursor: pointer;
}
.news-side .item:hover { border-color: var(--sapphire); }
.news-side .item .img {
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--gunmetal), var(--rich-black));
  border-radius: 10px;
  overflow: hidden;
}
.news-side .item .img img { width: 100%; height: 100%; object-fit: cover; }
.news-side .item .info .cat { font-size: 10px; color: var(--cooper); font-weight: 900; letter-spacing: 1px; text-transform: uppercase; }
.news-side .item .info h4 { font-size: 14px; margin: 4px 0 6px; line-height: 1.35; font-weight: 800; }
.news-side .item .info .when { font-size: 11px; color: var(--text-muted); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 12px 0 30px;
}

.news-categories {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

/* ============================================
   Ads page
   ============================================ */
.ads-hero {
  text-align: center;
  padding: 60px 30px;
  background: linear-gradient(180deg, transparent, rgba(168,118,62,0.06));
  border-radius: var(--radius-lg);
  margin: 22px 0;
}
.ads-hero h1 { font-size: clamp(36px, 4vw, 54px); font-weight: 900; margin: 0 0 14px; }
.ads-hero h1 .cooper-text { background: linear-gradient(135deg, var(--cooper), #d3a76a); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.ads-hero p { color: var(--text-muted); max-width: 720px; margin: 0 auto 22px; font-size: 16px; line-height: 1.7; }

.benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 30px 0;
}
@media (max-width: 880px) { .benefits { grid-template-columns: repeat(2, 1fr); } }
.benefit {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  text-align: center;
}
.benefit .icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--cooper), #815626);
  color: var(--rich-black);
  font-size: 24px;
  font-weight: 900;
}
.benefit .num { font-size: 28px; font-weight: 900; color: var(--cooper); }
.benefit h4 { margin: 4px 0 6px; font-size: 14px; font-weight: 800; }
.benefit p { color: var(--text-muted); font-size: 12px; margin: 0; line-height: 1.55; }

.ad-types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0;
}
@media (max-width: 800px) { .ad-types { grid-template-columns: 1fr; } }
.ad-type {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.ad-type h3 { font-size: 18px; margin: 0 0 10px; font-weight: 800; }
.ad-type ul { list-style: none; padding: 0; margin: 0; }
.ad-type li { font-size: 13px; color: var(--text-muted); padding: 6px 0; padding-inline-start: 22px; position: relative; }
.ad-type li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--sapphire); font-weight: 900; }

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 30px 0;
}
@media (max-width: 800px) { .plans { grid-template-columns: 1fr; } }
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  position: relative;
}
.plan.is-featured {
  background: linear-gradient(180deg, rgba(168,118,62,0.12), var(--surface));
  border-color: var(--cooper);
}
.plan .ribbon {
  position: absolute; top: -14px; inset-inline-start: 50%; transform: translateX(-50%);
  background: var(--cooper);
  color: var(--rich-black);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
}
html[dir="rtl"] .plan .ribbon { transform: translateX(50%); }
.plan h3 { font-size: 20px; margin: 6px 0; font-weight: 900; }
.plan .price { font-size: 36px; font-weight: 900; color: var(--sapphire); margin: 10px 0; }
.plan .price.cooper { color: var(--cooper); }
.plan .price small { font-size: 14px; color: var(--text-muted); font-weight: 600; }
.plan ul { list-style: none; padding: 0; margin: 16px 0; text-align: start; }
.plan li { font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--text-muted); padding-inline-start: 22px; position: relative; }
.plan li::before { content: "•"; color: var(--sapphire); position: absolute; inset-inline-start: 6px; }

/* ============================================
   Forms
   ============================================ */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  max-width: 720px;
  margin: 30px auto;
}
.form-card h2 { margin: 0 0 6px; font-size: 24px; font-weight: 900; }
.form-card .lead { color: var(--text-muted); font-size: 14px; margin: 0 0 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .col-2 { grid-column: span 2; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .form-grid .col-2 { grid-column: 1; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--text-muted); font-weight: 700; }
.field input, .field select, .field textarea {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 11px 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--sapphire); border-color: var(--sapphire); }
.field textarea { min-height: 110px; resize: vertical; }

/* ============================================
   About / Contact
   ============================================ */
.page-hero {
  text-align: center;
  padding: 60px 20px 30px;
}
.page-hero .eyebrow { color: var(--sapphire); font-size: 12px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
.page-hero h1 { font-size: clamp(34px, 4vw, 52px); font-weight: 900; margin: 8px 0 14px; }
.page-hero p { color: var(--text-muted); max-width: 720px; margin: 0 auto; font-size: 16px; line-height: 1.7; }

.content-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  margin: 22px 0;
}
.content-block h2 { font-size: 24px; font-weight: 900; margin: 0 0 12px; }
.content-block p { color: var(--text-muted); line-height: 1.8; font-size: 15px; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 24px 0;
}
@media (max-width: 700px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: linear-gradient(180deg, rgba(18,163,169,0.08), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.stat .num { font-size: 38px; font-weight: 900; background: linear-gradient(135deg, var(--sapphire), var(--cooper)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat .label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 22px;
  margin: 22px 0;
}
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.contact-info h3 { font-size: 16px; font-weight: 800; margin: 0 0 16px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; }
.contact-info ul { list-style: none; padding: 0; margin: 0; }
.contact-info li { padding: 12px 0; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.contact-info li:last-child { border-bottom: 0; }
.contact-info li .ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-3);
  color: var(--sapphire);
  flex-shrink: 0;
  font-size: 16px;
}

/* Phase 6+ player video (force fill of .player container) */
.player { position: relative; }
.player-video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block;
  background: #000;
  object-fit: contain;
  z-index: 0;
}
.player-bg { z-index: 1; pointer-events: none; }
.player .player-overlay,
.player .player-play,
.player .player-status { z-index: 3; }

/* Persiana stylesheet - end */

/* ─── Program detail modal ─────────────────────────────────────────── */
.pmodal[hidden] { display: none !important; }
.pmodal {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.pmodal-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 12, 18, 0.85);
  backdrop-filter: blur(6px);
  cursor: pointer;
}
.pmodal-card {
  position: relative;
  width: 100%; max-width: 920px;
  max-height: 90vh; overflow: auto;
  background: var(--surface, #0e1a23);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  animation: pmodal-in 0.22s ease-out;
}
@keyframes pmodal-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pmodal-close {
  position: absolute; inset-inline-end: 14px; top: 14px; z-index: 3;
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(0,0,0,0.55); color: #fff;
  border: 1px solid rgba(255,255,255,0.12); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.pmodal-close:hover { background: rgba(0,0,0,0.85); }

.pmodal-hero {
  position: relative; height: 320px; overflow: hidden;
  border-radius: 16px 16px 0 0;
}
.pmodal-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: blur(2px) brightness(0.55);
}
.pmodal-hero-grad {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--surface, #0e1a23) 0%, transparent 60%),
              linear-gradient(90deg, rgba(0,0,0,0.6) 0%, transparent 60%);
}
.pmodal-hero-content {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; gap: 22px;
  padding: 24px;
}
.pmodal-poster {
  width: 140px; height: 210px; object-fit: cover;
  border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,0.6);
  flex-shrink: 0; background: #000;
}
.pmodal-headline { flex: 1; min-width: 0; }
.pmodal-channel { margin-bottom: 8px; }
.pmodal-title {
  font-size: 28px; font-weight: 900; line-height: 1.2;
  color: var(--text, #f7f9f9); margin: 0 0 6px;
}
.pmodal-subtitle {
  color: var(--text-muted, rgba(255,255,255,0.6));
  font-size: 14px; margin-bottom: 10px;
}
.pmodal-meta {
  color: var(--text, #f7f9f9); font-size: 13px;
  display: flex; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px;
}
.pmodal-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.pmodal-actions .btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 8px; font-weight: 700;
  font-size: 13px; cursor: pointer; border: 0;
  transition: transform 0.1s, opacity 0.15s;
}
.pmodal-actions .btn:hover { transform: translateY(-1px); }
.pmodal-actions .btn-primary {
  background: var(--sapphire, #12A3A9); color: #fff; text-decoration: none;
}
.pmodal-actions .btn-ghost {
  background: rgba(255,255,255,0.08); color: var(--text, #fff);
  border: 1px solid var(--border, rgba(255,255,255,0.12));
}

.pmodal-body { padding: 22px 28px 28px; }
.pmodal-desc p {
  font-size: 15px; line-height: 1.85;
  color: var(--text, #f7f9f9); margin: 0 0 14px;
}
.pmodal-genres { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pmodal-chip {
  padding: 4px 12px; border-radius: 999px;
  background: rgba(168,118,62,0.14);
  border: 1px solid rgba(168,118,62,0.35);
  color: var(--cooper, #A8763E); font-size: 12px; font-weight: 700;
}

@media (max-width: 640px) {
  .pmodal { padding: 0; }
  .pmodal-card { border-radius: 0; max-height: 100vh; height: 100vh; }
  .pmodal-hero { height: 240px; border-radius: 0; }
  .pmodal-hero-content { flex-direction: column; align-items: flex-start; }
  .pmodal-poster { width: 90px; height: 135px; }
  .pmodal-title { font-size: 22px; }
  .pmodal-body { padding: 18px; }
}

/* ─── News article page ────────────────────────────────────────────── */
#art-body p { margin: 0 0 18px; }
#art-body { font-family: inherit; }
.btn-ghost {
  background: rgba(255,255,255,0.06); color: var(--text);
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 13px; text-decoration: none;
}
.btn-ghost:hover { background: rgba(255,255,255,0.10); }

/* ─── Player top-bar (channel logo + LIVE badge) ───────────────────── */
.player-topbar {
  position: absolute; top: 0; inset-inline-start: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; z-index: 4; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, transparent 100%);
}
.player-channel {
  display: flex; align-items: center; gap: 12px;
  pointer-events: auto;
}
.player-channel-name strong {
  display: block; color: #fff; font-size: 16px; font-weight: 800;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.live-badge-glow {
  background: var(--live, #e63946); color: #fff;
  padding: 6px 12px; border-radius: 6px;
  font-size: 11px; font-weight: 900; letter-spacing: 1.5px;
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.5);
  animation: pulse-glow 2s ease-in-out infinite;
  display: inline-flex; align-items: center; gap: 6px;
  pointer-events: auto;
}
.live-badge-glow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(230, 57, 70, 0.4); }
  50%      { box-shadow: 0 0 28px rgba(230, 57, 70, 0.7); }
}

/* ─── Player progress bar (current program) ────────────────────────── */
.player-progress {
  width: 100%; max-width: 480px;
  height: 4px; background: rgba(255,255,255,0.18); border-radius: 999px;
  margin-top: 10px; overflow: hidden;
}
.player-progress > i {
  display: block; height: 100%; border-radius: 999px;
  background: var(--sapphire, #12A3A9);
  transition: width 0.3s ease-out;
}

/* ─── Quality cog + dropdown ──────────────────────────────────────── */
.player-quality-wrap { position: relative; }
.player-quality {
  position: absolute; bottom: calc(100% + 8px); inset-inline-end: 0;
  background: rgba(0,0,0,0.92);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 8px;
  display: none; min-width: 130px;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  cursor: pointer;
}
.player-quality.is-open { display: block; }
.player-quality option {
  background: #0e1a23; color: #fff;
  padding: 6px;
}

/* ─── Initial loading state — replaces the demo-data flash ─────────── */
.rail:empty::before, .news-grid:empty::before {
  content: "";
  display: block;
  height: 220px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--surface, #0e1a23) 0%, var(--surface-2, #16242f) 50%, var(--surface, #0e1a23) 100%);
  background-size: 200% 100%;
  animation: persiana-shimmer 1.4s ease-in-out infinite;
}
.hero:empty {
  height: 420px;
  border-radius: 16px;
  background: linear-gradient(90deg, var(--surface, #0e1a23) 0%, var(--surface-2, #16242f) 50%, var(--surface, #0e1a23) 100%);
  background-size: 200% 100%;
  animation: persiana-shimmer 1.4s ease-in-out infinite;
}
@keyframes persiana-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
/* When body has data-hydrating, fade rails in once ready */
body[data-hydrated="true"] .rail, body[data-hydrated="true"] .hero { animation: persiana-fadein 0.4s ease-out; }
@keyframes persiana-fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ─── Mute button states ───────────────────────────────────────────── */
.player-btn#btn-mute.is-muted {
  background: rgba(230, 57, 70, 0.22);
  border-color: rgba(230, 57, 70, 0.55);
  color: #ff8b8b;
  box-shadow: 0 0 12px rgba(230, 57, 70, 0.35);
}
.player-btn#btn-mute.is-muted:hover {
  background: rgba(230, 57, 70, 0.32);
}

/* ─── Social brand icons (footer) ─────────────────────────────────── */
.socials a.social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.18s ease-out;
  text-decoration: none;
}
.socials a.social:hover {
  transform: translateY(-2px);
  color: #fff;
}
.socials a.social-ig:hover { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); border-color: transparent; }
.socials a.social-yt:hover { background: #FF0000;             border-color: transparent; }
.socials a.social-tg:hover { background: #229ED9;             border-color: transparent; }
.socials a.social-x:hover  { background: #000;                border-color: transparent; }
.socials a.social-fb:hover { background: #1877F2;             border-color: transparent; }


/* ─── EPG schedule now-line + scroll polish ────────────────────────── */
.now-line {
  position: absolute;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--cooper, #A8763E);
  z-index: 5;
  box-shadow: 0 0 12px rgba(168, 118, 62, 0.65);
  pointer-events: none;
}
.now-line::before {
  content: "";
  position: absolute;
  top: -4px; left: -4px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--cooper, #A8763E);
  box-shadow: 0 0 12px rgba(168, 118, 62, 0.85);
}


/* ─── EPG times bar polish ────────────────────────────────────────── */
.epg-times > div {
  background: var(--surface-2, #16242f);
  padding: 10px 12px;
  border-inline-start: 1px solid var(--border);
  white-space: nowrap;
}
.epg-times > div:first-child {
  background: var(--surface, #0e1a23);
  border-inline-start: 0;
  font-weight: 800;
  color: var(--text);
  z-index: 11;
  position: sticky;
  inset-inline-start: 0;
}

/* ════════════════════════════════════════════════════════════════════
   📱  MOBILE — Comprehensive responsive layer (<= 768px)
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* ── Spacing reset for narrow viewport ───────────────────────────── */
  .shell { padding-inline: 14px !important; }
  .section { padding-block: 18px !important; }

  /* ── Top nav: collapse to hamburger ──────────────────────────────── */
  .nav-inner {
    flex-wrap: wrap;
    padding: 10px 14px !important;
    gap: 8px;
  }
  .brand-sub { display: none; }
  .nav-links {
    order: 99;
    flex-basis: 100%;
    flex-direction: column;
    gap: 4px;
    background: var(--surface, #0e1a23);
    border: 1px solid var(--border, rgba(255,255,255,0.10));
    border-radius: 10px;
    padding: 8px;
    margin-top: 8px;
    display: none;          /* shown when [data-mobile-open] on the nav root */
  }
  [data-nav][data-mobile-open] .nav-links { display: flex !important; }
  .nav-link { padding: 10px 12px !important; }
  .nav-actions { gap: 6px !important; }
  .nav-actions .lang-switch { padding: 2px !important; }
  .nav-actions .lang-switch button { padding: 4px 8px !important; font-size: 11px; }
  .btn-live-cta { padding: 6px 12px !important; font-size: 12px; }
  /* Hamburger button (added by JS) */
  .nav-burger {
    background: none; border: 0; color: var(--text, #fff);
    cursor: pointer; padding: 8px; margin-inline-start: auto;
    display: inline-flex; align-items: center; justify-content: center;
  }

  /* ── Hero ────────────────────────────────────────────────────────── */
  .hero { min-height: auto !important; padding: 24px 18px !important; }
  .hero-title { font-size: 26px !important; line-height: 1.2; }
  .hero-desc { font-size: 13px !important; }
  .hero-collage { display: none !important; }
  .hero-actions .btn { padding: 9px 16px !important; font-size: 13px; }

  /* ── Section headers ─────────────────────────────────────────────── */
  h2 { font-size: 18px !important; }
  .more { font-size: 11px !important; }

  /* ── Rails: keep horizontal scroll, smaller cards ────────────────── */
  .rail { gap: 10px !important; padding-inline: 4px !important; }
  .card-live, .card-tonight { width: 240px !important; }
  .card-poster { width: 160px !important; }
  .ptitle { font-size: 13px !important; }
  .ptime { font-size: 11px !important; }
  .card .body, .card-news .body { padding: 10px !important; }
  .card .title, .card-news .title { font-size: 13px !important; }

  /* ── Player ──────────────────────────────────────────────────────── */
  .live-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .player { aspect-ratio: 16/9; min-height: auto !important; }
  .player-overlay { padding: 14px 16px !important; }
  .player-info h2 { font-size: 16px !important; }
  .player-info p { font-size: 11px !important; }
  .player-controls { gap: 6px !important; flex-wrap: wrap; }
  .player-btn { width: 36px !important; height: 36px !important; }
  .player-topbar { padding: 12px 14px !important; }
  .player-channel-name strong { font-size: 13px !important; }
  .live-side { padding: 12px !important; }

  /* ── Schedule EPG ────────────────────────────────────────────────── */
  .epg-toolbar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 8px;
  }
  .epg-toolbar input,
  .epg-toolbar select { width: 100% !important; min-width: 0 !important; }
  .epg-times { grid-template-columns: 140px repeat(24, 80px) !important; width: calc(140px + 24 * 80px) !important; }
  .epg-row { grid-template-columns: 140px 1fr !important; width: calc(140px + 24 * 80px) !important; }
  .epg-track { width: calc(24 * 80px) !important; min-width: calc(24 * 80px) !important; background-size: 80px 100% !important; }
  .epg-channel { padding: 10px !important; }
  .epg-channel .nm { font-size: 12px !important; }

  /* ── News & cards ────────────────────────────────────────────────── */
  .news-grid { grid-template-columns: 1fr !important; }
  .news-feature { grid-template-columns: 1fr !important; }
  .news-side { grid-template-columns: 1fr !important; }

  /* ── Channel grid ────────────────────────────────────────────────── */
  .channels-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .card-channel { padding: 14px !important; }
  .ch-name-lg { font-size: 14px !important; }

  /* ── Forms ───────────────────────────────────────────────────────── */
  .form-grid { grid-template-columns: 1fr !important; }
  .form-grid .col-2 { grid-column: 1 !important; }
  input, select, textarea { font-size: 16px !important; /* prevent iOS zoom */ }

  /* ── Footer ──────────────────────────────────────────────────────── */
  .footer .grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }

  /* ── Contact info layout ─────────────────────────────────────────── */
  .contact-grid { grid-template-columns: 1fr !important; }
  .contact-info { padding: 18px !important; }

  /* ── Modal: full-screen on phones ────────────────────────────────── */
  .pmodal { padding: 0 !important; }
  .pmodal-card { max-height: 100vh !important; height: 100vh !important; border-radius: 0 !important; }
  .pmodal-hero { height: 200px !important; border-radius: 0 !important; }
  .pmodal-poster { width: 80px !important; height: 120px !important; }
  .pmodal-title { font-size: 19px !important; }
  .pmodal-body { padding: 16px !important; }

  /* ── Ads page ────────────────────────────────────────────────────── */
  .rate-card { padding: 16px !important; }
  .rate-price { font-size: 22px !important; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 22px !important; }
  .channels-grid { grid-template-columns: 1fr !important; }
  .nav-actions .btn-live-cta { display: none; }
}

/* ─── iOS Safari: force video to fill player container ─────────────── */
.player {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
.player .player-video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  background: #000;
}
@media (max-width: 768px) {
  .player-video { object-fit: contain; }
  /* Hide controls bar that might overflow on small screens — let user use double-tap fullscreen instead */
  .player .player-overlay { padding-bottom: 8px !important; }
}


/* ─── Schedule channel column: freeze on horizontal scroll ──────────── */
.epg-row .epg-channel {
  position: sticky !important;
  inset-inline-start: 0 !important;
  z-index: 6 !important;
  background: var(--surface, #0e1a23) !important;
  border-inline-end: 2px solid var(--sapphire, #12A3A9) !important;
  box-shadow: 4px 0 12px rgba(0,0,0,0.3);
}
/* Also freeze the times bar's first cell (channel header) */
.epg-times > div:first-child {
  position: sticky !important;
  inset-inline-start: 0 !important;
  z-index: 12 !important;
  background: var(--surface, #0e1a23) !important;
  border-inline-end: 2px solid var(--sapphire, #12A3A9) !important;
}


/* ─── Schedule program card hover: enlarge title for readability ─────── */
.epg-prog {
  transition: transform 0.18s ease-out, box-shadow 0.18s, z-index 0.01s;
  cursor: pointer;
}
.epg-prog:hover {
  transform: scale(1.08);
  z-index: 3 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  outline: 2px solid var(--sapphire, #12A3A9);
}
.epg-prog:hover .pn { font-size: 14px !important; font-weight: 800; }
.epg-prog:hover .pt { font-size: 11px !important; }
