/* ============================================================
   IPTVApp.ca - premium design layer (loaded after styles.css)
   Visual polish only: header, buttons, cards, pricing, footer,
   homepage jump bar and promise band, article TOC and progress bar.
   Brand colours come from the tokens in styles.css.
   ============================================================ */
:root {
  --red-glow: rgba(216, 6, 33, .35);
  --red-grad: linear-gradient(135deg, #ff2244 0%, #d80621 55%, #a80017 100%);
  --glass: rgba(18, 18, 20, .72);
  --card-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px -12px rgba(0, 0, 0, .7);
}

/* Sticky header (+ the homepage jump bar) never covers a jumped-to heading */
.home section[id] { scroll-margin-top: calc(var(--header-h) + 72px); }
::selection { background: rgba(216, 6, 33, .55); color: #fff; }
:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid #ff2244;
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Header: near-opaque frosted glass ---------- */
.site-header {
  background: rgba(10, 10, 12, .9);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
          backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 8px 24px -18px rgba(0, 0, 0, .9);
}
@media (min-width: 1025px) {
  .nav-menu a { position: relative; padding-block: 6px; }
  .nav-menu a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--red-grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
  }
  .nav-menu a:hover::after,
  .nav-menu a[aria-current="page"]::after { transform: scaleX(1); }
}

/* ---------- Primary buttons: gradient, highlight, glow, sweep ---------- */
.btn-primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--red-grad);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 10px 24px -10px var(--red-glow);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s ease;
}
.btn-primary:hover {
  background: var(--red-grad);
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 16px 32px -12px rgba(216, 6, 33, .6);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-ghost { transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.btn-ghost:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .04); }

/* Headline accent words */
.reviews-title-accent,
.text-accent {
  background: linear-gradient(90deg, #ff4d63, #ff2244 45%, #ff7a3d);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* ---------- Cards: layered shadow, lift and edge glow ---------- */
.feature-card, .channel-card, .ca-explain-card, .ca-region, .testimonial-card,
.post-card, .price-card, .how-step, .device {
  box-shadow: var(--card-shadow);
}
@media (hover: hover) {
  .feature-card, .channel-card, .ca-explain-card, .ca-region, .post-card {
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  }
  .feature-card:hover, .channel-card:hover, .ca-explain-card:hover, .ca-region:hover, a.post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 34, 68, .45);
    box-shadow: 0 0 0 1px rgba(255, 34, 68, .18), 0 18px 40px -16px rgba(216, 6, 33, .45);
  }
}

/* ---------- Featured pricing plan: animated gradient border ---------- */
@property --iptv-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
.price-card-featured {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--dark), var(--dark)) padding-box,
    conic-gradient(from var(--iptv-angle), #ff2244, #7a0012, #ff7a3d, #ff2244) border-box;
  animation: iptv-spin 6s linear infinite;
  box-shadow: 0 24px 60px -24px rgba(216, 6, 33, .55);
}
@keyframes iptv-spin { to { --iptv-angle: 360deg; } }

/* ---------- Footer: soft glows and a brand line ---------- */
.site-footer {
  position: relative;
  border-top: 0;
  background:
    radial-gradient(600px 220px at 12% 0%, rgba(216, 6, 33, .12), transparent 70%),
    radial-gradient(500px 200px at 88% 100%, rgba(216, 6, 33, .08), transparent 70%),
    var(--dark-2);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff2244 30%, #ff7a3d 70%, transparent);
  opacity: .8;
}

/* ---------- Homepage: "On this page" jump bar ---------- */
.home-jump {
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  background: rgba(10, 10, 12, .9);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.home-jump-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-block: 10px;
  scrollbar-width: none;
}
.home-jump-inner::-webkit-scrollbar { display: none; }
.home-jump a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--dark-3);
  background: rgba(255, 255, 255, .02);
  color: var(--grey);
  font-size: .84rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.home-jump a:hover { border-color: #ff2244; color: #fff; background: rgba(216, 6, 33, .1); }
@media (min-width: 1025px) { .home-jump-inner { justify-content: center; } }

/* ---------- Homepage: promise band ---------- */
.promise {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(900px 400px at 50% 0%, rgba(216, 6, 33, .22), transparent 70%),
    linear-gradient(180deg, #120507, #0b0b0d);
}
.promise-inner { display: grid; gap: 36px; align-items: center; }
.promise-seal {
  width: 168px;
  height: 168px;
  margin: 0 auto;
  position: relative;
}
.promise-seal svg.ring { width: 100%; height: 100%; animation: iptv-rotate 22s linear infinite; }
.promise-seal-core {
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--red-grad);
  box-shadow: 0 0 40px rgba(216, 6, 33, .45);
  color: #fff;
  font-weight: 800;
  line-height: 1.05;
}
.promise-seal-core strong { display: block; font-size: 1.9rem; }
.promise-seal-core span { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
@keyframes iptv-rotate { to { transform: rotate(360deg); } }
.promise-cards { display: grid; gap: 14px; }
.promise-card {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 20px;
}
.promise-card h3 { font-size: 1.02rem; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.promise-card h3 .icon { color: #ff2244; width: 18px; height: 18px; }
.promise-card p { color: var(--grey); font-size: .9rem; }
.promise .section-cta { justify-content: flex-start; margin-top: 26px; }
@media (min-width: 720px) { .promise-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1025px) {
  .promise-inner { grid-template-columns: 220px 1fr; gap: 56px; }
  .promise-copy .section-title, .promise-copy .section-sub { text-align: left; margin-inline: 0; }
}
@media (max-width: 1024px) { .promise .section-cta { justify-content: center; } }

/* ---------- Comparison table: stacked cards on phones ---------- */
@media (max-width: 719px) {
  .compare-table.is-stackable,
  .compare-table.is-stackable tbody { display: block; width: 100%; min-width: 0; border: 0; background: transparent; }
  .compare-table.is-stackable thead { display: none; }
  .compare-table.is-stackable tr {
    display: block;
    margin-bottom: 12px;
    background: var(--dark-2);
    border: 1px solid var(--dark-3);
    border-radius: 12px;
    overflow: hidden;
  }
  .compare-table.is-stackable tbody th {
    display: block;
    position: static;
    padding: 12px 14px;
    background: rgba(216, 6, 33, .12);
    color: #fff;
    border: 0;
  }
  .compare-table.is-stackable td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border: 0;
    border-top: 1px solid var(--dark-3);
    text-align: right;
    white-space: normal;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .compare-table.is-stackable td::before {
    content: attr(data-label);
    flex: 0 0 42%;
    text-align: left;
    color: var(--grey);
    font-weight: 600;
  }
  .table-wrap.has-stackable { overflow: visible; }
  .table-wrap.has-stackable::after, .table-wrap.has-stackable::before { display: none; }
  .table-wrap.has-stackable ~ .table-hint, .table-hint.is-hidden { display: none; }
}

/* ---------- Articles: reading progress, TOC, updated date ---------- */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: var(--red-grad);
  pointer-events: none;
}
.auto-toc {
  margin: 0 0 32px;
  border: 1px solid var(--dark-3);
  border-radius: var(--radius);
  background: var(--dark-2);
  box-shadow: var(--card-shadow);
}
.auto-toc summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-weight: 700;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.auto-toc summary::-webkit-details-marker { display: none; }
.auto-toc summary::after { content: "+"; font-size: 1.3rem; color: #ff2244; line-height: 1; }
.auto-toc[open] summary::after { content: "–"; }
.article-body .auto-toc ol { margin: 0; padding: 0 20px 18px 42px; }
.article-body .auto-toc li { margin-bottom: 6px; }
.article-body .auto-toc a { color: var(--grey-light); font-weight: 500; text-decoration: none; }
.article-body .auto-toc a:hover { color: #ff2244; }
.post-updated { color: var(--grey); }

/* Author box keeps its gradient, with a softer edge */
.article-cta { box-shadow: 0 20px 50px -30px rgba(216, 6, 33, .6); }

/* ---------- Comfortable tap targets on phones (44px) ---------- */
@media (max-width: 1024px) {
  .home-jump a { min-height: 44px; }
  .lang-toggle a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 6px; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .price-card-featured, .promise-seal svg.ring { animation: none; }
  .btn-primary::after { display: none; }
  .btn-primary:hover, .btn-ghost:hover, .feature-card:hover, .channel-card:hover,
  .ca-explain-card:hover, .ca-region:hover, a.post-card:hover { transform: none; }
}


/* ---------------------------------------------------------------
 * Round 2: performance, motion and mobile polish
 * ------------------------------------------------------------- */

/* Looping animations pause while off-screen (premium.js) */
.anim-paused, .anim-paused * { animation-play-state: paused !important; }

/* Scroll reveal (premium.js adds .reveal only below the first screen) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Article images keep their shape when the column is narrower */
.article-body img { max-width: 100%; height: auto; }

/* Mobile offer bar: readable saving chip and a close button */
.mobile-cta-off { color: #a3001a; }
.mobile-cta-close {
	flex: 0 0 auto;
	width: 30px; height: 30px; margin-right: -4px;
	border: 0; border-radius: 50%;
	background: rgba(13, 13, 13, .07); color: rgba(13, 13, 13, .7);
	font-size: 20px; line-height: 1; cursor: pointer;
}
.mobile-cta-close:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.mobile-cta-closed .mobile-cta { display: none; }
@media (max-width: 719px) {
	.mobile-cta-closed body { padding-bottom: env(safe-area-inset-bottom); }
}

/* "Read more" folds for long paragraphs on phones */
.article-body p.is-folded {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.read-more {
	display: inline-flex; align-items: center; gap: 6px;
	min-height: 44px; margin: -6px 0 14px; padding: 0;
	border: 0; background: none; cursor: pointer;
	color: var(--red-text); font: inherit; font-weight: 700; font-size: .92rem;
}
.read-more::after { content: "\25BE"; font-size: .8em; }

/* Comparison table: a check mark on every IPTVApp.ca cell */
.compare-table td.col-brand strong::before {
	content: "\2713";
	display: inline-grid; place-items: center;
	width: 18px; height: 18px; margin-right: 8px; border-radius: 50%;
	background: rgba(46, 204, 113, .16); color: #2ecc71;
	font-size: 11px; font-weight: 900; vertical-align: 1px;
}
.compare-source { margin: 14px auto 0; max-width: 760px; text-align: center; font-size: .8rem; color: var(--grey); }

/* Contact page: "How we can help" */
.contact-help { margin-top: 40px; padding: 28px; border: 1px solid var(--dark-3); border-radius: var(--radius); background: var(--dark-2); }
.contact-help h2 { font-size: 1.4rem; margin-bottom: 12px; }
.contact-help h3 { font-size: 1.1rem; margin: 22px 0 8px; }
.contact-help p, .contact-help li { color: var(--grey-light); }
.contact-help ul { margin: 14px 0 0 1.1em; display: grid; gap: 8px; }
.contact-help a { color: var(--red-text); font-weight: 600; }
.contact-help { width: calc(100% - 32px); max-width: 1000px; margin: 40px auto 56px; }
.contact-help p + p { margin-top: 10px; }
@media (min-width: 720px) { .contact-help { padding: 36px 40px; } }

/* ---------------------------------------------------------------
 * Homepage "Movies & Series" banner (inc/vod-banner.php)
 * ------------------------------------------------------------- */
.vod-banner {
	position: relative; overflow: hidden;
	background:
		radial-gradient(60% 70% at 78% 40%, rgba(64, 92, 255, .32), transparent 70%),
		radial-gradient(50% 60% at 10% 90%, rgba(120, 60, 255, .18), transparent 70%),
		linear-gradient(180deg, #070b1f 0%, #0b1030 55%, #070b1f 100%);
}
.vod-inner { display: grid; gap: 40px; align-items: center; }
.vod-title { margin: 0 0 18px; line-height: 1.02; letter-spacing: -.02em; color: #fff; }
.vod-num {
	display: block; font-size: clamp(3rem, 9vw, 5.6rem); font-weight: 900;
	background: linear-gradient(180deg, #ffe066 0%, #ffb800 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
	filter: drop-shadow(0 6px 24px rgba(255, 184, 0, .25));
}
.vod-head { display: block; font-size: clamp(2rem, 5.6vw, 3.4rem); font-weight: 800; }
.vod-tail { display: block; margin-top: 12px; font-size: clamp(.95rem, 1.6vw, 1.1rem); font-weight: 600; color: #aeb7e6; letter-spacing: 0; line-height: 1.4; }
.vod-pill {
	display: inline-block; margin: 0 0 18px; padding: 10px 22px; border-radius: 14px;
	background: linear-gradient(180deg, #ffd23f, #ffb000); color: #1a1300;
	font-size: clamp(1.05rem, 2.2vw, 1.45rem); font-weight: 600; box-shadow: 0 10px 30px -10px rgba(255, 176, 0, .6);
}
.vod-pill strong { font-weight: 900; }
.vod-sub { color: #c4cbef; max-width: 560px; margin-bottom: 26px; }
.vod-cats { list-style: none; display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; }
.vod-cats li { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 18px; color: #fff; font-size: .92rem; font-weight: 600; }
.vod-cats li + li { border-left: 1px solid rgba(255, 255, 255, .22); }
.vod-cats li:first-child { padding-left: 0; }
.vod-cats svg { width: 34px; height: 34px; }

.vod-stage { position: relative; }
.vod-tv {
	position: relative; padding: 10px; border-radius: 14px;
	background: #05060c; border: 2px solid #23263a;
	box-shadow: 0 0 0 1px rgba(120, 140, 255, .15), 0 30px 80px -20px rgba(70, 100, 255, .65), 0 0 120px -30px rgba(90, 110, 255, .8);
}
.vod-screen { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; aspect-ratio: 16 / 9; }
.vod-tile { position: relative; overflow: hidden; border-radius: 6px; background: #111; }
.vod-tile img, .vod-tile svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vod-tile span {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 5px;
	background: linear-gradient(transparent, rgba(0, 0, 0, .85)); color: #fff;
	font-size: clamp(.5rem, 1vw, .7rem); font-weight: 700; letter-spacing: .02em; text-align: center;
}
.vod-badge {
	position: absolute; top: -18px; right: -12px; z-index: 2;
	display: flex; flex-direction: column; align-items: center; line-height: 1;
	padding: 8px 14px 9px; border-radius: 10px; border: 2px solid #ffcf3a;
	background: #0b0b0b; color: #fff; box-shadow: 0 0 30px rgba(255, 190, 40, .55);
}
.vod-badge b { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 900; }
.vod-badge small { margin-top: 3px; padding: 3px 7px; border-radius: 5px; background: #ffcf3a; color: #111; font-size: clamp(.55rem, 1vw, .72rem); font-weight: 900; text-transform: uppercase; }
.vod-console { height: 14px; margin: 0 8% ; border-radius: 0 0 10px 10px; background: linear-gradient(#1a1d2e, #0b0d18); box-shadow: 0 20px 40px -10px rgba(70, 100, 255, .5); }
.vod-banner .movies-points { margin-top: 48px; }

@media (min-width: 960px) {
	.vod-inner { grid-template-columns: .9fr 1.1fr; gap: 56px; }
	.vod-tv { transform: perspective(1600px) rotateY(-6deg); }
}
@media (max-width: 559px) {
	.vod-cats li { padding: 4px 10px; font-size: .78rem; }
	.vod-cats svg { width: 26px; height: 26px; }
	.vod-badge { right: -4px; top: -14px; }
	.vod-screen { gap: 4px; }
}
.vod-tile { background: linear-gradient(160deg, #1c2550, #0b0f24); }

/* Movies banner in the brand colours (red on near-black) */
.vod-banner {
	background:
		radial-gradient(55% 70% at 80% 42%, rgba(216, 6, 33, .30), transparent 70%),
		radial-gradient(45% 55% at 8% 92%, rgba(216, 6, 33, .14), transparent 70%),
		linear-gradient(180deg, #0a0a0a 0%, #120607 55%, #0a0a0a 100%);
}
.vod-num {
	background: linear-gradient(180deg, #ff4d66 0%, #d80621 100%);
	-webkit-background-clip: text; background-clip: text; color: transparent;
	filter: drop-shadow(0 6px 26px rgba(216, 6, 33, .45));
}
.vod-tail { color: var(--grey); }
.vod-pill {
	background: linear-gradient(180deg, #ff2244, #b8001a); color: #fff;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 12px 30px -10px rgba(216, 6, 33, .7);
}
.vod-sub { color: var(--grey-light); }
.vod-cats svg { color: var(--red-text); }
.vod-tv {
	background: #050505; border-color: #262626;
	box-shadow: 0 0 0 1px rgba(255, 34, 68, .18), 0 30px 80px -20px rgba(216, 6, 33, .6), 0 0 120px -30px rgba(216, 6, 33, .7);
}
.vod-screen { display: block; position: relative; overflow: hidden; border-radius: 6px; background: #111; }
.vod-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* Brand badge laid exactly over the gold badge printed in the artwork */
.vod-badge {
	top: 10px; right: 10px; width: 24%; height: 25%;
	justify-content: center; padding: 0;
	border: 0; border-radius: 0 6px 0 14px;
	background: linear-gradient(160deg, #1a1a1a, #050505);
	box-shadow: inset 0 0 0 2px #d80621, 0 0 30px rgba(216, 6, 33, .55);
}
.vod-badge b { color: #fff; font-size: clamp(1.1rem, 3.2vw, 2.4rem); }
.vod-badge small { background: #d80621; color: #fff; }
.vod-console { background: linear-gradient(#1c1c1c, #0b0b0b); box-shadow: 0 20px 40px -10px rgba(216, 6, 33, .45); }
@media (max-width: 559px) { .vod-badge { top: 6px; right: 6px; } }
@media (max-width: 559px) { .vod-tv { padding: 6px; } }

/* Movies banner: no extra section background - same plain dark as the site */
.vod-banner { background: var(--dark); }
