/* ===== Mobile responsiveness (loaded last) ===== */

/* Never allow sideways scrolling */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
html,body{max-width:100%;overflow-x:clip}
img,video,iframe,canvas,svg{max-width:100%}
*{-webkit-tap-highlight-color:rgba(30,58,95,.12)}

/* Calculator / form inputs must shrink inside their grid cells */
.calc-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.calc-fields.three,.calc-out{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:640px){.calc-fields,.calc-fields.three,.calc-out{grid-template-columns:minmax(0,1fr)}}
.calc-fields label,.calc-fields input,.calc-card,.calc-out>*{min-width:0}
.calc-fields input,.contact-form input,.contact-form select,.contact-form textarea,.form-group input,.form-group select,.form-group textarea{width:100%;max-width:100%;box-sizing:border-box}

/* Footer brand name was dark-on-dark */
.footer .logo-text{color:#fff}

/* ---------- Tablet & below: hamburger menu ---------- */
@media (max-width:992px){
  .nav{display:none}
  .header-actions{display:none}
  .mobile-menu-btn{display:flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:10px;font-size:24px;margin-left:auto}
  .mobile-menu-btn:active{background:rgba(30,58,95,.08)}
  .header{background:rgba(255,255,255,.97)}
  .header .container{position:relative}
  .nav.active{display:flex!important;max-height:calc(100vh - 80px);max-height:calc(100dvh - 80px);overflow-y:auto;border-radius:0 0 16px 16px}
  .nav.active .nav-link{display:block;padding:12px 4px;font-size:16px;border-bottom:1px solid rgba(30,58,95,.08)}
  .nav.active .nav-link:last-child{border-bottom:0}
  .nav.active .nav-link::after{display:none}
  .hero{min-height:auto}
  .hero-shape{max-width:70vw;max-height:70vw}
  .hero .stat{border-left-width:2px}
}

/* ---------- Phones ---------- */
@media (max-width:768px){
  .container{padding-left:18px;padding-right:18px}
  section{scroll-margin-top:70px}
  .logo-text{font-size:19px}
  .hero{padding:100px 0 56px}
  .hero-title{font-size:clamp(28px,8vw,38px);line-height:1.2}
  .hero-desc{font-size:16px}
  .hero-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
  .hero .stat{padding-left:10px;text-align:left}
  .hero .stat-number{font-size:26px}
  .hero .stat-label{font-size:12px}
  .section-title{font-size:clamp(26px,7vw,32px)}
  .section-subtitle,.section-desc{font-size:15px}
  .cta-buttons .btn,.contact-form .btn{width:100%;justify-content:center}
  .footer-bottom{align-items:center}
  .footer-legal{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 18px}
  .map-frame{min-height:280px}
  .wa-float{right:14px;bottom:14px;width:52px;height:52px;font-size:27px}
  /* 16px inputs stop iOS Safari from zooming in on focus */
  input,select,textarea{font-size:16px!important}
  .btn{min-height:48px}
  .about-experience{right:12px;bottom:16px;padding:14px 20px}
}

@media (max-width:480px){
  .hero-buttons .btn,.btn{width:100%;justify-content:center}
  .calc-card,.docs-card{padding:18px}
  .faq-item summary{font-size:.95rem}
  .contact-form-wrapper{padding:22px 18px}
  .promise-card,.step-card,.help-card{padding:20px}
  .hero-badge,.badge{font-size:11px;letter-spacing:.06em}
}

@media (max-width:360px){
  .logo-text{font-size:17px}
  .hero-title{font-size:26px}
  .help-grid{grid-template-columns:1fr!important}
  .container{padding-left:14px;padding-right:14px}
}

/* Landscape phones: don't force full-height hero */
@media (max-height:500px) and (orientation:landscape){
  .hero{min-height:auto;padding:90px 0 40px}
}

/* ===== Sticky quick-contact bar (phones only) ===== */
.mobile-cta{display:none}
@media (max-width:768px){
  .mobile-cta{display:grid;grid-template-columns:1fr 1fr 1.5fr;gap:8px;position:fixed;left:0;right:0;bottom:0;z-index:1600;padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);backdrop-filter:blur(10px);box-shadow:0 -6px 24px rgba(15,36,64,.14)}
  .mobile-cta a{display:flex;align-items:center;justify-content:center;gap:7px;min-height:46px;border-radius:12px;font-size:14px;font-weight:600;text-decoration:none;color:#fff;white-space:nowrap}
  .mobile-cta .mc-call{background:#1e3a5f}
  .mobile-cta .mc-wa{background:#25d366}
  .mobile-cta .mc-book{background:linear-gradient(135deg,#c9a962,#e2c47e);color:#0f2440}
  .mobile-cta a:active{transform:scale(.97)}
  .wa-float{display:none}
  body{padding-bottom:70px}
  /* compact hero: stats stay in one row so the hero is shorter */
  .hero-stats{grid-template-columns:repeat(3,1fr)!important;gap:10px}
  .hero .stat{padding-left:8px}
  .hero .stat-number{font-size:22px}
  .hero .stat-label{font-size:11px;line-height:1.3}
  .hero{padding:92px 0 40px}
}
@media (max-width:360px){.mobile-cta .mc-book span{font-size:12px}.mobile-cta a{gap:5px;font-size:13px}}

#progress{display:none!important}
