/* ==========================================================================
   mcs-polish.css — loaded LAST, after normalize -> webflow -> site css.
   Two jobs only:
   1. Native, minimal re-implementations of the webflow.js behaviors we still
      need (mobile nav, FAQ accordion, state dropdown). NO IX2 runtime — reveal
      animations are dropped, elements render in their final visible state.
   2. POLISH-SPEC Tier 1 (mechanical): consistent hover/focus-visible states,
      long-form typographic rhythm, tap targets, image hygiene. Extends the
      existing brand CSS variables only — no new fonts, no new colours.
   ========================================================================== */

/* Parity with the live site's inline smoothing rule */
body {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 1a. Mobile nav toggle (replaces webflow w--open) ------------- */
@media screen and (max-width: 991px) {
  .nav-menu.w-nav-menu { display: none; }
  .nav-menu.w-nav-menu.mcs-nav-open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background-color: var(--wbec-dark-blue);
    padding: 18px 24px 26px;
    box-shadow: 0 12px 24px rgba(8, 38, 42, .18);
    z-index: 1000;
  }
  .menu-button { cursor: pointer; }
  /* 1.5 tap targets >= 44px on touch/mobile */
  .nav-link,
  .link-2,
  .dropdown-link,
  .b-team-social-link-large,
  .faq-title,
  .footer-meta-item a { min-height: 44px; }
}

/* ---------- 1a-2. IX2 image-reveal shim -------------------------------- */
/* On the live site the visible `.animated-image` starts at height:0 and is
   grown by webflow.js (IX2), while an opacity:0 `.animated-image-placeholder`
   sibling reserves the height. We drop both the runtime and the placeholder, so
   render the single image in normal flow at its natural size. */
.animated-image-container { min-height: 0; }
.animated-image-container .animated-image {
  position: relative;
  height: auto;
}

/* ---------- 1b. FAQ accordion (doctor profile w-dropdown) --------------- */
.faq .faq-content { display: none; }
.faq.mcs-faq-open .faq-content { display: block; }
.faq .faq-title { cursor: pointer; }
.faq .faq-icon { transition: transform .2s ease; }
.faq.mcs-faq-open .faq-icon { transform: rotate(180deg); }

/* ---------- 1c. State selector dropdown (best-cataract-surgeons) -------- */
.dropdown-2 .dropdown-list-2 { display: none; }
.dropdown-2.mcs-dd-open .dropdown-list-2 {
  display: block;
  position: absolute;
  z-index: 900;
  max-height: 60vh;
  overflow-y: auto;
}
.dropdown-2 .dropdown-toggle { cursor: pointer; }

/* ==========================================================================
   2. TIER 1 POLISH
   ========================================================================== */

/* 2.1 Smooth, consistent transitions for interactive elements */
a,
button,
.button,
.w-button,
.b-team-social-link-large,
.link-2,
.nav-link,
.blog-grid-link img,
.featured-post-image,
.image-hover {
  transition: color .15s ease, background-color .18s ease,
    border-color .18s ease, opacity .15s ease, transform .2s ease;
}

/* 2.2 Consistent, visible keyboard focus (was nearly invisible on the live
   site). Uses the brand royal blue. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.button:focus-visible,
.w-button:focus-visible,
.faq-title:focus-visible,
.menu-button:focus-visible,
.dropdown-toggle:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--wbec-royal-blue);
  outline-offset: 3px;
  border-radius: 2px;
}

/* 2.3 Hover states (consistent, low-risk) */
.nav-link:hover,
.link-2:hover,
.dropdown-link:hover,
.dropdown-link-item:hover,
.underline-link:hover { opacity: .82; }

.button:hover,
.w-button:hover { opacity: .9; }

.b-team-card-large { transition: transform .18s ease, box-shadow .2s ease; }
.b-team-card-large:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(8, 38, 42, .12);
}
.b-team-social-link-large:hover { opacity: .8; }

.blog-grid-link { overflow: hidden; }
.blog-grid-link img { transform-origin: center; }
.blog-grid-link:hover img,
.featured-post-link:hover .featured-post-image { transform: scale(1.035); }

/* 2.4 Long-form typographic rhythm (posts + doctor bios) ~70ch measure */
.location-rich,
.rich-text-block,
.mcs-longform { max-width: 72ch; }
.location-rich.align-left,
.container-large.align-center .location-rich { margin-left: auto; margin-right: auto; }
.location-rich p,
.rich-text-block p,
.mcs-longform p { line-height: 1.72; margin-bottom: 1.15em; }
.location-rich h2,
.location-rich h3,
.rich-text-block h2,
.rich-text-block h3,
.mcs-longform h2,
.mcs-longform h3 { margin-top: 1.5em; margin-bottom: .5em; }
.location-rich ul,
.location-rich ol,
.mcs-longform ul,
.mcs-longform ol { margin-bottom: 1.15em; padding-left: 1.35em; }
.location-rich li,
.mcs-longform li { margin-bottom: .45em; line-height: 1.6; }
.location-rich img { border-radius: 8px; height: auto; }

/* 2.5 Image hygiene: never overflow, keep intrinsic ratio when width/height
   attributes are set. */
img { max-width: 100%; }

/* 2.6 Footer link tap comfort */
.link-2 { padding-top: 3px; padding-bottom: 3px; }
