/* UpIPTV — Custom Styles */

/* ── Skip link (visually hidden until focused) ── */
.skip-link {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link:focus {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: auto !important;
  height: auto !important;
  padding: 8px 16px !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  background: #3b82f6 !important;
  color: #fff !important;
  font-weight: 700 !important;
  z-index: 9999 !important;
  border-radius: 0 0 8px 0 !important;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #3b82f6; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #60a5fa; }

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }

/* ── Glassmorphism ── */
.glass {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.08);
}
.glass-light {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.08);
}

/* ── Gradient text ── */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-blue {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero gradient ── */
.hero-gradient {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,0.18) 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 80% 50%, rgba(139,92,246,0.10) 0%, transparent 60%);
}

/* ── Neon glow ── */
.neon-blue { box-shadow: 0 0 20px rgba(59,130,246,0.4), 0 0 60px rgba(59,130,246,0.15); }
.neon-blue:hover { box-shadow: 0 0 30px rgba(59,130,246,0.6), 0 0 80px rgba(59,130,246,0.25); }

/* ── Card hover lift ── */
.card-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* ── Gradient border ── */
.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ── Featured plan glow ── */
.plan-featured {
  box-shadow: 0 0 0 1px rgba(59,130,246,0.5), 0 20px 60px rgba(59,130,246,0.2);
}

/* ── Prose for blog content ──
   LIGHT MODE is the default (no .dark on <html>). Dark-mode colors are scoped
   under `.dark .prose-custom ...` so they only apply when Alpine sets the dark
   class. Previously this file used `.light` as the override, but the site only
   ever sets `.dark` — meaning the light-mode rules were dead code and every
   blog rendered with the dark-mode (near-white) palette regardless of theme. */

/* Defaults = light mode (page background is bg-gray-50) */
.prose-custom h2 {
  color: #0f172a; font-size: 1.6rem; font-weight: 800;
  margin-top: 2.5rem; margin-bottom: 1rem;
  padding-bottom: 0.4rem; border-bottom: 2px solid rgba(59,130,246,0.3);
  line-height: 1.3;
}
.prose-custom h3 {
  color: #1e293b; font-size: 1.2rem; font-weight: 700;
  margin-top: 1.75rem; margin-bottom: 0.6rem; line-height: 1.4;
}
.prose-custom h4 {
  color: #334155; font-size: 1.05rem; font-weight: 600;
  margin-top: 1.25rem; margin-bottom: 0.5rem;
}
.prose-custom p { color: #374151; line-height: 1.85; margin-bottom: 1.1rem; font-size: 1.0rem; }
.prose-custom a { color: #2563eb; text-decoration: underline; }
.prose-custom a:hover { color: #1d4ed8; }
.prose-custom ul { color: #374151; padding-left: 1.6rem; margin-bottom: 1.1rem; list-style-type: disc; }
.prose-custom ol { color: #374151; padding-left: 1.6rem; margin-bottom: 1.1rem; list-style-type: decimal; }
.prose-custom li { margin-bottom: 0.5rem; line-height: 1.7; }
.prose-custom li::marker { color: #2563eb; }
.prose-custom blockquote {
  border-left: 4px solid #3b82f6; padding: 0.75rem 1.25rem;
  margin: 1.75rem 0; color: #475569; font-style: italic;
  background: rgba(59,130,246,0.04); border-radius: 0 8px 8px 0;
}
.prose-custom code { background: rgba(59,130,246,0.1); color: #2563eb; padding: 0.2em 0.5em; border-radius: 4px; font-size: 0.875em; }
.prose-custom pre { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 1rem; overflow-x: auto; }
.prose-custom img { border-radius: 12px; margin: 1.5rem auto; display: block; max-width: 100%; }
.prose-custom strong { color: #0f172a; font-weight: 700; }
.prose-custom table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.95rem; }
.prose-custom th { color: #1e293b; background: rgba(59,130,246,0.08); padding: 0.6rem 1rem; text-align: left; font-weight: 700; border: 1px solid #e2e8f0; }
.prose-custom td { color: #374151; padding: 0.6rem 1rem; border: 1px solid #f1f5f9; }
.prose-custom tr:nth-child(even) td { background: #f8fafc; }

/* Dark-mode overrides (Alpine adds .dark to <html> when darkMode is on) */
.dark .prose-custom h2 { color: #f1f5f9; border-bottom-color: rgba(59,130,246,0.25); }
.dark .prose-custom h3 { color: #cbd5e1; }
.dark .prose-custom h4 { color: #94a3b8; }
.dark .prose-custom p { color: #cbd5e1; }
.dark .prose-custom a { color: #60a5fa; }
.dark .prose-custom a:hover { color: #93c5fd; }
.dark .prose-custom ul, .dark .prose-custom ol { color: #cbd5e1; }
.dark .prose-custom li::marker { color: #3b82f6; }
.dark .prose-custom blockquote { color: #94a3b8; background: rgba(59,130,246,0.05); }
.dark .prose-custom code { background: rgba(59,130,246,0.15); color: #93c5fd; }
.dark .prose-custom pre { background: #0f1117; border-color: rgba(255,255,255,0.1); }
.dark .prose-custom strong { color: #f8fafc; }
.dark .prose-custom th { color: #e2e8f0; background: rgba(59,130,246,0.15); border-color: rgba(255,255,255,0.1); }
.dark .prose-custom td { color: #cbd5e1; border-color: rgba(255,255,255,0.07); }
.dark .prose-custom tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

/* ── FAQ accordion ── */
.faq-item details[open] summary { color: #60a5fa; }
.faq-item details summary::marker { display: none; }
.faq-item details summary::-webkit-details-marker { display: none; }
.faq-item details summary { list-style: none; cursor: pointer; }

/* ── Star rating ── */
.stars { color: #f59e0b; letter-spacing: -1px; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.badge-blue { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-green { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.badge-purple { background: rgba(168,85,247,0.15); color: #c084fc; border: 1px solid rgba(168,85,247,0.3); }
.badge-orange { background: rgba(249,115,22,0.15); color: #fb923c; border: 1px solid rgba(249,115,22,0.3); }

/* ── Pulse dot ── */
.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  position: relative;
  display: inline-block;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #22c55e;
  animation: ping 1.5s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes ping {
  75%, 100% { transform: scale(2.2); opacity: 0; }
}

/* ── Animated gradient border on focus ── */
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.4);
}

/* ── Country flag badges ──
   Defaults are light-mode (page bg #f9fafb): dark text, blue-tinted pill so it
   reads as a real chip rather than blending into the card behind it. */
.flag-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.30);
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.flag-badge:hover {
  background: rgba(59,130,246,0.16);
  border-color: rgba(59,130,246,0.5);
  transform: translateY(-1px);
}
.dark .flag-badge {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  color: #f8fafc;
}
.dark .flag-badge:hover {
  background: rgba(59,130,246,0.18);
  border-color: rgba(59,130,246,0.5);
}

/* =============================================================================
   GERMAN MARKET ACCENT LAYER
   -----------------------------------------------------------------------------
   Subtle nods to the German flag (Schwarz / Rot / Gold) as a *decorative
   accent layer* — never replacing the brand blue/purple palette. All values
   are tokenised so a future repaint touches one place.

   AA-contrast notes:
   - Pure #FFCC00 on white misses AA for text; the `--de-gold-ink` token is
     a darkened gold (#B98800) used wherever gold needs to be readable text
     on a light background.
   - Pure #000000 on dark mode is invisible against the page; the
     `.dark` overrides swap black for slate-100 on stat numbers and use a
     translucent white-tinted border on accents.
   ========================================================================== */

:root {
  --de-black:    #000000;
  --de-red:      #DD0000;
  --de-gold:     #FFCC00;
  --de-gold-ink: #B98800;   /* AA-compliant gold for text on white */
}

/* Tricolour gradient string — reused for bars, dividers, stat-card top borders */
.de-tricolor-bar,
.de-tricolor-divider {
  background: linear-gradient(
    to bottom,
    var(--de-black) 0%,   var(--de-black) 33.34%,
    var(--de-red)   33.34%, var(--de-red)   66.67%,
    var(--de-gold)  66.67%, var(--de-gold)  100%
  );
}

/* Top-of-page bar — sits above the navbar on every page (placed in base.html) */
.de-tricolor-bar {
  position: relative; z-index: 60;
  width: 100%; height: 4px;
  flex-shrink: 0;
}
/* In dark mode the pure-black band would disappear against #0a0a0f, so we
   nudge it to slate-700 — still reads as the flag's top band, never invisible. */
.dark .de-tricolor-bar {
  background: linear-gradient(
    to bottom,
    #334155 0%,            #334155 33.34%,
    var(--de-red) 33.34%,  var(--de-red) 66.67%,
    var(--de-gold) 66.67%, var(--de-gold) 100%
  );
}

/* Standalone horizontal divider between major sections */
.de-tricolor-divider {
  width: 100%; height: 3px;
  border-radius: 2px;
  opacity: 0.6;
}
.dark .de-tricolor-divider { opacity: 0.45; }

/* Hero pill — small "Optimiert für Deutschland" badge */
.de-badge-tricolor {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.10);
  color: #0f172a;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.01em;
  transition: background .25s ease, transform .25s ease;
}
.de-badge-tricolor:hover { transform: translateY(-1px); }
.de-badge-tricolor::before {
  content: ''; display: inline-block;
  width: 14px; height: 10px; border-radius: 2px;
  background: linear-gradient(
    to bottom,
    var(--de-black) 0%,   var(--de-black) 33.34%,
    var(--de-red)   33.34%, var(--de-red)   66.67%,
    var(--de-gold)  66.67%, var(--de-gold)  100%
  );
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.dark .de-badge-tricolor {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}
.dark .de-badge-tricolor::before {
  background: linear-gradient(
    to bottom,
    #334155 0%, #334155 33.34%,
    var(--de-red) 33.34%, var(--de-red) 66.67%,
    var(--de-gold) 66.67%, var(--de-gold) 100%
  );
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* Stat-card top accent — a hair-thin tricolour stripe above the card */
.de-stat-card { position: relative; isolation: isolate; }
.de-stat-card::before {
  content: ''; position: absolute;
  top: 0; left: 22%; right: 22%; height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(
    to right,
    var(--de-black) 0%,   var(--de-black) 33.34%,
    var(--de-red)   33.34%, var(--de-red)   66.67%,
    var(--de-gold)  66.67%, var(--de-gold)  100%
  );
  opacity: 0.85;
}
.dark .de-stat-card::before {
  background: linear-gradient(
    to right,
    #334155 0%, #334155 33.34%,
    var(--de-red) 33.34%, var(--de-red) 66.67%,
    var(--de-gold) 66.67%, var(--de-gold) 100%
  );
}

/* Stat number colour helpers — used on the home-hero 4-stat row */
.de-stat-black { color: #0f172a; }      /* render as deep slate, not pure black */
.dark .de-stat-black { color: #f1f5f9; }
.de-stat-red   { color: var(--de-red); }
.dark .de-stat-red { color: #f87171; }   /* lighter red holds contrast on dark */
.de-stat-gold  { color: var(--de-gold-ink); }
.dark .de-stat-gold { color: var(--de-gold); }

/* Pricing featured-plan gold accent — gilt the chosen card without repainting it */
.de-featured-gilt {
  position: relative;
  box-shadow:
    inset 0 0 0 1px rgba(255, 204, 0, 0.55),
    0 12px 32px rgba(255, 204, 0, 0.08);
}
.de-featured-gilt::before {
  content: ''; position: absolute;
  top: -1px; left: -1px; right: -1px; height: 4px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(to right,
    var(--de-gold) 0%, #f5b400 50%, var(--de-gold) 100%);
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.45);
  pointer-events: none;
}
.dark .de-featured-gilt {
  box-shadow:
    inset 0 0 0 1px rgba(255, 204, 0, 0.45),
    0 12px 36px rgba(255, 204, 0, 0.12);
}

/* Gold accent text — for swapping a single keyword's purple shimmer to a
   gilded foil look. Used sparingly; never on body copy. */
.de-gold-accent {
  background: linear-gradient(90deg, #c8941a, var(--de-gold), #c8941a);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          text-fill-color: transparent;
  font-weight: 900;
}

/* Footer kicker — small "Stolz für den deutschen Markt" tagline */
.de-footer-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #94a3b8;
}
.de-footer-kicker::before {
  content: ''; display: inline-block;
  width: 16px; height: 11px; border-radius: 2px;
  background: linear-gradient(
    to bottom,
    var(--de-black) 0%, var(--de-black) 33.34%,
    var(--de-red) 33.34%, var(--de-red) 66.67%,
    var(--de-gold) 66.67%, var(--de-gold) 100%
  );
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* ── Inline links inside blog-category descriptions ── */
.category-desc a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s ease;
}
.category-desc a:hover { color: #1d4ed8; }
.dark .category-desc a { color: #60a5fa; }
.dark .category-desc a:hover { color: #93c5fd; }

/* ── Section gradient separators ── */
.section-sep {
  background: linear-gradient(to bottom, transparent, rgba(59,130,246,0.05) 50%, transparent);
}

/* ── Animated number counter ── */
.stat-number {
  font-variant-numeric: tabular-nums;
}

/* ── Loading skeleton ── */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Channel category pill ── */
.cat-pill {
  cursor: pointer;
  transition: all 0.2s ease;
}
.cat-pill.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* ── Responsive video ── */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
}
.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Table of Contents box ── */
.toc-box {
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0 2rem;
}
.toc-box .toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #60a5fa;
  margin-bottom: 0.75rem;
}
.toc-box ol {
  padding-left: 1.25rem;
  margin: 0;
  list-style-type: decimal;
}
.toc-box li {
  margin-bottom: 0.35rem;
  line-height: 1.5;
}
.toc-box a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.toc-box a:hover { color: #60a5fa; }

.light .toc-box {
  background: rgba(59,130,246,0.04);
  border-color: rgba(59,130,246,0.25);
}
.light .toc-box a { color: #475569; }
.light .toc-box a:hover { color: #2563eb; }

/* ── Inline article section images ── */
.article-img {
  margin: 1.75rem 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
}
.article-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  margin: 0;
}
.article-img figcaption {
  font-size: 0.78rem;
  color: #64748b;
  text-align: center;
  padding: 0.5rem 0.75rem;
  background: rgba(0,0,0,0.2);
}

.light .article-img {
  border-color: rgba(0,0,0,0.07);
}
.light .article-img figcaption {
  background: rgba(0,0,0,0.04);
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fadeInUp 0.6s ease both; }

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.animate-float { animation: floatY 4s ease-in-out infinite; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer-text {
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #3b82f6 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}
