/* ADaval V11 — correções mobile/Tablet e compatibilidade Safari iOS. */
:root { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html { scroll-padding-top: 90px; }
body { width:100%; max-width:100%; overflow-x:hidden; }
*, *::before, *::after { box-sizing:border-box; }
[hidden] { display:none !important; }
img, svg, picture, video { max-width:100%; }
a,button,input,textarea,select { -webkit-tap-highlight-color:rgba(28,188,168,.14); }
:where(.site-header, main, footer, section, article, .wrap, .nav-row, .flow-layout, .flow-panel, .v5-price-card, .model-card) { min-width:0; }
:where(h1,h2,h3,p,a,strong,.v5-price-card,.flow-panel,.model-card) { overflow-wrap:break-word; }
:where(.flow-fields,.flow-fields>*,.flow-panel, .catalog-hero-grid>*, .v5-feature-grid>*) { min-width:0; }
:where(input,select,textarea) { max-width:100%; }
:where(table) { max-width:100%; }
.site-header { -webkit-backdrop-filter:none; backdrop-filter:none; }
/* Impede que uma barra horizontal de muitos links destrua o cabeçalho em iPad/telemóvel. */
@media (max-width:1180px) {
  .site-header { height:78px !important; position:sticky; top:0; z-index:1000; }
  .site-header .nav-row { height:78px; display:flex; flex-wrap:nowrap; align-items:center; justify-content:space-between; gap:10px; }
  .site-header .desktop-nav, .site-header .nav-cta { display:none !important; }
  .site-header a.brand { flex:0 1 auto !important; min-width:0 !important; width:clamp(160px,55vw,295px) !important; max-width:calc(100% - 62px) !important; white-space:normal; }
  .site-header .adaval-logo { width:100%; height:auto; display:block; object-fit:contain; }
  .site-header .menu-toggle {
    display:flex !important; flex:0 0 44px; width:44px; height:44px; padding:0;
    align-items:center; justify-content:center; flex-direction:column; gap:5px;
    border:1px solid #aac6c9; border-radius:10px; background:#fff; color:#163f48;
    cursor:pointer; touch-action:manipulation;
  }
  .site-header .menu-toggle span { display:block; width:21px; height:2px; border-radius:2px; background:#163f48; transition:transform .16s, opacity .16s; }
  .site-header .menu-toggle[aria-expanded="true"] span:first-child { transform:translateY(7px) rotate(45deg); }
  .site-header .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity:0; }
  .site-header .menu-toggle[aria-expanded="true"] span:last-child { transform:translateY(-7px) rotate(-45deg); }
  .site-header #mobile-nav:not([hidden]) {
    display:flex !important; flex-direction:column; gap:0 !important;
    position:absolute !important; top:100% !important; left:0; right:0;
    background:#fff; color:#133b43; padding:10px max(18px,env(safe-area-inset-left)) 18px;
    max-height:calc(100vh - 78px); max-height:calc(100dvh - 78px);
    overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
    border-top:1px solid #dceae8; border-bottom:1px solid #dceae8;
    box-shadow:0 15px 30px rgba(8,31,39,.17); z-index:1100;
  }
  .site-header #mobile-nav a {
    display:flex; align-items:center; width:100%; min-height:46px;
    padding:10px 14px; margin:0; color:#163c44; font-size:15px; font-weight:700;
    line-height:1.35; border-bottom:1px solid #ebf2f1; border-radius:0;
    text-decoration:none; touch-action:manipulation;
  }
  .site-header #mobile-nav a:last-child { border-bottom:0; }
  .site-header #mobile-nav a[aria-current="page"] { color:#087e77; background:#edf8f5; border-radius:7px; }
  .site-header #mobile-nav a:active { background:#eaf7f2; }
}
@media (min-width:1181px) {
 .site-header .menu-toggle,.site-header #mobile-nav { display:none !important; }
}
/* Dispositivos iPhone/Android: impedir colunas rígidas e zoom do formulário no iOS. */
@media (max-width:700px) {
 .v5-feature-grid,.catalog-hero-grid,.flow-layout,.contact-grid,.process-layout,.faq-grid {
    grid-template-columns:minmax(0,1fr) !important;
 }
 .v5-card-grid,.v5-quality-list,.v5-diagnostics,.flow-fields,.flow-meta,
 .model-grid,.faults-grid,.repair-types-grid { grid-template-columns:minmax(0,1fr) !important; }
 .flow-panel { padding:19px 16px; }
 .flow-fields input,.flow-fields select,.flow-fields textarea,.flow-search input,
 #quote-form input,#quote-form select,#quote-form textarea { font-size:16px; }
 .flow-search { flex-direction:column; }
 .flow-search input,.flow-search button { width:100%; }
 .flow-actions > * { max-width:100%; }
 .v5-price-box>strong { font-size:clamp(29px,9vw,40px); }
 .v5-diag { flex-wrap:wrap; }
 .catalog-bottom { flex-direction:column; align-items:stretch; }
 .footer-main,.footer-bottom { flex-wrap:wrap; }
 .footer-links { flex-wrap:wrap; }
 .wrap { max-width:100%; }
}
@media (max-width:390px) {
 .hero h1, .catalog-hero h1 { font-size:clamp(30px,9vw,38px); }
 .section-heading h2,.process-intro h2,.contact-copy h2,.faq-grid h2 { font-size:clamp(27px,8vw,34px); }
 .v5-price-card, .model-card { padding:16px; }
}
/* Ter como base o posicionamento natural e a viewport segura do Safari. */
.site-header #mobile-nav[hidden] { display:none !important; }
@supports (-webkit-touch-callout:none) {
  .site-header #mobile-nav { -webkit-overflow-scrolling:touch; }
  input,select,textarea { border-radius:8px; }
}

/* Navegação de computador compacta: também evita sobreposição em portáteis. */
@media (min-width:1181px) {
 .site-header .desktop-nav { display:flex; gap:clamp(7px,0.9vw,13px); font-size:12px; white-space:nowrap; flex:0 1 auto; min-width:0; }
 .site-header a.brand { width:clamp(235px,23vw,300px); max-width:300px; flex:0 0 auto; }
 .site-header .nav-cta { white-space:nowrap; padding:11px 12px; flex:0 0 auto; }
 .site-header .nav-row { gap:12px; }
}

/* V12 — iconografia previsível no iOS + contraste acessível e apresentação compacta. */
.principles-section .adaval-principle-svg {
 display:block; width:25px; height:25px; max-width:100%; overflow:visible;
 color:#168d83; stroke:currentColor;
}
.principles-section .principle-mark { display:inline-flex; align-items:center; justify-content:center; }
/* A nota foi criada com estilos para fundo escuro; aqui o fundo é branco. */
.principles-section .v5-muted-note {
 color:#52666c !important;
 font-size:clamp(13px, 1.6vw, 15px);
 line-height:1.65;
 margin:17px 0 0 !important;
}
.principles-section .v5-inline-link {
 color:#08786f !important;
 text-decoration-color:currentColor !important;
 text-decoration-thickness:1px;
 text-underline-offset:3px;
}
.principles-section .v5-inline-link:hover,
.principles-section .v5-inline-link:focus-visible { color:#075b53 !important; }
.principles-section .adaval-inline-arrow {
 display:inline-block; height:1em; width:1em; vertical-align:-.15em;
 margin-left:.15em; overflow:visible;
}
@media (max-width:700px) {
 /* Ícone e texto lado a lado, com menos espaço vazio entre os 3 compromissos. */
 .principles-section { padding:26px 0 30px !important; }
 .principles-section .principles-grid {
   display:grid; grid-template-columns:minmax(0,1fr); gap:9px !important;
 }
 .principles-section .principles-grid > div {
   min-width:0; display:grid; grid-template-columns:30px minmax(0,1fr);
   grid-template-rows:auto auto; column-gap:14px; row-gap:2px;
   align-items:center; border-left:2px solid #deebe7;
   padding:12px 6px 12px 15px !important;
 }
 .principles-section .principle-mark {
   grid-column:1; grid-row:1 / span 2; margin:0; align-self:center;
   font-size:0; line-height:1;
 }
 .principles-section .principles-grid h3 {
   grid-column:2; font-size:clamp(14px,4vw,16px); line-height:1.3;
   margin:0;
 }
 .principles-section .principles-grid p {
   grid-column:2; font-size:13px; line-height:1.55; margin:0;
 }
 .principles-section .v5-muted-note { margin-top:15px !important; }
}
/* Ícones de texto que permanecem nos outros botões são forçados a tipográficos. */
/* V12 — evitar que o rodapé crie scroll horizontal no iPad (701-1180px). */
@media (min-width:701px) and (max-width:1180px) {
 .site-footer .footer-main { flex-wrap:wrap; gap:30px; }
 .site-footer .footer-main > * { min-width:0; max-width:100%; }
 .site-footer .footer-links { display:flex; flex-wrap:wrap; width:100%; max-width:100%; gap:22px 36px; }
 .site-footer .footer-links > div { min-width:132px; }
 .site-footer .footer-bottom { flex-wrap:wrap; }
}
