/* Auvidi site-wide responsive layer — all pages via header.php */
html{scroll-behavior:smooth}
html,body{overflow-x:clip;max-width:100%}
*,*::before,*::after{box-sizing:border-box}
img,video,canvas,iframe{max-width:100%;height:auto}
/* Shared page shells — center within viewport (do NOT clamp .wrap; many pages use it as a full-width flex center) */
.container,.af-wrap,.ap-wrap,.au-container{
  max-width:1200px;
  width:100%;
  margin-left:auto;
  margin-right:auto;
}

/* Homepage platform logos — keep icons visible in 3×2 mobile grid */
.logos .logoitem{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  aspect-ratio:1 / 1;
  width:100%;
  max-width:120px;
  margin-inline:auto;
  padding:12px;
  box-sizing:border-box;
}
.logos .logoitem svg{
  display:block !important;
  width:56px !important;
  height:56px !important;
  max-width:none !important;
  max-height:none !important;
  flex:0 0 auto;
  visibility:visible !important;
  opacity:1 !important;
}

/* Touch-friendly defaults */
button,.btn,.au-btn,a.neon-btn,.au-link,.af-link,.af-pill,.af-sc{
  -webkit-tap-highlight-color:transparent;
}
@media (max-width:768px){
  button,.btn,.au-btn,a.neon-btn,.au-sss-q{
    min-height:44px;
  }
}

/* Kill fixed desktop widths that cause horizontal scroll */
.au-pricing .ap-wrap::before,
.logos .container::before{
  width:min(1200px,100%) !important;
  max-width:100% !important;
  left:50% !important;
  transform:translateX(-50%) !important;
}
.au-pricing .ap-grid{
  width:100% !important;
  max-width:1140px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}

/* Common marketing grids */
@media (max-width:900px){
  .grid-2,.grid-3,.steps,.pricing,.hero .grid,.hero-inner{
    grid-template-columns:1fr !important;
  }
  .au-pricing .ap-grid{
    grid-template-columns:1fr !important;
    max-width:560px !important;
  }
  .logos .row{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}
@media (max-width:640px){
  .logos{padding:16px 0 !important}
  .logos .container{padding:0 12px !important}
  .logos .row,
  .logos .grid,
  section.logos .container > div{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:12px !important;
    align-items:center !important;
    justify-items:center !important;
    padding:14px 10px !important;
  }
  .logos .logoitem{
    max-width:104px;
    width:100%;
    aspect-ratio:1 / 1;
    min-height:0;
    padding:10px;
  }
  .logos .logoitem svg{
    width:44px !important;
    height:44px !important;
  }
  .hero-v2{
    min-height:0 !important;
    height:auto !important;
    align-items:start !important;
    padding:0 !important;
  }
  .hero-wrap{padding:18px 14px 20px !important; margin:0 auto !important}
  .hero-v2 h1,.hero-v2 .title{
    font-size:clamp(26px,7.5vw,34px) !important;
    line-height:1.15 !important;
    margin:10px 0 8px !important;
  }
  .hero-v2 h1 br{display:none}
  .hero-v2 .subtitle{font-size:15px !important; line-height:1.45 !important; margin:0 !important}
  .hero-v2 .cta{margin-top:14px !important}
  .cta-row,.cta,.hero-v2 .cta{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:10px !important;
  }
  .cta-row a,.cta a,.hero-v2 .cta a,
  .cta-row .btn,.hero-v2 .btn{
    flex:1 1 100%;
    text-align:center;
    justify-content:center;
    min-height:48px;
  }
  /* Testimonials: allow horizontal scroll without page overflow */
  .t{min-width:min(280px,85vw) !important}
  /* FAQ */
  #au-sss-root{padding-left:12px !important;padding-right:12px !important}
  #au-sss-root .au-sss-q{padding:14px 12px !important;font-size:15px !important}
  /* Mid title */
  #auvidi-mid-title h2{font-size:clamp(22px,6vw,28px) !important}
  /* Features badges — 2×2 on phones */
  #auvidi-features{min-height:0 !important}
  #auvidi-features .wrap{padding:12px 12px 36px !important}
  #auvidi-features .badges{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:16px 10px !important;
    align-items:start !important;
  }
  #auvidi-features .badge{
    flex-direction:column !important;
    align-items:center !important;
    text-align:center !important;
    min-width:0 !important;
    gap:0 !important;
    width:100% !important;
  }
  #auvidi-features .circle{
    width:72px !important;
    height:72px !important;
    margin-bottom:10px !important;
  }
  #auvidi-features .idx{font-size:26px !important}
  #auvidi-features .dot{width:16px !important;height:16px !important}
  #auvidi-features .dot.l{left:-6px !important;top:-6px !important}
  #auvidi-features .dot.r{right:-6px !important;top:-6px !important}
  #auvidi-features .badge h3{
    font-size:14px !important;
    line-height:1.25 !important;
    margin:4px 0 0 !important;
  }
  #auvidi-features .badge p{
    font-size:12px !important;
    line-height:1.35 !important;
    max-width:100% !important;
    margin:4px 0 0 !important;
  }
  /* About / legal identity tables */
  .table-like .row{grid-template-columns:1fr !important}
  .kpi{gap:10px !important}
  .kpi div{width:100%}
  .container{padding-left:14px !important;padding-right:14px !important}
  .au-pricing .ap-toggle{width:100% !important;max-width:100% !important;flex-wrap:wrap}
  .au-pricing .ap-wrap{padding:0 14px 48px !important;margin:40px auto !important}
}

/* Tables */
@media (max-width:768px){
  table{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .table-wrap,.au-table-wrap,.overflow-x{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
}

/* Forms / auth pages */
@media (max-width:640px){
  input,select,textarea{
    font-size:16px !important; /* prevent iOS zoom */
    max-width:100%;
  }
  .auth-card,.login-card,.card-form{
    width:100% !important;
    max-width:100% !important;
    margin:0 auto !important;
    padding:16px !important;
  }
}

/* Content pages with common layouts */
@media (max-width:980px){
  .page-hero,.legal-hero,.about-hero{
    padding:28px 16px !important;
  }
  .page-grid,.legal-grid,.about-grid{
    grid-template-columns:1fr !important;
    gap:20px !important;
  }
}

/* Panel / account pages often use .app grid with sidebar */
@media (max-width:720px){
  .app{grid-template-columns:1fr !important}
  .sidebar{position:relative !important;height:auto !important;border-right:0 !important}
  .content{padding:16px !important}
  .form-grid{grid-template-columns:1fr !important}
}

/* Buy / packages cards */
@media (max-width:960px){
  .pricing-grid,.packages-grid,.plan-grid{
    grid-template-columns:1fr !important;
  }
}

/* Safe area for notched phones */
@supports (padding: max(0px)){
  .auvidi-topbar .au-container{
    padding-left:max(10px, env(safe-area-inset-left));
    padding-right:max(10px, env(safe-area-inset-right));
  }
  #auvidi-footer{
    padding-bottom:max(28px, env(safe-area-inset-bottom));
  }
}

/* Hero mobile — kill leftover tall viewport gap under CTAs */
@media (max-width:900px){
  section.hero-v2,
  .hero-v2{
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    align-items:start !important;
    padding-bottom:0 !important;
    margin-bottom:0 !important;
  }
  .hero-v2 .hero-wrap,
  .hero-wrap{
    padding-bottom:12px !important;
    margin-bottom:0 !important;
  }
  .hero-v2 .cta{margin-bottom:0 !important; padding-bottom:0 !important}
  section.logos{margin-top:4px !important; padding-top:10px !important; padding-bottom:10px !important}
  #auvidi-features{min-height:0 !important; height:auto !important}
}

/* Account / profile pages: full-bleed centering shell */
.au-prof-page{
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  padding:32px 0 40px !important;
  box-sizing:border-box !important;
  display:flex !important;
  justify-content:center !important;
}
.au-prof-inner{
  width:100% !important;
  max-width:1200px !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:16px !important;
  padding-right:16px !important;
  box-sizing:border-box !important;
}
