/* ============================================================
   MÍDIA 43 — Responsive: Mobile-first Breakpoints
   ============================================================ */

/* ---- TABLET (max 1024px) --------------------------------- */
@media (max-width: 1024px) {

  /* Nav */
  .nav__links,
  .nav__cta {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  /* Hero grid → single column */
  .home-hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-12);
  }

  .home-hero__subtitle { margin-inline: auto; }

  .home-hero__actions {
    justify-content: center;
  }

  .hero-numbers {
    max-width: 480px;
    margin-inline: auto;
  }

  /* Story */
  .story-grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .story-visual { order: -1; }

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

  /* Values */
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Team */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  /* Contact */
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* ---- MOBILE (max 768px) ---------------------------------- */
@media (max-width: 768px) {

  /* Nav mobile menu show/hide */
  .nav__mobile { display: block; }
  .nav__mobile:not(.nav__mobile--visible) { display: none; }

  /* Larger tap area for mobile nav links */
  .nav__mobile-link {
    padding: var(--space-4) var(--space-4);
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Hero */
  .home-hero {
    min-height: auto;
    padding-block: calc(var(--nav-height) + var(--space-10)) var(--space-10);
  }

  .home-hero__title {
    font-size: clamp(1.875rem, 9vw, 2.5rem);
  }

  .hero-numbers {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
  }

  .hero-number-card:first-child {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  /* Map */
  #map { height: 420px; }

  .map-counter { display: none; }

  /* Popup — responsive width on mobile */
  .leaflet-popup-content-wrapper {
    min-width: 240px !important;
    max-width: min(300px, calc(100vw - 24px)) !important;
  }

  /* Map filters scroll */
  .map-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
  }

  .map-filter-btn {
    flex-shrink: 0;
    min-height: 44px;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }

  /* Values */
  .values-grid {
    grid-template-columns: 1fr;
  }

  /* Team */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer__brand-desc { max-width: 100%; }

  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .footer__bottom-links {
    gap: var(--space-4);
  }

  /* CTA banner */
  .cta-banner {
    padding: var(--space-10) var(--space-6);
  }

  .cta-banner__text {
    font-size: var(--font-size-base);
  }

  /* Contact form row */
  .form__row {
    grid-template-columns: 1fr;
  }

  /* Section spacing */
  .section { padding-block: var(--space-12); }
  .section--lg { padding-block: var(--space-16); }

  /* Page hero */
  .page-hero {
    padding-top: calc(var(--nav-height) + var(--space-10));
    padding-bottom: var(--space-10);
  }

  /* Touch targets */
  .btn {
    min-height: 44px;
  }

  /* Faster tap response — eliminates 300ms delay on older Android */
  a, button, .btn, .map-filter-btn, .nav__mobile-link,
  .nav__hamburger, .footer__link, .footer__social-link {
    touch-action: manipulation;
  }
}

/* ---- SMALL MOBILE (max 480px) --------------------------- */
@media (max-width: 480px) {

  /* Hide hero number cards — save vertical space */
  .home-hero__visual { display: none; }

  /* Full-width hero buttons */
  .home-hero__actions {
    flex-direction: column;
    width: 100%;
  }

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

  /* Stats single column on very small */
  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  #map { height: 380px; }

  .contact-form-wrap {
    padding: var(--space-5);
  }

  /* Section header tighter */
  .section__header {
    margin-bottom: var(--space-8);
  }

  /* Page hero compact */
  .page-hero__subtitle {
    font-size: var(--font-size-base);
  }
}

/* ---- LARGE SCREENS (min 1400px) ------------------------- */
@media (min-width: 1400px) {
  #map { height: 660px; }

  .home-hero__title {
    font-size: 5rem;
  }
}
