/* iPhone hero CTA stability fix
   Fixes oversized/wrapping hero call buttons and bottom WhatsApp overlap on iOS Safari. */
*,*::before,*::after{box-sizing:border-box}
.hero a[href^="mailto:"],
.hero a[href*="wa.me"],
.hero .btn,
.hero .button,
.hero .cta,
.hero .nav-cta,
.hero-actions a{
  max-width:100%!important;
  white-space:normal!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
  line-height:1.18!important;
  text-align:center!important;
  -webkit-appearance:none!important;
  appearance:none!important;
  touch-action:manipulation;
}
.hero .btn,
.hero .button,
.hero .cta,
.hero a[href^="mailto:"],
.hero a[href*="wa.me"],
.hero-actions a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
}
@media(max-width:560px){
  .hero .container{max-width:100%!important;}
  .hero .btn,
  .hero .button,
  .hero .cta,
  .hero a[href^="mailto:"],
  .hero a[href*="wa.me"],
  .hero-actions a{
    width:100%!important;
    max-width:calc(100vw - 32px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding:13px 16px!important;
    border-radius:18px!important;
    font-size:clamp(.84rem,3.75vw,.98rem)!important;
    letter-spacing:.02em!important;
    min-height:48px!important;
  }
  .hero [style*="max-width:900px"],
  .hero [style*="max-width:850px"]{max-width:100%!important;}
}
@media(max-width:760px){
  body{padding-bottom:86px!important;}
  #conversion-cta-bar.whatsapp-cta-bar{
    left:10px!important;
    right:10px!important;
    bottom:calc(10px + env(safe-area-inset-bottom,0px))!important;
  }
  #conversion-cta-bar.whatsapp-cta-bar a{
    width:100%!important;
    max-width:calc(100vw - 20px)!important;
    border-radius:18px!important;
    white-space:normal!important;
  }
  .floating-cta{
    left:10px!important;
    right:10px!important;
    bottom:calc(82px + env(safe-area-inset-bottom,0px))!important;
    border-radius:18px!important;
    text-align:center!important;
    white-space:normal!important;
  }
}
@supports(padding:max(0px)){
  #conversion-cta-bar.whatsapp-cta-bar{bottom:max(10px,env(safe-area-inset-bottom))!important;}
  .floating-cta{bottom:calc(82px + env(safe-area-inset-bottom))!important;}
}

/* Mobile header: keep the Magic Mentor credit on its own row above navigation. */
@media (max-width: 920px) {
  .nav {
    overflow: visible !important;
  }

  .nav .nav-inner {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    min-height: 0 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .nav .brand {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    position: relative !important;
    z-index: 2 !important;
    margin: 0 !important;
    padding: 0 8px 5px !important;
    white-space: nowrap !important;
    text-align: center !important;
    line-height: 1.25 !important;
  }

  .nav .nav-links {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 18px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 5px 8px 7px !important;
    margin: 0 !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav .nav-links > a {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    line-height: 1.25 !important;
  }

  .nav .nav-links .cta-email-backup {
    display: none !important;
  }
}
