/* ==========================================================================
   be happy always — Responsive rules
   Breakpoints tested: 320, 375, 390, 414, 768, 1024, 1280, 1440, 1920
   ========================================================================== */

/* Large desktop refinement */
@media (min-width: 1441px) {
  .container, .header-inner, .hero-inner {
    max-width: 1320px;
  }
}

/* Laptop / small desktop */
@media (max-width: 1180px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .hero-inner {
    gap: 2.5rem;
  }

  .footer-top {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .main-nav {
    display: none;
  }

  .header-actions .btn-primary {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-media {
    order: -1;
  }

  .split,
  .split-reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .split .hero-media,
  .split img {
    order: -1;
  }

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

  .trust-strip {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

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

/* Mobile */
@media (max-width: 640px) {
  :root {
    --space-2xl: 4.5rem;
    --space-xl: 3rem;
  }

  .container, .container-narrow, .header-inner, .hero-inner {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  h1 { font-size: clamp(2.1rem, 8vw, 2.8rem); }
  h2 { font-size: clamp(1.7rem, 6.5vw, 2.2rem); }

  .hero {
    padding-top: 1.5rem;
  }

  .hero-actions,
  .final-cta .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .floating-card {
    left: 0.75rem;
    right: 0.75rem;
    bottom: -1.1rem;
    max-width: none;
  }

  .card-grid,
  .card-grid-2 {
    grid-template-columns: 1fr;
  }

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

  .section-head-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2.2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .final-cta {
    padding: var(--space-xl) 1.5rem;
    border-radius: var(--radius-md);
  }

  .newsletter {
    padding: var(--space-lg) 1.25rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input[type="email"],
  .newsletter-form button {
    width: 100%;
  }

  .blog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-search {
    max-width: none;
  }

  .marquee-item {
    font-size: 1.05rem;
    padding: 0 1.4rem;
  }

  .contact-layout {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 380px) {
  h1 { font-size: 1.9rem; }
  .brand { font-size: 1.15rem; }
}
