/* DISPON — Final Responsive Control Layer
   Target: mobile Safari/Chrome, tablet, desktop Safari/Chrome, laptop widths.
   Non-destructive: layout safety only; no feature or branding changes. */
html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  max-width:100%;
  overflow-x:hidden;
}
body{
  max-width:100%;
  min-width:0;
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
}
*,*::before,*::after{box-sizing:border-box;min-width:0}
img,svg,video,canvas,iframe{max-width:100%;}
img{height:auto;}
button,input,select,textarea{max-width:100%;}
input,select,textarea{min-width:0;}
main,header,footer,section,article,aside,nav,form,fieldset{min-width:0;max-width:100%;}
h1,h2,h3,h4,h5,h6,p,li,td,th,label,button,a{overflow-wrap:break-word;}
.site-header .header-inner{min-width:0;max-width:100%;}
.site-header .brand-logo-full{flex:0 1 auto;min-width:0;}
.site-header .nav,.site-header .header-actions{min-width:0;}
.search-box,.search-field,.hero-modern-copy,.hero-modern-visual,.professional-actions,.contact-buttons{min-width:0;max-width:100%;}
.search-field input,.search-field select,.search-button{width:100%;max-width:100%;}
.service-card,.professional-card,.step-card,.card,.booking-box,.profile-modal-content,.auth-card,.report-card,.professional-page,.client-main,.admin-page,.dashboard-page{min-width:0;max-width:100%;}
.booking-box,.profile-modal-content{overflow:auto;-webkit-overflow-scrolling:touch;}
.territory-table-wrap,.table-wrap,.table-responsive,.admin-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}
table{max-width:100%;}
/* Laptop / small desktop: keep two-column compositions inside the viewport. */
@media (min-width:901px) and (max-width:1199px){
  .site-header .header-inner{width:calc(100% - 32px)!important;}
  .site-header .nav{gap:clamp(3px,.55vw,9px)!important;}
  .site-header .nav a{font-size:clamp(10px,.75vw,12px)!important;}
  .site-header .header-actions{gap:6px!important;}
  .hero-modern,.feature-banner{min-width:0!important;}
  .hero-modern-copy,.hero-modern-visual{min-width:0!important;}
  .footer-container{min-width:0!important;}
}
/* Tablet / compact laptop. */
@media (min-width:768px) and (max-width:900px){
  .site-header .header-inner{width:calc(100% - 28px)!important;}
  .hero-modern,.feature-banner{grid-template-columns:minmax(0,1fr)!important;}
  .hero-modern-copy,.hero-modern-visual{width:100%!important;}
  .hero-modern-visual{justify-content:center!important;}
  .footer-container{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
/* Mobile. */
@media (max-width:767px){
  html,body{width:100%;}
  .site-header .header-inner{width:calc(100% - 24px)!important;}
  .hero-modern,.feature-banner,.contact-section,.urgency-section,.ai-card{min-width:0!important;}
  .hero-modern-copy,.hero-modern-visual,.ai-copy{width:100%!important;max-width:100%!important;}
  .hero-modern-visual img{width:100%!important;max-width:100%!important;height:auto!important;}
  .footer-container{grid-template-columns:1fr!important;}
  .footer-bottom{min-width:0!important;}
  .search-box{grid-template-columns:minmax(0,1fr)!important;}
  .search-field,.search-button{width:100%!important;max-width:100%!important;}
  .popular-searches{max-width:100%;flex-wrap:wrap;}
  .professional-actions,.contact-buttons,.hero-actions{max-width:100%;flex-wrap:wrap;}
  .professional-actions>*{min-width:0;}
  .booking-box,.profile-modal-content{width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important;}
  .report-card{width:100%!important;}
  .territory-table-wrap{width:100%;}
}
@media (max-width:430px){
  .site-header .header-inner{width:calc(100% - 16px)!important;}
  .btn,.search-button,.book-button,.service-button,.profile-button,.hero-cta,.contact-submit{max-width:100%;}
  .booking-box,.profile-modal-content{width:calc(100% - 16px)!important;max-width:calc(100% - 16px)!important;}
}
/* Safari/iOS form rendering normalization. */
@supports (-webkit-touch-callout:none){
  input,select,textarea,button{-webkit-appearance:none;}
  select{background-image:none;}
}

/* DISPON — Micro Polish Pass
   UX refinement inspired by the benchmark review, without changing product architecture. */
html{scroll-padding-top:84px}
[id]{scroll-margin-top:84px}

/* Keep long labels comfortable on narrow Safari/Chrome viewports. */
.service-card h3,.professional-card h3,.section-title-row h2,.search-heading h2,.section-heading-center h2{overflow-wrap:break-word;hyphens:auto}

@media (min-width:901px){
  .services-grid .service-card{transition:box-shadow .18s ease,border-color .18s ease,transform .18s ease}
  .services-grid .service-card:hover{transform:translateY(-2px)}
}

@media (max-width:767px){
  /* Hero: tighter hierarchy and less wasted vertical space. */
  .hero-modern{gap:20px!important}
  .hero-modern-copy{padding-top:4px}
  .hero-modern-copy h1{font-size:clamp(30px,8.4vw,38px)!important;line-height:1.05!important;letter-spacing:-.035em!important}
  .hero-modern-copy>p{font-size:17px!important;line-height:1.45!important}
  .hero-actions{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  .hero-actions .btn{width:100%!important}

  /* Search: make the main action unmistakable and easy to tap. */
  .search-section{scroll-margin-top:78px}
  .search-heading h2{font-size:clamp(27px,7.5vw,34px)!important;line-height:1.08!important}
  .search-heading p{font-size:14px!important;line-height:1.55!important}
  .search-box{gap:10px!important;padding:10px!important}
  .search-box .search-button{width:100%!important;min-height:50px!important;font-size:15px!important}
  .popular-searches{gap:7px!important;margin-top:14px!important}
  .popular-searches button{min-height:42px!important;padding:9px 12px!important}

  /* Services: preserve the 2-column scan pattern, but make each card easier to act on. */
  .services-grid{gap:10px!important}
  .service-card{border-radius:20px!important}
  .service-card-body{padding:14px 12px 13px!important}
  .service-card h3{font-size:15px!important;line-height:1.22!important}
  .service-card p{font-size:12px!important;line-height:1.48!important;margin-bottom:11px!important}
  .service-card .service-button{width:100%!important;min-height:44px!important;padding-inline:10px!important;font-size:12px!important}
  .service-card-top{gap:6px!important}
  .service-live,.service-number{font-size:11px!important}

  /* Section headings: avoid crowded title/link rows. */
  .section-title-row{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;align-items:start!important}
  .section-title-row>.text-link{justify-self:start;min-height:42px;display:inline-flex;align-items:center}

  /* Trust strip: readable 2-up cards on phones. */
  .trust-strip{grid-template-columns:1fr 1fr!important;gap:6px!important;padding:10px!important;border-radius:18px!important}
  .trust-strip>div{padding:12px 9px!important;grid-template-columns:30px 1fr!important;column-gap:7px!important}
  .trust-strip span{width:30px!important;height:30px!important;font-size:15px!important;padding:7px!important;border-radius:10px!important}
  .trust-strip strong,.trust-strip small{font-size:10.5px!important;line-height:1.3!important}

  /* Public/professional result cards and booking controls. */
  .professional-card,.review,.review-box,.client-card,.verification-card,.reservations-card{max-width:100%!important}
  .professional-actions,.client-actions,.reservation-actions,.verification-actions,.message-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
  .professional-actions>* ,.client-actions>* ,.reservation-actions>* ,.verification-actions>* ,.message-actions>*{width:100%!important}

  /* Admin/report screens: stack controls before the table instead of squeezing them. */
  .reports-toolbar{align-items:stretch!important;flex-direction:column!important}
  .report-admin-top{display:block!important}
  .report-admin-actions,.moderation-actions{grid-template-columns:1fr!important}
  .territory-table-wrap,.table-wrapper{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .territory-table,.table-wrapper table{min-width:640px}

  /* Professional workspace: preserve touch targets and prevent horizontal pressure. */
  .professional-form,.professional-form-section,.verification-grid,.verification-actions,.precise-date-grid-v70{max-width:100%!important;min-width:0!important}
  .professional-form button[type="submit"]{width:100%!important}

  /* Modals and drawers stay inside the safe viewport. */
  .modal,.modal-content,.dialog,.drawer,.booking-modal,.booking-panel{max-width:calc(100vw - 24px)!important}
  .modal-content,.dialog,.drawer,.booking-modal,.booking-panel{max-height:calc(100dvh - 24px);overflow:auto;-webkit-overflow-scrolling:touch}
}

@media (max-width:430px){
  .hero-modern-copy h1{font-size:30px!important}
  .hero-modern-copy>p{font-size:16px!important}
  .search-heading h2{font-size:28px!important}
  .services-grid{gap:8px!important}
  .service-card-body{padding:12px 10px!important}
  .service-card h3{font-size:14px!important}
  .service-card p{font-size:11px!important}
  .service-card .service-button{font-size:11px!important;min-height:42px!important}
  .trust-strip{gap:4px!important;padding:8px!important}
  .trust-strip>div{padding:10px 7px!important}
  .section-title-row>.text-link{font-size:13px}
}

/* Safari desktop/laptop: avoid accidental rubber-band horizontal page movement. */
@supports (-webkit-touch-callout:none){
  body{overscroll-behavior-x:none}
  .popular-searches,.agenda-grid.week,.territory-table-wrap,.table-wrapper{scrollbar-width:thin}
}


/* DISPON REFRESH11 — targeted UI defect fixes (2026-10-28)
   Scope: mobile navigation control, footer separator rendering, booking icons,
   admin logo contrast. No business logic, auth, Supabase, AI or booking flow changed. */
@media (max-width:900px){
  .site-header .mobile-menu-toggle{width:48px!important;min-width:48px!important;max-width:48px!important;height:48px!important;min-height:48px!important;max-height:48px!important;padding:0!important;margin:0 0 0 auto!important;display:grid!important;place-items:center!important;border-radius:16px!important;line-height:1!important;font-size:0!important;box-sizing:border-box!important}
  .site-header .mobile-menu-icon{display:block!important;width:24px!important;height:24px!important;line-height:24px!important;font-size:24px!important;text-align:center!important}
}
.site-footer .footer-column .footer-link-separator{display:none!important}
.booking-professional-avatar svg{width:24px!important;height:24px!important;display:block!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.booking-service-icon svg{width:20px!important;height:20px!important;display:block!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
.admin-header .brand{display:flex!important;align-items:center!important;padding:5px 9px!important;border-radius:12px!important;background:#fff!important;box-shadow:0 4px 14px rgba(0,0,0,.12)!important}
.admin-header .brand img{display:block!important;width:170px!important;height:51px!important;object-fit:contain!important;object-position:left center!important}
@media (max-width:560px){.admin-header .brand{padding:4px 7px!important}.admin-header .brand img{width:132px!important;height:40px!important}}
