/* ==========================================================================
   responsive.css
   Responsabilidade: todas as adaptações por largura de tela, num arquivo só.
   Pontos de quebra: 1139px (grade dos cartões), 1024px e 767px (do site
   original) e 900px (menu retrátil).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Até 1139px: os quatro cartões deixam de caber lado a lado
   Abaixo dessa largura a coluna fica estreita demais para o título
   "Neurodesenvolvimento", então a grade passa a duas colunas equilibradas.
   -------------------------------------------------------------------------- */
@media (max-width: 1139px) {

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

  /* Com dois cartões por linha há espaço de sobra para o título maior */
  .area-card__title { font-size: 1.25rem; }
}

/* --------------------------------------------------------------------------
   Até 1024px: tablet
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {

  .site-header__inner { padding: .25rem 1rem; }

  .primary-nav__list { gap: 1rem; }

  .primary-nav__link { font-size: .875rem; }

  /* O botão do cabeçalho sai; o flutuante do WhatsApp cobre a função */
  .site-header__cta { display: none; }

  .hero__inner {
    min-height: 0;
    padding-block: 3rem 7rem;
  }

  .hero__title { font-size: 1.75rem; }

  .check-list--lg li { font-size: 1rem; }

  .badges { gap: 1rem 1.5rem; }

  .badge { flex: 1 1 9rem; }

  .badge__title { font-size: .8125rem; }

  .section-title { font-size: 2.1875rem; }

  .section-title--narrow { font-size: 1.75rem; }

  .about { background-size: cover; }

  .about__inner {
    min-height: 0;
    padding-block: 2rem;
  }

  .about__title { font-size: 1.5rem; }

  .about__text p { font-size: .9375rem; }

  .tpac__grid { gap: 1.5rem; }

  .tpac__lead { font-size: 1.125rem; }

  .cta-card {
    margin-top: 2rem;
    padding: 2rem 1.5rem 3rem;
  }

  .cta-card__title { font-size: 1.9375rem; }

  .cta-card__text {
    font-size: 1rem;
    text-align: left;
  }

  .cta-card__hint { text-align: left; }

  .faq .accordion { max-width: 100%; }
}

/* --------------------------------------------------------------------------
   Até 900px: a navegação vira menu retrátil
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {

  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: var(--c-surface-1);
    box-shadow: 0 12px 20px rgba(5, 49, 85, .12);
    overflow: hidden;
    max-height: 0;
    transition: max-height .35s ease;
  }

  .primary-nav.is-open { max-height: 26rem; }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem 1rem 1rem;
  }

  .primary-nav__link {
    display: block;
    padding: .85rem .25rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(5, 49, 85, .08);
  }

  .primary-nav__link::after { display: none; }

  /* Trava a rolagem do corpo enquanto o menu estiver aberto */
  body.has-open-nav { overflow: hidden; }
}

/* --------------------------------------------------------------------------
   Até 767px: telefone
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {

  :root { --header-h: 4rem; }

  .site-header__logo img { width: 120px; }

  /* Arte em retrato: a foto ocupa os 79% iniciais da largura da tela.
     A imagem entra inteira (100% auto) e o texto começa logo abaixo dela,
     por isso o recuo superior é medido em vw e não em rem. */
  .hero {
    background-image: url("../images/hero-bg-mobile.png");
    background-position: top center;
    background-size: 100% auto;
    background-color: var(--c-hero-mobile);
  }

  .hero__inner {
    padding-block: 85vw 3rem;
  }

  .hero__content {
    max-width: 100%;
    text-align: center;
  }

  .hero__title { font-size: 1.3125rem; }

  .hero__content .check-list li { text-align: left; }

  .hero__content .btn { width: 100%; }

  .badges {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-inline: 0;
    padding: 1.25rem;
  }

  .badge { flex: 1 1 auto; }

  .badge__title { font-size: 1rem; }

  .section-title { font-size: 1.75rem; }

  .section-title--narrow { font-size: 1.3125rem; }

  .area-cards { grid-template-columns: 1fr; }

  .area-card__title {
    font-size: 1.375rem;
    text-align: center;
  }

  .areas__cta .btn,
  .tpac__body .btn,
  .cta-card .btn { width: 100%; }

  .testimonials { padding-bottom: 3rem; }

  .carousel {
    padding: 1.5rem .5rem 2.5rem;
    gap: .25rem;
  }

  .carousel__arrow {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }

  .testimonial__name { font-size: .875rem; }

  .testimonial__text { font-size: .875rem; }

  /* Mesma lógica do hero: a arte em retrato termina por volta de 62% da
     largura da tela, então o texto começa depois desse ponto. */
  .about {
    background-image: url("../images/sobre-bg-mobile.png");
    background-position: top center;
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-color: var(--c-white);
  }

  .about__inner {
    flex-direction: column;
    padding-top: 68vw;
  }

  .about__text,
  .about__spacer {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .about__spacer { display: none; }

  .about__title { text-align: center; }

  .tpac { padding-bottom: 3rem; }

  .tpac__grid { flex-direction: column; }

  .tpac__media,
  .tpac__body {
    flex: 1 1 100%;
    width: 100%;
  }

  .tpac__lead {
    font-size: 1.125rem;
    text-align: center;
  }

  .cta-card__title { font-size: 1.625rem; }

  .accordion__trigger { font-size: .9375rem; }

  .site-footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .site-footer__brand img {
    width: 50%;
    margin-inline: auto;
  }

  .contact-list li { justify-content: center; }

  .site-footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .whatsapp-float {
    width: 3rem;
    height: 3rem;
  }
}
