/* ============================================================
   RESPONSIVE.CSS — Mobile-First Responsive Styles
   ============================================================ */

/* ============================================================
   BREAKPOINT REFERENCE:
   sm :  640px
   md :  768px
   lg : 1024px
   xl : 1280px
   2xl: 1536px
   ============================================================ */

/* ============================================================
   BASE (Mobile first — all default styles apply to mobile)
   ============================================================ */

/* Hide nav links on mobile */
.navbar-links { display: none; }

/* Hero responsive */
.hero {
  min-height: 90vh;
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.hero-badges {
  gap: var(--space-sm);
}

.hero-badge {
  font-size: 0.8rem;
  padding: 6px var(--space-md);
}

.hero-cta {
  flex-direction: column;
  align-items: center;
}

.hero-cta .btn { width: 100%; max-width: 320px; }

.hero-stat-strip {
  gap: var(--space-xl);
}

/* Plans grid — single column mobile */
.plans-grid {
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.plan-card.popular {
  transform: scale(1);
  order: -1; /* Show popular first on mobile */
}

.plan-card.popular:hover {
  transform: translateY(-8px);
}

/* Setup base card — stack on mobile */
.setup-base-card {
  flex-direction: column;
  text-align: center;
  padding: var(--space-xl);
}

.setup-base-visual {
  width: 100%;
}

.setup-channels-grid {
  grid-template-columns: repeat(2, 1fr);
}

/* Extras grid — single column mobile */
.extras-grid {
  grid-template-columns: 1fr;
}

/* Content + Sidebar layout — stack vertical */
.content-with-sidebar {
  grid-template-columns: 1fr;
}

/* Calculator — full width on mobile, appears AFTER main content */
.calculator-sidebar {
  width: 100%;
  order: 2;
}

.calc-body {
  max-height: none;
}

/* Comparison table — scroll */
.comparison-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table th,
.comparison-table td {
  padding: var(--space-md);
  white-space: nowrap;
}

/* CTA Box padding */
.cta-box {
  padding: var(--space-2xl) var(--space-xl);
}

/* FAQ — full width */
.faq-list {
  max-width: 100%;
}

/* Section padding */
.section {
  padding: var(--space-3xl) 0;
}

/* Container padding */
.container {
  padding: 0 var(--space-md);
}

/* Modal full screen on mobile */
.modal-content {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: absolute;
  bottom: 0;
  max-height: 90vh;
}

.modal {
  align-items: flex-end;
}

/* Toast bottom center on mobile */
.toast-container {
  bottom: 80px;
  right: 50%;
  transform: translateX(50%);
  width: 90%;
  max-width: 400px;
}

/* Floating CTA button — only visible on mobile, hidden on desktop */
.calc-fab {
  display: none;
}

@media (max-width: 1023px) {
  .calc-fab {
    display: flex;
  }
}

/* ============================================================
   SMALL TABLET (≥ 640px)
   ============================================================ */
@media (min-width: 640px) {
  .hero-cta {
    flex-direction: row;
  }

  .hero-cta .btn {
    width: auto;
  }

  .setup-channels-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .extras-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .container {
    padding: 0 var(--space-lg);
  }

  .modal-content {
    max-width: 480px;
    border-radius: var(--radius-xl);
    position: static;
    margin: auto;
    max-height: 85vh;
  }

  .modal {
    align-items: center;
  }

  .toast-container {
    right: 24px;
    transform: none;
    width: auto;
    bottom: 24px;
  }
}

/* ============================================================
   TABLET (≥ 768px)
   ============================================================ */
@media (min-width: 768px) {
  /* Show 2 columns for plans */
  .plans-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Re-order popular card to middle position */
  .plan-card.popular {
    order: 0;
  }

  .setup-base-card {
    flex-direction: row;
    text-align: left;
  }

  .setup-base-visual {
    width: auto;
    min-width: 160px;
  }

  .setup-channels-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .extras-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-stat-strip {
    gap: var(--space-3xl);
  }

  .container {
    padding: 0 var(--space-xl);
  }
}

/* ============================================================
   DESKTOP (≥ 1024px)
   ============================================================ */
@media (min-width: 1024px) {
  /* Show 3 plans side by side */
  .plans-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }

  .plan-card.popular {
    transform: scale(1.04);
  }

  .plan-card.popular:hover {
    transform: scale(1.04) translateY(-8px);
  }

  /* Two-column layout: content + sticky calculator */
  .content-with-sidebar {
    grid-template-columns: 1fr 380px;
    align-items: start;
  }

  /* Sticky calculator on desktop */
  .calculator-sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
  }

  .calculator-sidebar .calc-body {
    max-height: calc(100vh - 350px);
    overflow-y: auto;
  }

  /* Hide floating calc button on desktop */
  .calc-fab {
    display: none;
  }

  /* Show navbar links */
  .navbar-links {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
  }

  .navbar-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
  }

  .navbar-link:hover { color: var(--text-primary); }

  .setup-channels-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .extras-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section {
    padding: var(--space-4xl) 0;
  }

  .cta-box {
    padding: var(--space-3xl) var(--space-4xl);
  }
}

/* ============================================================
   LARGE DESKTOP (≥ 1280px)
   ============================================================ */
@media (min-width: 1280px) {
  .content-with-sidebar {
    grid-template-columns: 1fr 420px;
    gap: var(--space-3xl);
  }

  .setup-channels-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .container {
    padding: 0 var(--space-2xl);
  }
}

/* ============================================================
   EXTRA LARGE (≥ 1536px)
   ============================================================ */
@media (min-width: 1536px) {
  .content-with-sidebar {
    grid-template-columns: 1fr 450px;
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .navbar,
  .hero,
  .calc-fab,
  .scroll-to-top,
  .calc-actions,
  .toast-container,
  .modal-overlay {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .plan-card,
  .extra-card,
  .channel-card {
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .plans-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   REDUCED MOTION (Accessibility)
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }

  .hero-particle { display: none; }
}

/* ============================================================
   HIGH CONTRAST MODE
   ============================================================ */
@media (prefers-contrast: high) {
  :root {
    --border: rgba(255, 255, 255, 0.3);
    --text-secondary: #C0C8E8;
    --text-muted: #8090B8;
  }
}

/* ============================================================
   DARK MODE — Force dark theme regardless of OS preference
   This design is intentionally dark for brand consistency.
   ============================================================ */
/* No light mode overrides — dark theme is enforced via body background */
