/* ============================================
   Bem-Estar — responsive.css
   Breakpoints: 1920 / 1440 / 1366 / 1024 / 768 / 430 / 390 / 375
   Estratégia: desktop-first com reflow, não apenas scale
   ============================================ */

/* ---------- 1920px+ large desktop ---------- */
@media (min-width: 1536px) {
  :root { --container: 1280px; }
  .hero__inner { min-height: 540px; }
  .hero__media { height: 500px; }
}

/* ---------- 1440px ---------- */
@media (max-width: 1440px) {
  :root { --container: 1140px; }
}

/* ---------- 1366px ---------- */
@media (max-width: 1366px) {
  :root { --container: 1100px; --container-pad: 20px; }
  .header__menu { gap: 18px; }
}

/* ---------- 1200px ---------- */
@media (max-width: 1199px) {
  :root { --container: 960px; }
  .header__menu { gap: 14px; }
  .header__menu a { font-size: 10.5px; }
  .hero__title { font-size: 46px; }
  .cards { gap: 16px; }
  .institutional__content { padding: 32px 28px; }
}

/* ---------- 1024px tablet landscape ---------- */
@media (max-width: 1024px) {
  :root { --container: 92%; --container-pad: 20px; }
  .header__phone span { display: none; }
  .header__phone { width: 36px; height: 36px; justify-content: center; border: 1.5px solid var(--color-border); border-radius: 50%; }
  .hero__inner { min-height: 440px; grid-template-columns: 1fr .85fr; gap: 32px; }
  .hero__media { height: 410px; }
  .hero__content { padding-right: 20px; }
  .gallery__grid { gap: 10px; }
  .footer__grid { grid-template-columns: 1.3fr 0.9fr 0.8fr 1fr; gap: 24px; }
  .cta-banner__inner { padding: 24px 28px; }
  .photo-wall { grid-template-columns: repeat(3, 1fr); }
  .photo-page-footer__inner { grid-template-columns: 1fr 1fr; }
  .photo-page-footer__inner > .btn { grid-column: 1 / -1; justify-self: start; }
}

/* ---------- 768px - 1023px tablet portrait ---------- */
@media (max-width: 1023px) {
  .header__nav {
    position: fixed; inset: var(--header-h) 0 0 auto;
    width: 320px; max-width: 85vw;
    height: calc(100dvh - var(--header-h));
    display: block;
    background: #fff;
    border-left: 1px solid var(--color-border-light);
    box-shadow: -8px 0 24px rgba(0,0,0,.08);
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    z-index: 99;
    padding: 28px 24px;
    overflow-y: auto;
  }
  .header__nav.is-open { transform: translateX(0); }
  .header__menu { display: flex; width: 100%; flex-direction: column; align-items: stretch; gap: 0; }
  .header__menu li { width: 100%; flex: 0 0 auto; border-bottom: 1px solid var(--color-border-light); }
  .header__menu a { display: block; padding: 14px 0; font-size: 13px; }
  .header__menu a::after { display: none; }
  .header__toggle { display: flex; }
  .header__actions .btn--small { padding: 8px 14px; font-size: 11px; }
}

/* ---------- 768px breakpoint - reorganização tablet ---------- */
@media (max-width: 900px) {
  /* Hero vira coluna */
  .hero { padding-bottom: 0; }
  .hero__inner {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero__content {
    padding: 28px 0 24px;
    text-align: left;
  }
  .hero__media {
    margin: 0 calc(-1 * var(--container-pad));
    border-radius: 16px;
    min-height: 360px; height: 360px;
    transform: none;
  }
  .hero__leaf--left { display: none; }

  /* Serviços 2 colunas */
  .cards { grid-template-columns: repeat(2, 1fr); }

  /* Institucional empilha */
  .institutional__inner { grid-template-columns: 1fr; }
  .institutional__media { height: 340px; min-height: 0; max-height: none; }
  .institutional__content { padding: 28px 24px; }

  /* Galeria 3 colunas */
  .gallery__grid { grid-template-columns: repeat(3, 1fr); }

  /* CTA empilha */
  .cta-banner__inner { flex-direction: column; text-align: center; }
  .cta-banner__text { flex-direction: column; text-align: center; }
  .cta-banner__text p br { display: none; }

  /* Footer 2x2 */
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__map { grid-column: 1 / -1; }
  .map-card img { height: 200px; }
  .trust__grid, .process__list { grid-template-columns: repeat(2, 1fr); }
  .review-card { flex-basis: calc((100% - 18px) / 2); }
  .contact__grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- 768px exato ---------- */
@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .services { padding: 40px 0 32px; }
  .institutional { padding: 32px 0; }
  .gallery { padding: 32px 0 24px; }
  .copyright__inner { flex-direction: column; text-align: center; gap: 10px; }
}

/* ---------- Mobile < 768px ---------- */
@media (max-width: 767px) {
  :root { --container-pad: 16px; }
  .hero__title { font-size: 30px; }
  .hero__text { font-size: 13.5px; max-width: 100%; }
  .hero__actions { grid-template-columns: 1fr; max-width: none; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__badges { display: grid; grid-template-columns: .95fr 1.12fr .93fr; flex-wrap: nowrap; gap: 3px; width: 100%; }
  .hero__badges li { justify-content: center; gap: 3px; min-width: 0; font-size: 9px; letter-spacing: -0.02em; padding: 7px 2px; white-space: nowrap; }
  .hero__badges li svg { width: 14px; height: 14px; flex: 0 0 14px; }

  .section-header h2 { font-size: 24px; }
  .cards { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 24px 18px; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  /* última imagem ocupa linha inteira em mobile */
  .gallery__item:last-child { grid-column: 1 / -1; aspect-ratio: 2 / 1; }

  .cta-banner__inner { padding: 24px 20px; }
  .cta-banner__text h2 { font-size: 18px; }

  .footer { padding: 32px 0 24px; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer__disclaimer { max-width: 100%; }
  .map-card img { height: 180px; }
  .trust__grid, .process__list, .contact__form { grid-template-columns: 1fr; }
  .reviews { padding: 44px 0; }
  .reviews__heading { align-items: flex-start; flex-direction: column; gap: 20px; }
  .reviews__score { width: 100%; justify-content: center; }
  .reviews-carousel { padding-inline: 0; }
  .review-card { flex-basis: 100%; }
  .review-card { min-height: 190px; }
  .reviews-carousel__control { top: auto; bottom: -1px; margin: 0; }
  .reviews-carousel__control--prev { left: calc(50% - 70px); }
  .reviews-carousel__control--next { right: calc(50% - 70px); }
  .reviews__cta .btn { width: 100%; justify-content: center; text-align: center; }
  .contact__form { padding: 22px 18px; }
  .photo-page-hero { padding: 52px 0 38px; }
  .photo-page-gallery { padding: 32px 0 44px; }
  .photo-wall { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 170px; gap: 10px; }
  .photo-wall__item--wide { grid-column: span 2; }
  .photo-wall__item--tall { grid-row: span 1; }
  .photo-page-footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .photo-page-footer__inner > .btn { grid-column: auto; width: 100%; justify-content: center; }
}

/* ---------- 430px ---------- */
@media (max-width: 430px) {
  .header__actions .header__phone { display: none; }
  .hero__title { font-size: 28px; }
  .hero__media { height: 300px; min-height: 300px; }
  .institutional__media { height: 280px; min-height: 0; }
  .gallery__item { aspect-ratio: 1 / 1; }
  .gallery__item:last-child { aspect-ratio: 2 / 1; }
  .photo-wall { grid-auto-rows: 145px; }
}

/* ---------- 390px ---------- */
@media (max-width: 390px) {
  .hero__title { font-size: 26px; }
  .hero__actions .btn { font-size: 12px; padding: 11px 18px; }
  .section-header h2 { font-size: 22px; }
  .cta-banner__text h2 { font-size: 17px; }
  .footer__col h3 { font-size: 10.5px; }
}

/* ---------- 375px ---------- */
@media (max-width: 375px) {
  :root { --container-pad: 14px; }
  .hero__title { font-size: 24px; }
  .hero__media { height: 280px; min-height: 280px; }
  .card h3 { font-size: 14px; }
  .card p { font-size: 12px; }
  .btn { font-size: 12px; padding: 11px 18px; }
  .copyright__inner p { font-size: 10.5px; }
  .header__inner { gap: 12px; }
}

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

/* ---------- Overlay para menu mobile ---------- */
.header__overlay {
  position: fixed; inset: var(--header-h) 0 0 0;
  background: rgba(30,46,46,.32);
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  z-index: 98;
}
.header__overlay.is-visible { opacity: 1; pointer-events: auto; }
