:root {
	--mpo-navy: #082444;
	--mpo-navy-2: #0A2C57;
	--mpo-pink: #B54B7A;
	--mpo-pink-hover: #9C3D66;
	--mpo-coral: #F08C9E;
	--mpo-sky: #4FC0F0;
	--mpo-blue: #1C8FD6;
	--mpo-muted: #4C6B85;
	--mpo-line: #DCE7F0;
	--mpo-font: 'Instrument Sans', system-ui, sans-serif;
	--mpo-display: 'Manrope', sans-serif;
	--mpo-serif: 'Instrument Serif', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #FFFFFF; -webkit-font-smoothing: antialiased; font-family: var(--mpo-font); color: var(--mpo-navy); }
[id] { scroll-margin-top: 84px; }
a { color: #0A2C57; text-decoration: none; }
a:not([class]):hover { color: #9C3D66; }
@keyframes mpo-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes mpo-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.mpo-grain { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 220px 220px; }

.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Accessibility: skip link + focus rings (navy on light, white or sky on dark/colored areas) */
.mpo-skip { position: fixed; left: 16px; top: 12px; z-index: 100; transform: translateY(-200%); background: #082444; color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.mpo-skip:focus { transform: none; outline: 3px solid #4FC0F0; outline-offset: 3px; color: #fff; }
:focus-visible { outline: 3px solid #0A2C57; outline-offset: 3px; }
.mpo-topbar :focus-visible, .mpo-footer :focus-visible, .mpo-refer__box :focus-visible { outline-color: #4FC0F0; }
.mpo-hero :focus-visible, .mpo-cleared-box :focus-visible, .mpo-partner__box :focus-visible { outline-color: #fff; }
.mpo-float-cta:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px #082444, 0 14px 36px rgba(8, 36, 68, 0.35); }
.mpo-nav .mpo-svc-link:focus-visible { outline-offset: -3px; }
[id="main"]:focus { outline: none; }

/* Shared */
.mpo-container { max-width: 1280px; margin: 0 auto; }
.mpo-eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #B54B7A; }
.mpo-h2 { font-family: var(--mpo-display); font-size: 44px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; margin: 0; }
.mpo-serif-em { font-family: var(--mpo-serif); font-style: italic; font-weight: 400; }
.mpo-pulse { animation: mpo-pulse 1.6s ease-in-out 3; }

/* Keeps "Pre-Op" etc. from breaking at the hyphen in headings (inc/content-filters.php) */
.nowrap { white-space: nowrap; }

/* Phone pair (mpo_phone_pair() / [mpo_phones]): English and Spanish lines, small language label, own language first.
   Each line stays whole; the pair wraps between the two lines (inline) or shows one per line (stack). */
.mpo-phone { white-space: nowrap; }
.mpo-phone__lang { font-size: 0.8em; font-weight: 600; opacity: 0.8; }
.mpo-phones .mpo-phone > a[href^="tel:"] { display: inline; }
.mpo-phones__sep { margin: 0 0.15em; opacity: 0.6; }
.mpo-phones--stack, .mpo-phones--stack .mpo-phone { display: block; }
.mpo-phones--stack .mpo-phone + .mpo-phone { margin-top: 0.2em; }

/* Ripple CTA: the pink "Book" buttons in heroes (home + block heroes) and the insurance callout button (mypreop-core).
   Two rings grow from the pill edge and fade, looping like a drop hitting water (transform/opacity only).
   site.js (initRipple) sets --mpo-ripple-sx/-sy per button so the rings grow 14px per side at any label length (the
   fallback scale below assumes a ~230x56 pill). Neighbors need a gap of at least ~20px. --mpo-cta-ring sets the color. */
:is(.mpo-hero-cta, .mpo-hero .wp-block-button.is-style-cta .wp-block-button__link, .mpo-callout a.mpo-callout-btn) { position: relative; isolation: isolate; }
:is(.mpo-hero-cta, .mpo-hero .wp-block-button.is-style-cta .wp-block-button__link, .mpo-callout a.mpo-callout-btn)::before,
:is(.mpo-hero-cta, .mpo-hero .wp-block-button.is-style-cta .wp-block-button__link, .mpo-callout a.mpo-callout-btn)::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; border: 2px solid var(--mpo-cta-ring, rgba(240, 140, 158, 0.6)); pointer-events: none; opacity: 0; animation: mpo-ripple 2.4s ease-out infinite; }
:is(.mpo-hero-cta, .mpo-hero .wp-block-button.is-style-cta .wp-block-button__link, .mpo-callout a.mpo-callout-btn)::after { animation-delay: 1.2s; }
@keyframes mpo-ripple { from { transform: scale(1); opacity: 0.7; } to { transform: scale(var(--mpo-ripple-sx, 1.12), var(--mpo-ripple-sy, 1.45)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
	:is(.mpo-hero-cta, .mpo-hero .wp-block-button.is-style-cta .wp-block-button__link, .mpo-callout a.mpo-callout-btn)::before,
	:is(.mpo-hero-cta, .mpo-hero .wp-block-button.is-style-cta .wp-block-button__link, .mpo-callout a.mpo-callout-btn)::after { content: none; animation: none; }
}

/* Media placeholder (mpo_placeholder) */
.mpo-ph { position: absolute; inset: 0; border-radius: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px; text-align: center; }
.mpo-ph-badge { background: #B54B7A; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 8px 16px; border-radius: 999px; }
.mpo-ph-text { background: rgba(8, 36, 68, 0.4); padding: 3px 10px; border-radius: 8px; font-size: 16px; line-height: 1.5; color: #fff; max-width: 22em; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.mpo-ph--video { gap: 12px; padding: 20px; }
.mpo-ph--video .mpo-ph-badge { font-size: 12px; padding: 7px 14px; }
.mpo-ph--video .mpo-ph-text { font-weight: 600; line-height: 1.45; max-width: none; }
.mpo-ph-play { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); }
.mpo-ph-play::before { content: ''; width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid #082444; margin-left: 4px; }

/* Top bar */
.mpo-topbar { background: #061B33; color: #C6DEF0; font-size: 13px; }
.mpo-topbar-in { max-width: 1280px; margin: 0 auto; padding: 9px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.mpo-topbar-links { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: center; }
.mpo-topbar a { color: #C6DEF0; }
.mpo-topbar-fax { opacity: 0.55; }

/* Header */
.mpo-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid #DCE7F0; }
.mpo-header-in { max-width: 1280px; margin: 0 auto; padding: 14px 32px; display: flex; align-items: center; gap: 18px; }
.mpo-logo { display: flex; align-items: center; flex-shrink: 0; }
.mpo-logo img { height: 38px; width: auto; display: block; }
.mpo-nav { display: flex; align-items: center; gap: 16px; font-size: 15px; font-weight: 500; margin-left: auto; white-space: nowrap; min-width: 0; }
.mpo-nav a { color: #082444; }
.mpo-nav a, .mpo-svc-btn { min-height: 24px; display: inline-flex; align-items: center; }
.mpo-nav-item { position: relative; }
.mpo-svc-btn { font: inherit; color: #082444; background: none; border: 0; padding: 0; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.mpo-svc-caret { display: inline-flex; flex-shrink: 0; width: 12px; height: 12px; color: currentColor; transition: transform 0.2s ease, color 0.2s ease; }
.mpo-svc-caret svg { display: block; width: 100%; height: 100%; }
.mpo-svc-btn[aria-expanded="true"] .mpo-svc-caret { transform: rotate(180deg); }
.mpo-svc-btn:hover .mpo-svc-caret, .mpo-svc-btn.is-current .mpo-svc-caret { color: #B54B7A; }
.mpo-svc-menu { position: absolute; top: 32px; left: -18px; width: 320px; background: #fff; border: 1px solid #DCE7F0; border-radius: 14px; box-shadow: 0 18px 44px rgba(14, 47, 60, 0.13); padding: 10px; display: flex; flex-direction: column; gap: 2px; white-space: normal; }
.mpo-svc-menu[hidden] { display: none; }
/* Hover bridge: covers the gap between the toggle and the dropdown so moving the mouse down doesn't close it. */
.mpo-header-in > .mpo-nav .mpo-svc-menu::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: 12px; }
.mpo-nav .mpo-svc-link { padding: 9px 12px; border-radius: 9px; font-size: 14.5px; color: #33587D; }
.mpo-nav .mpo-svc-link:hover { background: #EAF6FC; color: #0A2C57; }
.mpo-nav a[aria-current="page"], .mpo-svc-btn.is-current { color: #B54B7A; font-weight: 600; }
/* Language switcher: USA / Spain flags (mpo_flag_svg). Active = full color + navy ring; the other is dimmed until hover/focus. */
.mpo-lang { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.mpo-lang a { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; padding: 0; border-radius: 8px; opacity: 0.55; transition: opacity 0.15s; }
.mpo-lang a:hover, .mpo-lang a:focus-visible, .mpo-lang a[aria-current] { opacity: 1; }
.mpo-flag { display: block; width: 22px; height: 16px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(8, 36, 68, 0.15); }
/* Active: 2px gap in the header/panel background (both white), then a 1px soft navy hairline. */
.mpo-lang a[aria-current] .mpo-flag { box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(8, 36, 68, 0.35); }
.mpo-pill { background: #B54B7A; color: #fff; padding: 12px 24px; border-radius: 999px; font-size: 15px; font-weight: 600; flex-shrink: 0; white-space: nowrap; }
.mpo-pill:hover { background: #9C3D66; color: #fff; }
.mpo-burger { display: none; margin-left: auto; width: 44px; height: 44px; flex-shrink: 0; border: 1px solid #DCE7F0; border-radius: 12px; background: #fff; cursor: pointer; padding: 0; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.mpo-burger span { display: block; width: 20px; height: 2px; background: #082444; border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.mpo-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mpo-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mpo-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mpo-mnav { display: none; }

@media (max-width: 1160px) {
	.mpo-header-in { padding: 12px 16px; }
	.mpo-header-in > .mpo-nav, .mpo-header-in > .mpo-lang { display: none; }
	.mpo-burger { display: flex; }
	.mpo-header-in > .mpo-pill { padding: 11px 20px; }
	.mpo-mnav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid #DCE7F0; box-shadow: 0 18px 30px rgba(8, 36, 68, 0.12); padding: 8px 16px 20px; max-height: calc(100vh - 70px); overflow-y: auto; }
	.mpo-mnav[data-open] { display: block; }
	.mpo-mnav .mpo-nav { flex-direction: column; align-items: stretch; gap: 0; margin: 0; font-size: 17px; white-space: normal; }
	.mpo-mnav .mpo-nav > a, .mpo-mnav .mpo-svc-btn { padding: 14px 4px; border-bottom: 1px solid #EAF1F7; width: 100%; justify-content: space-between; }
	.mpo-mnav .mpo-svc-caret { width: 16px; height: 16px; }
	.mpo-mnav .mpo-svc-menu { position: static; width: auto; box-shadow: none; border: 0; border-radius: 0; padding: 4px 0 8px 10px; }
	.mpo-mnav .mpo-lang { margin-top: 14px; justify-content: center; }
	.mpo-mnav .mpo-pill { display: block; text-align: center; margin-top: 18px; padding: 15px 24px; }
}
@media (max-width: 520px) {
	.mpo-header-in > .mpo-pill { display: none; }
}

/* Footer */
.mpo-footer { margin-top: 104px; background: radial-gradient(900px 440px at 88% 0%, #154273 0%, rgba(21, 66, 115, 0) 70%), linear-gradient(180deg, #0A2C57 0%, #04142A 100%); color: #A6C0D6; padding: 60px 32px 34px; }
.mpo-footer-in { max-width: 1280px; margin: 0 auto; }
.mpo-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 44px; }
.mpo-footer-logo { display: flex; align-items: center; background: #fff; border-radius: 10px; padding: 10px 14px; width: fit-content; }
.mpo-footer-logo img { height: 34px; width: auto; display: block; }
.mpo-footer-tag { font-size: 15px; line-height: 1.6; margin: 18px 0 0; }
.mpo-footer-contact { font-size: 14px; margin-top: 20px; line-height: 1.7; }
.mpo-footer-contact a { color: #4FC0F0; }
.mpo-footer-col-title { font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #9DBAD3; }
.mpo-footer-links { display: flex; flex-direction: column; gap: 5px; margin-top: 16px; }
.mpo-footer-links a { font-size: 15px; color: #C4D8E8; padding: 2.5px 0; }
.mpo-footer-links a:hover { color: #fff; }
.mpo-footer-bar { margin-top: 48px; padding-top: 22px; border-top: 1px solid #1E436A; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13.5px; }
.mpo-footer-social { display: flex; gap: 20px; }
.mpo-footer-social a { color: #A6C0D6; }

.mpo-float-cta { position: fixed; right: 24px; bottom: 24px; z-index: 50; background: #B54B7A; color: #fff; padding: 15px 24px; border-radius: 999px; font-size: 15.5px; font-weight: 700; box-shadow: 0 14px 36px rgba(8, 36, 68, 0.35); display: flex; align-items: center; gap: 10px; }
.mpo-float-cta:hover { background: #9C3D66; color: #fff; }
.mpo-float-cta::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

.mpo-page { padding: 64px 32px; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.mpo-lang a { transition: none; }
	.mpo-pulse { animation: none; }
	.mpo-svc-caret { transition: none; }
}

/* "To confirm" markers (staging only, see mpo_confirm_open() in inc/helpers.php) */
/* min-width: 0 + fit-content keep a long note from setting the min width of a grid/flex parent (it widened the
   mobile home to 592px via .mpo-iv-list and pushed the fixed "Book Your Clearance" button off screen). */
.mpo-confirm { display: block; margin: 0; min-width: 0; }
.mpo-confirm--inline { display: inline; }
.mpo-confirm__note { display: block; width: fit-content; max-width: 100%; box-sizing: border-box; margin: 0 0 8px; padding: 6px 10px; background: #FFF4C2; border: 1px solid #E0B400; border-radius: 6px; color: #4A3B00; font: 600 12.5px/1.4 var(--mpo-font); letter-spacing: 0; text-transform: none; text-align: left; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); white-space: normal; }
.mpo-confirm__note b { font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; font-size: 11px; margin-right: 2px; }
.mpo-confirm__target { display: block; outline: 2px dashed #E0B400; outline-offset: 4px; border-radius: 4px; }
.mpo-confirm--inline > .mpo-confirm__note { display: inline-block; margin: 0 6px 4px 0; vertical-align: middle; }
.mpo-confirm--inline > .mpo-confirm__target { display: inline; }
.mpo-confirm--float { position: relative; display: inline-block; }
.mpo-confirm--float > .mpo-confirm__note { position: absolute; bottom: calc(100% + 8px); right: 0; z-index: 70; width: 260px; margin: 0; }
.mpo-confirm--float > .mpo-confirm__note::after { content: ""; position: absolute; top: 100%; right: 18px; border: 6px solid transparent; border-top-color: #E0B400; }
.mpo-confirm--float > .mpo-confirm__target { display: inline-block; }
.mpo-iv-list .mpo-confirm__target { display: grid; gap: 14px; }

/* Mega menu (Patients): overview on top, Services in two columns, Locations below */
.mpo-mega-label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #B54B7A; padding: 10px 12px 4px; }
.mpo-header-in > .mpo-nav .mpo-svc-menu--mega { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; width: min(620px, 86vw); left: 50%; transform: translateX(-50%); padding: 14px; white-space: normal; }
.mpo-header-in > .mpo-nav .mpo-svc-menu--mega[hidden] { display: none; }
.mpo-header-in > .mpo-nav .mpo-svc-menu--mega .mpo-mega-label,
.mpo-header-in > .mpo-nav .mpo-svc-menu--mega .mpo-svc-link--overview,
.mpo-header-in > .mpo-nav .mpo-svc-menu--mega .mpo-svc-link--loc { grid-column: 1 / -1; }
.mpo-nav .mpo-svc-menu--mega .mpo-svc-link--overview { font-weight: 600; color: #082444; border-bottom: 1px solid #EAF1F7; border-radius: 9px 9px 0 0; padding-bottom: 12px; }
.mpo-header-in > .mpo-nav .mpo-svc-menu--mega .mpo-mega-label:not(:first-of-type) { border-top: 1px solid #EAF1F7; margin-top: 8px; padding-top: 14px; }
.mpo-nav .mpo-svc-menu--mega .mpo-svc-link--loc::after { content: "\2192"; margin-left: 6px; }
.mpo-mnav .mpo-mega-label { padding: 10px 12px 2px; }
