/* ========== TABLET: 1024px and below ========== */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .steps::before {
    display: none;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero__visual {
    max-width: 480px;
    margin: 0 auto;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer__brand {
    grid-column: 1 / -1;
    max-width: 100%;
  }

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

  .stats-bar__item:nth-child(2) {
    border-right: none;
  }

  .stats-bar__item:nth-child(3),
  .stats-bar__item:nth-child(4) {
    border-top: 1px solid rgba(255,255,255,0.2);
  }

  .calculator__controls {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .calculator__results {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .calculator__result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .calculator__result-value {
    font-size: 1.5rem !important;
  }
}

/* ========== MOBILE: 768px and below ========== */
@media (max-width: 768px) {
  .section {
    padding: 52px 0;
  }

  .section__header {
    margin-bottom: 36px;
  }

  .section__subtitle {
    font-size: 1rem;
  }

  /* Navigation */
  .nav__links,
  .nav__phone {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  /* Grid overrides */
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* Collapse large inline gaps when grids stack */
  .grid-2 {
    gap: 32px !important;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Hero */
  .hero {
    padding: 56px 0 44px;
  }

  .hero__subtitle {
    font-size: 1rem;
    margin-bottom: 32px;
  }

  .hero__actions {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 32px;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__trust {
    flex-direction: column;
    gap: 10px;
  }

  /* Stats bar */
  .stats-bar {
    padding: 16px 0;
  }

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

  .stats-bar__value {
    font-size: 1.3rem;
  }

  .stats-bar__label {
    font-size: 0.75rem;
  }

  /* Calculator */
  .calculator {
    padding: 28px 20px;
  }

  /* Steps */
  .steps {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .footer__legal {
    font-size: 0.78rem;
  }

  /* Forms */
  .form-grid {
    grid-template-columns: 1fr;
  }

  /* Trust bar (Elavon) */
  .trust-bar__inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* Trust strip (card networks) */
  .trust-strip__inner {
    gap: 12px;
  }

  .trust-strip__divider {
    display: none;
  }

  /* CTA section */
  .cta-section__actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-section__actions .btn {
    width: 100%;
    max-width: 360px;
  }

  /* Pricing cards */
  .finder-buttons {
    gap: 8px;
  }

  .finder-btn {
    font-size: 0.8rem;
    padding: 10px 16px;
  }

  /* Comparison table */
  .comparison-table {
    font-size: 0.8rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px 12px;
  }

  /* Page hero */
  .page-hero {
    padding: 40px 0 32px;
  }

  .page-hero p {
    font-size: 1rem;
  }

  /* Nav actions - hide secondary on mobile */
  .nav__actions .btn--secondary {
    display: none;
  }

  /* Hide hero savings card on mobile to keep hero compact */
  .hero__visual {
    display: none;
  }

  /* Mobile nav section headers */
  .nav__mobile > a:not(.nav__mobile-sub):not(.btn) {
    font-weight: 700;
    font-size: 1rem;
    color: var(--gph-dark);
  }

  /* Smooth momentum scroll on touch */
  .nav__mobile,
  .product-nav-strip {
    -webkit-overflow-scrolling: touch;
  }
}

/* ========== SMALL MOBILE: 480px and below ========== */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 44px 0;
  }

  .section__header {
    margin-bottom: 28px;
  }

  .hero__content {
    text-align: center;
  }

  .hero__actions {
    align-items: center;
  }

  .stats-bar__grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-bar__item {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }

  .stats-bar__item:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .calculator {
    padding: 20px 16px;
    border-radius: var(--radius-md);
  }

  .calculator__results {
    padding: 16px;
  }

  .pricing-card {
    padding: 24px;
  }

  .testimonial-card {
    padding: 24px;
  }

  /* Review marquee — narrower cards on small phones */
  .review-card {
    width: 275px;
    padding: 18px 20px;
  }

  /* Logo marquee — tighter on small phones */
  .logo-track {
    gap: 36px;
  }

  .logo-track img {
    height: 24px;
  }

  .footer {
    padding: 40px 0 20px;
  }

  .cta-section {
    padding: 52px 0;
  }

  .btn--lg {
    font-size: 1rem;
    padding: 16px 24px;
  }

  /* Page hero tighter on small phones */
  .page-hero {
    padding: 32px 0 24px;
  }
}

/* ========== LARGE SCREENS: 1400px and above ========== */
@media (min-width: 1400px) {
  h1 { font-size: 4rem; }
  h2 { font-size: 2.75rem; }

  .hero {
    padding: 120px 0 100px;
  }

  .section {
    padding: 100px 0;
  }
}

/* ========== PRINT ========== */
@media print {
  .nav,
  .cta-section,
  .footer {
    display: none;
  }

  body {
    font-size: 12pt;
  }

  h1 { font-size: 24pt; }
  h2 { font-size: 18pt; }
}

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