@media (max-width: 767px) {
  html body footer.maven-standard-footer .msf-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
  }

  html body footer.maven-standard-footer .msf-wrap > .msf-brand,
  html body footer.maven-standard-footer .msf-wrap > .maven-contact-actions-v2,
  html body footer.maven-standard-footer .msf-wrap > .msf-address {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    grid-column: auto !important;
  }

  html body footer.maven-standard-footer .msf-wrap > .maven-contact-actions-v2 { display: flex !important; }

  .msf-brand strong,
  .msf-brand span,
  .msf-copy,
  .msf-address,
  .msf-address * {
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    white-space: normal !important;
  }

  .msf-bottom {
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  html body .seo-language-nav {
    position: fixed !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    width: auto !important;
    max-width: calc(100vw - 104px) !important;
    justify-content: flex-end !important;
    z-index: 1002 !important;
  }

  html body .seo-language-nav a {
    min-width: 0 !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    font-size: 10px !important;
    white-space: nowrap !important;
  }

  html body .mg-header .mg-logo img {
    width: 76px !important;
    height: auto !important;
    max-height: 66px !important;
    object-fit: contain !important;
  }

  html body .mg-header .mg-menu-toggle {
    position: absolute !important;
    right: 16px !important;
    top: 58px !important;
    z-index: 1303 !important;
  }

  html body .mg-header .mg-mobile-nav {
    top: 106px !important;
  }
}

/* Prevent long CJK sequences from expanding flex/grid tracks. */
html[lang^="zh"] body * {
  min-width: 0;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
}

/* Final root-cause responsive corrections - 2026-08-14 */
body.mg-home .hero {
  height: auto !important;
  min-height: min(900px, 100svh) !important;
  max-height: none !important;
  padding: 112px 0 64px !important;
  align-items: center !important;
}

body.mg-home .hero-content {
  width: min(640px, 100%) !important;
  max-width: 640px !important;
  height: auto !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 20px !important;
}

body.mg-home .hero .eyebrow,
body.mg-home .hero h1,
body.mg-home .hero p,
body.mg-home .hero .actions,
body.mg-home .hero-stats {
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
}

body.mg-home .hero-stats {
  width: 100% !important;
  margin-top: 12px !important;
}

@media (min-width: 992px) {
  body.mg-home .hero {
    min-height: 900px !important;
    padding: 96px 0 44px !important;
  }

  body.mg-home .hero-content {
    gap: 16px !important;
  }

  body.mg-home .hero h1,
  html[lang='pt-BR'] body.mg-home .hero h1,
  html[lang='es'] body.mg-home .hero h1,
  html[lang^='es-'] body.mg-home .hero h1 {
    font-size: clamp(52px, 4.6vw, 66px) !important;
    line-height: 1.02 !important;
  }

  body.mg-home .hero p {
    font-size: 18px !important;
    line-height: 1.48 !important;
  }
}

#floating-whatsapp-btn {
  right: max(16px, env(safe-area-inset-right)) !important;
  bottom: max(16px, env(safe-area-inset-bottom)) !important;
}

footer.maven-standard-footer {
  padding-bottom: max(92px, calc(20px + env(safe-area-inset-bottom))) !important;
}

@media (min-width: 641px) and (max-width: 991px) {
  body.mg-home .hero {
    min-height: 760px !important;
    padding: 124px 0 64px !important;
    align-items: flex-start !important;
  }

  body.mg-home .hero-content {
    width: 100% !important;
    max-width: 620px !important;
    gap: 16px !important;
  }

  body.mg-home .hero h1 {
    margin: 0 !important;
    line-height: 1.04 !important;
  }

  body.mg-home .hero p {
    margin: 0 !important;
    line-height: 1.5 !important;
  }

  body.mg-home .hero-stats {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 0 !important;
    padding-right: 76px !important;
  }
}

@media (max-width: 640px) {
  body.mg-home .hero {
    min-height: max(900px, 100svh) !important;
    padding: 206px 0 52px !important;
    align-items: flex-start !important;
  }

  body.mg-home .hero-content {
    width: 100% !important;
    max-width: none !important;
    gap: 14px !important;
  }

  body.mg-home .hero h1 {
    margin: 0 !important;
    line-height: 1.04 !important;
  }

  body.mg-home .hero p {
    margin: 0 !important;
    line-height: 1.5 !important;
  }

  body.mg-home .hero .actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body.mg-home .hero-stats {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 0 !important;
    padding-right: 70px !important;
  }

  #floating-whatsapp-btn {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }
}


/* Correção exclusiva: preservar proporção natural da logo do cabeçalho */
.mg-header .mg-logo img {
  width: auto !important;
  height: auto !important;
  max-width: 138px !important;
  max-height: 104px !important;
  object-fit: contain !important;
}
