/*--------------------------------------------------------------
# Mannobgyn — Polish Overlay
#
# Loaded last (after mb-provider) so it wins specificity without
# resorting to !important. Preserves the Medilab v4.9.1 layout 1:1
# and only layers visual refinement, fluid type, and motion polish
# on top. Every animation respects `prefers-reduced-motion`.
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Design tokens
--------------------------------------------------------------*/
:root {
  --mb-primary: #1977cc;
  --mb-primary-600: #1668b5;
  --mb-primary-300: #5db2ff;
  --mb-accent: #3fbbc0;
  --mb-accent-600: #2fa3a8;
  --mb-ink: #1f1f1f;
  --mb-ink-soft: #444;
  --mb-muted: #727272;
  --mb-surface: #ffffff;
  --mb-surface-soft: #f5fbff;

  --mb-shadow-sm: 0 4px 12px rgba(15, 56, 100, 0.06);
  --mb-shadow-md: 0 12px 30px rgba(15, 56, 100, 0.1);
  --mb-shadow-lg: 0 22px 50px rgba(15, 56, 100, 0.16);

  --mb-radius-sm: 6px;
  --mb-radius-md: 12px;
  --mb-radius-lg: 18px;
  --mb-radius-pill: 999px;

  --mb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mb-dur-fast: 180ms;
  --mb-dur: 320ms;
  --mb-dur-slow: 520ms;

  --mb-section-pad-y: clamp(48px, 7vw, 96px);
}

/*--------------------------------------------------------------
# Fluid typography
# Smoothly scales h1–h3 mobile→desktop without breakpoint jumps.
--------------------------------------------------------------*/
h1,
.h1 {
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem);
  line-height: 1.18;
}

h2,
.h2,
.section-title h2 {
  font-size: clamp(1.55rem, 1.15rem + 1.7vw, 2.25rem);
  line-height: 1.22;
}

h3,
.h3 {
  font-size: clamp(1.2rem, 1rem + 0.9vw, 1.6rem);
  line-height: 1.3;
}

/*--------------------------------------------------------------
# Accessible focus ring (applies globally where browsers expose it)
--------------------------------------------------------------*/
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.appointment-btn:focus-visible,
#hero .btn-get-started:focus-visible,
.carousel-control-prev:focus-visible,
.carousel-control-next:focus-visible {
  outline: 3px solid rgba(25, 119, 204, 0.55);
  outline-offset: 3px;
  border-radius: var(--mb-radius-sm);
}

/*--------------------------------------------------------------
# Topbar — glassy blur once the page scrolls
--------------------------------------------------------------*/
#topbar.topbar-scrolled {
  background: rgba(25, 119, 204, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  transition: background var(--mb-dur) var(--mb-ease);
}

/*--------------------------------------------------------------
# Header — softer shadow + crisp underline once scrolled
--------------------------------------------------------------*/
/*
 * Header background fix — the upstream Medilab template ships
 *   #header { background: #fff transparent; }
 * which is a malformed rule that browsers parse as `transparent`,
 * so the logo + nav text bleed through whatever hero image is
 * behind them. Force an always-on translucent white background
 * with a subtle backdrop blur so the brand stays legible on every
 * slide. When the user scrolls past 100px, JS adds .header-scrolled
 * and we promote to a fully opaque white + elevation shadow.
 */
#header {
  background: rgba(255, 255, 255, 0.92) !important;
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(25, 119, 204, 0.08);
  box-shadow: 0 1px 0 rgba(15, 56, 100, 0.04);
  transition:
    box-shadow var(--mb-dur) var(--mb-ease),
    background var(--mb-dur) var(--mb-ease),
    border-color var(--mb-dur) var(--mb-ease);
}

#header.header-scrolled {
  background: #ffffff !important;
  box-shadow: var(--mb-shadow-md);
  border-bottom-color: rgba(25, 119, 204, 0.12);
}

/* Guarantee the logo is sharp on top of the frosted glass */
#header .logo a {
  color: var(--mb-ink);
  text-shadow: none;
}

#header .logo img {
  filter: drop-shadow(0 1px 2px rgba(15, 56, 100, 0.08));
}

/*--------------------------------------------------------------
# Active nav state — gradient pill underline + bold weight
# Walker (inc/walker-nav.php) already adds .active to the anchor
# and current-menu-item / current-menu-parent / current-menu-ancestor
# to the <li>; this block just makes those states pop on the page.
--------------------------------------------------------------*/
.navbar > ul > li > a.active,
.navbar > ul > li.current-menu-item > a,
.navbar > ul > li.current-menu-parent > a,
.navbar > ul > li.current-menu-ancestor > a,
.navbar > ul > li.current_page_item > a,
.navbar > ul > li.current_page_parent > a,
.navbar > ul > li.current_page_ancestor > a {
  color: var(--mb-primary) !important;
  font-weight: 700;
  border-bottom-color: transparent !important;
  position: relative;
}

.navbar > ul > li > a.active::after,
.navbar > ul > li.current-menu-item > a::after,
.navbar > ul > li.current-menu-parent > a::after,
.navbar > ul > li.current-menu-ancestor > a::after,
.navbar > ul > li.current_page_item > a::after,
.navbar > ul > li.current_page_parent > a::after,
.navbar > ul > li.current_page_ancestor > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--mb-primary), var(--mb-accent));
  box-shadow: 0 1px 4px rgba(25, 119, 204, 0.32);
}

/* Hover — single border-bottom line only (matches original static-site design).
   No ::after is used for hover; only the active/current state uses ::after.
   The border-bottom color change is handled by style.css (.navbar a:hover). */
.navbar > ul > li > a:hover {
  color: var(--mb-primary);
}

/* Dropdown children — highlight the current service in the SERVICES dropdown */
.navbar .dropdown ul li.current-menu-item > a,
.navbar .dropdown ul li.current_page_item > a {
  color: var(--mb-primary);
  font-weight: 600;
  background: linear-gradient(90deg, rgba(63, 187, 192, 0.08), rgba(25, 119, 204, 0.06));
  border-left: 3px solid var(--mb-primary);
  padding-left: 17px; /* compensate for 3px border so text stays aligned */
}

/* Mobile nav active state — pill instead of underline (cramped vertical layout) */
.navbar-mobile > ul > li > a.active,
.navbar-mobile > ul > li.current-menu-item > a,
.navbar-mobile > ul > li.current-menu-parent > a,
.navbar-mobile > ul > li.current-menu-ancestor > a {
  color: var(--mb-primary) !important;
  background: linear-gradient(90deg, rgba(25, 119, 204, 0.08), rgba(63, 187, 192, 0.05));
  border-left: 4px solid var(--mb-primary);
  padding-left: 16px;
  font-weight: 700;
}

/* Reduced motion — drop the transitions */
@media (prefers-reduced-motion: reduce) {
  #header,
  .navbar a,
  .navbar a::after {
    transition: none !important;
  }
}

/*--------------------------------------------------------------
# Buttons — refined gradient + shimmer + lift
--------------------------------------------------------------*/
.appointment-btn,
#hero .btn-get-started {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--mb-accent) 0%, var(--mb-primary) 100%);
  border: 0;
  box-shadow: 0 6px 16px rgba(63, 187, 192, 0.25);
  transition:
    transform var(--mb-dur) var(--mb-ease),
    box-shadow var(--mb-dur) var(--mb-ease),
    background-position var(--mb-dur) var(--mb-ease);
  background-size: 200% 200%;
  background-position: 0% 50%;
}

.appointment-btn::after,
#hero .btn-get-started::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
  transform: translateX(-110%);
  transition: transform var(--mb-dur-slow) var(--mb-ease);
  pointer-events: none;
}

.appointment-btn:hover,
#hero .btn-get-started:hover {
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(25, 119, 204, 0.28);
}

.appointment-btn:hover::after,
#hero .btn-get-started:hover::after {
  transform: translateX(110%);
}

/*--------------------------------------------------------------
# Hero carousel — bottom-fade, pill indicators, smoother fade
--------------------------------------------------------------*/
#hero .carousel-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

#hero .carousel-inner .active,
#hero .carousel-inner .carousel-item-next.carousel-item-start,
#hero .carousel-inner .carousel-item-prev.carousel-item-end {
  transition: opacity 1.2s var(--mb-ease);
}

#hero .carousel-indicators {
  bottom: 24px;
}

#hero .carousel-indicators li,
#hero .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  margin: 0 6px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--mb-radius-pill);
  transition:
    width var(--mb-dur) var(--mb-ease),
    background var(--mb-dur) var(--mb-ease),
    opacity var(--mb-dur) var(--mb-ease);
}

#hero .carousel-indicators li.active,
#hero .carousel-indicators [data-bs-target].active {
  width: 28px;
  background: var(--mb-accent);
  border-color: var(--mb-accent);
  opacity: 1;
}

/*--------------------------------------------------------------
# Service cards (.single_department) — clipped corners, layered
# shadow, image zoom, "Learn More" arrow slides on hover
--------------------------------------------------------------*/
.our_department_area .single_department {
  border-radius: var(--mb-radius-md);
  overflow: hidden;
  box-shadow: var(--mb-shadow-sm);
  transition:
    transform var(--mb-dur) var(--mb-ease),
    box-shadow var(--mb-dur) var(--mb-ease);
}

.our_department_area .single_department:hover {
  transform: translateY(-6px);
  box-shadow: var(--mb-shadow-lg);
}

.our_department_area .single_department .department_thumb {
  border-radius: 0;
}

.our_department_area .single_department .department_content a.learn_more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.our_department_area .single_department .department_content a.learn_more::after {
  content: "\2192";
  display: inline-block;
  transition: transform var(--mb-dur) var(--mb-ease);
}

.our_department_area .single_department:hover .department_content a.learn_more {
  text-decoration: none;
}

.our_department_area .single_department:hover .department_content a.learn_more::after {
  transform: translateX(6px);
}

/*--------------------------------------------------------------
# Services icon-box variant (homepage grid) — also gets a lift
--------------------------------------------------------------*/
.services .icon-box {
  border-radius: var(--mb-radius-md);
  transition:
    transform var(--mb-dur) var(--mb-ease),
    box-shadow var(--mb-dur) var(--mb-ease);
}

.services .icon-box:hover {
  transform: translateY(-6px);
  box-shadow: var(--mb-shadow-md);
}

/*--------------------------------------------------------------
# Doctor cards (.member) — circular pic with gradient ring on hover
--------------------------------------------------------------*/
.doctors .member {
  border-radius: var(--mb-radius-md);
  transition:
    transform var(--mb-dur) var(--mb-ease),
    box-shadow var(--mb-dur) var(--mb-ease);
}

.doctors .member:hover {
  transform: translateY(-4px);
  box-shadow: var(--mb-shadow-md);
}

.doctors .member .pic {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  isolation: isolate;
}

.doctors .member .pic::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--mb-accent), var(--mb-primary), var(--mb-accent));
  opacity: 0;
  z-index: -1;
  transition: opacity var(--mb-dur) var(--mb-ease);
}

.doctors .member:hover .pic::before {
  opacity: 1;
}

.doctors .member .pic img {
  border-radius: 50%;
  transition: transform var(--mb-dur-slow) var(--mb-ease);
}

.doctors .member:hover .pic img {
  transform: scale(1.04);
}

/* "Photo coming soon" placeholder treatment */
.doctors .member--placeholder .pic {
  isolation: isolate;
}

.doctors .member--placeholder .pic svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 50%;
  filter: drop-shadow(0 2px 6px rgba(15, 50, 75, 0.08));
}

.doctors .member--placeholder .pic .pic-badge {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(135deg, var(--mb-primary), var(--mb-accent));
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(15, 50, 75, 0.18);
  white-space: nowrap;
  z-index: 2;
}

.doctors .member--placeholder .member-info h4 {
  color: var(--mb-ink);
}

.doctors .member--placeholder .member-info h4::after {
  content: " · TBA";
  font-size: 0.72em;
  font-weight: 500;
  color: var(--mb-muted);
  letter-spacing: 0.04em;
}

.doctors .member--placeholder:hover .pic::before {
  opacity: 0.6;
}

/*--------------------------------------------------------------
# About / Why-Us icon-boxes — subtle hover lift
--------------------------------------------------------------*/
.about .icon-box,
.why-us .icon-boxes .icon-box {
  border-radius: var(--mb-radius-md);
  transition:
    transform var(--mb-dur) var(--mb-ease),
    box-shadow var(--mb-dur) var(--mb-ease),
    background var(--mb-dur) var(--mb-ease);
}

.about .icon-box:hover,
.why-us .icon-boxes .icon-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--mb-shadow-md);
}

/*--------------------------------------------------------------
# Forms — nicer focus state, larger touch targets, branded states
--------------------------------------------------------------*/
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="date"],
form input[type="number"],
form select,
form textarea {
  min-height: 44px;
  border-radius: var(--mb-radius-sm);
  transition:
    border-color var(--mb-dur-fast) var(--mb-ease),
    box-shadow var(--mb-dur-fast) var(--mb-ease);
}

form textarea {
  min-height: 120px;
}

form input:focus,
form select:focus,
form textarea:focus {
  border-color: var(--mb-primary);
  box-shadow: 0 0 0 4px rgba(25, 119, 204, 0.12);
}

form .sent-message {
  background: rgba(63, 187, 192, 0.1);
  color: var(--mb-accent-600);
  border: 1px solid rgba(63, 187, 192, 0.35);
  border-radius: var(--mb-radius-sm);
  padding: 12px 16px;
}

form .error-message {
  background: rgba(220, 53, 69, 0.08);
  color: #b02a37;
  border: 1px solid rgba(220, 53, 69, 0.3);
  border-radius: var(--mb-radius-sm);
  padding: 12px 16px;
}

/*--------------------------------------------------------------
# FAQ — smoother accordion, chevron rotate
--------------------------------------------------------------*/
.faq .faq-list-women-exam li {
  transition:
    box-shadow var(--mb-dur) var(--mb-ease),
    transform var(--mb-dur) var(--mb-ease);
  box-shadow: var(--mb-shadow-sm);
}

.faq .faq-list-women-exam li:hover {
  transform: translateY(-2px);
  box-shadow: var(--mb-shadow-md);
}

.faq .faq-list-women-exam .icon-show,
.faq .faq-list-women-exam .icon-close {
  transition: transform var(--mb-dur) var(--mb-ease);
}

.faq .faq-list-women-exam a:not(.collapsed) .icon-close {
  transform: rotate(180deg);
}

/*--------------------------------------------------------------
# Footer — subtle gradient top edge, social-icon hover lift
--------------------------------------------------------------*/
#footer {
  position: relative;
}

#footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--mb-accent) 0%, var(--mb-primary) 50%, var(--mb-accent) 100%);
}

#footer .footer-top .social-links a {
  transition:
    transform var(--mb-dur) var(--mb-ease),
    background var(--mb-dur) var(--mb-ease);
}

#footer .footer-top .social-links a:hover {
  transform: translateY(-3px);
}

/*--------------------------------------------------------------
# Scroll-reveal — opt-in via [data-mb-reveal] + main.js observer
--------------------------------------------------------------*/
[data-mb-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--mb-dur-slow) var(--mb-ease),
    transform var(--mb-dur-slow) var(--mb-ease);
  will-change: opacity, transform;
}

[data-mb-reveal].mb-in-view {
  opacity: 1;
  transform: none;
}

/*--------------------------------------------------------------
# Sticky mobile CTA bar — visible <992px so the practice's two
# top conversions ("Call" + "Book Appointment") are one tap away
--------------------------------------------------------------*/
.mb-mobile-cta {
  display: none;
}

@media (max-width: 991.98px) {
  .mb-mobile-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: rgba(25, 119, 204, 0.18);
    box-shadow: 0 -8px 20px rgba(15, 56, 100, 0.12);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .mb-mobile-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 12px;
    min-height: 52px;
    font-family: "Raleway", sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    text-decoration: none;
    background: var(--mb-primary);
    transition:
      background var(--mb-dur-fast) var(--mb-ease),
      transform var(--mb-dur-fast) var(--mb-ease);
  }

  .mb-mobile-cta a + a {
    background: var(--mb-accent);
  }

  .mb-mobile-cta a:hover,
  .mb-mobile-cta a:focus-visible {
    background: var(--mb-primary-600);
  }

  .mb-mobile-cta a + a:hover,
  .mb-mobile-cta a + a:focus-visible {
    background: var(--mb-accent-600);
  }

  .mb-mobile-cta i {
    font-size: 1.1rem;
  }

  /* Make sure floating widgets and footer don't sit behind the CTA bar. */
  body {
    padding-bottom: 60px;
  }

  .back-to-top {
    bottom: 75px;
  }
}

/*--------------------------------------------------------------
# Reduced-motion opt-out — full kill switch for animations
--------------------------------------------------------------*/
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-mb-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .appointment-btn::after,
  #hero .btn-get-started::after {
    display: none;
  }
}

/*--------------------------------------------------------------
# Hero Breadcrumb Band (.mb-hero-breadcrumb)
# Mirrors the original static site's .about-us-banner/.page-banner
# design: full-width image, large uppercase page title, trail below.
--------------------------------------------------------------*/
.mb-hero-breadcrumb {
  padding-top: 120px; /* clear fixed header + topbar */
  overflow: hidden;
}

@media (max-width: 992px) {
  .mb-hero-breadcrumb {
    padding-top: 100px;
  }
}

.mb-hero-banner {
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  padding: 80px 0 50px;
  position: relative;
}

/* Subtle dark-to-transparent overlay so text stays legible on any image */
.mb-hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.72) 100%);
  pointer-events: none;
}

.mb-hero-banner .container {
  position: relative;
  z-index: 1;
}

.mb-page-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #2c4964;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
  font-family: "Raleway", sans-serif;
}

.mb-page-trail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4a5666;
}

.mb-page-trail a {
  color: var(--mb-primary, #1977cc);
  text-decoration: none;
  transition: color 0.2s;
}

.mb-page-trail a:hover {
  color: var(--mb-accent, #3fbbc0);
  text-decoration: none;
}

.mb-trail-sep {
  color: #8a9ab0;
  font-weight: 300;
  margin: 0 2px;
}

@media (max-width: 576px) {
  .mb-hero-banner {
    padding: 50px 0 32px;
  }
}

/*--------------------------------------------------------------
# Map embed block — mirrors the static site's custom-titled map.
#
# Structure (generated by mb_render_map() in helpers.php):
#   .map-embed-wrap
#     .map-title-bar             ← dark header with avatar + practice name
#       .map-title-avatar        ← purple "JN" circle
#       .map-title-text
#         .map-title-main        ← specialty line
#         .map-title-sub         ← practice name in small caps
#     .map-inner-frame           ← crops the iframe and hosts the overlay
#       iframe                   ← pulled up so the Google header is off-screen
#       .map-embed-overlay       ← white strip hides the bottom attribution bar
#
# All positioning uses CSS classes so wp_kses cannot strip anything.
--------------------------------------------------------------*/
.map-embed-wrap {
  width: 100%;
}

/* Dark title bar above the map */
.map-title-bar {
  background: #1f1f1f;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px 8px 0 0;
  font-family: Arial, sans-serif;
}

/* Purple "JN" circle */
.map-title-avatar {
  background: #6a1b9a;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.map-title-text {
  display: flex;
  flex-direction: column;
}

.map-title-main {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.map-title-sub {
  font-size: 11px;
  color: #aaaaaa;
  margin-top: 2px;
}

/* Crops the oversized iframe; acts as the containing block for the overlay */
.map-inner-frame {
  position: relative;
  width: 100%;
  height: 450px;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
}

/* Iframe taller than the frame and shifted up to hide the Google header bar */
.map-inner-frame iframe {
  position: absolute;
  top: -70px;
  left: 0;
  width: 100%;
  height: 520px;
  border: 0;
  display: block;
}

/* White strip that masks the "This map was made with Google My Maps" line */
.map-embed-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 32px;
  background: #ffffff;
  z-index: 10;
  pointer-events: none;
}
