/* ==========================================================================
   EarWell Centers design system
   Brand tokens from EarWell Brand Guidelines v2. Slate text on orange
   buttons; Deep Blue for links and small blue text; EarWell Blue and
   Orange are graphic/fill colors only.
   ========================================================================== */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../../fonts/poppins-regular.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../../fonts/poppins-medium.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../../fonts/poppins-semibold.woff2") format("woff2"); }
@font-face { font-family: "Gelasio"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../../fonts/gelasio-variable.woff2") format("woff2"); }

:root {
	--ew-orange: #DB8C21;
	--ew-blue: #478FB8;
	--ew-slate: #232C39;
	--ew-deep-blue: #2E5D78;
	--ew-deep-orange: #8E5B15;
	--ew-gray: #5F6670;
	--ew-mist: #EDF4F8;
	--ew-cream: #FBF4E9;
	--ew-light: #F6F6F6;
	--ew-white: #FFFFFF;
	--ew-line: #DDE5EB;
	--ew-orange-hover: #C97E18;

	--ew-font-head: Georgia, Gelasio, "Times New Roman", serif;
	--ew-font-body: Poppins, "Helvetica Neue", Arial, sans-serif;

	--ew-max: 1200px;
	--ew-read: 760px;
	--ew-gutter: clamp(20px, 4vw, 40px);
	--ew-section: clamp(56px, 8vw, 104px);
	--ew-radius: 12px;
	--ew-radius-lg: 18px;
	--ew-radius-btn: 6px;
	--ew-shadow: 0 1px 2px rgba(35, 44, 57, .06), 0 8px 24px rgba(35, 44, 57, .07);
	--ew-shadow-hover: 0 2px 4px rgba(35, 44, 57, .08), 0 14px 32px rgba(35, 44, 57, .12);
	--ew-focus: 0 0 0 3px #fff, 0 0 0 6px var(--ew-deep-blue);
	--ew-actionbar-h: 0px;
}

/* ---------- Base ---------- */

html { scroll-behavior: smooth; scroll-padding-top: 24px; scroll-padding-bottom: calc(var(--ew-actionbar-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
	font-family: var(--ew-font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--ew-slate);
	background: var(--ew-white);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, .ew-h1, .ew-h2 { font-family: var(--ew-font-head); font-weight: 700; color: var(--ew-slate); letter-spacing: -0.01em; text-wrap: balance; }
h1, .ew-h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem); line-height: 1.12; margin: 0 0 .5em; }
h2, .ew-h2 { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.25rem); line-height: 1.2; margin: 1.6em 0 .55em; }
h3 { font-family: var(--ew-font-body); font-weight: 600; font-size: clamp(1.15rem, 1.05rem + .35vw, 1.3rem); line-height: 1.35; margin: 1.5em 0 .5em; color: var(--ew-slate); }
h4 { font-family: var(--ew-font-body); font-weight: 600; font-size: 1.0625rem; margin: 1.25em 0 .4em; }
p, ul, ol { margin: 0 0 1.1em; }
.entry-content > :first-child, .ew-section > :first-child { margin-top: 0; }
strong { font-weight: 600; }
small, .ew-muted { color: var(--ew-gray); font-size: .9375rem; }

a { color: var(--ew-deep-blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ew-slate); text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
	outline: 3px solid var(--ew-deep-blue); outline-offset: 3px; border-radius: 4px; box-shadow: none;
}
::selection { background: var(--ew-cream); color: var(--ew-slate); }

img { border-radius: 0; }
figure { margin: 0 0 1.5em; }
figcaption, .wp-element-caption { font-size: .875rem; color: var(--ew-gray); margin-top: .6em; line-height: 1.5; }

.screen-reader-text:focus { background: var(--ew-white); color: var(--ew-slate); box-shadow: var(--ew-focus); }
.skip-link.screen-reader-text:focus { z-index: 100000; }

/* GeneratePress overrides */
.site-content { display: block; }
.separate-containers .inside-article, .one-container .container, .one-container .site-content { background: transparent; }
.one-container .site-content { padding: 0; }
.ew-page .site-content, .ew-page .inside-article { padding: 0; }
.ew-page .entry-content { margin-top: 0; }
.ew-page .site.grid-container { max-width: none; }
body:not(.ew-page) .site-content { padding: clamp(24px, 4vw, 48px) var(--ew-gutter) var(--ew-section); max-width: var(--ew-max); margin: 0 auto; }
.single-post .site-main, .single-post .inside-article { max-width: var(--ew-read); margin-inline: auto; }
.single-post .inside-article { padding: 0; }
.single-post .featured-image, .single-post .post-image { margin: 0 0 1.75em; }
.single-post .featured-image img { border-radius: var(--ew-radius-lg); width: 100%; height: auto; }
.entry-header .entry-title { margin-bottom: .35em; }
.entry-meta { display: none; }

/* ---------- Buttons ---------- */

.ew-btn, .wp-block-button__link, .wp-element-button {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	font-family: var(--ew-font-body); font-weight: 600; font-size: 1rem; line-height: 1.2;
	padding: .9em 1.4em; border-radius: var(--ew-radius-btn); border: 2px solid transparent;
	text-decoration: none; cursor: pointer; transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
	min-height: 48px;
}
.ew-btn:hover, .wp-block-button__link:hover { text-decoration: none; }
.ew-btn .ew-icon, .wp-block-button__link .ew-icon { flex: none; }

/* Primary: Slate text on Orange (5.22:1). Never white on orange. */
.ew-btn--primary, .wp-block-button .wp-block-button__link, .wp-block-button.is-style-ew-primary .wp-block-button__link { background: var(--ew-orange); color: var(--ew-slate); border-color: var(--ew-orange); }
.ew-btn--primary:hover, .wp-block-button .wp-block-button__link:hover, .wp-block-button.is-style-ew-primary .wp-block-button__link:hover { background: var(--ew-orange-hover); border-color: var(--ew-orange-hover); color: var(--ew-slate); }

/* Secondary: White on Deep Blue (7.11:1). */
.ew-btn--secondary, .ew-btn-secondary, .wp-block-button.is-style-ew-secondary .wp-block-button__link { background: var(--ew-deep-blue); color: var(--ew-white); border-color: var(--ew-deep-blue); }
.ew-btn--secondary:hover, .ew-btn-secondary:hover, .wp-block-button.is-style-ew-secondary .wp-block-button__link:hover { background: var(--ew-slate); border-color: var(--ew-slate); color: var(--ew-white); }

.ew-btn--outline, .wp-block-button.is-style-ew-outline .wp-block-button__link { background: transparent; color: var(--ew-deep-blue); border-color: var(--ew-deep-blue); }
.ew-btn--outline:hover, .wp-block-button.is-style-ew-outline .wp-block-button__link:hover { background: var(--ew-deep-blue); color: var(--ew-white); }

.ew-btn--ghost-light { background: transparent; color: var(--ew-white); border-color: rgba(255,255,255,.7); }
.ew-btn--ghost-light:hover { background: var(--ew-white); color: var(--ew-slate); border-color: var(--ew-white); }

.ew-btn--sm { padding: .6em 1.05em; min-height: 44px; font-size: .9375rem; }
.ew-btn--lg { padding: 1em 1.7em; font-size: 1.0625rem; }
.wp-block-buttons { gap: 12px; margin-bottom: 1.25em; }
.wp-block-buttons > .wp-block-button { margin: 0; }

.ew-text-link { font-weight: 600; }

/* ---------- Top bar and header ---------- */

.ew-topbar { background: var(--ew-slate); color: #E8ECF0; font-size: .875rem; }
.ew-topbar__inner { max-width: var(--ew-max); margin: 0 auto; padding: 6px var(--ew-gutter); display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; }
.ew-topbar__note { margin: 0; }
.ew-topbar__phone { color: #fff; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.ew-topbar__phone:hover { color: #fff; text-decoration: underline; }
.ew-topbar__phone .ew-icon { width: 16px; height: 16px; color: var(--ew-orange); }
.ew-utility-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.ew-utility-nav a { color: #fff; text-decoration: none; display: inline-block; padding: 6px 0; }
.ew-utility-nav a:hover { text-decoration: underline; color: #fff; }
.ew-utility-nav a:focus-visible { outline-color: var(--ew-orange); }
@media (max-width: 900px) { .ew-topbar__note { display: none; } .ew-topbar__inner { justify-content: center; } .ew-utility-nav ul { justify-content: center; gap: 2px 16px; } }

.site-header { background: var(--ew-white); border-bottom: 1px solid var(--ew-line); position: relative; z-index: 50; }
.inside-header { max-width: var(--ew-max); padding: 12px var(--ew-gutter); }
@media (min-width: 1025px) { .inside-header { padding-left: 20px; padding-right: 20px; } }
.site-logo .header-image { width: 172px; height: auto; display: block; }
@media (max-width: 768px) { .site-logo .header-image { width: 156px; } .inside-header { padding: 10px var(--ew-gutter); } }

.main-navigation, .main-navigation ul ul { background: transparent; }
.main-navigation .main-nav ul li a { font-family: var(--ew-font-body); font-weight: 500; font-size: .9063rem; color: var(--ew-slate); padding-left: 9px; padding-right: 9px; line-height: 64px; }
.main-navigation .main-nav > ul { flex-wrap: nowrap; }
@media (min-width: 1025px) { .main-navigation .inside-navigation { flex-wrap: nowrap; } .main-navigation .main-nav ul li.menu-item-has-children .dropdown-menu-toggle { padding-left: 2px; padding-right: 6px; } }
.main-navigation .main-nav ul li.menu-item-has-children > a { padding-right: 4px; }
.inside-header { flex-wrap: nowrap; }
.site-logo { flex: none; margin-right: 12px; }
.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a,
.main-navigation .main-nav ul li:not([class*="current-menu-"]):focus-within > a,
.main-navigation .main-nav ul li.sfHover:not([class*="current-menu-"]) > a { color: var(--ew-deep-blue); background: transparent; }
.main-navigation .main-nav ul li[class*="current-menu-"] > a { color: var(--ew-deep-blue); background: transparent; box-shadow: inset 0 -3px 0 var(--ew-orange); }
.main-navigation .dropdown-menu-toggle { padding-left: 4px; }
.main-navigation ul ul { box-shadow: var(--ew-shadow-hover); border: 1px solid var(--ew-line); border-radius: var(--ew-radius); padding: 10px 0; width: 280px; background: var(--ew-white); }
.main-navigation .main-nav ul ul li a { line-height: 1.4; padding: 10px 18px; font-size: .9375rem; }
.main-navigation .main-nav ul ul li:hover > a { background: var(--ew-mist); }
.main-navigation .menu-bar-items { align-items: center; }
.ew-header-actions { display: flex; align-items: center; gap: 14px; margin-left: 12px; }
.ew-header-phone { display: inline-flex; align-items: center; gap: 6px; color: var(--ew-deep-blue); font-weight: 600; text-decoration: none; white-space: nowrap; font-size: .9688rem; }
.ew-header-phone:hover { text-decoration: underline; }
@media (max-width: 1240px) and (min-width: 1025px) { .main-navigation .main-nav ul li a { padding-left: 6px; padding-right: 6px; font-size: .875rem; } .site-logo .header-image { width: 140px; } .ew-header-actions .ew-btn { padding-left: .8em; padding-right: .8em; } }

/* Grouped desktop dropdown for Ear Molding */
@media (min-width: 1025px) {
	.main-navigation .ew-mega > .sub-menu { width: 560px; display: grid; grid-template-columns: 1fr 1fr; padding: 12px; gap: 0 8px; }
	.main-navigation .ew-mega > .sub-menu li { width: auto; }
	.main-navigation .ew-mega > .sub-menu a { border-radius: 8px; }
	.main-navigation .ew-mega.ew-mega--right > .sub-menu { right: 0; left: auto; }
}

/* Mobile menu */
.menu-toggle { color: var(--ew-slate); font-weight: 600; padding: 0 16px; line-height: 52px; }
.menu-toggle:hover, .menu-toggle:focus { color: var(--ew-deep-blue); background: transparent; }
@media (max-width: 1024px) {
	.main-navigation.toggled .main-nav > ul { border-top: 1px solid var(--ew-line); padding-bottom: 12px; }
	.main-navigation.toggled .main-nav ul li a { line-height: 1.4; padding-top: 14px; padding-bottom: 14px; }
	.main-navigation.toggled .main-nav ul ul { box-shadow: none; border: 0; border-left: 3px solid var(--ew-mist); border-radius: 0; margin-left: 16px; width: auto; padding: 0; }
	.main-navigation .menu-bar-items .ew-header-actions .ew-btn { display: none; }
}

/* Breadcrumbs */
.ew-breadcrumbs { font-size: .875rem; color: var(--ew-gray); }
.ew-breadcrumbs__inner { max-width: var(--ew-max); margin: 0 auto; padding: 14px var(--ew-gutter) 0; }
.ew-breadcrumbs a { color: var(--ew-deep-blue); }
.ew-page .ew-breadcrumbs { background: var(--ew-cream); }
body:not(.ew-page) .ew-breadcrumbs__inner { padding: 0 0 18px; }
.single-post .ew-breadcrumbs__inner { max-width: var(--ew-read); }

/* ---------- Sections ---------- */

.ew-section { padding: var(--ew-section) var(--ew-gutter); margin: 0 !important; }
.ew-section--tight { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 64px); }
.ew-section--mist { background: var(--ew-mist); }
.ew-section--cream { background: var(--ew-cream); }
.ew-section--light { background: var(--ew-light); }
.ew-section--slate { background: var(--ew-slate); color: #E8ECF0; }
.ew-section--slate h2, .ew-section--slate h3 { color: var(--ew-white); }
.ew-section--slate a:not(.ew-btn) { color: #fff; }
.ew-section > * { margin-left: auto; margin-right: auto; }
.ew-section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 44px) !important; }
.ew-section-head.has-text-align-center, .ew-center { text-align: center; margin-left: auto; margin-right: auto; }
.ew-section-head h2 { margin-top: 0; }
.ew-section-head p:last-child { margin-bottom: 0; }

.ew-eyebrow { display: block; font-family: var(--ew-font-body); font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ew-deep-orange); margin: 0 0 .75em !important; }
.ew-section--slate .ew-eyebrow { color: var(--ew-orange); }
.ew-lead { font-size: clamp(1.0625rem, 1rem + .4vw, 1.25rem); line-height: 1.6; color: var(--ew-gray); }

/* ---------- Hero ---------- */

.ew-hero { background: linear-gradient(180deg, var(--ew-cream) 0%, #FDF9F3 70%, var(--ew-white) 100%); padding: clamp(32px, 5vw, 64px) var(--ew-gutter) clamp(48px, 6vw, 88px); margin: 0 !important; }
.ew-hero--mist { background: linear-gradient(180deg, var(--ew-mist) 0%, #F5F9FB 70%, var(--ew-white) 100%); }
.ew-hero .wp-block-columns { max-width: var(--ew-max); margin: 0 auto; align-items: center; gap: clamp(28px, 5vw, 64px); }
.ew-hero h1 { margin-bottom: .4em; }
.ew-hero .ew-lead { color: #48505A; max-width: 38em; }
.ew-hero__media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--ew-radius-lg); box-shadow: var(--ew-shadow); }
.ew-hero__media figure { margin: 0; position: relative; }
.ew-hero__media figure::before { content: ""; position: absolute; inset: auto -14px -14px auto; width: 46%; height: 46%; border-radius: var(--ew-radius-lg); background: var(--ew-mist); z-index: -1; }
.ew-hero--page .wp-block-columns { align-items: center; }
.ew-hero--text { padding-bottom: clamp(32px, 4vw, 56px); }
.ew-hero--text > * { max-width: var(--ew-read); margin-left: auto !important; margin-right: auto !important; }
.ew-trust { list-style: none; padding: 0; margin: 1.5em 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .9375rem; color: #48505A; }
.ew-trust li { display: inline-flex; align-items: center; gap: 8px; }
.ew-trust li::before { content: ""; width: 20px; height: 20px; flex: none; border-radius: 50%; background: var(--ew-mist) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232E5D78'%3E%3Cpath d='m9.5 16.2-4.2-4.2-1.4 1.4 5.6 5.6 11-11-1.4-1.4z'/%3E%3C/svg%3E") center / 14px no-repeat; }
@media (max-width: 781px) { .ew-hero .wp-block-column.ew-hero__media { order: -1; } .ew-hero__media figure::before { display: none; } }

/* ---------- Grids and cards ---------- */

.ew-grid { display: grid; gap: clamp(16px, 2.2vw, 28px); margin: 0 auto; max-width: var(--ew-max); }
.ew-grid > * { margin: 0 !important; }
.ew-grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.ew-grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.ew-grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
@media (min-width: 1000px) { .ew-grid--3 { grid-template-columns: repeat(3, 1fr); } .ew-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.ew-card, .is-style-ew-card {
	background: var(--ew-white); border: 1px solid var(--ew-line); border-radius: var(--ew-radius);
	padding: clamp(20px, 2.4vw, 28px); box-shadow: var(--ew-shadow); position: relative; display: flex; flex-direction: column;
}
.ew-card > :last-child, .ew-card__body > :last-child { margin-bottom: 0; }
.ew-card h3, .ew-card__title { margin: 0 0 .45em; font-size: 1.1875rem; }
.ew-card h3 a, .ew-card__title a { color: var(--ew-slate); text-decoration: none; }
.ew-card h3 a::after, .ew-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--ew-radius); }
.ew-card h3 a:focus-visible { outline: none; }
.ew-card h3 a:focus-visible::after, .ew-card__title a:focus-visible::after { outline: 3px solid var(--ew-deep-blue); outline-offset: 3px; }
.ew-card--link, .ew-card:has(h3 a) { transition: box-shadow .2s ease, transform .2s ease; }
.ew-card--link:hover, .ew-card:has(h3 a):hover { box-shadow: var(--ew-shadow-hover); transform: translateY(-2px); }
.ew-card:has(h3 a):hover h3 a { color: var(--ew-deep-blue); }
.ew-card p { color: #48505A; font-size: 1rem; }
.ew-card__media { margin: calc(-1 * clamp(20px, 2.4vw, 28px)) calc(-1 * clamp(20px, 2.4vw, 28px)) 18px; overflow: hidden; border-radius: var(--ew-radius) var(--ew-radius) 0 0; aspect-ratio: 3 / 2; background: var(--ew-mist); }
.ew-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ew-card__media--placeholder { display: grid; place-items: center; color: var(--ew-blue); }
.ew-card__media--placeholder .ew-icon { width: 48px; height: 48px; }
.ew-card__body { display: flex; flex-direction: column; flex: 1; }
.ew-card__more { margin-top: auto; padding-top: .5em; font-weight: 600; color: var(--ew-deep-blue); display: inline-flex; align-items: center; gap: 6px; font-size: .9375rem; }
.ew-card .wp-block-image { margin: calc(-1 * clamp(20px, 2.4vw, 28px)) calc(-1 * clamp(20px, 2.4vw, 28px)) 18px; }
.ew-card .wp-block-image img { border-radius: var(--ew-radius) var(--ew-radius) 0 0; width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.ew-card .ew-link { margin-top: auto; margin-bottom: 0; font-weight: 600; }

/* Audience pathway cards */
.ew-audience { padding-top: 0; }
.ew-audience .ew-grid { margin-top: calc(-1 * clamp(24px, 4vw, 48px)); position: relative; }
.ew-audience-card { border-top: 4px solid var(--ew-orange); }
.ew-audience-card::before { content: ""; width: 52px; height: 52px; border-radius: 50%; margin-bottom: 16px; background: var(--ew-cream) center / 28px no-repeat; }
.ew-audience-card--newborn::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E5B15' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='12' cy='9' r='5'/%3E%3Cpath d='M5 21c1.5-3.5 4-5 7-5s5.5 1.5 7 5'/%3E%3Ccircle cx='10.2' cy='8.6' r='.5' fill='%238E5B15'/%3E%3Ccircle cx='13.8' cy='8.6' r='.5' fill='%238E5B15'/%3E%3C/svg%3E"); }
.ew-audience-card--expecting { border-top-color: var(--ew-blue); }
.ew-audience-card--expecting::before { background-color: var(--ew-mist); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E5D78' stroke-width='1.6' stroke-linecap='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M8 3v4M16 3v4M4 10h16M9 15l2 2 4-4'/%3E%3C/svg%3E"); }
.ew-audience-card--provider { border-top-color: var(--ew-deep-blue); }
.ew-audience-card--provider::before { background-color: var(--ew-mist); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E5D78' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M6 3v6a4 4 0 0 0 8 0V3'/%3E%3Cpath d='M10 13v2a5 5 0 0 0 10 0v-2'/%3E%3Ccircle cx='20' cy='11' r='2'/%3E%3C/svg%3E"); }

/* Feature (split) blocks */
.ew-split { max-width: var(--ew-max); margin: 0 auto; gap: clamp(28px, 5vw, 64px); align-items: center; }
.ew-split .wp-block-image img, .ew-rounded img { border-radius: var(--ew-radius-lg); width: 100%; height: auto; }
.ew-split .wp-block-image { margin: 0; }

/* Lists */
.ew-checklist, .is-style-ew-checklist { list-style: none; padding-left: 0; }
.ew-checklist li, .is-style-ew-checklist li { position: relative; padding-left: 34px; margin-bottom: .6em; }
.ew-checklist li::before, .is-style-ew-checklist li::before { content: ""; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%; background: var(--ew-mist) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232E5D78'%3E%3Cpath d='m9.5 16.2-4.2-4.2-1.4 1.4 5.6 5.6 11-11-1.4-1.4z'/%3E%3C/svg%3E") center / 15px no-repeat; }

.ew-steps, .is-style-ew-steps { list-style: none; padding-left: 0; counter-reset: ew-step; display: grid; gap: 14px; }
.ew-steps > li, .is-style-ew-steps > li { counter-increment: ew-step; position: relative; padding: 20px 22px 20px 78px; background: var(--ew-white); border: 1px solid var(--ew-line); border-radius: var(--ew-radius); margin: 0; }
.ew-steps > li::before, .is-style-ew-steps > li::before { content: counter(ew-step, decimal-leading-zero); position: absolute; left: 22px; top: 18px; font-family: var(--ew-font-head); font-weight: 700; font-size: 1.6rem; line-height: 1; color: var(--ew-blue); }
.ew-steps > li strong:first-child { display: block; font-size: 1.0625rem; margin-bottom: 2px; }
.ew-steps--grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); max-width: var(--ew-max); margin: 0 auto; }
.ew-steps--grid > li { padding: 70px 22px 22px; }

/* Callouts */
.ew-callout { background: var(--ew-cream); border-left: 4px solid var(--ew-orange); border-radius: 0 var(--ew-radius) var(--ew-radius) 0; padding: 20px 24px; margin: 1.75em 0; }
.ew-callout > :last-child { margin-bottom: 0; }
.ew-callout h3 { margin-top: 0; }
.ew-note { background: var(--ew-mist); border-radius: var(--ew-radius); padding: 18px 22px; margin: 1.5em 0; font-size: 1rem; }
.ew-note > :last-child { margin-bottom: 0; }

/* Condition cards */
.ew-condition-card .ew-card__media { aspect-ratio: 4 / 3; }

/* Reading layout for article-style sections */
.ew-reading { max-width: var(--ew-read); margin-left: auto; margin-right: auto; }
.ew-prose > * { max-width: var(--ew-read); margin-left: auto !important; margin-right: auto !important; }
.ew-prose > .alignwide, .ew-prose > .ew-grid, .ew-prose > .ew-split { max-width: var(--ew-max); }
.ew-prose h2 { margin-top: 1.8em; }
.ew-prose > h2:first-child { margin-top: 0; }
.ew-prose .wp-block-image img { border-radius: var(--ew-radius); }

/* Table of contents */
.ew-toc { background: var(--ew-light); border-radius: var(--ew-radius); padding: 18px 22px; margin: 0 0 2em; }
.ew-toc__title { font-weight: 600; margin: 0 0 .5em; font-size: .9375rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ew-gray); }
.ew-toc ol { margin: 0; padding-left: 1.2em; columns: 2 240px; column-gap: 32px; }
.ew-toc li { margin-bottom: .35em; break-inside: avoid; }

/* Review information */
.ew-review-info { font-size: .9375rem; color: var(--ew-gray); margin: 0 0 1.5em; }
.ew-review-info p { margin: 0 0 .3em; }
.ew-review-info__reviewed { color: var(--ew-slate); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.ew-review-info__reviewed .ew-icon { color: #2D7A46; }
.ew-review-info__policy { margin-left: .5em; }
.ew-hero .ew-review-info { margin-top: 1.25em; margin-bottom: 0; }
.ew-article-summary { font-size: 1.1875rem; line-height: 1.6; color: #48505A; border-left: 4px solid var(--ew-orange); padding-left: 18px; margin: .5em 0 1em; }

.ew-editor-note { font-size: .875rem; background: #FFF8E6; border: 1px dashed var(--ew-deep-orange); color: #5a3b0d; padding: 10px 14px; border-radius: 8px; margin: 12px 0; }

/* Sources */
.ew-sources { border-top: 1px solid var(--ew-line); margin-top: 2.5em; padding-top: 1.25em; font-size: .9375rem; }
.ew-sources__title { font-family: var(--ew-font-body); font-size: 1rem !important; font-weight: 600; margin: 0 0 .6em !important; text-transform: uppercase; letter-spacing: .08em; color: var(--ew-gray); }
.ew-sources ol { padding-left: 1.2em; margin: 0; }
.ew-sources li { margin-bottom: .5em; }
.ew-sources__detail { color: var(--ew-gray); }

/* Related */
.ew-related { margin: 2.75em 0 0; }
.ew-related__title { margin-top: 0; font-size: clamp(1.4rem, 1.2rem + .8vw, 1.75rem); }

/* ---------- FAQ ---------- */

.wp-block-earwell-faq { max-width: var(--ew-read); margin-left: auto !important; margin-right: auto !important; }
.wp-block-earwell-faq > h2 { margin-top: 0; }
.wp-block-earwell-faq > p { color: var(--ew-gray); }
.wp-block-earwell-faq .wp-block-details { border-bottom: 1px solid var(--ew-line); margin: 0; padding: 0; }
.wp-block-earwell-faq .wp-block-details:first-of-type { border-top: 1px solid var(--ew-line); }
.wp-block-earwell-faq summary {
	list-style: none; cursor: pointer; position: relative; padding: 20px 52px 20px 0; font-weight: 600; font-size: 1.0625rem; line-height: 1.45; color: var(--ew-slate);
}
.wp-block-earwell-faq summary::-webkit-details-marker { display: none; }
.wp-block-earwell-faq summary::after {
	content: ""; position: absolute; right: 4px; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%;
	background: var(--ew-mist) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232E5D78'%3E%3Cpath d='M11 5h2v14h-2zM5 11h14v2H5z'/%3E%3C/svg%3E") center / 16px no-repeat;
	transition: transform .2s ease;
}
.wp-block-earwell-faq details[open] > summary::after { transform: rotate(45deg); }
.wp-block-earwell-faq summary:hover { color: var(--ew-deep-blue); }
.wp-block-earwell-faq details > :not(summary) { margin: 0 0 1em; padding-right: 52px; color: #3A424D; }
.wp-block-earwell-faq details > :last-child { margin-bottom: 22px; }
.ew-section--mist .wp-block-earwell-faq .wp-block-details, .ew-section--cream .wp-block-earwell-faq .wp-block-details { border-color: #D3DEE6; }
.ew-section--mist .wp-block-earwell-faq summary::after { background-color: var(--ew-white); }

/* ---------- Evaluation action panel ---------- */

.ew-cta-panel {
	max-width: var(--ew-max); margin: 0 auto; background: var(--ew-slate); color: #E8ECF0; border-radius: var(--ew-radius-lg);
	padding: clamp(28px, 4.5vw, 56px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; position: relative; overflow: hidden;
}
.ew-cta-panel::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 28px solid rgba(71, 143, 184, .25); pointer-events: none; }
.ew-cta-panel h2 { color: var(--ew-white); margin: 0 0 .4em; }
.ew-cta-panel p { margin: 0; color: #D5DCE3; }
.ew-cta-panel__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; position: relative; z-index: 1; }
.ew-cta-panel a:focus-visible { outline-color: var(--ew-orange); }
@media (max-width: 820px) { .ew-cta-panel { grid-template-columns: 1fr; } .ew-cta-panel__actions { justify-content: flex-start; } }
.ew-section--cta { padding-top: clamp(24px, 4vw, 48px); }
.ew-article-footer .ew-cta-panel { margin-top: 3em; grid-template-columns: 1fr; }
.ew-article-footer .ew-cta-panel__actions { justify-content: flex-start; }

/* ---------- People ---------- */

.ew-person { background: var(--ew-white); border: 1px solid var(--ew-line); border-radius: var(--ew-radius); overflow: hidden; box-shadow: var(--ew-shadow); display: flex; flex-direction: column; }
.ew-person__photo { aspect-ratio: 4 / 5; background: var(--ew-mist); overflow: hidden; }
.ew-person__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; }
.ew-person__body { padding: 20px 22px 24px; }
.ew-person__name { margin: 0 0 .2em; font-size: 1.1875rem; }
.ew-person__name a { color: var(--ew-slate); text-decoration: none; }
.ew-person__name a:hover { color: var(--ew-deep-blue); text-decoration: underline; }
.ew-person__title { color: var(--ew-deep-orange); font-weight: 600; font-size: .9375rem; margin-bottom: .6em; }
.ew-person p { font-size: 1rem; }
.ew-person--feature { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; max-width: var(--ew-max); margin: 0 auto; align-items: stretch; }
.ew-person--feature .ew-person__photo { aspect-ratio: auto; min-height: 100%; }
.ew-person--feature .ew-person__body { padding: clamp(24px, 4vw, 48px); align-self: center; }
.ew-person--feature .ew-person__name { font-family: var(--ew-font-head); font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.25rem); }
.ew-person--feature .ew-checklist { margin: 1.2em 0 1.5em; }
@media (max-width: 720px) { .ew-person--feature { grid-template-columns: 1fr; } .ew-person--feature .ew-person__photo { aspect-ratio: 4 / 4; } }

/* ---------- Offices ---------- */

.ew-office-card .ew-card__media { aspect-ratio: 16 / 9; }
/* Office photos are portrait entrance shots; keep the door sign in frame. */
.ew-office-card .ew-card__media img { object-position: 50% 30%; }
.ew-office-card p { display: flex; gap: 8px; align-items: flex-start; margin-bottom: .5em; }
.ew-office-card p .ew-icon { color: var(--ew-deep-blue); margin-top: .2em; flex: none; }
.ew-office-card .ew-office-card__address { color: #3A424D; }
.ew-badge { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; align-self: flex-start; }
.ew-badge--pending { background: #FFF1DC; color: #6B4210; border: 1px solid #F2D3A6; }
.ew-office-details { max-width: var(--ew-max); margin: 0 auto; }
.ew-office-details__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 20px; }
.ew-office-details__item { background: var(--ew-white); border: 1px solid var(--ew-line); border-radius: var(--ew-radius); padding: 22px; }
.ew-office-details__item h3 { margin: 0 0 .6em; display: flex; align-items: center; gap: 8px; font-size: 1.0625rem; }
.ew-office-details__item h3 .ew-icon { color: var(--ew-deep-blue); }
.ew-office-details__item p:last-child { margin-bottom: 0; }
.ew-hours { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.ew-hours th, .ew-hours td { text-align: left; padding: 4px 0; border: 0; }
.ew-hours__note { margin: 8px 0 0; font-size: .9375rem; color: var(--ew-slate); }

.ew-map { border-radius: var(--ew-radius-lg); overflow: hidden; }
.ew-map svg { display: block; width: 100%; height: auto; }

/* ---------- Results ---------- */

.ew-case { background: var(--ew-white); border: 1px solid var(--ew-line); border-radius: var(--ew-radius); padding: 18px; box-shadow: var(--ew-shadow); }
.ew-case .wp-block-image { margin: 0 0 12px; }
.ew-case .wp-block-image img { border-radius: 8px; width: 100%; height: auto; }
.ew-case h3 { margin: 4px 0 .3em; font-size: 1.0625rem; }
.ew-case p { font-size: .9375rem; color: #48505A; margin-bottom: .4em; }

/* Gallery of clinical photographs */
.ew-photo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; max-width: var(--ew-max); margin: 0 auto 1.5em; }
.ew-photo-row .wp-block-image { margin: 0; }
.ew-photo-row img { border-radius: var(--ew-radius); width: 100%; max-width: 440px; height: auto; }
.ew-prose .ew-photo-row, .ew-section .ew-photo-row:only-child { max-width: var(--ew-read); }

/* ---------- Reviews ---------- */

.ew-reviews { max-width: var(--ew-max); }
.ew-quote { margin: 0; background: var(--ew-white); border-radius: var(--ew-radius); padding: 28px 28px 24px; border: 1px solid var(--ew-line); position: relative; }
.ew-quote::before { content: "“"; font-family: var(--ew-font-head); font-size: 4rem; line-height: 1; color: var(--ew-orange); position: absolute; top: 10px; left: 22px; }
.ew-quote blockquote { margin: 0; padding: 26px 0 0; border: 0; font-style: normal; background: none; }
.ew-quote blockquote p { font-size: 1.0625rem; color: var(--ew-slate); margin-bottom: .8em; }
.ew-quote figcaption { font-weight: 600; color: var(--ew-slate); font-size: .9375rem; }

/* ---------- Video ---------- */

.ew-video { margin: 0; }
.ew-video__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--ew-radius); overflow: hidden; background: var(--ew-slate); }
.ew-video__frame img { width: 100%; height: 100%; object-fit: cover; opacity: .82; display: block; }
.ew-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ew-video__play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: linear-gradient(180deg, rgba(35,44,57,0) 30%, rgba(35,44,57,.7) 100%); border: 0; color: #fff; cursor: pointer; padding: 16px; font: inherit; }
.ew-video__play > span[aria-hidden] { width: 64px; height: 64px; border-radius: 50%; background: var(--ew-orange); color: var(--ew-slate); display: grid; place-items: center; font-size: 1.4rem; padding-left: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.ew-video__label { font-weight: 600; font-size: .9375rem; text-align: center; text-shadow: 0 1px 2px rgba(0,0,0,.4); max-width: 90%; }
.ew-video__play:hover > span[aria-hidden] { background: var(--ew-orange-hover); }
.ew-video__play:focus-visible { outline: 3px solid var(--ew-orange); outline-offset: -6px; }

/* ---------- Booking slot ---------- */

.ew-booking { max-width: var(--ew-read); margin: 0 auto; }
.ew-booking--phone { background: var(--ew-white); border: 1px solid var(--ew-line); border-radius: var(--ew-radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--ew-shadow); }
.ew-booking--phone h2 { margin-top: 0; }
.ew-booking iframe { border: 0; border-radius: var(--ew-radius); }

/* ---------- Blog ---------- */

.ew-blog-intro { max-width: var(--ew-max); margin: 0 auto 1.5em; }
.ew-blog-intro > * { max-width: var(--ew-read); }
.ew-topic-nav ul { list-style: none; margin: 0 0 2em; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.ew-topic-nav a { display: inline-block; padding: 8px 16px; border: 1px solid var(--ew-line); border-radius: 999px; text-decoration: none; color: var(--ew-slate); font-size: .9375rem; font-weight: 500; background: var(--ew-white); }
.ew-topic-nav a:hover { border-color: var(--ew-deep-blue); color: var(--ew-deep-blue); }
.ew-topic-nav a[aria-current="page"] { background: var(--ew-slate); color: #fff; border-color: var(--ew-slate); }
.ew-article-grid { margin-bottom: 2em; }
.ew-article-card .ew-eyebrow { margin-bottom: .5em !important; font-size: .75rem; }
.ew-article-card .ew-card__title { font-size: 1.125rem; }
.ew-blog-outro { margin-top: 3em; }
.ew-blog-outro .wp-block-earwell-faq { margin-bottom: 3em !important; }
.paging-navigation, .nav-links { margin-top: 1em; }
.nav-links .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--ew-line); border-radius: 8px; margin-right: 6px; text-decoration: none; }
.nav-links .page-numbers.current { background: var(--ew-slate); color: #fff; border-color: var(--ew-slate); }
.archive .page-header { margin-bottom: 1em; }
.archive .page-header h1 { margin-bottom: .3em; }
.single-post .entry-content h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem); }
.single-post .entry-content img { border-radius: var(--ew-radius); height: auto; }
.single-post .entry-content blockquote { border-left: 4px solid var(--ew-blue); background: var(--ew-mist); padding: 16px 20px; font-style: normal; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ew-slate); }
.ew-footer { background: var(--ew-slate); color: #CDD5DD; font-size: .9375rem; }
.ew-footer__inner { max-width: var(--ew-max); margin: 0 auto; padding: clamp(48px, 6vw, 72px) var(--ew-gutter) 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 36px; }
.ew-footer a { color: #fff; text-decoration: none; }
.ew-footer a:hover { text-decoration: underline; }
.ew-footer a:focus-visible { outline-color: var(--ew-orange); }
.ew-footer__logo img { width: 200px; height: auto; display: block; margin-bottom: 18px; }
.ew-footer__phone a { display: inline-flex; gap: 8px; align-items: center; font-size: 1.1875rem; font-weight: 600; }
/* Fax sits under the phone, aligned with the number (icon 18px + 8px gap). */
.ew-footer__phone:has(+ .ew-footer__fax) { margin-bottom: 4px; }
.ew-footer__fax { margin-top: 0; padding-left: 26px; font-size: .9375rem; }
.ew-footer__heading { font-family: var(--ew-font-body) !important; font-size: .8125rem !important; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ew-orange) !important; margin: 0 0 1em !important; }
.ew-footer ul { list-style: none; margin: 0; padding: 0; }
.ew-footer li { margin-bottom: .55em; }
.ew-footer-offices li { margin-bottom: 1em; }
.ew-footer-offices strong { display: block; color: #fff; }
.ew-footer-offices span { color: #B7C1CB; }
.ew-footer .ew-btn--primary { color: var(--ew-slate); }
.ew-footer__legal { border-top: 1px solid rgba(255,255,255,.12); }
.ew-footer__legal-inner { max-width: var(--ew-max); margin: 0 auto; padding: 20px var(--ew-gutter) 28px; display: flex; gap: 20px; justify-content: space-between; flex-wrap: wrap; font-size: .8438rem; color: #AEB8C2; }
.ew-footer__legal-inner p { margin: 0; max-width: 640px; }
.ew-footer__legal ul { display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 960px) { .ew-footer__inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ew-footer__inner { grid-template-columns: 1fr; } }

/* ---------- Mobile action bar ---------- */

.ew-action-bar { display: none; }
@media (max-width: 768px) {
	:root { --ew-actionbar-h: 64px; }
	body { padding-bottom: var(--ew-actionbar-h); }
	.ew-action-bar {
		display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
		padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); border-top: 1px solid var(--ew-line); box-shadow: 0 -6px 18px rgba(35,44,57,.08);
	}
	.ew-action-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: var(--ew-radius-btn); font-weight: 600; text-decoration: none; font-size: .9688rem; }
	.ew-action-bar__call { background: var(--ew-white); color: var(--ew-deep-blue); border: 2px solid var(--ew-deep-blue); }
	.ew-action-bar__book { background: var(--ew-orange); color: var(--ew-slate); }
	.ew-header-phone span { display: none; }
}

/* Staging bar */
.ew-staging-bar { background: #FFF1DC; color: #5a3b0d; text-align: center; font-size: .8125rem; padding: 6px 12px; border-bottom: 1px solid #F2D3A6; }

/* ---------- Editor tweaks ---------- */

.editor-styles-wrapper { font-family: var(--ew-font-body); }
.editor-styles-wrapper .ew-section { padding: 40px 24px; }

/* ---------- Print ---------- */

@media print {
	.ew-topbar, .site-header, .ew-action-bar, .ew-footer, .ew-cta-panel, .ew-breadcrumbs { display: none !important; }
	.wp-block-earwell-faq details > :not(summary) { display: block !important; }
}

/* Header: keep labels on one line */
@media (min-width: 1025px) {
	.main-navigation .main-nav > ul > li > a { white-space: nowrap; }
	.main-navigation .main-nav > ul > li { flex: none; }
	.ew-header-actions .ew-btn { white-space: nowrap; }
}

/* Uniform case-card images and a 2×2 reviews grid */
.ew-case .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 760px) { .ew-reviews.ew-grid--2 { grid-template-columns: repeat(2, 1fr); } }

/* Mobile menu toggle and compact top bar */
.main-navigation .menu-toggle, .mobile-menu-control-wrapper .menu-toggle, .main-navigation.toggled .menu-toggle { color: var(--ew-slate); background: transparent; }
.main-navigation .menu-toggle:hover, .main-navigation .menu-toggle:focus-visible { color: var(--ew-deep-blue); background: var(--ew-mist); }
.main-navigation .menu-toggle::before { font-size: 1.35rem; }
.main-navigation.toggled .main-nav ul li a, .main-navigation.toggled .dropdown-menu-toggle { color: var(--ew-slate); }
@media (max-width: 900px) {
	.ew-topbar__inner { padding-top: 2px; padding-bottom: 2px; min-height: 36px; }
	.ew-utility-nav { min-width: 0; max-width: 100%; }
	.ew-utility-nav ul { flex-wrap: wrap; justify-content: center; gap: 0 12px; font-size: .75rem; }
	.ew-utility-nav a { white-space: nowrap; padding: 4px 0; }
}

/* Header action keeps brand button contrast inside GeneratePress navigation */
.main-navigation .menu-bar-items .ew-header-actions a.ew-btn--primary,
.main-navigation .menu-bar-items .ew-header-actions a.ew-btn--primary:hover { color: var(--ew-slate); background: var(--ew-orange); line-height: 1.2; }
.main-navigation .menu-bar-items .ew-header-actions a.ew-btn--primary:hover { background: var(--ew-orange-hover); }

/* ---------- Alignment and spacing pass ---------- */

/* Button groups always sit clear of the content above and below. */
.wp-block-buttons { margin-top: 1.75rem; margin-bottom: 0; row-gap: 12px; column-gap: 12px; }
.ew-hero .wp-block-buttons { margin-top: 1.5rem; }
.wp-block-buttons + * { margin-top: 1.5rem; }
.ew-hero .wp-block-buttons + .ew-trust, .ew-hero .wp-block-buttons + .ew-review-info { margin-top: 1.25rem; }
.ew-card .ew-link, .ew-card > p:last-child > a:only-child { margin-top: auto; }

/* Photo rows: equal heights, natural proportions, never upscaled, centered. */
.ew-photo-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); align-items: start; justify-items: center; }
.ew-photo-row .wp-block-image { display: flex; flex-direction: column; align-items: center; width: 100%; }
.ew-photo-row .wp-block-image img { width: auto; max-width: 100%; height: 240px; object-fit: contain; border-radius: var(--ew-radius); }
.ew-photo-row .wp-block-image figcaption { text-align: center; max-width: 280px; }
.ew-prose .ew-photo-row, .ew-section > .ew-photo-row { margin-top: 1.5rem; margin-bottom: 1.75rem; }
@media (max-width: 600px) { .ew-photo-row .wp-block-image img { height: 210px; } }

/* Hero media: images keep a consistent frame and align to the text block. */
.ew-hero .wp-block-columns { align-items: center !important; }
.ew-hero__media .wp-block-image { width: 100%; }
.ew-hero__media figcaption { text-align: left; }

/* Split (text + image) rows align vertically and images fill their column. */
.ew-split { align-items: center !important; }
.ew-split .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; }


/* Space between card grids and whatever follows (captions, links, buttons). */
.ew-grid + *, .ew-page-cards + *, .ew-latest + *, .ew-reviews + *, .ew-office-cards + * { margin-top: 1.75rem !important; }

/* ---------- Contact form ---------- */
.ew-contact-form, .ew-form-success { background: var(--ew-white); border: 1px solid var(--ew-line); border-radius: var(--ew-radius-lg); padding: clamp(22px, 4vw, 36px); box-shadow: var(--ew-shadow); margin-top: 1.5rem; scroll-margin-top: 24px; }
.ew-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 600px) { .ew-form-row { grid-template-columns: 1fr; } }
.ew-field { margin-bottom: 18px; }
.ew-field label { display: block; font-weight: 600; font-size: .9688rem; margin-bottom: 6px; color: var(--ew-slate); }
.ew-req { color: var(--ew-deep-orange); }
.ew-optional { font-weight: 400; color: var(--ew-gray); font-size: .875rem; }
.ew-hint { font-size: .875rem; color: var(--ew-gray); margin: -2px 0 8px; }
.ew-contact-form input[type="text"], .ew-contact-form input[type="email"], .ew-contact-form input[type="tel"], .ew-contact-form select, .ew-contact-form textarea {
	width: 100%; font: inherit; font-size: 1rem; color: var(--ew-slate); background: var(--ew-white);
	border: 1px solid #A9B4BE; border-radius: 8px; padding: 12px 14px; min-height: 48px; box-shadow: none;
}
.ew-contact-form textarea { min-height: 140px; resize: vertical; }
.ew-contact-form input:focus-visible, .ew-contact-form select:focus-visible, .ew-contact-form textarea:focus-visible { outline: 3px solid var(--ew-deep-blue); outline-offset: 1px; border-color: var(--ew-deep-blue); }
.ew-field--error input, .ew-field--error textarea { border-color: #B42318; border-width: 2px; }
.ew-error { color: #B42318; font-size: .875rem; font-weight: 600; margin: 0 0 6px; }
.ew-error-summary { border: 2px solid #B42318; background: #FEF3F2; border-radius: var(--ew-radius); padding: 14px 18px; margin-bottom: 20px; }
.ew-error-summary h2 { font-family: var(--ew-font-body) !important; font-size: 1.0625rem !important; margin: 0 0 6px !important; color: #B42318; }
.ew-error-summary ul { margin: 0; padding-left: 1.2em; }
.ew-error-summary a { color: #B42318; }
.ew-form-note { font-size: .875rem; color: var(--ew-gray); margin: 4px 0 0; }
.ew-contact-form .wp-block-buttons { margin-top: 1.25rem; }
.ew-contact-form button.wp-block-button__link { border: 0; }
.ew-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ew-form-success { border-left: 5px solid #2D7A46; }
.ew-form-success h2 { margin-top: 0; font-size: clamp(1.35rem, 1.2rem + .6vw, 1.6rem); }

/* Breadcrumb bar joins the hero with no white gap. */
.ew-page .site-main > .ew-breadcrumbs { margin-bottom: 0; }
.ew-page .ew-breadcrumbs__inner { padding-bottom: 6px; }
.ew-page .site-main > article, .ew-page .site-main > .inside-article { margin-top: 0; margin-bottom: 0; }

/* Tablets (769–1024px): keep Book an Evaluation in the header beside the menu button.
   Phones use the fixed Call / Book bar instead. */
@media (min-width: 769px) and (max-width: 1024px) {
	.main-navigation .menu-bar-items .ew-header-actions .ew-btn { display: inline-flex; }
	.mobile-menu-control-wrapper { align-items: center; gap: 8px; }
}
@media (max-width: 768px) { .main-navigation .menu-bar-items .ew-header-actions .ew-btn { display: none; } }

/* Header button: keep flex centering inside GeneratePress's menu bar. */
.main-navigation .menu-bar-items .ew-header-actions a.ew-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; padding: 0 1.05em; line-height: 1.2;
}
@media (max-width: 768px) { .main-navigation .menu-bar-items .ew-header-actions a.ew-btn { display: none; } }

/* Dropdown menus: GeneratePress defaults sub-menu text to white; use brand colors. */
.main-navigation .main-nav ul ul li a,
.main-navigation .main-nav ul ul li a:visited { color: var(--ew-slate); background: transparent; }
.main-navigation .main-nav ul ul li:hover > a,
.main-navigation .main-nav ul ul li:focus-within > a,
.main-navigation .main-nav ul ul li.sfHover > a { color: var(--ew-deep-blue); background: var(--ew-mist); }
.main-navigation .main-nav ul ul li[class*="current-menu-"] > a { color: var(--ew-deep-blue); background: var(--ew-mist); box-shadow: inset 3px 0 0 var(--ew-orange); }
.main-navigation .main-nav ul ul .dropdown-menu-toggle { color: inherit; }

/* Two-column Ear Molding dropdown when opened by click, hover or keyboard. */
@media (min-width: 1025px) {
	.main-navigation .main-nav ul li.ew-mega > ul.sub-menu,
	.main-navigation .main-nav ul li.ew-mega > ul.sub-menu.toggled-on,
	.main-navigation .main-nav ul li.ew-mega.sfHover > ul.sub-menu { display: grid; grid-template-columns: 1fr 1fr; width: 520px; padding: 12px; gap: 2px 8px; }
	.main-navigation .main-nav ul li.ew-mega > ul.sub-menu > li { float: none; width: auto; }
	.main-navigation .main-nav ul li.ew-mega > ul.sub-menu > li > a { border-radius: 8px; }
}
