/* ============================================================
   BESTFFL REDESIGN PREMIUM — RESPONSIVE v2.0.0
   Mobile-first cascade, fluid typography, flexible grids
   ============================================================ */

/* ============================================================
   MOBILE-FIRST BASE (320px+)
   ============================================================ */

@media (max-width: 640px) {
  :root {
    /* Reduce spacing slightly on mobile */
    --bestffl-space-5: 1.2rem;  /* 19px instead of 24px */
    --bestffl-space-6: 1.6rem;  /* 26px instead of 32px */
    --bestffl-space-7: 2.2rem;  /* 35px instead of 48px */
    --bestffl-space-8: 2.8rem;  /* 45px instead of 64px */
  }

  body.bestffl-premium-mode {
    font-size: 15px;
  }

  .bestffl-container {
    padding: var(--bestffl-space-4) var(--bestffl-space-3);
  }

  h1, .h1 {
    font-size: 1.75rem;
    margin-bottom: var(--bestffl-space-4);
  }

  h2, .h2 {
    font-size: 1.4rem;
    margin-bottom: var(--bestffl-space-3);
  }

  h3, .h3 {
    font-size: 1.2rem;
    margin-bottom: var(--bestffl-space-3);
  }

  p {
    margin-bottom: var(--bestffl-space-3);
  }

  /* ===== Top Bar Mobile ===== */
  .bestffl-premium-topbar {
    padding: 0;
    position: sticky;
    top: 0;
  }

  .bestffl-topbar-inner {
    padding: var(--bestffl-space-3);
    gap: var(--bestffl-space-2);
    flex-wrap: wrap;
  }

  .bestffl-brand {
    min-width: auto;
    gap: var(--bestffl-space-3);
  }

  .bestffl-logo {
    height: 48px;
    padding: var(--bestffl-space-2);
  }

  .bestffl-wordmark-title {
    font-size: 1.2rem;
    font-weight: 900;
  }

  .bestffl-wordmark-tagline {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
  }

  .bestffl-nav-spacer {
    flex-basis: 100%;
    min-width: 0;
    order: 3;
    height: 0;
  }

  .bestffl-nav {
    order: 4;
    width: 100%;
    gap: 2px;
    margin-top: var(--bestffl-space-2);
  }

  .bestffl-nav a {
    font-size: 0.8rem;
    padding: 4px 8px;
    font-weight: 700;
  }

  /* ===== Editorial Packs Mobile ===== */
  .bestffl-review-pack {
    padding: var(--bestffl-space-4);
    margin: var(--bestffl-space-5) 0;
    border-radius: var(--bestffl-radius-lg);
  }

  .review-pack__header {
    margin-bottom: var(--bestffl-space-4);
    padding-bottom: var(--bestffl-space-3);
  }

  .review-pack__title {
    font-size: 1.4rem;
  }

  .review-pack__tagline {
    font-size: 0.8rem;
  }

  .review-sections {
    gap: var(--bestffl-space-3);
    margin-bottom: var(--bestffl-space-4);
  }

  .review-section {
    padding: var(--bestffl-space-4);
    margin-bottom: 0;
  }

  .review-section h3 {
    font-size: 1.1rem;
    margin-bottom: var(--bestffl-space-2);
  }

  .review-section ul,
  .review-section ol {
    margin-left: var(--bestffl-space-4);
  }

  .review-sources {
    padding: var(--bestffl-space-4);
    margin-top: var(--bestffl-space-4);
    border-radius: var(--bestffl-radius-lg);
  }

  .review-sources h4 {
    font-size: 0.9rem;
    margin-bottom: var(--bestffl-space-3);
  }

  .review-sources ul {
    gap: var(--bestffl-space-2);
  }

  .review-sources a {
    font-size: 0.9rem;
  }

  .bestffl-winner-spotlight {
    padding: var(--bestffl-space-4);
    margin: var(--bestffl-space-5) 0;
  }

  .bestffl-winner-spotlight h2 {
    font-size: 1.3rem;
  }

  /* ===== Footer Mobile ===== */
  .bestffl-premium-footer {
    padding: var(--bestffl-space-5) var(--bestffl-space-4);
  }

  .bestffl-footer-inner {
    max-width: 100%;
  }

  .bestffl-footer-links ul {
    flex-direction: column;
    gap: var(--bestffl-space-3);
  }

  .bestffl-footer-links li {
    margin-bottom: 0;
  }
}

/* ============================================================
   TABLET (641px - 1024px)
   ============================================================ */

@media (min-width: 641px) and (max-width: 1024px) {
  :root {
    --bestffl-space-5: 1.4rem;  /* 22px */
    --bestffl-space-6: 1.8rem;  /* 29px */
    --bestffl-space-7: 2.6rem;  /* 42px */
    --bestffl-space-8: 3.4rem;  /* 54px */
  }

  h1, .h1 {
    font-size: 2.2rem;
  }

  h2, .h2 {
    font-size: 1.8rem;
  }

  h3, .h3 {
    font-size: 1.4rem;
  }

  .bestffl-container {
    padding: var(--bestffl-space-5) var(--bestffl-space-4);
  }

  .bestffl-topbar-inner {
    padding: var(--bestffl-space-4);
  }

  .bestffl-logo {
    height: 52px;
  }

  .bestffl-wordmark-title {
    font-size: 1.3rem;
  }

  .bestffl-nav a {
    font-size: 0.9rem;
    padding: var(--bestffl-space-2) var(--bestffl-space-3);
  }

  .bestffl-review-pack {
    padding: var(--bestffl-space-5);
    margin: var(--bestffl-space-6) 0;
  }

  .review-sections {
    gap: var(--bestffl-space-5);
  }

  .review-section {
    padding: var(--bestffl-space-5);
  }

  .review-sources {
    padding: var(--bestffl-space-5);
    margin-top: var(--bestffl-space-6);
  }
}

/* ============================================================
   DESKTOP (1025px+)
   ============================================================ */

@media (min-width: 1025px) {
  /* Default values already set in design-system.css */

  .bestffl-container {
    padding: var(--bestffl-space-6) var(--bestffl-space-4);
  }

  /* Multi-column layouts on desktop */
  .review-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--bestffl-space-6);
  }

  .review-section--headline {
    grid-column: 1 / -1;
  }

  .review-sources {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   EXTRA LARGE (1441px+)
   ============================================================ */

@media (min-width: 1441px) {
  .bestffl-container {
    padding: var(--bestffl-space-7) var(--bestffl-space-4);
  }

  .bestffl-review-pack {
    padding: var(--bestffl-space-8);
  }

  /* Even larger typography on ultra-wide screens */
  h1, .h1 {
    font-size: 3.5rem;
  }

  h2, .h2 {
    font-size: 2.5rem;
  }
}

/* ============================================================
   FLUID TYPOGRAPHY (scales with viewport)
   ============================================================ */

@media (min-width: 320px) and (max-width: 1920px) {
  h1 {
    font-size: clamp(1.75rem, 5vw, 3.5rem);
  }

  h2 {
    font-size: clamp(1.4rem, 4vw, 2.5rem);
  }

  h3 {
    font-size: clamp(1.1rem, 3vw, 1.75rem);
  }

  .bestffl-h1-size: clamp(1.75rem, 5vw, 3.5rem);
  .bestffl-h2-size: clamp(1.4rem, 4vw, 2.5rem);
  .bestffl-h3-size: clamp(1.1rem, 3vw, 1.75rem);
}

/* ============================================================
   SMALL SCREENS - TOUCH-FRIENDLY TARGETS
   Ensure buttons/links are at least 44x44px for mobile
   ============================================================ */

@media (hover: none) and (pointer: coarse) {
  a, button, [role="button"] {
    min-height: 44px;
    min-width: 44px;
  }

  .bestffl-nav a {
    min-height: 40px;
    min-width: 40px;
    padding: var(--bestffl-space-3) var(--bestffl-space-4);
  }

  .review-sources a {
    padding: var(--bestffl-space-2) 0;
  }
}

/* ============================================================
   LANDSCAPE MODE (phones in landscape)
   ============================================================ */

@media (max-height: 500px) and (orientation: landscape) {
  .bestffl-premium-topbar {
    position: sticky;
    top: 0;
  }

  .bestffl-topbar-inner {
    padding: var(--bestffl-space-2);
  }

  .bestffl-logo {
    height: 40px;
  }

  .bestffl-wordmark-title {
    font-size: 1rem;
  }

  .bestffl-wordmark-tagline {
    display: none;
  }

  .bestffl-nav a {
    font-size: 0.8rem;
    padding: 2px 6px;
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
  body.bestffl-premium-mode {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .bestffl-premium-topbar,
  .bestffl-premium-footer {
    display: none;
  }

  .bestffl-review-pack {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
    margin: 20pt 0;
  }

  a {
    color: black;
    text-decoration: none;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }

  .review-sources a[href]::after {
    content: " (" attr(href) ")";
  }
}

/* ============================================================
   MINIMAL / TEXT-ONLY MODE
   For users with data/bandwidth limitations
   ============================================================ */

@media (prefers-reduced-data: reduce) {
  * {
    background-image: none !important;
  }

  .bestffl-premium-topbar::before {
    display: none;
  }

  .bestffl-review-pack::before {
    display: none;
  }

  .bestffl-logo {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  }
}
