/* Classy Mind V94 — unified desktop, tablet and mobile stabilization */
html{max-width:100%;overflow-x:hidden}
body{max-width:100%;overflow-x:hidden}
img,svg,video,iframe{max-width:100%}
.site-shell,.slide-frame,.content-panels,.doctor-directory,.service-directory,.treatment-program-directory,.about-directory,.article-directory,.gallery-directory,.site-footer-section{max-width:100%}
.menu-bar{-webkit-overflow-scrolling:touch;scrollbar-width:none}
.menu-bar::-webkit-scrollbar{display:none}

@media (min-width:1181px){
  .slide-frame{max-width:1916px}
  .panels-grid,.site-footer-section{max-width:1820px}
}

@media (max-width:1180px){
  .site-shell{padding-inline:12px}
  .slide-frame{width:100%;max-width:100%;border-radius:28px}
  .brand-link{left:16px;top:13px;width:205px;height:58px}
  .menu-bar{
    left:12px;right:12px;top:105px;
    width:auto!important;max-width:none!important;
    transform:none!important;justify-content:flex-start;
    overflow-x:auto;overflow-y:hidden;padding:6px;
  }
  .menu-item{min-width:max-content;padding-inline:14px}
  .top-right-tools{right:14px}
  .content-panels,.doctor-directory,.service-directory,.treatment-program-directory{padding-inline:14px}
  .panels-grid,.doctor-directory-shell,.site-footer-section{width:100%}
  .footer-top-cards{gap:16px}
}

@media (max-width:900px){
  .site-shell{padding:8px 8px 0;display:block}
  .slide-frame{
    width:100%;height:auto;min-height:860px;
    aspect-ratio:auto!important;border-radius:26px;
  }
  .topbar{height:176px}
  .brand-link{left:14px;top:12px;width:180px;height:54px}
  .top-right-tools{right:12px;top:10px}
  .member-access-nav{left:14px!important;top:70px!important;max-width:calc(100% - 28px);overflow-x:auto}
  .menu-bar{top:112px!important;left:10px;right:10px;border-radius:18px}
  .hero-copy{
    left:28px!important;right:28px!important;top:190px!important;
    width:auto!important;max-width:560px!important;
  }
  .hero-title{font-size:clamp(34px,7vw,52px);line-height:1.04}
  .hero-subtitle{max-width:520px;font-size:14px;line-height:1.8}
  .right-actions{
    left:28px!important;right:28px!important;top:500px!important;width:auto!important;
    display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px!important;
  }
  .right-actions .action-link,.right-actions .action-stat-card{
    min-width:0!important;min-height:68px!important;height:auto!important;
    border-radius:18px!important;margin:0!important;
  }
  .right-actions .action-link + .action-link{margin:0!important}
  .trust-block{
    left:28px!important;right:28px!important;top:675px!important;bottom:auto!important;
    width:auto!important;max-width:620px;grid-template-columns:minmax(0,1fr) 130px;
  }
  .social-card{
    left:28px!important;right:auto!important;top:auto!important;bottom:24px!important;
    width:auto!important;max-width:calc(100% - 56px);height:58px;
    flex-direction:row!important;padding:7px 9px!important;border-radius:22px!important;
    overflow-x:auto;overflow-y:hidden;
  }
  html[dir="rtl"] .social-card{left:auto!important;right:28px!important}
  .content-panels{padding:10px 10px 46px}
  .panels-grid{grid-template-columns:1fr!important;gap:14px}
  .glass-panel{width:100%;min-width:0}
  .footer-main-grid{grid-template-columns:1fr 1fr}
  .footer-top-cards{grid-template-columns:1fr}
}

@media (max-width:620px){
  .site-shell{padding:4px 4px 0}
  .slide-frame{min-height:1010px;border-radius:20px}
  .slide-frame::before{border-radius:20px}
  .brand-link{left:10px;top:9px;width:150px;height:48px}
  .top-right-tools{right:8px!important;top:7px!important;width:148px!important}
  .top-right-tools .phone-chip{font-size:7.5px!important}
  .top-right-tools .compact-booking{width:108px!important;min-width:108px!important}
  .member-access-nav{left:9px!important;top:61px!important;right:9px;max-width:none}
  .member-access-link{flex:0 0 auto}
  .menu-bar{top:100px!important;left:7px;right:7px;padding:5px;border-radius:16px}
  .menu-item{height:38px;min-width:max-content;padding-inline:11px;font-size:10px}
  .menu-item-image{width:17px!important;height:17px!important}
  .hero-copy{left:18px!important;right:18px!important;top:165px!important}
  .hero-eyebrow{margin-bottom:10px;padding:6px 10px;font-size:9px}
  .hero-title{margin-bottom:12px;font-size:clamp(30px,10vw,42px);line-height:1.08}
  .hero-subtitle{font-size:12px;line-height:1.75}
  .right-actions{
    left:18px!important;right:18px!important;top:480px!important;
    grid-template-columns:1fr!important;gap:6px!important;
  }
  .right-actions .action-link,.right-actions .action-stat-card{
    min-height:58px!important;padding:7px 10px!important;border-radius:15px!important;
  }
  .action-stat-description{display:none!important}
  .trust-block{
    left:18px!important;right:18px!important;top:760px!important;
    grid-template-columns:minmax(0,1fr) 104px!important;gap:8px!important;
  }
  .trust-copy{min-width:0}
  .trust-text{font-size:9px}
  .rating-label{font-size:8px}
  .social-card{left:18px!important;bottom:18px!important;max-width:calc(100% - 36px)}
  html[dir="rtl"] .social-card{left:auto!important;right:18px!important}
  .social-link{width:38px;height:38px;flex:0 0 38px}
  .content-panels{padding-inline:7px}
  .panel-standard{min-height:0!important}
  .home-doctor-detail,.home-article-detail{grid-template-columns:1fr!important}
  .doctor-detail-photo-wrap,.home-article-detail-media{width:100%!important;max-width:none!important}
  .doctor-detail-actions{grid-template-columns:1fr!important}
  .footer-main-grid{grid-template-columns:1fr;padding:17px}
  .footer-quick-links{grid-template-columns:1fr}
  .footer-legal-line{align-items:flex-start;flex-direction:column}
  .footer-glass-card{padding:15px}
  .data-status{max-width:calc(100% - 28px);font-size:9px}
}

@media (max-width:380px){
  .slide-frame{min-height:1060px}
  .brand-link{width:132px}
  .top-right-tools{width:136px!important}
  .hero-copy{top:160px!important}
  .right-actions{top:485px!important}
  .trust-block{top:785px!important;grid-template-columns:1fr!important}
  .avatar-window{display:none!important}
}

@media (orientation:landscape) and (max-height:620px) and (max-width:980px){
  .slide-frame{min-height:720px}
  .hero-copy{top:165px!important;max-width:46%!important}
  .right-actions{left:auto!important;right:22px!important;top:190px!important;width:42%!important;grid-template-columns:1fr!important}
  .trust-block{left:22px!important;right:auto!important;top:500px!important;width:46%!important}
  .social-card{bottom:14px!important}
}

/* V94 final cross-page viewport safeguards */
*,*::before,*::after{box-sizing:border-box}
main,section,article,aside,header,footer,nav,form,fieldset{min-width:0}
input,select,textarea,button{max-width:100%}
pre,code,.article-card-copy,.service-card-copy,.program-copy,.about-record-content,.page-review-comment{overflow-wrap:anywhere;word-break:break-word}
.doctor-directory-shell,.content-directory,.about-directory,.treatment-program-directory,.service-detail-shell,.page-review-card{margin-inline:auto}
.doctor-grid,.content-grid,.service-grid,.article-grid,.gallery-grid,.program-grid,.about-record,.page-review-list{min-width:0}
.site-footer-section iframe,.footer-map-frame iframe{width:100%!important;max-width:100%!important}

@media (max-width:1024px){
  .doctor-directory,.content-directory,.about-directory,.treatment-program-directory,.service-detail-shell{width:calc(100% - 24px)!important;max-width:none!important}
  .doctor-directory-header,.service-directory-header,.about-directory-head{flex-wrap:wrap;align-items:flex-start!important}
  .doctor-directory-heading,.service-directory-summary{min-width:0;max-width:100%}
  .article-grid,.gallery-grid,.service-grid,.content-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .page-review-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media (max-width:700px){
  .doctor-directory,.content-directory,.about-directory,.treatment-program-directory,.service-detail-shell{width:calc(100% - 12px)!important;padding-inline:8px!important;border-radius:22px!important}
  .doctor-directory-header,.service-directory-header,.about-directory-head{padding-inline:10px!important}
  .doctor-search{width:100%!important;max-width:none!important}
  .doctor-grid,.article-grid,.gallery-grid,.service-grid,.content-grid,.program-grid,.about-details,.page-review-list{grid-template-columns:1fr!important}
  .content-card,.service-card,.article-card,.gallery-card,.program-card,.doctor-card,.about-record,.page-review-item{width:100%!important;max-width:100%!important}
  .page-review-compose,.page-review-card{padding-inline:10px!important}
  .page-review-actions,.service-card-actions,.article-card-actions,.program-actions{grid-template-columns:1fr!important;flex-wrap:wrap}
  dialog{max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 20px)!important}
}

@media (max-width:460px){
  .doctor-directory,.content-directory,.about-directory,.treatment-program-directory,.service-detail-shell{width:calc(100% - 8px)!important;padding-inline:5px!important}
  .doctor-directory-header,.service-directory-header,.about-directory-head{padding:13px 8px!important}
  .doctor-directory-title,.about-directory-title{font-size:clamp(22px,8vw,31px)!important}
  .doctor-card-meta-row,.cm-chat-doctor-row{grid-template-columns:minmax(78px,.68fr) minmax(0,1.32fr)!important}
}

/* V143 — keep configurable logo responsive */
@media(max-width:1180px){.brand-link{width:min(var(--brand-logo-width,250px),205px)!important;height:min(var(--brand-logo-height,70px),58px)!important}}
@media(max-width:900px){.brand-link{width:min(var(--brand-logo-width,250px),180px)!important;height:min(var(--brand-logo-height,70px),54px)!important}}
@media(max-width:680px){.brand-link{width:min(var(--brand-logo-width,250px),150px)!important;height:min(var(--brand-logo-height,70px),48px)!important}}
@media(max-width:430px){.brand-link{width:min(var(--brand-logo-width,250px),132px)!important;height:min(var(--brand-logo-height,70px),44px)!important}}
