/* ==============================================================
   Site3-compatible secondary pages + Markdown blog presentation
   Maintains existing native homepage styling and shared navigation.
   ============================================================= */
.site-inner-page {
  --sub-bg:#f3f6fb;
  --sub-surface:#fff;
  --sub-soft:#eaf0fa;
  --sub-text:#101b33;
  --sub-muted:#58667c;
  --sub-border:#d9e3f2;
  --sub-accent:#0b54cf;
  --sub-strong:#091057;
  --sub-shadow:0 14px 36px rgba(14,29,73,.07);
}
.site-inner-page.dark-theme {
  --sub-bg:#0b1221;
  --sub-surface:#172336;
  --sub-soft:#1c2c43;
  --sub-text:#f2f5fb;
  --sub-muted:#b2c2d7;
  --sub-border:#30415b;
  --sub-accent:#49a5ff;
  --sub-strong:#121d32;
  --sub-shadow:0 14px 36px rgba(0,0,0,.19);
}
.site-inner-page .content-page {
  width:100%;min-width:0;max-width:none;
  color:var(--sub-text);
  background:var(--sub-bg);
  font-family:Inter, 'Nunito Sans', system-ui, sans-serif;
  font-size:16px;
  line-height:1.65;
  overflow-wrap:break-word;
}
.site-inner-page .content-page *,
.site-inner-page .content-page *::before,
.site-inner-page .content-page *::after { box-sizing:border-box; }
.site-inner-page .content-page a {color:var(--sub-accent);}
.site-inner-page .content-page .sub-btn {color:#fff;}
.site-inner-page .content-page .subpage-wrap {
  width:min(1100px,calc(100% - 48px)); max-width:1100px;
  margin-left:auto;margin-right:auto;
}
/* Home page header on 8k is positioned over a photograph. Secondary pages
   need their own opaque, in-flow header, retaining the same brand/nav/footer. */
body.site-inner-page:not(.dark-theme) #masthead {
  position:relative !important;top:auto;left:auto;right:auto;
  width:100%;height:110px;min-height:110px;
  background:#f1f4fa; z-index:50;
}
body.site-inner-page:not(.dark-theme) #ast-desktop-header {height:110px;display:flex;align-items:center;}
body.site-inner-page:not(.dark-theme) .site-header-mobile {height:110px;}
body.site-inner-page:not(.dark-theme) #ast-mobile-popup {top:110px;}
body.site-inner-page:not(.dark-theme) .site-main.content-page {padding:0;}
body.site-inner-page:not(.dark-theme) .footer-main {margin-top:0;}

/* Hub keeps its existing fixed sidebar and centered content shell. */
body.site-inner-page.dark-theme .main-content.content-page {padding-top:0;}
body.site-inner-page.dark-theme .sidebar {overflow-y:auto;}
body.site-inner-page.dark-theme .sidebar .nav-menu {overscroll-behavior:contain;}

/* Page hero inspired by site3: eyebrow, title, descriptive lead and breadcrumb. */
.subpage-hero {
  position:relative;isolation:isolate;
  padding:64px 0 66px;
  overflow:hidden;
  color:var(--sub-text);
  background:linear-gradient(115deg,var(--sub-soft),var(--sub-bg) 66%);
  border-bottom:1px solid var(--sub-border);
}
.subpage-hero::after {
  content:"";position:absolute;z-index:-1;pointer-events:none;
  top:-120px;right:-85px;width:430px;height:430px;
  background:radial-gradient(circle,rgba(36,119,237,.18),transparent 70%);
}
.subpage-breadcrumb {display:flex;gap:13px;align-items:center;color:var(--sub-muted);font-size:13px;margin-bottom:24px;}
.subpage-breadcrumb a {text-decoration:none;font-weight:700;}
.subpage-kicker {display:inline-block;font-size:12px;text-transform:uppercase;letter-spacing:.15em;color:var(--sub-accent);font-weight:800;margin-bottom:14px;}
.subpage-hero h1 {
  font-family:Inter, 'Nunito Sans', system-ui, sans-serif;
  font-weight:800;font-size:clamp(34px,4vw,55px);letter-spacing:-.045em;
  line-height:1.1;max-width:850px;margin:0 0 20px;color:var(--sub-text);
}
.subpage-hero p {font-size:clamp(15px,1.6vw,18px);line-height:1.7;max-width:740px;margin:0;color:var(--sub-muted);}
.subpage-section {padding:64px 0;}
.sub-section-head {max-width:760px;margin-bottom:30px;}
.sub-section-head h2,.sub-h2 {font-size:clamp(26px,3vw,38px);font-weight:800;line-height:1.2;letter-spacing:-.035em;color:var(--sub-text);margin:0 0 12px;}
.sub-section-head p {font-size:16px;color:var(--sub-muted);margin:0;}
.sub-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;}
.sub-feature,.sub-contact-card,.sub-device,.sub-legal-shell,.sub-note,.sub-blog-card,.sub-faq {
  background:var(--sub-surface); border:1px solid var(--sub-border);
  border-radius:18px; box-shadow:var(--sub-shadow);
}
.sub-feature {padding:29px;min-width:0;transition:transform .18s ease,box-shadow .18s ease;}
.sub-feature:hover {transform:translateY(-3px);box-shadow:0 17px 30px rgba(23,65,122,.11);}
.sub-feature-icon {display:grid;place-items:center;width:56px;height:56px;font-size:27px;background:var(--sub-soft);border-radius:15px;margin-bottom:24px;}
.sub-feature h2,.sub-contact-card h2 {font-size:21px;font-weight:800;line-height:1.3;color:var(--sub-text);margin:0 0 12px;}
.sub-feature p,.sub-contact-card p {font-size:15px;line-height:1.65;color:var(--sub-muted);margin:0;}
.sub-note {margin-top:30px;padding:32px;}
.sub-note h2 {color:var(--sub-text);font-size:23px;margin:0 0 15px;}
.sub-note p {color:var(--sub-muted);margin:15px 0 0;}
.sub-note ol,.sub-note ul {margin:0;padding-left:25px;}
.sub-note li {margin:6px 0;color:var(--sub-text);}
.subpage-cta {margin:30px auto 0;text-align:center;padding:65px 24px 75px;background:var(--sub-strong);color:#fff;}
.subpage-cta h2 {font-size:clamp(26px,3vw,40px);font-weight:800;color:#fff;margin:0 0 7px;}
.subpage-cta p {color:#d6def4;max-width:560px;margin:0 auto 23px;}
.sub-btn {display:inline-flex;align-items:center;justify-content:center;gap:9px;text-decoration:none;border-radius:11px;padding:11px 19px;background:#1768dc;color:#fff;font-weight:700;font-size:14px;line-height:1.5;border:1px solid transparent;transition:filter .16s,transform .16s;}
.sub-btn:hover {transform:translateY(-1px);filter:brightness(1.1);}
.sub-device-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:21px;}
.sub-device {padding:27px 29px;}
.sub-device-heading {display:flex;gap:16px;align-items:center;margin-bottom:17px;}
.sub-num {font-size:13px;letter-spacing:.06em;color:var(--sub-accent);background:var(--sub-soft);padding:8px 10px;border-radius:9px;font-weight:800;}
.sub-device h2 {font-size:21px;line-height:1.3;color:var(--sub-text);font-weight:800;margin:0;}
.sub-device ol {padding-left:21px;margin:0;}
.sub-device li {color:var(--sub-muted);padding:5px 0 5px 7px;}
.sub-faq-list {display:grid;gap:12px;}
.sub-faq {padding:0;overflow:hidden;}
.sub-faq summary {cursor:pointer;padding:22px 25px;font-size:17px;font-weight:750;color:var(--sub-text);}
.sub-faq p {color:var(--sub-muted);padding:0 25px 21px;margin:0;}
.sub-contact-card {padding:30px;display:flex;flex-direction:column;align-items:flex-start;gap:13px;min-width:0;}
.sub-contact-card h2 {margin:0;}
.sub-contact-card strong {word-break:break-word;color:var(--sub-text);font-size:14px;margin-top:9px;}
.sub-contact-card .sub-btn {margin-top:auto;}
.sub-legal-shell {padding:40px 50px;max-width:900px;margin:0 auto;}
.sub-legal-note {background:var(--sub-soft);border-left:4px solid var(--sub-accent);padding:12px 18px;border-radius:7px;color:var(--sub-muted);font-size:13px;margin:0 0 26px;}

/* Markdown is rendered on build: safe, crawlable and portable static HTML. */
.sub-markdown {font-size:16px;line-height:1.82;color:var(--sub-text);overflow-wrap:anywhere;}
.sub-markdown>*:first-child {margin-top:0;}
.sub-markdown h2 {color:var(--sub-text);font-size:28px;letter-spacing:-.025em;line-height:1.3;margin:37px 0 13px;font-weight:800;}
.sub-markdown h3 {color:var(--sub-text);font-size:21px;letter-spacing:-.01em;line-height:1.3;margin:28px 0 12px;font-weight:750;}
.sub-markdown h4 {color:var(--sub-text);font-size:18px;margin:22px 0 10px;}
.sub-markdown p {margin:0 0 19px;}
.sub-markdown ul,.sub-markdown ol {margin:0 0 24px;padding-left:24px;}
.sub-markdown li {margin:7px 0;padding-left:4px;}
.sub-markdown a {text-decoration:underline;text-underline-offset:3px;}
.sub-markdown blockquote {border-left:4px solid var(--sub-accent);padding:12px 20px;margin:24px 0;background:var(--sub-soft);border-radius:0 9px 9px 0;}
.sub-markdown blockquote p:last-child {margin-bottom:0;}
.sub-markdown code {border-radius:5px;background:var(--sub-soft);padding:2px 6px;font-size:.92em;white-space:pre-wrap;}
.sub-markdown pre {overflow-x:auto;background:#0b1428;color:#e9f3ff;padding:19px 22px;border-radius:12px;margin:19px 0;line-height:1.6;white-space:pre;}
.sub-markdown pre code {padding:0;background:none;color:inherit;white-space:pre;}
.sub-markdown table {display:block;width:100%;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:22px 0;}
.sub-markdown th,.sub-markdown td {padding:12px 14px;white-space:normal;text-align:left;border:1px solid var(--sub-border);min-width:130px;}
.sub-markdown th {background:var(--sub-soft);font-weight:800;}
.sub-markdown img {max-width:100%;height:auto;border-radius:12px;}
.sub-markdown hr {border:0;border-top:1px solid var(--sub-border);margin:35px 0;}

/* Blog listing and article views */
.sub-blog-toolbar {display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center;margin-bottom:30px;}
.sub-search-label {font-size:13px;font-weight:750;color:var(--sub-text);width:100%;}
#blog-search {width:100%;max-width:500px;min-width:0;color:var(--sub-text);background:var(--sub-surface);border:1px solid var(--sub-border);border-radius:12px;padding:13px 16px;font:inherit;font-size:15px;outline-offset:3px;}
.sub-blog-tags {display:flex;flex-wrap:wrap;gap:7px;align-items:center;}
.sub-filter {border:1px solid var(--sub-border);border-radius:999px;padding:10px 14px;color:var(--sub-text);background:var(--sub-surface);cursor:pointer;font-size:13px;font-weight:700;}
.sub-filter.active,.sub-filter:hover {background:var(--sub-accent);border-color:var(--sub-accent);color:#fff;}
.sub-blog-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;}
.sub-blog-card {overflow:hidden;min-width:0;transition:transform .16s;}
.sub-blog-card:hover {transform:translateY(-4px);}
.sub-blog-card[hidden] {display:none!important;}
.sub-blog-card-link {text-decoration:none!important;display:block;height:100%;}
.sub-blog-art {height:150px;background:var(--sub-soft);display:flex;align-items:center;justify-content:center;overflow:hidden;}
.sub-blog-art img {width:100%;height:100%;object-fit:cover;}
.sub-blog-art-empty {background:linear-gradient(135deg,#164ca4,#0d1b50);color:#e2edff;font-size:52px;}
.site-inner-page.dark-theme .sub-blog-art-empty {background:linear-gradient(135deg,#1769a9,#11213c);}
.sub-blog-card-body {padding:26px;}
.sub-blog-meta {display:flex;flex-wrap:wrap;gap:7px;color:var(--sub-muted);font-size:12px;margin-bottom:17px;}
.sub-blog-meta span:first-child {color:var(--sub-accent);font-weight:800;}
.sub-blog-card h2 {font-size:21px;line-height:1.35;letter-spacing:-.02em;color:var(--sub-text);font-weight:800;margin:0 0 10px;}
.sub-blog-card p {font-size:14px;line-height:1.7;color:var(--sub-muted);margin:0 0 19px;}
.sub-read-more {font-weight:800;color:var(--sub-accent);font-size:14px;}
.sub-empty {padding:35px;border:1px dashed var(--sub-border);text-align:center;border-radius:12px;color:var(--sub-muted);}
.sub-empty[hidden] {display:none;}
.sub-post {padding-top:45px;padding-bottom:90px;max-width:930px!important;}
.sub-back {display:inline-block;text-decoration:none;font-size:14px;font-weight:800;margin-bottom:36px;}
.sub-post-heading {border-bottom:1px solid var(--sub-border);padding-bottom:32px;margin-bottom:35px;}
.sub-post-meta {display:flex;align-items:center;gap:11px 17px;flex-wrap:wrap;font-size:13px;color:var(--sub-muted);margin-bottom:18px;}
.sub-tag {display:inline-block;padding:6px 11px;color:var(--sub-accent);background:var(--sub-soft);border-radius:999px;font-weight:800;}
.sub-post h1 {font-size:clamp(34px,4.5vw,55px);line-height:1.12;letter-spacing:-.047em;font-weight:850;color:var(--sub-text);margin:0 0 18px;}
.sub-post-heading p {font-size:18px;line-height:1.75;color:var(--sub-muted);max-width:760px;margin:0;}
.sub-post-image {width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:18px;margin-bottom:30px;}
.sub-post-prose {max-width:810px;margin:0 auto;}
.sub-post-footer {display:flex;justify-content:space-between;flex-wrap:wrap;gap:20px;border-top:1px solid var(--sub-border);margin-top:48px;padding-top:25px;font-size:14px;font-weight:800;}
.sub-post-footer a {text-decoration:none;}
@media(max-width:1100px){
  .sub-blog-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .sub-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .site-inner-page:not(.dark-theme) #ast-desktop-header .desktop-header-inner {width:min(100%,1200px);}
}
@media(max-width:700px){
  .site-inner-page .content-page .subpage-wrap {width:calc(100% - 32px);}
  .subpage-hero {padding:37px 0 42px;}
  .subpage-section {padding:36px 0;}
  .sub-grid,.sub-device-grid,.sub-blog-grid {grid-template-columns:1fr;}
  .sub-legal-shell {padding:22px 18px;border-radius:13px;}
  .sub-contact-card {padding:22px;}
  .sub-feature {padding:23px;}
  .sub-post {padding-top:32px;padding-bottom:48px;}
  .sub-markdown h2 {font-size:24px;}
  .sub-blog-art {height:175px;}
  .subpage-cta {padding:48px 18px;}
  .sub-post-heading p {font-size:16px;}
  #blog-search {max-width:100%;}
}
@media(min-width:1200px){
  body.site-inner-page:not(.dark-theme) .desktop-header-inner {
    grid-template-columns:minmax(150px, 180px) minmax(0,1fr) minmax(90px,150px);
    width:1200px;max-width:100%;gap:10px;
  }
  body.site-inner-page:not(.dark-theme) .desktop-nav-pill {max-width:100%;}
}
@media(prefers-reduced-motion:reduce) {
  .sub-feature,.sub-blog-card,.sub-btn {transition:none;}
}

/* The expanded 8K navigation now fits inside the original capsule. */
body.site-body #ast-desktop-header .nav-link,
body.site-body #ast-desktop-header .menu-link {padding-left:11px;padding-right:11px;font-size:14px;}
body.site-inner-page:not(.dark-theme) #mobile-menu-toggle,
body.site-inner-page:not(.dark-theme) #mobile-menu-toggle svg {color:#091057!important;stroke:#091057!important;}
body.site-inner-page:not(.dark-theme) #mobile-menu-toggle .ast-hamburger-icon {color:#091057!important;}
@media (min-width:600px) and (max-width:1199px) {
  body.site-inner-page:not(.dark-theme) #ast-mobile-header {display:flex!important;}
  body.site-inner-page:not(.dark-theme) #ast-desktop-header {display:none!important;}
}
/* Four original 8K footer columns need at least 1280px; switch to a two-column
   layout on compact desktop so neither the footer nor page overflows. */
@media (min-width:600px) and (max-width:1279px) {
  body.site-body .site-footer .footer-widgets-grid {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:30px;width:100%;max-width:100%;
  }
  body.site-body .site-footer .footer-widget {min-width:0;}
}

/* -- 2026-11-11 blog reference and brand palette corrections -- */

/* Hub TV color calibration — use ONLY existing homepage design tokens.
   The blue theme from the initial site3 adaptation is intentionally removed. */
body.site-inner-page.dark-theme {
  --sub-bg:#141414;
  --sub-surface:var(--surface,#232323);
  --sub-soft:#30251c;
  --sub-text:var(--text,#fff7ed);
  --sub-muted:var(--muted,#d7c7b8);
  --sub-border:var(--border,rgba(255,247,237,.14));
  --sub-accent:var(--primary-orange-light,#ff8f3d);
  --sub-strong:#181818;
  --sub-shadow:0 20px 42px rgba(0,0,0,.22);
}
body.site-inner-page.dark-theme .content-page {
  background-color:#141414;
  background-image:var(--bg-gradient);
  font-family:var(--font-family,Inter,Arial,sans-serif);
}
body.site-inner-page.dark-theme .subpage-hero {
  border:1px solid var(--border);
  border-radius:var(--radius-hero,30px);
  margin:22px 22px 0;
  background-image:var(--gradient-hero);
  background-color:var(--surface);
  padding:46px 0;
  box-shadow:var(--sh1);
}
body.site-inner-page.dark-theme .subpage-hero::after {
  background:radial-gradient(circle,rgba(232,89,12,.18),transparent 70%);
}
body.site-inner-page.dark-theme .sub-feature,
body.site-inner-page.dark-theme .sub-contact-card,
body.site-inner-page.dark-theme .sub-device,
body.site-inner-page.dark-theme .sub-legal-shell,
body.site-inner-page.dark-theme .sub-note,
body.site-inner-page.dark-theme .sub-faq,
body.site-inner-page.dark-theme .sub-blog-card {
  background-color:var(--surface);
  background-image:var(--gradient-glass);
  border:1px solid var(--border);
  border-radius:var(--r3,20px);
  box-shadow:var(--sh1);
}
body.site-inner-page.dark-theme .sub-blog-card-link:hover h2,
body.site-inner-page.dark-theme .sub-back:hover {color:var(--primary-orange-light);}
body.site-inner-page.dark-theme .sub-blog-art-empty {
  color:var(--primary-orange-light);
  background:linear-gradient(135deg,rgba(232,89,12,.34),rgba(20,20,20,.95) 72%),#25201c;
  border-bottom:1px solid rgba(255,143,61,.25);
  font-size:70px;
}
body.site-inner-page.dark-theme .sub-blog-art-empty span {
  text-shadow:0 8px 32px rgba(232,89,12,.65);
}
body.site-inner-page.dark-theme .sub-blog-card:hover {
  border-color:var(--border-popular);
}
body.site-inner-page.dark-theme .sub-btn,
body.site-inner-page.dark-theme .sub-filter.active,
body.site-inner-page.dark-theme .sub-filter:hover {
  background-image:var(--gradient-primary);
  background-color:var(--primary-orange);
  border-color:var(--primary-orange);
  color:#fff7ed;
}
body.site-inner-page.dark-theme .sub-blog-card .sub-blog-meta span:first-child,
body.site-inner-page.dark-theme .sub-blog-card .sub-read-more,
body.site-inner-page.dark-theme .sub-tag,
body.site-inner-page.dark-theme .subpage-kicker {
  color:var(--primary-orange-light);
}
body.site-inner-page.dark-theme #blog-search {
  border:1px solid var(--border);background:#232323;color:#fff7ed;
}
body.site-inner-page.dark-theme #blog-search:focus-visible,
body.site-inner-page.dark-theme .sub-filter:focus-visible {
  outline:2px solid var(--primary-orange-light);outline-offset:3px;
}
body.site-inner-page.dark-theme .sub-filter {
  border-color:var(--border);background-color:var(--surface);
  color:var(--text);
}
body.site-inner-page.dark-theme .sub-filter.active,
body.site-inner-page.dark-theme .sub-filter:hover {
  background:var(--gradient-primary);color:#fff;
}
body.site-inner-page.dark-theme .subpage-cta {
  background:linear-gradient(135deg,rgba(232,89,12,.16),rgba(255,247,237,.04));
  border:1px solid var(--border);border-radius:var(--r3,20px);
  margin:20px 22px 35px;
}
body.site-inner-page.dark-theme .subpage-cta p {color:var(--muted);}
body.site-inner-page.dark-theme .sub-markdown blockquote {background:rgba(232,89,12,.09);}
body.site-inner-page.dark-theme .sub-markdown pre {background:#101010;}
@media(max-width:700px) {
  body.site-inner-page.dark-theme .subpage-hero {margin:15px 12px 0;padding:35px 0;}
  body.site-inner-page.dark-theme .subpage-cta {margin:15px 12px 24px;}
}

/* 2026 brand migration: responsive IPTVTop4K SVG in the actual Hub sidebar. */
body.dark-theme #sidebar .logo-img,
body.dark-theme #sidebar img.logo-img {
  width: 238px !important;
  max-width: 100% !important;
  height: 55px !important;
  object-fit: contain !important;
  aspect-ratio: 720 / 160 !important;
  filter: drop-shadow(0 0 8px rgba(232, 89, 12, .19));
}
body.dark-theme #sidebar .brand-logo {min-width:0;}
@media (max-width: 650px) {
  body.dark-theme #sidebar .logo-img,
  body.dark-theme #sidebar img.logo-img {
    width: 202px !important;
    max-width: 100% !important;
    height: 47px !important;
  }
}
@media (max-width: 355px) {
  body.dark-theme #sidebar .logo-img,
  body.dark-theme #sidebar img.logo-img {width: 178px !important;height: 40px !important;}
}

/* 2026-11-16: 4-plan grid and trial link in IPTVTop4K's orange theme. */
body.dark-theme .pricing-grid, body .pricing-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
}
body .pricing-grid .pricing-card {min-width:0;}
body .nav-free-trial {
  font-weight:800;color:#ffaf70!important;
  border:1px solid rgba(232,89,12,.4);border-radius:10px;
  background:rgba(232,89,12,.12);
}
body .nav-free-trial:hover,body .nav-free-trial:focus-visible {
  background:rgba(232,89,12,.25)!important;color:#fff!important;
}
@media(max-width:700px) {
  body.dark-theme .pricing-grid,body .pricing-grid {grid-template-columns:minmax(0,1fr);}
}
