/* ============================================================
   MapleStream IPTV — styles.css
   Mobile-first, single stylesheet, no external dependencies.

   BRAND TOKENS — edit these variables to retheme the whole site.
   ============================================================ */
:root {
  /* Brand palette */
  --red: #D80621;          /* primary brand red */
  --red-dark: #A80017;     /* hover / pressed state */
  --white: #FFFFFF;
  --dark: #0D0D0D;         /* near-black base */
  --dark-2: #161616;       /* raised surfaces (cards, alt sections) */
  --dark-3: #222222;       /* borders / dividers */
  --grey: #A8A8A8;         /* secondary text on dark */
  --grey-light: #D6D6D6;   /* body text on dark */

  /* Type scale */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --container: 1140px;
  --radius: 14px;
  --header-h: 64px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Offset anchor targets so the sticky header doesn't cover section titles */
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

body {
  font-family: var(--font);
  background: var(--dark);
  color: var(--grey-light);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--white); }
a:hover { color: var(--red); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* Mobile-first: tighter rhythm on phones, opens up at ≥720px */
.section { padding: 60px 0; }

/* ---------- Icon system (SVG sprite) ----------
   Stroke icons inherit currentColor; .icon-fill for solid marks. */
.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-fill { fill: currentColor; stroke: none; }
.icon-sm { width: 15px; height: 15px; vertical-align: -2px; }

/* Rounded icon container — red-tinted, consistent across sections */
.icon-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(216, 6, 33, .1);
  border: 1px solid rgba(216, 6, 33, .28);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.icon-box-sm { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 12px; }
.icon-box-sm .icon { width: 19px; height: 19px; }
.icon-box-center { margin-inline: auto; }

/* Visually hidden (screen readers only) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Accessible skip link — visible only when focused */
.skip-link {
  position: absolute;
  left: -9999px;
  background: var(--red);
  color: var(--white);
  padding: 10px 18px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; top: 0; }

/* ---------- Headings ---------- */
h1, h2, h3 { color: var(--white); line-height: 1.2; font-weight: 800; }

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-align: center;
  margin-bottom: 14px;
}

.section-sub {
  max-width: 640px;
  margin: 0 auto 44px;
  text-align: center;
  color: var(--grey);
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  border-radius: 10px;
  padding: 13px 26px;
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
  cursor: pointer;
  border: 2px solid transparent;
  font-size: 1rem;
}
.btn:active { transform: scale(.97); }

/* Primary — brand red, high contrast (white on #D80621 passes WCAG AA large/bold) */
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); color: var(--white); }

/* Ghost — outline on dark backgrounds */
.btn-ghost { border-color: var(--dark-3); color: var(--white); background: transparent; }
.btn-ghost:hover { border-color: var(--white); color: var(--white); }

/* Outline — pricing secondary CTAs */
.btn-outline { border-color: var(--red); color: var(--white); background: transparent; }
.btn-outline:hover { background: var(--red); color: var(--white); }

/* Light — used on the red Quebec band */
.btn-light { background: var(--white); color: var(--red); }
.btn-light:hover { background: var(--dark); color: var(--white); }

.btn-lg { padding: 16px 34px; font-size: 1.08rem; }
.btn-block { display: block; width: 100%; }

/* Visible focus ring for keyboard users */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

/* ============================================================
   PROMO BANNER (urgency element)
   ============================================================ */
.promo-banner {
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 44px 9px 16px;
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  position: relative;
}
.promo-banner p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.promo-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.promo-banner.hidden { display: none; }

/* ============================================================
   HEADER / NAV — sticky, CTA always visible
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--dark-3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--white);
  font-size: 1.25rem;
}
.logo-leaf { width: 26px; height: 26px; fill: var(--red); flex-shrink: 0; }
.logo-text { font-weight: 400; letter-spacing: -.02em; }
.logo-text strong { font-weight: 800; }

/* Nav links — hidden behind hamburger on mobile */
.nav-menu {
  list-style: none;
  display: none;
  gap: 26px;
}
.nav-menu a {
  text-decoration: none;
  color: var(--grey-light);
  font-weight: 600;
  font-size: .95rem;
}
.nav-menu a:hover, .nav-menu a[aria-current="page"] { color: var(--white); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* Language switcher stub */
.lang-toggle {
  background: none;
  border: 1px solid var(--dark-3);
  border-radius: 8px;
  color: var(--grey);
  font-family: inherit;
  font-size: .8rem;
  font-weight: 700;
  padding: 7px 10px;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  text-decoration: none;
}
.lang-divider { opacity: .4; }
/* main.js toggles .lang-active onto the current language code */
.lang-toggle .lang-active { color: var(--white); }

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  order: 3;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--white);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown menu */
.nav-menu.open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--dark-2);
  border-bottom: 1px solid var(--dark-3);
  box-shadow: 0 24px 40px rgba(0, 0, 0, .45);
  padding: 10px 20px;
  gap: 0;
}
/* Comfortable 44px-plus tap targets in the mobile menu */
.nav-menu.open a {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.nav-menu.open li:last-child a { border-bottom: 0; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 80px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(216, 6, 33, .22), transparent 65%),
    var(--dark);
  text-align: center;
}
.hero-compact { padding-bottom: 56px; }

/* Oversized decorative leaf — barely-there watermark */
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-leaf {
  position: absolute;
  width: 520px;
  right: -140px;
  top: -60px;
  fill: var(--red);
  opacity: .05;
  transform: rotate(14deg);
}

.hero-inner { position: relative; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--red);
  background: rgba(216, 6, 33, .12);
  border: 1px solid rgba(216, 6, 33, .35);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .03em;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: -.02em;
  max-width: 820px;
  margin: 0 auto 18px;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 30px;
  font-size: 1.1rem;
  color: var(--grey);
}

/* Social-proof rating row under the hero subtitle */
.hero-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
  font-size: .92rem;
  color: var(--grey);
}
.hero-proof strong { color: var(--white); }
.hero-proof .stars { margin: 0; font-size: 1rem; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 22px;
}
/* Full-width, easy-thumb CTAs on small phones */
@media (max-width: 479px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; }
  .section-cta .btn { display: block; width: 100%; }
}


.hero-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  font-size: .88rem;
  color: var(--grey);
  margin-bottom: 48px;
}

/* CSS-only TV mockup — keeps the hero image-free and fast */
.hero-screen {
  max-width: 720px;
  margin: 0 auto;
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .03);
}
.screen-bar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--dark-3);
}
.screen-bar span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--dark-3);
}
.screen-bar span:first-child { background: var(--red); }

.screen-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px;
}
@media (min-width: 560px) {
  .screen-grid { grid-template-columns: repeat(3, 1fr); padding: 16px; }
}
.tile {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e1e1e, #2a2a2a);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8px 10px;
  position: relative;
}
.tile-live { background: linear-gradient(135deg, #3a0a12, var(--red-dark)); }
.tile-label { font-size: .72rem; font-weight: 600; color: var(--grey-light); }
.badge-live {
  position: absolute;
  top: 7px; left: 8px;
  font-size: .58rem;
  font-weight: 800;
  color: var(--white);
  background: var(--red);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: .05em;
}
.badge-time {
  position: absolute;
  top: 7px; left: 8px;
  font-size: .58rem;
  font-weight: 700;
  color: var(--grey-light);
  background: rgba(255, 255, 255, .1);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: .05em;
}

/* Centered CTA row reused at the bottom of several sections */
.section-cta { text-align: center; margin-top: 40px; }

/* ============================================================
   TRUST BAR
   ============================================================ */
.trust-bar {
  background: var(--dark-2);
  border-block: 1px solid var(--dark-3);
  padding: 30px 0;
}
/* Flex so any item count (currently 5) centers cleanly on every width */
.trust-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px 36px;
  text-align: center;
}
.trust-item { min-width: 120px; }
.trust-num {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--white);
}
.trust-label { font-size: .85rem; color: var(--grey); }

/* ============================================================
   FEATURES
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.feature-card {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: border-color .2s ease, transform .2s ease;
}
.feature-card .icon-box { margin-inline: auto; }
.feature-card:hover { border-color: rgba(216, 6, 33, .5); transform: translateY(-3px); }
.feature-card h3 { font-size: 1.12rem; margin-bottom: 10px; }
.feature-card p { color: var(--grey); font-size: .95rem; }
.feature-card a { color: var(--red); font-weight: 600; }

/* ============================================================
   CHANNELS — category showcase
   ============================================================ */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.channel-card {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  transition: border-color .2s ease, transform .2s ease;
}
.channel-card .icon-box { margin-inline: auto; }
.channel-card:hover { border-color: rgba(216, 6, 33, .5); transform: translateY(-3px); }
.channel-card h3 { font-size: 1rem; margin-bottom: 6px; }
.channel-card p { font-size: .84rem; color: var(--grey); margin-bottom: 12px; }
.channel-count {
  display: inline-block;
  font-size: .74rem;
  font-weight: 800;
  color: var(--red);
  background: rgba(216, 6, 33, .12);
  border: 1px solid rgba(216, 6, 33, .3);
  border-radius: 999px;
  padding: 3px 10px;
}
.channels-note {
  text-align: center;
  margin-top: 30px;
  color: var(--grey);
  font-size: .95rem;
}
.channels-note a { color: var(--red); font-weight: 700; }

/* ============================================================
   SPORTS — live-tile gallery
   ============================================================ */
.sports-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 34px;
}
.sport-tile {
  aspect-ratio: 16 / 10;
  min-height: 108px;
  border-radius: 10px;
  background: linear-gradient(150deg, #1c1c1c, #262626);
  border: 1px solid var(--dark-3);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
}
/* Red glow on live tiles */
.sport-tile:has(.badge-live) {
  background: linear-gradient(150deg, #2a0910, #3d0d17);
  border-color: rgba(216, 6, 33, .4);
}

/* Photo layer — lazy <img>, crops to fill the tile without distortion.
   The tile's brand gradient shows through while it loads. */
.sport-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* Bottom-up scrim between photo and text so league + title stay
   legible over any image */
.sport-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .85) 100%);
  pointer-events: none;
}

/* Badges ride above the photo + scrim (scoped so the shared badge
   styling itself stays untouched) */
.sport-tile .badge-live,
.sport-tile .badge-time { z-index: 2; }

.sport-league {
  position: relative;              /* sits above the ::before scrim */
  z-index: 2;
  font-size: .7rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--red);
  letter-spacing: .08em;
  text-transform: uppercase;
}
/* League tag stays on its own line above; the matchup wraps naturally
   below it, clamped to 2 lines (badge is top-anchored, so no collision) */
.sport-match {
  position: relative;
  z-index: 2;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 2px;
  color: var(--white);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mobile: slightly taller cards + tighter padding so two-line titles
   breathe, and a small font bump for readability at 2-up width */
@media (max-width: 767px) {
  .sport-tile { aspect-ratio: 4 / 3; padding: 10px 12px; }
  .sport-match { font-size: .95rem; }
}

/* League pills — single-line infinite marquee. The pill list is
   duplicated in the HTML; the track is exactly two sets wide, so
   animating 0% → -50% loops seamlessly with no gap. Pills use
   margin-right (not flex gap) so one set is exactly half the track. */
.sports-leagues-wrap {
  position: relative;
  overflow: hidden;
}
/* Soft fade at both edges so pills never hard-clip */
.sports-leagues-wrap::before,
.sports-leagues-wrap::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40px;
  pointer-events: none;
  z-index: 2;
}
.sports-leagues-wrap::before { left: 0;  background: linear-gradient(90deg, var(--dark-2), transparent); }
.sports-leagues-wrap::after  { right: 0; background: linear-gradient(270deg, var(--dark-2), transparent); }

.sports-leagues {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  will-change: transform;
  animation: leagues-scroll 32s linear infinite;
}
/* Pause on hover so pills can be read (matches the poster rails) */
.sports-leagues-wrap:hover .sports-leagues { animation-play-state: paused; }

.sports-leagues li {
  flex-shrink: 0;
  white-space: nowrap;
  margin-right: 10px;
  font-size: .84rem;
  font-weight: 600;
  color: var(--grey-light);
  background: var(--dark);
  border: 1px solid var(--dark-3);
  border-radius: 999px;
  padding: 7px 14px;
}

@keyframes leagues-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Reduced motion: the global rule stops the animation, so fall back
   to the static centered wrapped layout and drop the duplicate set */
@media (prefers-reduced-motion: reduce) {
  .sports-leagues { flex-wrap: wrap; width: auto; justify-content: center; }
  .sports-leagues li[aria-hidden="true"] { display: none; }
}

/* ============================================================
   MOVIES / VOD — two-row poster marquee, auto-scrolling in a
   seamless loop (opposite directions per row). Real cover art,
   lazy-loaded. Each track's item list is duplicated in the HTML
   so the animation can loop 0% → -50% with no gap or jump.
   ============================================================ */
.poster-rail-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
  overflow: hidden;
}
.poster-rail-wrap::before,
.poster-rail-wrap::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 48px;
  pointer-events: none;
  z-index: 2;
}
.poster-rail-wrap::before { left: 0; background: linear-gradient(90deg, var(--dark), transparent); }
.poster-rail-wrap::after { right: 0; background: linear-gradient(270deg, var(--dark), transparent); }

.poster-row { overflow: hidden; width: 100%; }

.poster-track {
  display: flex;
  gap: 12px;
  width: max-content;
  will-change: transform;
}
.poster-track-a { animation: poster-scroll-left 46s linear infinite; }
.poster-track-b { animation: poster-scroll-right 52s linear infinite; }
/* Pause on hover — a small "look closer" affordance on desktop */
.poster-row:hover .poster-track { animation-play-state: paused; }

@keyframes poster-scroll-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes poster-scroll-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .poster-track-a, .poster-track-b { animation: none; }
}

.poster {
  flex: 0 0 auto;
  width: 132px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--dark-3);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .4);
}
.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.poster-flag {
  position: absolute;
  top: 8px; right: 8px;
  font-size: .6rem;
  font-weight: 800;
  color: var(--white);
  background: var(--red);
  border-radius: 4px;
  padding: 2px 7px;
  letter-spacing: .05em;
  z-index: 1;
}

.movies-points {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
}
.movie-point {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-align: center;
}
.movie-point strong { color: var(--white); display: block; margin-bottom: 6px; }
.movie-point p { font-size: .92rem; color: var(--grey); }

/* ============================================================
   COMPARISON TABLE — cable vs IPTV
   ============================================================ */
.table-wrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Mobile-only swipe affordance — the table is wider than a phone
   screen (min-width: 560px), so without a clear cue the right-hand
   MapleStream column just looks cut off. A pill chip with gently
   nudging arrows says "this scrolls"; main.js fades it out after the
   first real swipe, and the row-label column stays sticky so the
   reader never loses context mid-swipe. */
.table-hint { display: none; }
@media (max-width: 719px) {
  .table-hint {
    display: flex;
    width: fit-content;
    margin: 0 auto 14px;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--grey-light);
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--dark-3);
    border-radius: 999px;
    transition: opacity .45s ease;
  }
  .table-hint .chev {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1;
    color: var(--red);
  }
  /* Arrows breathe outward — a universal "scrolls sideways" cue */
  .chev-l { animation: chev-nudge-l 1.5s ease-in-out infinite; }
  .chev-r { animation: chev-nudge-r 1.5s ease-in-out infinite; }
  /* Fades once the user swipes; keeps its height so nothing jumps */
  .table-hint.is-hidden { opacity: 0; }

  /* Right-edge fade: content visibly continues past the viewport */
  .table-wrap::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 32px;
    background: linear-gradient(270deg, var(--dark), transparent);
    pointer-events: none;
  }

  /* Row labels stay pinned while the value columns scroll under them.
     Sticky table cells silently break in Safari when the table uses
     border-collapse: collapse, so switch to separate borders here —
     cells already carry their own border-bottom, so nothing changes
     visually. */
  .compare-table {
    border-collapse: separate;
    border-spacing: 0;
  }
  .compare-table tbody th,
  .compare-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--dark-2);
    box-shadow: 4px 0 10px rgba(0, 0, 0, .35);
  }
  .compare-table thead th:first-child { background: var(--dark); }
}

@keyframes chev-nudge-l {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-4px); }
}
@keyframes chev-nudge-r {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}

.compare-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-table th, .compare-table td {
  padding: 15px 18px;
  text-align: left;
  font-size: .93rem;
  border-bottom: 1px solid var(--dark-3);
}
.compare-table thead th {
  font-size: .95rem;
  color: var(--white);
  background: var(--dark);
}
.compare-table tbody th { color: var(--grey-light); font-weight: 600; }
.compare-table td { color: var(--grey); }
.compare-table .col-brand {
  background: rgba(216, 6, 33, .08);
  color: var(--grey-light);
}
.compare-table thead .col-brand { color: var(--white); background: rgba(216, 6, 33, .2); }
.compare-table thead .icon-sm { color: var(--red); }
.compare-table .col-brand strong { color: var(--white); }

/* ============================================================
   DEVICES
   ============================================================ */
.device-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.device {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 22px 14px;
  text-align: center;
  font-weight: 700;
  color: var(--white);
  font-size: .95rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .2s ease;
}
.device:hover { border-color: rgba(216, 6, 33, .5); }
.device .icon-box { margin-bottom: 10px; }
.device small { font-weight: 500; color: var(--grey); font-size: .76rem; }

.devices-apps {
  text-align: center;
  margin-top: 30px;
  color: var(--grey);
  font-size: .95rem;
  max-width: 620px;
  margin-inline: auto;
}
.devices-apps strong { color: var(--white); }

/* ============================================================
   SEO CONTENT — long-form "What is IPTV" block
   ============================================================ */
.seo-container { max-width: 880px; }
.seo-cols { display: grid; gap: 34px; }
.seo-block h3 { font-size: 1.15rem; margin-bottom: 12px; }
.seo-block p { color: var(--grey); font-size: .97rem; margin-bottom: 14px; }
.seo-block a { color: var(--red); font-weight: 600; }
.seo-block strong { color: var(--grey-light); }

/* ============================================================
   PRICING
   ============================================================ */
.section-dark { background: var(--dark-2); }

/* Competitor-price comparison callout, above the plan cards */
.pricing-callout {
  max-width: 760px;
  margin: 0 auto 20px;
  background: rgba(216, 6, 33, .08);
  border: 1px solid rgba(216, 6, 33, .3);
  border-radius: var(--radius);
  padding: 18px 24px;
  text-align: center;
  font-size: .96rem;
  color: var(--grey-light);
}
.pricing-callout strong { color: var(--white); }
.callout-price {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
  border-radius: 999px;
  padding: 3px 12px;
  margin-left: 2px;
  white-space: nowrap;
}

.pricing-note {
  max-width: 760px;
  margin: 0 auto 34px;
  background: var(--dark);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 16px 24px;
  text-align: center;
  font-size: .88rem;
  color: var(--grey);
}
.pricing-note strong { color: var(--grey-light); }

/* Evergreen urgency countdown — powered by the 48h timer in main.js */
.pricing-countdown { text-align: center; margin-bottom: 34px; }
.pricing-countdown-label {
  font-size: .9rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 14px;
}
.countdown-boxes { display: flex; justify-content: center; gap: 10px; }
.countdown-box {
  background: var(--dark);
  border: 1px solid var(--dark-3);
  border-radius: 10px;
  padding: 10px 18px;
  min-width: 64px;
}
.countdown-box .cd-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.countdown-box .cd-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--grey);
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: 420px;
  margin: 0 auto;
}

.price-card {
  background: var(--dark);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.price-card-featured {
  border: 2px solid var(--red);
  box-shadow: 0 18px 50px rgba(216, 6, 33, .18);
}

/* Secondary highlight — colored border without the full "flagship" treatment */
.price-card-accent {
  border: 2px solid rgba(216, 6, 33, .5);
}

.price-flag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--red);
  color: var(--white);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 14px;
  white-space: nowrap;
}

.price-name { font-size: 1.05rem; color: var(--grey-light); margin-bottom: 2px; }
.price-term { font-size: .8rem; color: var(--grey); margin-bottom: 14px; }
.price-tag { margin-bottom: 4px; }
.price-amount { font-size: 2.5rem; font-weight: 800; color: var(--white); letter-spacing: -.02em; }
.price-period { color: var(--grey); font-size: .95rem; }
/* Monthly-equivalent pill under the headline total price */
.price-monthly {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--red);
  background: rgba(216, 6, 33, .12);
  border: 1px solid rgba(216, 6, 33, .3);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 10px 0 8px;
}
.price-note { font-size: .82rem; color: var(--grey); font-weight: 600; margin-bottom: 4px; }

.price-features {
  list-style: none;
  margin: 20px 0 26px;
  flex-grow: 1;
}
.price-features li {
  padding: 8px 0 8px 26px;
  position: relative;
  font-size: .93rem;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.price-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 800;
}

.pricing-trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin-top: 34px;
  font-size: .88rem;
  color: var(--grey);
}
.pricing-trust li { display: inline-flex; align-items: center; gap: 7px; }
.pricing-trust .icon-sm { color: var(--red); }

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-steps {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  counter-reset: step;
}
.how-step { text-align: center; padding: 0 12px; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(216, 6, 33, .12);
  border: 2px solid var(--red);
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.how-step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.how-step p { color: var(--grey); font-size: .95rem; }

/* ============================================================
   QUEBEC BAND — full-bleed brand red
   ============================================================ */
.section-red {
  background: linear-gradient(120deg, var(--red-dark), var(--red));
  overflow: hidden;
}
.section-red .section-title { text-align: left; color: var(--white); }
.quebec-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  align-items: center;
  position: relative;
}
.quebec-copy p { color: rgba(255, 255, 255, .9); margin-bottom: 26px; max-width: 560px; }
.quebec-visual { display: none; }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.testimonial {
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}
.stars { color: #FFB400; letter-spacing: 3px; margin-bottom: 14px; font-size: .95rem; }
.testimonial blockquote {
  font-size: .98rem;
  color: var(--grey-light);
  margin-bottom: 16px;
}
.testimonial figcaption { font-size: .85rem; color: var(--grey); }
.testimonial figcaption strong { color: var(--white); }

/* ============================================================
   FAQ — native <details>
   ============================================================ */
.faq-container { max-width: 760px; }

.faq-item {
  border-bottom: 1px solid var(--dark-3);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 36px 20px 0;
  font-weight: 700;
  color: var(--white);
  position: relative;
  font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--red);
  font-size: 1.5rem;
  font-weight: 400;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p {
  padding: 0 0 22px;
  color: var(--grey);
  font-size: .96rem;
  max-width: 680px;
}
.faq-item a { color: var(--red); font-weight: 600; }

/* ============================================================
   FINAL CTA
   ============================================================ */
.final-cta {
  background:
    radial-gradient(ellipse 70% 90% at 50% 110%, rgba(216, 6, 33, .25), transparent 70%),
    var(--dark);
  text-align: center;
}
.final-cta-inner { max-width: 640px; }
.cta-leaf { width: 44px; height: 44px; fill: var(--red); margin: 0 auto 20px; }
.cta-microtrust {
  margin-top: 18px;
  font-size: .85rem;
  color: var(--grey);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}
.cta-microtrust .icon-sm { color: var(--red); }

/* ============================================================
   MOBILE STICKY CTA BAR — visible only on phones/small tablets
   Price on the left, glowing pill CTA on the right (thumb zone).
   ============================================================ */
.mobile-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(13, 13, 13, .08);
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .16);
}

/* Single-row price anchoring: was-price, real price, saving chip */
.mobile-cta-price {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  line-height: 1;
}
.mobile-cta-was {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(13, 13, 13, .45);
}
.mobile-cta-amount {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--dark);
  white-space: nowrap;
}
.mobile-cta-amount small {
  font-size: .66rem;
  font-weight: 700;
  color: rgba(13, 13, 13, .5);
}
.mobile-cta-off {
  font-size: .62rem;
  font-weight: 800;
  color: var(--red);
  background: rgba(216, 6, 33, .1);
  border: 1px solid rgba(216, 6, 33, .3);
  border-radius: 999px;
  padding: 3px 7px;
  letter-spacing: .02em;
}

/* Pill-shaped CTA with a red glow, matched to the brand color */
.btn-pill {
  border-radius: 999px;
  padding: 11px 20px;
  font-size: .92rem;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(216, 6, 33, .4);
}
.btn-pill:hover { box-shadow: 0 4px 20px rgba(216, 6, 33, .55); }

/* On very narrow phones, drop the was-price so nothing wraps */
@media (max-width: 374px) {
  .mobile-cta-was { display: none; }
}

/* Keep page content clear of the fixed bar: full bar height plus
   breathing room, and the iPhone home-indicator safe area on top */
body { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
@media (min-width: 720px) {
  .mobile-cta { display: none; }
  body { padding-bottom: 0; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--dark-2);
  border-top: 1px solid var(--dark-3);
  padding: 56px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding-bottom: 44px;
}
.footer-brand p {
  margin-top: 14px;
  color: var(--grey);
  font-size: .92rem;
  max-width: 300px;
}
.footer-col h3 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--grey);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--grey-light);
  text-decoration: none;
  font-size: .93rem;
}
.footer-col a:hover { color: var(--red); }

.footer-bottom {
  border-top: 1px solid var(--dark-3);
  padding: 20px;
  text-align: center;
  font-size: .82rem;
  color: var(--grey);
}

/* ============================================================
   RESPONSIVE — small phones
   The channel grid's card copy gets too cramped to read comfortably
   in 2 columns below ~380px, so it goes full-width here. (Sports
   tiles stay 2-up — their fixed-height badges/labels already read
   cleanly at this size.)
   ============================================================ */
@media (max-width: 380px) {
  .channel-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   RESPONSIVE — tablet and up
   ============================================================ */
@media (min-width: 720px) {
  .section { padding: 96px 0; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .how-steps { grid-template-columns: repeat(3, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .channel-grid { grid-template-columns: repeat(4, 1fr); }
  /* .sports-gallery stays 2-up through tablet; goes 4-up >1024px below */
  .poster { width: 168px; }
  .movies-points { grid-template-columns: repeat(3, 1fr); max-width: none; }
  .device-grid { grid-template-columns: repeat(4, 1fr); }

  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 680px;
    align-items: stretch;
  }

  .quebec-inner { grid-template-columns: 1.4fr 1fr; }
  .quebec-visual { display: block; }
  .quebec-leaf {
    width: 240px;
    fill: rgba(255, 255, 255, .18);
    margin-left: auto;
    transform: rotate(10deg);
  }
}

/* Desktop nav */
@media (min-width: 920px) {
  .nav-toggle { display: none; }
  .nav-menu { display: flex; }
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Sports gallery: desktop keeps its original 4-column layout */
@media (min-width: 1025px) {
  .sports-gallery { grid-template-columns: repeat(4, 1fr); }
}

/* Four pricing tiers side by side once there's room for them to breathe */
@media (min-width: 1000px) {
  .pricing-grid { grid-template-columns: repeat(4, 1fr); max-width: none; }
  /* Flagship card pops slightly above its neighbours on wide screens */
  .price-card-featured { transform: scale(1.04); }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================================================
   LIVE CHANNELS SHOWCASE — reusable card grid
   Add a channel: copy a <li class="live-card"> in index.html.
   Cards are 16:10; artwork goes in img/live/ (~1000px wide).
   ============================================================ */

/* Spec asks for a slightly wider container than the site default */
.live-container { max-width: 1200px; }

.live-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);  /* desktop */
  gap: 20px;
  margin-top: 40px;
}

.live-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: #1A1A1A;                     /* shows while image lazy-loads */
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.live-card:hover,
.live-card:focus-within {
  transform: scale(1.03);
  box-shadow: 0 0 24px rgba(216, 6, 33, 0.35); /* subtle red glow */
}

/* Photo layer */
.live-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Gradient overlay — sits above the photo, below badge/title */
.live-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
              rgba(13, 13, 13, 0)   45%,
              rgba(13, 13, 13, 0.55) 100%);
  pointer-events: none;
}

/* Badge — top-left, 16px offset (used by cards with plain photos) */
.live-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 6px;
}

/* Title — bottom-left, above the gradient overlay */
.live-card-title {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  color: var(--white);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  padding-right: 18px;
}

/* Tablet: 2 columns */
@media (max-width: 1024px) {
  .live-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: 1 column */
@media (max-width: 640px) {
  .live-grid { grid-template-columns: 1fr; }
}

/* Keep cards still for users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .live-card:hover,
  .live-card:focus-within { transform: none; }
}

/* ============================================================
   BLOG — index cards + article pages
   Add a post: copy an <a class="post-card"> block in blog.html.
   Thumbnails reuse the optimized channel art in img/live/.
   ============================================================ */
.blog-header { padding-bottom: 8px; }

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 40px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--dark-2);
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
a.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(216, 6, 33, .5);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
}

.post-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(150deg, #1c1c1c, #262626);
}
.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--red);
  color: var(--white);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.post-tag--soon {
  background: rgba(13, 13, 13, .78);
  border: 1px solid rgba(255, 255, 255, .25);
}

.post-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 22px;
  flex: 1;
}
.post-body h2, .post-body h3 {
  font-size: 1.08rem;
  line-height: 1.35;
  color: var(--white);
}
.post-excerpt { font-size: .9rem; color: var(--grey-light); flex: 1; }
.post-meta { font-size: .78rem; color: var(--grey); }
.post-read {
  font-size: .85rem;
  font-weight: 700;
  color: var(--red);
}

/* Cards for posts that aren't written yet — visibly parked, not links */
.post-card--soon { opacity: .65; }

/* Featured post spans the grid and goes side-by-side on desktop */
@media (min-width: 720px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
  .post-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
  .post-featured .post-thumb { aspect-ratio: auto; min-height: 100%; }
  .post-featured .post-body { justify-content: center; padding: 28px 32px; }
  .post-featured .post-body h2 { font-size: 1.5rem; }
}

/* ---------- Article pages ---------- */
.article-wrap { max-width: 760px; margin: 0 auto; }
.article-head { text-align: center; margin-bottom: 36px; }
.article-head h1 { font-size: clamp(1.7rem, 4.5vw, 2.5rem); line-height: 1.2; margin-bottom: 14px; }
.article-head .post-meta { font-size: .85rem; }
.article-hero-img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--dark-3);
  margin-bottom: 36px;
  display: block;
}
.article-body { color: var(--grey-light); font-size: 1rem; line-height: 1.75; }
.article-body h2 {
  color: var(--white);
  font-size: 1.35rem;
  margin: 40px 0 14px;
}
.article-body h3 {
  color: var(--white);
  font-size: 1.08rem;
  margin: 28px 0 10px;
}
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { margin: 0 0 16px 22px; }
.article-body li { margin-bottom: 8px; }
/* :not(.btn) — buttons inside articles keep their own white text
   (a bare `a` rule here would win specificity and go red-on-red) */
.article-body a:not(.btn) { color: var(--red); font-weight: 600; }
.article-body strong { color: var(--white); }

/* Inline conversion box inside articles */
.article-cta {
  background: linear-gradient(150deg, #2a0910, #3d0d17);
  border: 1px solid rgba(216, 6, 33, .4);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
  margin: 36px 0;
}
.article-cta p { margin-bottom: 16px; color: var(--grey-light); }
.article-cta strong { color: var(--white); }
