/* MWhite Clinic — P01-K2W-M shared visual contract.
   Loaded LAST on both authenticated and public layouts.
   Keep page identity, CMS semantics, SEO, image copyrights and noindex gates unchanged.
   Purpose: one consistent geometry, font and brand palette across all site pages. */
:root {
  --mw-layout-max: 1360px;
  --mw-layout-gutter: clamp(18px, 3vw, 40px);
  --mw-layout-radius: 29px;
  --mw-layout-radius-small: 20px;
  --mw-type-family: "Helvetica Neue", Helvetica, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mw-type-xl: clamp(2.75rem, 5vw, 5rem);
  --mw-type-h2: clamp(2.15rem, 3.6vw, 3.55rem);
  --mw-blue-action: #247fb9;
  --mw-blue-soft: #eff9fe;
  --mw-title-color: #243f58;
  --mw-body-color: #455d71;
}
body {
  font-family: var(--mw-type-family);
  font-size: 16px;
  line-height: 1.65;
  color: var(--mw-body-color);
  background: #fff;
}
.mw-container {
  width: min(calc(100% - (2 * var(--mw-layout-gutter))), var(--mw-layout-max));
  max-width: none;
  margin-inline: auto;
}
.mw-nav-shell {
  width: min(calc(100% - (2 * var(--mw-layout-gutter))), var(--mw-layout-max));
  max-width: none;
  padding-inline: 0;
  margin-inline: auto;
}
.mw-display,
.mw-section-heading h2,
.mw-services-hero h1,
.mw-listing-intro h1,
.mw-contact-hero h1,
.mw-service-feature-copy h2 {
  font-family: var(--mw-type-family);
  font-weight: 750;
  color: var(--mw-title-color);
  letter-spacing: -.052em;
  line-height: 1.09;
}
.mw-kicker {
  color: var(--mw-blue-action);
  font-family: var(--mw-type-family);
  font-size: .74rem;
  font-weight: 750;
  letter-spacing: .145em;
}
.mw-display,
.mw-services-hero h1,
.mw-listing-intro h1,
.mw-contact-hero h1 {
  text-wrap: balance;
}
.mw-hero-carousel,
.mw-services-hero {
  width: min(calc(100% - (2 * var(--mw-layout-gutter))), var(--mw-layout-max));
  max-width: none;
  margin: 20px auto 0;
  border-radius: var(--mw-layout-radius);
  overflow: hidden;
}
.mw-services-hero {
  min-height: 545px;
  box-shadow: 0 22px 52px rgba(30,90,135,.07);
}
.mw-services-hero .mw-container.mw-services-hero-content {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  padding: clamp(46px, 5vw, 65px) clamp(30px, 4.2vw, 62px);
  box-sizing: border-box;
}
.mw-hero-carousel .mw-hero-inner,
.mw-hero-carousel .mw-carousel-controls {
  width: 100%;
  max-width: none;
}
.mw-hero-carousel .mw-hero-inner {
  padding-inline: clamp(30px, 4.2vw, 62px);
}
.mw-services-hero h1,
.mw-listing-intro h1,
.mw-hero-carousel .mw-display,
.mw-contact-hero h1 {
  font-size: var(--mw-type-xl);
  font-weight: 750;
  line-height: 1.07;
  letter-spacing: -.058em;
}
.mw-services-hero h1 {
  max-width: 13ch;
}
.mw-listing-intro {
  margin: 20px 0 26px;
  width: 100%;
  min-width: 0;
  border-radius: var(--mw-layout-radius);
  padding: clamp(48px, 5.1vw, 76px) clamp(30px, 4.2vw, 62px);
  background: linear-gradient(112deg, #fff 0%, #eff9fe 75%, #f2fcfd);
}
.mw-listing-intro h1 {
  max-width: 23ch;
}
.mw-listing-intro p {
  max-width: 66ch;
  color: #526d81;
  line-height: 1.7;
}
.mw-section-heading h2,
.mw-service-feature-copy h2 {
  font-size: var(--mw-type-h2);
}
.mw-services-redesign {
  padding-top: clamp(38px, 4.4vw, 65px) !important;
}
.mw-service-feature {
  border-radius: var(--mw-layout-radius);
}
.mw-contact-hero {
  border-radius: var(--mw-layout-radius);
}
.mw-button,
.mw-service-jumps a,
.mw-footer-primary,
.mw-footer-secondary,
.mw-nav-links .mw-nav-accent {
  font-family: var(--mw-type-family);
  font-weight: 700;
  border-radius: 999px;
}
.mw-button:not(.mw-button-outline),
.mw-footer-primary,
.mw-nav-links .mw-nav-accent {
  background: var(--mw-blue-action);
  border-color: var(--mw-blue-action);
}
.mw-button-outline,
.mw-footer-secondary {
  color: var(--mw-blue-action);
}
.mw-card,
.mw-clinic-location,
.mw-location-map-entry {
  border-radius: var(--mw-layout-radius-small);
}
@media(max-width:900px) {
  .mw-hero-carousel .mw-hero-inner {
    padding-inline: clamp(25px, 4vw, 40px);
  }
  .mw-services-hero .mw-container.mw-services-hero-content {
    padding-inline: clamp(25px, 4vw, 40px);
  }
}
@media(max-width:700px) {
  :root {
    --mw-layout-gutter: 16px;
    --mw-layout-radius: 21px;
    --mw-layout-radius-small: 17px;
    --mw-type-xl: clamp(2.5rem, 9vw, 3.5rem);
    --mw-type-h2: clamp(2rem, 7.5vw, 2.9rem);
  }
  .mw-nav-shell { padding-inline: 0; }
  .mw-hero-carousel,
  .mw-services-hero {
    margin-top: 14px;
  }
  .mw-hero-carousel .mw-hero-inner {
    padding-inline: 22px;
  }
  .mw-services-hero {
    min-height: 420px;
  }
  .mw-services-hero .mw-container.mw-services-hero-content {
    padding: 38px 22px 40px;
  }
  .mw-listing-intro {
    margin-top: 14px;
    padding: 40px 24px;
  }
  .mw-services-hero h1,
  .mw-listing-intro h1,
  .mw-contact-hero h1 {
    max-width: 100%;
  }
}
@media(prefers-reduced-motion: reduce) {
  .mw-hero-carousel,
  .mw-services-hero,
  .mw-listing-intro {
    scroll-behavior: auto;
  }
}

/* Identical computed H1 font stack and scale across every hero.
   Selector specificity intentionally exceeds older immersive templates. */
.mw-hero-carousel .mw-hero-slide h1.mw-display,
.mw-services-hero h1.mw-display,
.mw-listing-intro h1.mw-display,
.mw-contact-hero h1.mw-display {
  font-family: var(--mw-type-family);
  font-size: var(--mw-type-xl);
  font-weight: 750;
  letter-spacing: -.058em;
  line-height: 1.07;
}

/* Owner's postrelease visual refinement: keep three columns and two rows,
   with more breathing room while preserving the surrounding section. */
.mw-home-doctor-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  width: 63%;
  max-width: 100%;
  margin-inline: auto;
  gap: clamp(18px, 1.7vw, 24px);
}
.mw-home-doctor-grid .mw-card-media img {
  object-position: center top;
}
.mw-home-doctor-grid .mw-card-content {
  padding: clamp(16px, 1.35vw, 20px);
}
.mw-home-doctor-grid .mw-list-card-title {
  font-size: clamp(0.95rem, 1.1vw, 1.08rem);
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.mw-home-doctor-grid .mw-card-content > p {
  font-size: 0.85rem;
  line-height: 1.5;
}
.mw-home-doctor-grid .mw-text-link {
  font-size: 0.86rem;
}
/* Only the doctor directory: avoid the excessive gap after its intro banner. */
.mw-doctor-directory > .mw-section {
  padding-top: clamp(10px, 1.5vw, 22px);
}
.mw-doctor-directory > .mw-section > .mw-card-grid {
  margin-top: 12px;
}
@media (max-width: 900px) {
  .mw-home-doctor-grid {
    width: min(100%, 680px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}
@media (max-width: 590px) {
  .mw-home-doctor-grid {
    width: min(100%, 350px);
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* Operational permits: readable over the first hero image and shown beside each branch. */
.mw-hero-carousel .mw-hero-slide:first-child .mw-hero-sio {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(4, 30, 51, .83);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .85);
  font-size: .8rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.mw-hero-carousel .mw-hero-slide:first-child .mw-hero-sio strong {
  color: #fff;
  font-weight: 750;
}
.mw-footer-redesign .mw-footer-branch .mw-footer-branch-sio {
  margin: 0;
  color: #244e68;
  font-size: .83rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.mw-footer-redesign .mw-footer-branch .mw-footer-branch-sio strong {
  color: #244e68;
  font-weight: 700;
}

/* P4: Guarantee the hidden attribute wins over authored display rules. */
.mw-hero-carousel [data-mw-slide][hidden] { display: none !important; }


/* P4 production correction: independent player panel, not full-bleed overlay.
   Branded text in the generated poster no longer overlaps the HTML headline. */
.mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) {
  background: linear-gradient(115deg, #082c49 0%, #10466b 100%);
}
.mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) .mw-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(24px, 3.5vw, 60px);
  min-height: clamp(530px, 62vh, 760px);
  padding: clamp(44px, 5vw, 78px) clamp(28px, 5vw, 72px) 98px;
}
.mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) .mw-hero-inner::after { display: none; }
.mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) .mw-hero-copy {
  width: 100%; max-width: 570px; padding: 0; z-index: 2;
}
.mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) .mw-display {
  font-size: clamp(2.5rem, 4.15vw, 4.55rem);
  max-width: 14ch;
  line-height: 1.04;
}
.mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) .mw-hero-photo {
  position: relative !important;
  inset: auto !important;
  z-index: 1; width: 100%; height: auto; min-height: 0;
  margin: 0; aspect-ratio: 16 / 9;
  overflow: hidden; isolation: isolate; border-radius: 20px;
  background: #091e31; box-shadow: 0 18px 45px rgba(0,0,0,.19);
}
.mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) .mw-hero-photo::before,
.mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) .mw-hero-photo-badge { display: none; }
.mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) .mw-hero-video {
  position: relative !important; inset: auto !important;
  width: 100% !important; height: 100% !important;
  max-height: none !important; min-height: 0 !important;
  display: block; object-fit: contain; border-radius: 20px;
  background: #091e31;
}
@media (max-width: 900px) {
  .mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) .mw-hero-inner {
    grid-template-columns: 1fr; gap: 24px;
    min-height: 0; padding: 34px 24px 88px;
  }
  .mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) .mw-hero-copy { max-width: none; }
  .mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) .mw-hero-photo {
    max-width: 760px; margin-inline: auto;
  }
  .mw-hero-carousel .mw-hero-slide:has(video[data-mw-hero-video]) .mw-display {
    font-size: clamp(2.35rem, 6.5vw, 3.9rem);
  }
}

/* Legal trust and portrait-safe founder imagery; never crop drg. Monica's face. */
.mw-footer-redesign .mw-footer-location-group > .mw-footer-legal-lead {
  grid-column: 1 / -1; margin: 0 0 4px; max-width: 74ch;
  color: #355c74; font-size: .83rem; line-height: 1.6;
}
.mw-footer-redesign .mw-footer-legal-lead strong {color: #163a52;}
.mw-clinic-legal-summary {
  max-width: 78ch; padding: 12px 16px;
  border-left: 3px solid #3387c1; border-radius: 0 12px 12px 0;
  background: #edf7fc; color: #244a62; line-height: 1.65;
}
.mw-doctor-featured .mw-card-media {
  display: flex; justify-content: center; align-items: center;
  aspect-ratio: 4 / 3; background: #eff8fb;
}
.mw-doctor-featured .mw-card-media img {
  display: block; width: 100% !important; height: 100% !important;
  object-fit: contain !important; object-position: center center !important;
  transform: none !important;
}
.mw-clinic-detail .mw-detail-media.mw-monica-portrait {
  display: flex; justify-content: center; align-items: center;
  max-width: min(100%, 820px); min-height: 0; height: auto;
  margin-inline: auto; overflow: hidden; background: #eff8fb;
}
.mw-clinic-detail .mw-detail-media.mw-monica-portrait img {
  display: block; width: 100% !important; height: auto !important;
  max-height: 780px; object-fit: contain !important;
  object-position: center center !important;
}
@media(max-width: 590px) {
  .mw-clinic-detail .mw-detail-media.mw-monica-portrait img {max-height: none;}
}

/* Public legal copy in first hero slide: compact and readable at all widths. */
.mw-hero-carousel .mw-hero-slide:first-child .mw-hero-sio {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px; max-width: min(100%, 560px);
  padding: 8px 11px; margin-top: 10px;
  font-size: clamp(.65rem, .74vw, .77rem); line-height: 1.35;
}
.mw-hero-carousel .mw-hero-slide:first-child .mw-hero-sio > span {
  display: block; max-width: 100%;
}
.mw-hero-carousel .mw-hero-slide:first-child .mw-hero-legal-heading {
  color: #fff; font-weight: 750; letter-spacing: .01em;
}
@media (max-width: 590px) {
  .mw-hero-carousel .mw-hero-slide:first-child .mw-hero-sio {
    padding: 8px 10px; gap: 3px; font-size: .65rem; line-height: 1.35;
  }
}
