/* =========================================================
   Reduza + Consultoria — Responsive rules
   Breakpoints: >1280 desktop-lg / 1024 desktop / 900 tablet / 640 mobile / 380 small mobile
   ========================================================= */

/* ---------- Large desktop polish ---------- */
@media (min-width: 1440px) {
  .container { max-width: 1260px; }
}

/* ---------- Notebook / small desktop ---------- */
@media (max-width: 1080px) {
  .hero-inner { gap: 32px; }
  .benefit-grid { gap: 16px; }
  .footer-grid { grid-template-columns: 1.2fr 1fr; }
  .footer-brand { grid-column: 1 / -1; margin-bottom: 12px; }
}

/* ---------- Tablet ---------- */
@media (max-width: 900px) {
  :root { --header-h: 70px; }

  .main-nav { display: none; }

  .menu-toggle { display: flex; }

  .header-cta { display: none; }

  .hero { padding: 56px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-stats { justify-content: center; }
  .hero-visual { max-width: 480px; margin: 0 auto; order: -1; }

  .about-grid { grid-template-columns: 1fr; }
  .about-stats { position: static; flex-direction: row; flex-wrap: wrap; }
  .about-photo { flex: 1 1 100%; }
  .about-photo img { aspect-ratio: 16 / 9; object-position: 30% 30%; }
  .stat-panel { flex: 1; }

  .details-layout { grid-template-columns: 1fr; }
  .steps--stacked { grid-template-columns: 1fr; }
  .details-photo { order: -1; }
  .details-photo img { min-height: 240px; max-height: 340px; object-position: center 38%; }

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

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

  .section { padding: 80px 0; }

  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-featured { grid-template-columns: auto 1fr; padding: 30px 28px; }
}

/* ---------- Mobile menu (shown when toggled, all widths where toggle is visible) ---------- */
@media (max-width: 900px) {
  .main-nav {
    display: block;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--c-white);
    border-bottom: 1px solid var(--c-border-soft);
    box-shadow: 0 16px 32px -20px rgba(7, 0, 50, 0.25);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.is-open { max-height: 420px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 24px 20px; }
  .main-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--c-border-soft); color: var(--c-primary); }
  .main-nav li:last-child a { border-bottom: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .container { padding: 0 18px; }

  .brand-word__sub { display: none; }

  .btn { white-space: normal; text-align: center; }
  .hero-actions .btn { width: 100%; }
  .hero-stats { flex-direction: column; gap: 16px; align-items: center; }

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

  .about-stats { flex-direction: column; }
  .about-photo img { aspect-ratio: 4 / 3; }

  .details-photo img { min-height: 200px; max-height: 260px; }

  .testimonial-grid { grid-template-columns: 1fr; }
  .testimonial-featured {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 28px 22px;
  }
  .testimonial-featured__avatar { margin: 0 auto; }
  .testimonial-featured__meta { justify-content: center; }
  .testimonial-featured__quote-icon { margin-left: auto; margin-right: auto; }

  .whatsapp-band__inner { flex-direction: column; text-align: center; }
  .whatsapp-band__actions { flex-direction: column; width: 100%; }
  .whatsapp-band__actions .btn { width: 100%; }

  .footer-grid { grid-template-columns: 1fr; gap: 36px; padding-bottom: 40px; }
  .footer-brand, .footer-nav, .footer-contact { text-align: left; }

  .section { padding: 64px 0; }
  .section-title { margin-bottom: 36px; }

  .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

/* ---------- Small mobile ---------- */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .hero-copy h1 { font-size: 1.85rem; }
  .btn { padding: 13px 20px; font-size: 0.88rem; }
  .btn--lg { padding: 15px 22px; }
  .stat-panel__number { font-size: 2.1rem; }
  .accordion-trigger { padding: 16px 18px; font-size: 0.92rem; }
  .accordion-panel > div { padding: 0 18px 18px; }
}

/* ---------- Guard against horizontal overflow ---------- */
html, body { max-width: 100%; overflow-x: hidden; }
.hero-graph, .benefit-card, .step, .stat-panel, .testimonial-card, .testimonial-featured { max-width: 100%; }
.hero-inner, .about-grid, .footer-grid, .whatsapp-band__inner,
.hero-copy, .hero-visual, .about-copy, .about-stats,
.testimonial-grid, .testimonial-card, .testimonial-featured,
.details-layout, .details-photo { min-width: 0; }
