/*
 * Cypress Towne Dental — front-end styles (also loaded in the block editor).
 *
 * Design tokens come from theme.json (colours, font sizes, Inter). Breakpoints follow the HTML version:
 * phones ≤ 767px, tablets 768–1024px, desktop ≥ 1025px.
 */

:root {
	--ctd-brand: var(--wp--preset--color--brand, #009dbb);
	--ctd-brand-dark: var(--wp--preset--color--brand-dark, #007e96);
	--ctd-navy: var(--wp--preset--color--navy, #052348);
	--ctd-tint: var(--wp--preset--color--tint, #e6f5f7);
	--ctd-cream: var(--wp--preset--color--cream, #f3efe6);
	--ctd-sky: var(--wp--preset--color--sky, #05d7ff);
	--ctd-rose: var(--wp--preset--color--rose, #cc3366);
	--ctd-red: #e42f3c;
	--ctd-text: #000;
	--ctd-muted: #5b6770;
	--ctd-radius: 12px;
	--ctd-radius-lg: 20px;
	--ctd-shadow: 0 0 10px rgba(0, 0, 0, .3);
	--ctd-container: 1140px;
	--ctd-gutter: 20px;
	--ctd-section-y: clamp(40px, 5vw, 72px);

	/* Layout tokens (QA 2026-11-17). Breakpoints used everywhere: ≤ 360 / ≤ 767 (phones), 768–1024 (tablets),
	   ≤ 781 (WordPress stacks columns), ≥ 1025 (desktop). CSS variables cannot be used in media queries, so they are
	   listed here for reference only. */
	--ctd-space-2xs: 4px;
	--ctd-space-xs: 8px;
	--ctd-space-sm: 12px;
	--ctd-space-md: 16px;
	--ctd-space-lg: 24px;
	--ctd-space-xl: 32px;
	--ctd-space-2xl: 48px;
	--ctd-col-gap: clamp(24px, 4vw, 48px);   /* gap between columns of a row (and between stacked columns) */
	--ctd-card-gap: clamp(12px, 2vw, 24px);  /* gap between cards of a grid */
	--ctd-media-max: 560px;                  /* tallest a photo next to text may be (desktop) */
	--ctd-media-max-sm: 440px;               /* … when the row is stacked (phones / small tablets) */
	--ctd-radius-sm: 6px;
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	overflow-x: hidden;
	font-family: var(--wp--preset--font-family--inter);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { text-underline-offset: 2px; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible { outline: 3px solid var(--ctd-sky); outline-offset: 2px; }

p { margin: 0 0 1em; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; overflow-wrap: break-word; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	position: fixed !important;
	top: 8px; left: 8px; z-index: 100001;
	width: auto; height: auto; clip: auto;
	padding: 12px 18px;
	background: #fff; color: var(--ctd-navy);
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
	font-weight: 700;
}
.site-main:focus { outline: 0; }

.ctd-container {
	width: 100%;
	max-width: calc(var(--ctd-container) + 2 * var(--ctd-gutter));
	margin-inline: auto;
	padding-inline: var(--ctd-gutter);
}

/* Visibility helpers (Elementor breakpoints) */
@media (max-width: 767px) { .ctd-hide-mobile { display: none !important; } }
@media (min-width: 768px) and (max-width: 1024px) { .ctd-hide-tablet { display: none !important; } }
@media (min-width: 1025px) { .ctd-hide-desktop { display: none !important; } }
@media (min-width: 768px) { .ctd-only-mobile { display: none !important; } }

/* ------------------------------------------------------------------ icons */

.ctd-icon { display: inline-block; flex: none; vertical-align: middle; }
.ctd-stars { display: inline-flex; gap: 2px; color: #f6bb06; vertical-align: middle; }
.ctd-stars .is-off { color: #d5d9dc; }

/* ------------------------------------------------------------------ buttons */

.ctd-btn,
.wp-block-button__link,
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	min-height: 44px;
	padding: 12px 24px;
	border: 2px solid transparent;
	border-radius: var(--ctd-radius);
	background: var(--ctd-brand);
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.ctd-btn:hover,
.ctd-btn:focus-visible,
.wp-block-button__link:hover,
.wp-block-button__link:focus-visible,
.wp-element-button:hover { background: var(--ctd-brand-dark); color: #fff; }

.ctd-btn--navy,
.wp-block-button.is-style-ctd-navy .wp-block-button__link { background: var(--ctd-navy); color: #fff; }
.ctd-btn--navy:hover,
.wp-block-button.is-style-ctd-navy .wp-block-button__link:hover { background: var(--ctd-brand); color: #fff; }

.ctd-btn--light,
.wp-block-button.is-style-ctd-light .wp-block-button__link {
	background: #fff;
	color: var(--ctd-brand);
	box-shadow: 0 0 10px rgba(0, 0, 0, .18);
}
.ctd-btn--light:hover,
.ctd-btn--light:focus-visible,
.wp-block-button.is-style-ctd-light .wp-block-button__link:hover,
.wp-block-button.is-style-ctd-light .wp-block-button__link:focus-visible { background: var(--ctd-navy); color: #fff; }

.ctd-btn--outline,
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--ctd-brand);
	border-color: currentColor;
}
.is-dark .ctd-btn--outline,
.is-dark .wp-block-button.is-style-outline .wp-block-button__link { color: #fff; border-color: var(--ctd-cream); }
.ctd-btn--outline:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.is-dark .ctd-btn--outline:hover,
.is-dark .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--ctd-cream);
	color: var(--ctd-brand);
	border-color: var(--ctd-cream);
}

.wp-block-button.is-style-ctd-red .wp-block-button__link { background: var(--ctd-red); color: #fff; }
.wp-block-button.ctd-btn-sm .wp-block-button__link { font-size: 14px; font-weight: 700; padding: 10px 20px; }
.wp-block-button.ctd-btn-xl .wp-block-button__link { font-size: clamp(22px, 2.4vw, 32px); font-weight: 700; padding: 14px 50px; }
.ctd-btn--block { width: 100%; }

/* Button icons ("has-icon-…" class on the button block) */
.wp-block-button[class*="has-icon-"] .wp-block-button__link::before {
	content: "";
	width: 1em; height: 1em;
	flex: none;
	background: currentColor;
	-webkit-mask: var(--ctd-i) center / contain no-repeat;
	mask: var(--ctd-i) center / contain no-repeat;
}
.has-icon-phone { --ctd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 15.5c-1.2 0-2.5-.2-3.6-.6-.3-.1-.7 0-1 .2l-2.2 2.2c-2.8-1.4-5.1-3.8-6.6-6.6l2.2-2.2c.3-.3.4-.7.2-1C8.7 6.4 8.5 5.2 8.5 4c0-.6-.4-1-1-1H4c-.6 0-1 .4-1 1 0 9.4 7.6 17 17 17 .6 0 1-.4 1-1v-3.5c0-.6-.4-1-1-1z'/%3E%3C/svg%3E"); }
.has-icon-calendar { --ctd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V10h14v10zm-9-3.6-2.3-2.3-1.4 1.4 3.7 3.7 6.7-6.7-1.4-1.4z'/%3E%3C/svg%3E"); }
.has-icon-map { --ctd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E"); }
.has-icon-arrow { --ctd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4l-1.4 1.4 5.6 5.6H4v2h12.2l-5.6 5.6L12 20l8-8z'/%3E%3C/svg%3E"); }
.has-icon-check { --ctd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E"); }
.has-icon-mail { --ctd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E"); }
.has-icon-clock { --ctd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 11h-5v-2h3V6h2v7z'/%3E%3C/svg%3E"); }
.has-icon-star { --ctd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6.1 6.6.8-4.9 4.6 1.3 6.6L12 17.3l-5.9 3.3 1.3-6.6-4.9-4.6 6.6-.8Z'/%3E%3C/svg%3E"); }

.wp-block-buttons { gap: 12px 16px; }
.wp-block-buttons.is-stretch > .wp-block-button { flex: 1 1 100%; }
.wp-block-buttons.is-stretch .wp-block-button__link { width: 100%; }

/* ------------------------------------------------------------------ header */

.ctd-header { position: relative; z-index: 1000; background: #fff; }
.ctd-topbar { background: var(--ctd-brand); color: #fff; }
.ctd-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding-block: 6px; }
.ctd-topbar .ctd-social a { color: #fff; }
.ctd-topbar__phone { display: none; color: #fff; font-weight: 700; text-decoration: none; }
.ctd-topbar__actions { display: flex; align-items: center; gap: 14px; }
.ctd-topbar__sep { width: 1px; height: 28px; background: rgba(255, 255, 255, .7); }

.ctd-pill {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 6px 20px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}
.ctd-pill--red { background: var(--ctd-red); color: #fff; }
.ctd-pill--red:hover { background: #c41d29; color: #fff; }
.ctd-pill--white { background: #fff; color: var(--ctd-navy); }
.ctd-pill--white:hover { background: var(--ctd-navy); color: #fff; }

/* English / Español toggle in the top bar */
.ctd-lang { display: inline-flex; align-items: center; padding: 3px; border-radius: 8px; background: rgba(255, 255, 255, .18); }
.ctd-lang__btn {
	min-height: 28px;
	padding: 4px 12px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .2s, color .2s;
}
.ctd-lang__btn:hover { background: rgba(255, 255, 255, .25); }
.ctd-lang__btn[aria-pressed="true"] { background: #fff; color: var(--ctd-navy); cursor: default; }
.ctd-lang__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ctd-lang__short { display: none; }
/* Narrow phones: the language toggle, Emergency and Schedule fit on one line; the number stays one tap away on the
   phone button in the header below. */
@media (max-width: 419px) { .ctd-topbar:has(.ctd-lang) .ctd-topbar__phone { display: none !important; } .ctd-topbar:has(.ctd-lang) .ctd-topbar__actions { margin-inline: auto; } }
/* The floating GTranslate dropdown is not needed while the top-bar toggle is shown. */
body:has(.ctd-lang) .gtranslate_wrapper, body:has(.ctd-lang) .gt_switcher_wrapper { display: none !important; }

.ctd-masthead { background: #fff; box-shadow: 0 1px 0 rgba(5, 35, 72, .06); }
.ctd-masthead__inner { display: flex; align-items: center; gap: 24px; min-height: 80px; padding-block: 8px; }
.ctd-logo { flex: none; }
.ctd-logo img,
.ctd-logo .custom-logo { display: block; width: auto; max-width: 135px; max-height: 64px; }
.ctd-logo__text { color: var(--ctd-navy); font-weight: 800; font-size: 20px; text-decoration: none; }

.ctd-menu-nav { flex: 1 1 auto; display: flex; justify-content: center; }
.ctd-menu { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ctd-menu > li { position: relative; display: flex; align-items: center; }
.ctd-menu > li > a,
.ctd-menu > li > .ctd-menu__label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 12px;
	border: 0;
	background: none;
	color: var(--ctd-navy);
	font: 500 14px/1.2 var(--wp--preset--font-family--inter);
	text-decoration: none;
	cursor: pointer;
}
.ctd-menu > li > a:hover,
.ctd-menu > li > .ctd-menu__label:hover,
.ctd-menu > li.current-menu-item > a,
.ctd-menu > li.current-menu-ancestor > a { color: var(--ctd-brand); }
.ctd-menu .ctd-submenu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px;
	margin-left: -8px;
	border: 0;
	background: none;
	color: var(--ctd-navy);
	cursor: pointer;
}
.ctd-menu > li > .ctd-menu__label.ctd-submenu-toggle { margin-left: 0; padding: 10px 12px; }
.ctd-menu__caret { transition: transform .2s ease; }
.ctd-menu [aria-expanded="true"] .ctd-menu__caret,
.ctd-mmenu [aria-expanded="true"] .ctd-menu__caret { transform: rotate(180deg); }

.ctd-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 20;
	min-width: 240px;
	margin: 0;
	padding: 10px;
	list-style: none;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 18px 40px rgba(5, 35, 72, .16);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.ctd-menu > li:hover > .sub-menu,
.ctd-menu > li:focus-within > .sub-menu,
.ctd-menu > li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.ctd-menu .sub-menu a {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	color: var(--ctd-navy);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}
.ctd-menu .sub-menu a:hover,
.ctd-menu .sub-menu .current-menu-item > a { background: var(--ctd-tint); color: var(--ctd-brand); }
.ctd-menu .sub-menu .ctd-submenu-toggle,
.ctd-menu .sub-menu .sub-menu { display: none; }
.ctd-menu > li.is-mega > .sub-menu {
	left: 50%;
	display: grid;
	grid-template-columns: repeat(2, minmax(220px, 1fr));
	grid-auto-flow: column;
	grid-template-rows: repeat(10, auto);
	gap: 0 12px;
	width: 560px;
	transform: translate(-50%, 8px);
}
.ctd-menu > li.is-mega:hover > .sub-menu,
.ctd-menu > li.is-mega:focus-within > .sub-menu,
.ctd-menu > li.is-mega.is-open > .sub-menu { transform: translate(-50%, 0); }

.ctd-masthead__cta { display: flex; align-items: center; gap: 18px; flex: none; }
.ctd-masthead__phone { display: inline-flex; align-items: center; gap: 6px; color: var(--ctd-navy); font-weight: 600; font-size: 16px; text-decoration: none; }
.ctd-masthead__phone .ctd-icon { color: var(--ctd-brand); }
.ctd-masthead__phone:hover { color: var(--ctd-brand); }
.ctd-masthead__cta .ctd-btn { min-height: 42px; padding: 9px 20px; border-radius: 8px; font-size: 15px; }

.ctd-burger {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px; height: 44px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: var(--ctd-tint);
	color: var(--ctd-navy);
	cursor: pointer;
}
.ctd-burger__close { display: none; }
.ctd-burger[aria-expanded="true"] .ctd-burger__open { display: none; }
.ctd-burger[aria-expanded="true"] .ctd-burger__close { display: block; }

.ctd-mobile-nav {
	position: absolute;
	top: 100%;
	left: 0; right: 0;
	max-height: calc(100vh - 120px);
	overflow-y: auto;
	padding: 12px var(--ctd-gutter) 24px;
	background: #fff;
	box-shadow: 0 20px 40px rgba(5, 35, 72, .18);
}
.ctd-mmenu, .ctd-mmenu .sub-menu { margin: 0; padding: 0; list-style: none; }
.ctd-mmenu li { position: relative; display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid #edf1f3; }
.ctd-mmenu a,
.ctd-mmenu .ctd-menu__label {
	flex: 1 1 auto;
	padding: 13px 4px;
	border: 0;
	background: none;
	color: var(--ctd-navy);
	font: 600 16px/1.3 var(--wp--preset--font-family--inter);
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}
.ctd-mmenu .ctd-menu__label.ctd-submenu-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.ctd-mmenu .ctd-submenu-toggle:not(.ctd-menu__label) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px; height: 44px;
	border: 0;
	background: none;
	color: var(--ctd-brand);
	cursor: pointer;
}
.ctd-mmenu .sub-menu { display: none; flex: 1 1 100%; padding-left: 14px; }
.ctd-mmenu .is-open > .sub-menu { display: block; }
.ctd-mmenu .sub-menu li:last-child { border-bottom: 0; }
.ctd-mmenu .sub-menu a { font-weight: 500; font-size: 15px; }
.ctd-mobile-nav__cta { display: grid; gap: 10px; margin-top: 16px; }

@media (max-width: 1024px) {
	.ctd-menu-nav { display: none; }
	.ctd-burger { display: inline-flex; }
	.ctd-masthead__inner { justify-content: space-between; gap: 12px; }
	.ctd-logo { margin-right: auto; }
}
@media (max-width: 767px) {
	.ctd-topbar .ctd-social { display: none; }
	.ctd-topbar__phone { display: inline-block; font-size: 14px; }
	.ctd-topbar__sep { display: none; }
	.ctd-topbar__actions { gap: 6px; }
	.ctd-pill { padding: 6px 10px; font-size: 12px; min-height: 30px; }
	.ctd-lang__btn { min-height: 24px; padding: 3px 8px; font-size: 12px; }
	.ctd-lang__long { display: none; }
	.ctd-lang__short { display: inline; }
	.ctd-topbar__phone { white-space: nowrap; }
	.ctd-masthead__inner { position: relative; min-height: 68px; }
	.ctd-logo { margin-right: 0; position: absolute; left: 50%; transform: translateX(-50%); }
	.ctd-logo img, .ctd-logo .custom-logo { max-width: 110px; max-height: 52px; }
	.ctd-masthead__phone span { display: none; }
	.ctd-masthead__phone { width: 40px; height: 40px; justify-content: center; border-radius: 10px; background: var(--ctd-tint); }
	.ctd-masthead__cta { gap: 8px; }
	.ctd-masthead__cta .ctd-btn { display: none; }
}
@media (min-width: 1025px) { .ctd-mobile-nav { display: none !important; } }

/* ------------------------------------------------------------------ social */

.ctd-social { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; list-style: none; }
.ctd-social a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; color: var(--ctd-brand); transition: transform .2s; }
.ctd-social a:hover { transform: translateY(-2px); }

/* ------------------------------------------------------------------ content sections */

.ctd-entry > * { margin-block-start: 0; }
.ctd-entry > .alignfull { margin-block: 0; }

.ctd-section { position: relative; padding-block: var(--ctd-section-y); isolation: isolate; }
.ctd-section.ctd-pad-0 { padding-block: 0; }
.ctd-section.ctd-pad-sm { padding-block: clamp(16px, 2vw, 24px); }
.ctd-section.ctd-pad-lg { padding-block: clamp(60px, 8vw, 110px); }

/* Linked headings keep the heading colour */
.ctd-entry :is(h1, h2, h3, h4, h5, h6) a,
.ctd-feature__title a { color: inherit; text-decoration: none; }
.ctd-entry :is(h1, h2, h3, h4, h5, h6) a:hover { color: var(--ctd-brand); }
.ctd-section.has-bg-image,
.ctd-section[class*="has-overlay-"] { background-size: cover; background-position: center; }
.ctd-section[class*="has-overlay-"]::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	opacity: .97;
	background: var(--ctd-ov, #fff);
}
.ctd-section.has-overlay-brand { --ctd-ov: var(--ctd-brand); }
.ctd-section.has-overlay-tint { --ctd-ov: var(--ctd-tint); }
.ctd-section.has-overlay-white { --ctd-ov: #fff; }
.ctd-section.has-overlay-cream { --ctd-ov: #faf9f6; }
.ctd-section.has-overlay-navy { --ctd-ov: var(--ctd-navy); }
.ctd-section.has-overlay-black { --ctd-ov: #000; }
.ctd-section.has-overlay-black::before { opacity: .45; }

.ctd-section > .wp-block-columns { margin-bottom: 0; }
.ctd-section .wp-block-columns { gap: var(--ctd-col-gap); }
.ctd-section .wp-block-columns + .wp-block-columns { margin-top: var(--ctd-space-lg); }
.ctd-section h2.wp-block-heading:not([class*="-font-size"]) { font-size: var(--wp--preset--font-size--huge); }

/* Dark sections & panels: white text */
.is-dark,
.is-dark p,
.is-dark li,
.is-dark h1, .is-dark h2, .is-dark h3, .is-dark h4, .is-dark h5, .is-dark h6 { color: #fff; }
.is-dark a:not(.wp-block-button__link):not(.ctd-btn):not(.ctd-rating) { color: #fff; }
.is-dark .has-navy-color { color: var(--ctd-navy) !important; }
.is-dark .has-sky-color { color: var(--ctd-sky) !important; }
.is-dark .has-brand-color { color: var(--ctd-brand) !important; }

/* Hero */
.ctd-hero {
	min-height: 500px;
	padding-block: clamp(40px, 6vw, 80px);
	background-color: var(--ctd-navy);
	overflow: hidden;
	align-content: center; /* text vertically centred in the hero, as on the live site */
}
/* Title-only heroes (pattern banners: About, Join our team, doctor pages …) are as tall as their text, like the live
   banners (~210–260px), instead of 500px with 300px of empty colour under the title. */
.ctd-hero:not(.has-bg-image):not(:has(> .wp-block-columns)) { min-height: 0; padding-block: clamp(48px, 6vw, 72px); }
.ctd-hero.has-bg-image { background-position: 70% center; }
.ctd-hero.has-bg-image::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(5, 35, 72, .55) 0%, rgba(5, 35, 72, .1) 60%, rgba(5, 35, 72, 0) 100%);
}
.ctd-hero h1 { font-size: var(--wp--preset--font-size--display); font-weight: 800; }
.ctd-hero h1 + h2,
.ctd-hero h1 + p { font-weight: 500; }
.ctd-hero h1 mark.has-sky-color { font-size: 1.2em; line-height: 1.1; }
.ctd-hero .wp-block-columns { align-items: center !important; }
.ctd-hero .wp-block-image img { border-radius: 0; }

/* Home hero: membership offer on a coloured strip */
.home .ctd-hero h2.has-display-font-size { margin: 0 !important; display: table; line-height: 1.15; }
.home .ctd-hero > h2.has-display-font-size,
.home .ctd-hero > .wp-block-image { margin-left: max(0px, calc((100% - 1300px) / 2)) !important; }
.home .ctd-hero h2.has-display-font-size + h2 { background: rgba(0, 157, 187, .85); padding: 0 10px; border-radius: 4px; }
.home .ctd-hero h1 { margin-top: 40px; font-size: var(--wp--preset--font-size--xxxl); font-weight: 700; text-align: center; }
.home .ctd-hero .wp-block-image { margin-left: 0; text-align: left; }

/* Panels (cards with a background) */
.ctd-panel {
	padding: clamp(22px, 3vw, 34px) clamp(18px, 2.5vw, 28px);
	border-radius: var(--ctd-radius-lg);
	box-shadow: var(--ctd-shadow);
}
.ctd-panel.has-brand-background-color,
.ctd-panel.has-navy-background-color { text-align: center; }
.ctd-panel.has-brand-background-color .wp-block-buttons,
.ctd-panel.has-navy-background-color .wp-block-buttons { justify-content: center; }
.ctd-panel.has-brand-background-color .wp-block-image,
.ctd-panel.has-navy-background-color .wp-block-image { margin-inline: auto; text-align: center; }
.ctd-panel.has-brand-background-color .wp-block-image img { max-width: 130px; }
.ctd-panel > * + * { margin-top: 12px; }
.ctd-panel.is-white { box-shadow: 0 10px 30px rgba(5, 35, 72, .08); }
.ctd-panel.has-cream-background-color { box-shadow: none; border-radius: 25px; }
.wp-block-column.ctd-panel { align-self: flex-start; }
.wp-block-column.ctd-media-col { padding: 0; border-radius: 15px; overflow: hidden; align-self: stretch; }
.wp-block-column.ctd-media-col .wp-block-image,
.wp-block-column.ctd-media-col .wp-block-image img { width: 100%; height: 100%; margin: 0; }
.wp-block-column.ctd-media-col .wp-block-image img { object-fit: cover; border-radius: 0; box-shadow: none; }
.ctd-panel h2,
.ctd-panel h3 { margin-bottom: 0; }

@media (max-width: 781px) { .wp-block-columns.ctd-reverse-mobile { flex-direction: column-reverse; } }

/* Headings & text helpers */
.ctd-eyebrow {
	margin-bottom: 8px !important;
	color: var(--ctd-brand);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: .3px;
	text-transform: uppercase;
}
.is-dark .ctd-eyebrow { color: var(--ctd-cream); }
.ctd-lead-title { font-weight: 600; line-height: 1.35; }
.is-upper { text-transform: uppercase; }
.ctd-entry p { line-height: 1.7; }
.ctd-section p:not([class*="-font-size"]),
.ctd-section li { font-size: 16px; }
.ctd-pill-label {
	display: inline-block;
	margin: 0 8px 8px 0 !important;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--ctd-tint);
	color: var(--ctd-navy);
	font-weight: 700;
	font-size: 15px;
}
.ctd-caption { font-size: 14px; color: var(--ctd-muted); }

/* Images */
.wp-block-image { margin-bottom: 0; }
.wp-block-image img { vertical-align: middle; }
.wp-block-image.ctd-rounded img { border-radius: var(--ctd-radius-lg); }
.wp-block-image.ctd-shadow-tl img { border-radius: var(--ctd-radius-lg); box-shadow: -11px -10px 0 0 var(--ctd-brand); }
.wp-block-image.ctd-shadow-br img { border-radius: 15px; box-shadow: 20px 20px 0 0 var(--ctd-brand); }
.wp-block-image.ctd-soft-shadow img { box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.wp-block-image.ctd-circle img { border-radius: 50%; }
.wp-block-image.ctd-img-narrow img { max-width: 76%; }
.wp-block-image.ctd-img-icon img { max-width: 110px; }
.wp-block-image.ctd-img-small img { max-width: 300px; }
.wp-block-image.ctd-shadow-tl { padding: 12px 0 0 12px; }
.wp-block-image.ctd-shadow-br { padding: 0 22px 22px 0; }
@media (max-width: 767px) {
	.wp-block-image.ctd-shadow-br img { box-shadow: 10px 10px 0 0 var(--ctd-brand); }
	.wp-block-image.ctd-shadow-tl img { box-shadow: -8px -8px 0 0 var(--ctd-brand); }
}

/* Lists */
.ctd-entry ul.wp-block-list,
.ctd-entry ol.wp-block-list { padding-left: 1.3em; margin: 0 0 1em; }
.ctd-entry li { margin-bottom: .35em; line-height: 1.6; }
.ctd-checklist,
.ctd-iconlist { list-style: none; padding-left: 0 !important; }
.ctd-checklist li,
.ctd-iconlist li { position: relative; padding-left: 32px; }
.ctd-checklist li::before,
.ctd-iconlist[class*="has-icon-"] li::before {
	content: "";
	position: absolute;
	left: 0; top: .2em;
	width: 20px; height: 20px;
	background: var(--ctd-brand);
	-webkit-mask: var(--ctd-i) center / contain no-repeat;
	mask: var(--ctd-i) center / contain no-repeat;
}
.ctd-checklist { --ctd-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1.2 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7Z'/%3E%3C/svg%3E"); }
.ctd-iconlist:not([class*="has-icon-"]) li::before {
	content: "";
	position: absolute;
	top: .55em; left: 6px;
	width: 8px; height: 8px;
	border: solid var(--ctd-brand);
	border-width: 0 2px 2px 0;
	transform: rotate(-45deg);
}
.ctd-iconlist a, .ctd-checklist a { color: var(--ctd-navy); text-decoration: none; font-weight: 600; }
.ctd-iconlist a:hover, .ctd-checklist a:hover { color: var(--ctd-brand); }
.ctd-iconlist.is-inline { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.is-dark .ctd-checklist li::before,
.is-dark .ctd-iconlist[class*="has-icon-"] li::before { background-color: #fff; }

/* Feature (icon box / image box) */
.ctd-feature { position: relative; margin-bottom: 18px; }
.ctd-feature.has-icon-check { padding-left: 38px; }
.ctd-feature.has-icon-check::before {
	content: "";
	position: absolute;
	left: 0; top: 2px;
	width: 26px; height: 26px;
	background: var(--ctd-brand);
	-webkit-mask: var(--ctd-i) center / contain no-repeat;
	mask: var(--ctd-i) center / contain no-repeat;
}
.ctd-feature__title { margin: 0 0 4px; font-weight: 700; color: var(--ctd-navy); }
.ctd-feature__title:not([class*="-font-size"]) { font-size: 16px; }
.ctd-feature p { margin: 0; }
.ctd-feature--image { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 4px 14px; }
.ctd-feature--image > .wp-block-image { grid-row: span 2; }
.ctd-feature--image img { width: 54px; height: 54px; object-fit: contain; }
.is-dark .ctd-feature__title { color: #fff; }

/* Service cards (image + title + text) */
.wp-block-column:has(> .wp-block-image + .wp-block-heading) {
	padding: 10px 10px 18px;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 0 10px rgba(0, 0, 0, .15);
}
.wp-block-column:has(> .wp-block-image + .wp-block-heading) .wp-block-image img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 4px; }
.wp-block-column:has(> .wp-block-image + .wp-block-heading) .wp-block-heading { margin: 10px 0 6px; }
.wp-block-column:has(> .wp-block-image + .wp-block-heading) p { font-size: 14px; line-height: 1.5; margin-bottom: 0; }

/* FAQ (details blocks) */
.ctd-faq { display: grid; gap: 10px; }
.ctd-faq-item {
	margin: 0 !important;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 2px 10px rgba(5, 35, 72, .12);
	overflow: hidden;
}
.ctd-faq-item summary {
	position: relative;
	display: block;
	padding: 14px 48px 14px 18px;
	color: var(--ctd-navy);
	font-weight: 600;
	font-size: 15px;
	line-height: 1.45;
	cursor: pointer;
	list-style: none;
}
.ctd-faq-item summary::-webkit-details-marker { display: none; }
.ctd-faq-item summary::after {
	content: "";
	position: absolute;
	right: 18px; top: 50%;
	width: 14px; height: 14px;
	margin-top: -7px;
	background:
		linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat,
		linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat;
	transition: transform .2s ease;
}
.ctd-faq-item[open] summary::after { transform: rotate(45deg); }
.ctd-faq-item[open] summary { color: var(--ctd-brand); }
.ctd-faq-item > :not(summary) { padding: 0 18px; }
.ctd-faq-item > :not(summary):last-child { padding-bottom: 16px; }
.ctd-faq-item p { font-size: 15px !important; }
.wp-block-column .ctd-faq-item { background: var(--ctd-tint); box-shadow: none; }
.wp-block-column .ctd-faq-item summary { color: var(--ctd-brand); }

/* Carousel (gallery with class ctd-carousel) and gallery */
.wp-block-gallery.ctd-carousel {
	display: grid !important;
	grid-auto-flow: column;
	grid-auto-columns: calc(50% - 8px);
	gap: 16px !important;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding-bottom: 0;
}
.wp-block-gallery.ctd-carousel::-webkit-scrollbar { display: none; }
/* Controls added by main.js: arrows on the sides, dots underneath. */
.ctd-carousel-wrap { position: relative; max-width: var(--wp--style--global--content-size, 1140px); margin-inline: auto; }
.ctd-carousel__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	margin-top: -36px; /* centred on the photos, not on photos + dots */
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--ctd-navy);
	box-shadow: 0 2px 10px rgba(5, 35, 72, .2);
	cursor: pointer;
}
.ctd-carousel__nav:hover, .ctd-carousel__nav:focus-visible { background: var(--ctd-brand); color: #fff; }
.ctd-carousel__nav.is-prev { left: -20px; }
.ctd-carousel__nav.is-next { right: -20px; }
.ctd-carousel__dots { display: flex; justify-content: center; gap: 8px; margin-top: var(--ctd-space-md); }
.ctd-carousel__dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #c9d3dc; cursor: pointer; transition: width .2s, background-color .2s; }
.ctd-carousel__dot[aria-current="true"] { width: 24px; border-radius: 5px; background: var(--ctd-brand); }
@media (max-width: 1240px) { .ctd-carousel__nav.is-prev { left: 6px; } .ctd-carousel__nav.is-next { right: 6px; } }
@media (max-width: 767px) { .ctd-carousel__nav { width: 34px; height: 34px; margin-top: -30px; } }
.wp-block-gallery.ctd-carousel > .wp-block-image { width: auto !important; margin: 0 !important; scroll-snap-align: start; }
.wp-block-gallery.ctd-carousel img { width: 100%; height: auto !important; object-fit: contain !important; }
@media (max-width: 767px) { .wp-block-gallery.ctd-carousel { grid-auto-columns: 100%; gap: 0 !important; } }
/* Insurance logo slider ([ctd_insurance_logos], phones): two logo cards per view; swipe, dots and auto-play
   (the arrows would cover the logos, so they are left out here). */
.wp-block-gallery.ctd-carousel.ctd-logo-slider { grid-auto-columns: calc(50% - 6px); gap: 12px !important; margin: var(--ctd-space-md) 0 0; padding: 4px 2px 10px; }
.wp-block-gallery.ctd-carousel.ctd-logo-slider > .wp-block-image {
	display: flex !important;
	align-items: center;
	justify-content: center;
	height: 88px;
	padding: 12px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(5, 35, 72, .08);
}
.wp-block-gallery.ctd-carousel.ctd-logo-slider img { width: auto !important; max-width: 82%; max-height: 48px; height: auto !important; }
.ctd-carousel-wrap:has(> .ctd-logo-slider) { margin-bottom: var(--ctd-space-md); }
.ctd-carousel-wrap:has(> .ctd-logo-slider) .ctd-carousel__nav { display: none; }
.ctd-carousel-wrap:has(> .ctd-logo-slider) .ctd-carousel__dots { gap: 6px; margin-top: 10px; }
.ctd-carousel-wrap:has(> .ctd-logo-slider) .ctd-carousel__dot { width: 8px; height: 8px; }
.ctd-carousel-wrap:has(> .ctd-logo-slider) .ctd-carousel__dot[aria-current="true"] { width: 20px; }

.wp-block-gallery.ctd-gallery { gap: 4px !important; }
.wp-block-gallery.ctd-gallery img { border-radius: 4px; }

.wp-block-separator.ctd-divider {
	position: relative;
	width: 200px;
	max-width: 60%;
	margin: 6px auto 24px;
	border: 0;
	border-top: 2px solid var(--ctd-navy);
	opacity: 1;
	overflow: visible;
	background: none;
}
.wp-block-separator.ctd-divider::after {
	content: "";
	position: absolute;
	left: 50%; top: -11px;
	width: 22px; height: 20px;
	margin-left: -11px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23052348' d='M12 3.5c-1.4-1-3.6-1.6-5.3-.7C4.2 4 3.6 7.2 4.6 10c.7 1.9 1 3.8 1.2 5.8.2 2 .6 5 2.2 5 1.4 0 1.6-2.2 2-4 .3-1.3.8-2.3 2-2.3s1.7 1 2 2.3c.4 1.8.6 4 2 4 1.6 0 2-3 2.2-5 .2-2 .5-3.9 1.2-5.8 1-2.8.4-6-2.1-7.2-1.7-.9-3.9-.3-5.3.7Z'/%3E%3C/svg%3E") center / 18px no-repeat;
}

/* Tables & quotes in articles */
.wp-block-table { overflow-x: auto; margin: 0 0 1.5em; }
.wp-block-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.wp-block-table th,
.wp-block-table td { padding: 10px 12px; border: 1px solid #d6e3e6; text-align: left; vertical-align: top; }
.wp-block-table thead th,
.wp-block-table tr:first-child th { background: var(--ctd-tint); color: var(--ctd-navy); }
.wp-block-quote { margin: 1.5em 0; padding: 12px 20px; border-left: 4px solid var(--ctd-brand); background: var(--ctd-tint); border-radius: 0 8px 8px 0; }
.wp-block-embed { margin: 1.5em 0; }

/* ------------------------------------------------------------------ rating badge & reviews */

.ctd-rating {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	margin: 6px 0 18px;
	color: inherit;
	font-weight: 600;
	font-size: 18px;
	text-decoration: none;
}
.ctd-rating:hover .ctd-rating__count { text-decoration: underline; }
.is-dark .ctd-rating { color: #fff; }

.ctd-reviews { padding: 20px; background: var(--ctd-cream); border-radius: 15px; color: var(--ctd-text); text-align: left; }
.ctd-reviews p,
.ctd-reviews li { color: var(--ctd-text) !important; }
.ctd-reviews__summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; margin-bottom: 16px; }
.ctd-reviews__summary p { margin: 0; }
.ctd-reviews__word { font-weight: 800; font-size: 20px; letter-spacing: .5px; }
.ctd-reviews__count { font-size: 15px; }
.ctd-reviews__google { display: inline-flex; align-items: center; gap: 6px; color: #3c4043 !important; font-weight: 600; text-decoration: none; }
.ctd-reviews__viewport { position: relative; display: flex; align-items: center; gap: 8px; }
.ctd-reviews__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 3 * 16px) / 4);
	gap: 16px;
	flex: 1 1 auto;
	min-width: 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding: 4px;
}
.ctd-reviews__track::-webkit-scrollbar { display: none; }
@media (max-width: 1024px) { .ctd-reviews__track { grid-auto-columns: calc((100% - 16px) / 2); } }
@media (max-width: 767px) { .ctd-reviews__track { grid-auto-columns: 86%; } }
.ctd-reviews__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 36px; height: 36px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--ctd-navy);
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
	cursor: pointer;
}
.ctd-reviews__nav:hover { background: var(--ctd-brand); color: #fff; }
.ctd-reviews__nav[disabled] { opacity: .35; cursor: default; }
@media (max-width: 767px) { .ctd-reviews__nav { display: none; } }
.ctd-review {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
	scroll-snap-align: start;
}
.ctd-review__head { display: flex; align-items: center; gap: 10px; }
.ctd-review__head > div { flex: 1 1 auto; min-width: 0; }
.ctd-review__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.ctd-review__avatar.is-initial { display: inline-flex; align-items: center; justify-content: center; background: var(--ctd-brand); color: #fff; font-weight: 700; }
.ctd-review__name { margin: 0 !important; font-weight: 700; font-size: 15px !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Reviewer name links to the Google profile (Google attribution); same look as plain names, also inside dark bands. */
.ctd-reviews .ctd-review .ctd-review__name a, .is-dark .ctd-reviews .ctd-review .ctd-review__name a:not(.ctd-btn) { color: inherit; text-decoration: none; }
.ctd-reviews .ctd-review__name a:hover, .ctd-reviews .ctd-review__name a:focus-visible { text-decoration: underline; }
.ctd-review__date { margin: 0 !important; font-size: 12px !important; color: var(--ctd-muted) !important; }
.ctd-review__g { flex: none; }
.ctd-review__text { font-size: 14px; line-height: 1.55; }
.ctd-review__text p { font-size: 14px !important; margin: 0; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.ctd-review__text.is-open p { -webkit-line-clamp: unset; display: block; }
.ctd-review__more { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--ctd-brand); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }

/* ------------------------------------------------------------------ banners & bands (templates) */

.ctd-banner { padding: clamp(36px, 5vw, 64px) 0; background: var(--ctd-tint); text-align: center; }
.ctd-banner__title { margin: 0; font-size: var(--wp--preset--font-size--huge); color: var(--ctd-navy); }
.ctd-banner__eyebrow { margin: 0 0 6px; color: var(--ctd-brand); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.ctd-banner--pattern {
	position: relative;
	min-height: 300px;
	display: flex;
	align-items: center;
	background: var(--ctd-brand) url("../images/pattern-leaves.png") center / cover;
	isolation: isolate;
}
.ctd-banner--pattern::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ctd-brand); opacity: .97; }
.ctd-banner--pattern .ctd-banner__title { color: #fff; font-weight: 700; }
.ctd-banner--blog .ctd-banner__title { font-weight: 700; }
.ctd-banner .ctd-search { max-width: 520px; margin: 18px auto 0; }

.ctd-page-body { padding-block: clamp(32px, 5vw, 64px); }

.ctd-band { position: relative; padding-block: clamp(40px, 5vw, 70px); isolation: isolate; }
.ctd-band--reviews { background: var(--ctd-brand) url("../images/pattern-leaves.png") center / cover; text-align: center; }
.ctd-band--reviews::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ctd-brand); opacity: .97; }
.ctd-band__title { font-size: var(--wp--preset--font-size--display); font-weight: 800; color: #fff; margin-bottom: 24px; }
.ctd-band--cta { background: var(--ctd-brand); }
.ctd-band--cta .ctd-band__title { font-size: var(--wp--preset--font-size--huge); font-weight: 700; margin-bottom: 12px; }
.ctd-band__row { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; }
.ctd-band__text { max-width: 760px; margin: 0; font-size: 18px; font-weight: 500; }
.ctd-band__actions { display: grid; gap: 12px; flex: none; }
.ctd-band__actions .ctd-btn { font-size: 14px; font-weight: 700; }
@media (max-width: 767px) {
	.ctd-band__row { flex-direction: column; text-align: center; }
	.ctd-band__actions { width: 100%; }
}

/* Service page with sidebar */
.ctd-service__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 40px;
	padding-block: clamp(32px, 4vw, 56px);
}
.ctd-service__aside { display: flex; flex-direction: column; gap: 24px; }
.ctd-service__img { margin: 0; }
.ctd-service__img img { width: 100%; border-radius: var(--ctd-radius-lg); box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.ctd-service__main .ctd-service__img { margin-bottom: 20px; }
@media (max-width: 1024px) { .ctd-service__grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; } }
@media (max-width: 767px) { .ctd-service__grid { grid-template-columns: 1fr; } }

/* Offer card ($99 new patient special) */
.ctd-offer {
	position: sticky;
	top: 24px;
	display: grid;
	gap: 12px;
	justify-items: center;
	padding: 28px 22px;
	background: var(--ctd-brand);
	border-radius: var(--ctd-radius-lg);
	box-shadow: var(--ctd-shadow);
	color: #fff;
	text-align: center;
}
.ctd-offer p { margin: 0; color: #fff; }
.ctd-offer__icon { width: 65px; height: auto; }
.ctd-offer__price { font-size: 40px; font-weight: 700; line-height: 1.1; }
.ctd-offer__title { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.ctd-offer__text { margin-top: -10px !important; font-size: 15px; font-weight: 700; letter-spacing: .5px; }
.ctd-offer__or { font-size: 22px; font-weight: 700; }
.ctd-offer__visit { font-size: 17px; line-height: 1.35; }
.ctd-offer .ctd-btn { max-width: 230px; font-size: 13px; font-weight: 700; min-height: 40px; padding: 8px 16px; }

/* Prose (articles, text pages) */
.ctd-prose { font-size: 16px; }
.ctd-prose h2 { font-size: var(--wp--preset--font-size--xxl); font-weight: 600; color: #1d1d1d; margin: 1.2em 0 .5em; }
.ctd-prose h3 { font-size: var(--wp--preset--font-size--xl); font-weight: 600; color: #1d1d1d; margin: 1.1em 0 .45em; }
.ctd-prose h4 { font-size: var(--wp--preset--font-size--lg); font-weight: 600; color: #1d1d1d; }
.ctd-prose a:not(.wp-block-button__link) { color: var(--ctd-rose); }
.ctd-prose .wp-block-image { margin: 1.5em 0; }
.ctd-prose .wp-block-image img { border-radius: 6px; }
.ctd-prose > :first-child { margin-top: 0; }

/* ------------------------------------------------------------------ blog listing */

.ctd-listing {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 32px;
	padding-block: clamp(28px, 4vw, 48px) clamp(40px, 5vw, 64px);
}
.ctd-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1024px) {
	.ctd-listing { grid-template-columns: 1fr; }
	.ctd-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) { .ctd-cards { grid-template-columns: 1fr; } }

.ctd-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #69c8db;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow .25s ease, transform .25s ease;
}
.ctd-card:hover { box-shadow: 0 10px 28px rgba(5, 35, 72, .14); transform: translateY(-2px); }
.ctd-card__media { display: block; aspect-ratio: 16 / 9.5; background: var(--ctd-tint); }
.ctd-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ctd-card__badge {
	position: absolute;
	top: 10px; right: 10px;
	max-width: calc(100% - 20px);
	padding: 3px 10px;
	border-radius: 999px;
	background: #61ce70;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.6;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ctd-card__badge:hover { background: var(--ctd-brand); color: #fff; }
.ctd-card__body { flex: 1 1 auto; padding: 18px 16px 12px; }
.ctd-card__title { margin: 0 0 10px; font-size: 15px; font-weight: 600; line-height: 1.35; color: #000; }
.ctd-card__title a { color: inherit; text-decoration: none; }
.ctd-card__title a:hover { color: var(--ctd-brand); }
.ctd-card__more { color: var(--ctd-brand); font-size: 11px; font-weight: 700; text-transform: uppercase; text-decoration: none; }
.ctd-card__meta { margin: 0; padding: 10px 16px; border-top: 1px solid #eef3f4; color: #8a8a8a; font-size: 11px; }

.ctd-listing__aside .ctd-widget {
	position: sticky;
	top: 24px;
	padding: 20px 22px;
	background: var(--ctd-brand);
	border-radius: 4px;
	color: #fff;
}
.ctd-widget__title { margin: 0 0 12px; color: #fff; font-size: 20px; font-weight: 500; }
.ctd-widget ul { margin: 0; padding-left: 18px; }
.ctd-widget li { margin: 2px 0; color: #fff; font-size: 14px; }
.ctd-widget a { color: #fff; text-decoration: none; }
.ctd-widget a:hover { text-decoration: underline; }

.ctd-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 32px 0 0; padding: 0; list-style: none; }
.ctd-pagination a,
.ctd-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px; height: 40px;
	padding: 0 10px;
	border-radius: 8px;
	background: var(--ctd-tint);
	color: var(--ctd-navy);
	font-weight: 700;
	text-decoration: none;
}
.ctd-pagination .current { background: var(--ctd-brand); color: #fff; }
.ctd-pagination a:hover { background: var(--ctd-navy); color: #fff; }
.ctd-pagination .dots { background: none; }

.ctd-search { display: flex; gap: 6px; }
.ctd-search__field { flex: 1 1 auto; min-height: 44px; padding: 8px 14px; border: 1px solid #b9d9df; border-radius: 10px; font: inherit; }
.ctd-search__submit { display: inline-flex; align-items: center; justify-content: center; width: 48px; border: 0; border-radius: 10px; background: var(--ctd-brand); color: #fff; cursor: pointer; }
.ctd-empty { padding: 32px; background: var(--ctd-tint); border-radius: 12px; text-align: center; }

/* ------------------------------------------------------------------ article */

.ctd-article__hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 400px;
	padding: 40px 0;
	background: #333 var(--ctd-hero) center / cover no-repeat;
	isolation: isolate;
}
.ctd-article__hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #000; opacity: .39; }
.ctd-article__title { max-width: 820px; margin: 0 0 10px; color: #fff; font-size: var(--wp--preset--font-size--xxl); font-weight: 700; line-height: 1.25; }
.ctd-article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: #fff; font-size: 14px; font-weight: 700; }
.ctd-article__meta a { color: #fff; text-decoration: none; }
.ctd-article__meta a:hover { text-decoration: underline; }
.ctd-breadcrumbs { margin-bottom: 10px; color: rgba(255, 255, 255, .85); font-size: 13px; }
.ctd-breadcrumbs a { color: #fff; }

.ctd-article__grid {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 32px;
	align-items: start;
	padding-bottom: clamp(40px, 5vw, 64px);
}
.ctd-article__aside { padding-top: 40px; }
.ctd-article__main {
	min-width: 0;
	margin-top: -40px;
	padding: 0 0 24px;
	background: #fff;
	border: 1px solid #ccc;
	box-shadow: 0 0 18px rgba(0, 0, 0, .12);
}
.ctd-article__image { margin: 0; }
.ctd-article__image img { display: block; width: 100%; }
.ctd-article__main > .ctd-prose,
.ctd-article__main > .ctd-toc,
.ctd-article__main > .ctd-article__foot { margin-inline: clamp(14px, 2vw, 24px); }
.ctd-article__main .ctd-prose { font-size: 15px; padding-top: 24px; overflow-wrap: break-word; }
@media (max-width: 1024px) {
	.ctd-article__grid { grid-template-columns: minmax(0, 1fr); }
	.ctd-article__aside { order: 2; padding-top: 0; }
	.ctd-article__main { margin-top: 24px; }
}

.ctd-toc { margin-top: 12px; border: 1px solid #9da5ae; border-radius: 3px; }
.ctd-toc__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 12px 14px;
	border: 0;
	background: #fff;
	color: #000;
	font: 700 15px/1.3 var(--wp--preset--font-family--inter);
	cursor: pointer;
}
.ctd-toc__toggle[aria-expanded="true"] .ctd-icon { transform: rotate(180deg); }
.ctd-toc__list { margin: 0; padding: 4px 14px 14px 34px; border-top: 1px solid #9da5ae; }
.ctd-toc__list li { margin: 6px 0; font-size: 14px; }
.ctd-toc__list li.is-h3 { margin-left: 16px; list-style: circle; }
.ctd-toc__list a { color: var(--ctd-navy); }

.ctd-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 0; padding: 0; list-style: none; }
.ctd-tags a { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--ctd-tint); color: var(--ctd-navy); font-size: 12px; text-decoration: none; }
.ctd-tags a:hover { background: var(--ctd-brand); color: #fff; }
.ctd-article__main .s4a-box { margin: 32px 0 0; }

/* ------------------------------------------------------------------ doctors, visit, footer */

.ctd-doctors { padding-block: clamp(48px, 6vw, 80px) clamp(28px, 4vw, 48px); background: #fff; }
.ctd-doctors__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; }
.ctd-doctor { position: relative; margin-top: 60px; padding: 100px clamp(20px, 3vw, 30px) 30px; background: #f2efe6; border-radius: 25px; }
.ctd-doctor__photo {
	position: absolute;
	top: -60px; left: clamp(20px, 3vw, 30px);
	width: 150px; height: 150px;
	border: 5px solid #fff;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .1);
}
.ctd-doctor__name { margin: 0 0 12px; color: var(--ctd-navy); font-size: var(--wp--preset--font-size--xxl); font-weight: 800; }
.ctd-doctor__bio { margin: 0 0 18px; font-size: 14px; line-height: 1.6; }
.ctd-doctor__link { display: inline-flex; align-items: center; gap: 6px; color: var(--ctd-brand); font-weight: 600; font-size: 14px; }
@media (max-width: 767px) { .ctd-doctors__grid { grid-template-columns: 1fr; } }

.ctd-visit { position: relative; padding-block: clamp(40px, 5vw, 64px); background: #faf9f6 url("../images/pattern-leaves.png") center / cover; isolation: isolate; }
.ctd-visit::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #faf9f6; opacity: .96; }
.ctd-visit__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.ctd-visit__media { display: grid; justify-items: center; gap: 22px; }
.ctd-visit__photo { width: 100%; border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.ctd-visit__card { padding: clamp(24px, 4vw, 50px) clamp(20px, 4vw, 60px); background: #fff; border-radius: 4px; }
.ctd-visit__title { margin: 0 0 16px; color: #1d1d1d; font-size: var(--wp--preset--font-size--xxl); font-weight: 700; }
.ctd-visit__sub { margin: 24px 0 8px; color: #1d1d1d; font-size: 20px; font-weight: 600; }
.ctd-visit__address { margin: 0; font-size: 16px; }
.ctd-visit__address a { color: #000; }
.ctd-visit__phone { color: var(--ctd-rose); text-decoration: none; }
.ctd-hours { margin: 0; font-size: 15px; }
.ctd-hours > div { display: flex; gap: 6px; }
.ctd-hours dt { font-weight: 700; }
.ctd-hours dd { margin: 0; }
@media (max-width: 767px) {
	.ctd-visit__grid { grid-template-columns: 1fr; }
	.ctd-visit__card { text-align: center; }
	.ctd-hours > div { justify-content: center; }
}

.ctd-footer { padding-top: clamp(40px, 5vw, 64px); background: #fff; color: #000; font-size: 15px; }
.ctd-footer__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.ctd-footer__logo img { width: 170px; height: auto; }
.ctd-footer__heading { margin: 18px 0 10px; color: #000; font-size: 15px; font-weight: 700; line-height: 1.4; }
.ctd-footer__col > .ctd-footer__heading:first-child { margin-top: 0; }
.ctd-footer__connect { color: var(--ctd-navy); }
.ctd-footer__phone { display: inline-flex; align-items: center; gap: 6px; color: #000; text-decoration: none; }
.ctd-footer__phone .ctd-icon { color: var(--ctd-brand); }
.ctd-footer__links { margin: 0; padding: 0; list-style: none; }
.ctd-footer__links li { margin: 0 0 10px; }
.ctd-footer__links a { color: #000; font-size: 14px; text-decoration: none; }
.ctd-footer__links a:hover { color: var(--ctd-brand); }
.ctd-footer .ctd-social a { width: 26px; height: 26px; }
.ctd-footer .ctd-social li:nth-child(1) a { color: #1877f2; }
.ctd-footer .ctd-social li:nth-child(2) a { color: #e1306c; }
.ctd-footer .ctd-social li:nth-child(3) a { color: #000; }
.ctd-footer__map .ctd-map iframe { height: 250px; }
.ctd-footer__bottom { margin-top: 40px; padding: 18px 0; text-align: center; font-size: 14px; }
.ctd-footer__bottom p { margin: 0; }
@media (max-width: 1024px) { .ctd-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ctd-footer__grid { grid-template-columns: 1fr; } }
@media (max-width: 767px) { .has-ctd-dock .ctd-footer__bottom { padding-bottom: 96px; } }

.ctd-map { position: relative; overflow: hidden; border-radius: 8px; background: var(--ctd-tint); }
.ctd-map iframe { display: block; width: 100%; height: 450px; border: 0; }

/* ------------------------------------------------------------------ quick-contact dock (from the HTML version) */

.ctd-dock { --dock-teal: #087f87; --dock-teal-dark: #05666d; --dock-ink: #173b40; --dock-small: #68838a; position: fixed; z-index: 9990; font-family: inherit; }
.ctd-dock__pill {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin: 0;
	padding: 0 15px;
	background: #fff;
	color: var(--dock-ink);
	border: 1px solid rgba(0, 0, 0, .07);
	border-radius: 15px 0 0 15px;
	box-shadow: 0 5px 22px rgba(0, 0, 0, .13);
	font-size: 14px;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	cursor: pointer;
	transition: width .35s cubic-bezier(.22, 1, .36, 1), background .25s ease, box-shadow .25s ease;
}
.ctd-dock__pill:hover,
.ctd-dock__pill:focus-visible { box-shadow: 0 8px 26px rgba(0, 0, 0, .18); text-decoration: none; }
.ctd-dock__text { display: flex; flex-direction: column; gap: 4px; opacity: 0; visibility: hidden; transform: translateX(10px); transition: opacity .25s ease, transform .35s cubic-bezier(.22, 1, .36, 1), visibility .25s; }
.ctd-dock__text small { font-size: 10px; font-weight: 500; color: var(--dock-small); }
.ctd-dock__text strong { font-size: 14px; font-weight: 700; color: var(--dock-ink); }
.ctd-dock__icon { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 25px; width: 25px; height: 25px; }
.ctd-dock__short { display: none; }
.ctd-dock__live { position: absolute; top: -3px; right: -5px; width: 8px; height: 8px; border-radius: 50%; background: #23c58b; border: 2px solid #fff; }
.ctd-dock__pill--book { background: var(--dock-teal); color: #fff; border-color: var(--dock-teal); }
.ctd-dock__pill--book .ctd-dock__text small { color: rgba(255, 255, 255, .82); }
.ctd-dock__pill--book .ctd-dock__text strong { color: #fff; }
.ctd-dock__pill--book:hover { background: var(--dock-teal-dark); color: #fff; }
@media (min-width: 768px) {
	.ctd-dock { top: 50%; right: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; transform: translateY(-50%); }
	.ctd-dock__pill { width: 56px; height: 58px; gap: 16px; interpolate-size: allow-keywords; }
	.ctd-dock__pill:hover,
	.ctd-dock__pill:focus-visible { width: fit-content; }
	.ctd-dock__pill:hover .ctd-dock__text,
	.ctd-dock__pill:focus-visible .ctd-dock__text { opacity: 1; visibility: visible; transform: none; }
	.ctd-dock__text { width: max-content; }
}
@media (max-width: 767px) {
	.ctd-dock { left: 0; right: 0; bottom: 0; display: flex; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid #e6eeee; box-shadow: 0 -5px 25px rgba(0, 0, 0, .1); }
	.ctd-dock__pill--msg, .ctd-dock__pill--map { display: none; }
	.ctd-dock__pill { flex: 1 1 0; justify-content: center; gap: 8px; height: 52px; padding: 0 9px; border-radius: 11px; }
	.ctd-dock__pill--call { background: #f0fafa; color: var(--dock-teal); border-color: #c5e6e8; }
	.ctd-dock__text { display: none; }
	.ctd-dock__short { display: inline-block; font-size: 13px; font-weight: 700; }
	.ctd-dock__live { display: none; }
	.ctd-dock__pill--call .ctd-icon { animation: ctd-vibrate 2.8s ease-in-out infinite; }
}
@keyframes ctd-vibrate { 0%, 6%, 24%, 100% { transform: rotate(0); } 8%, 12%, 16%, 20% { transform: rotate(-14deg); } 10%, 14%, 18%, 22% { transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) { .ctd-dock *, .ctd-dock__pill { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------------ popup & booking modal */

.ctd-popup,
.ctd-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0, 0, 0, .55);
}
.ctd-popup[hidden], .ctd-modal[hidden] { display: none; }
.ctd-popup__box { position: relative; width: min(420px, 100%); max-height: 90vh; overflow: auto; border-radius: 14px; background: #fff; }
.ctd-popup__box img { display: block; width: 100%; height: auto; }
.ctd-popup__close,
.ctd-modal__close {
	position: absolute;
	top: 10px; right: 10px;
	z-index: 2;
	display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .95);
	color: #000;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
	cursor: pointer;
}
.ctd-modal__box { position: relative; width: min(1100px, 100%); height: min(90vh, 900px); background: #fff; border-radius: 10px; overflow: hidden; }
.ctd-modal__box iframe { width: 100%; height: 100%; border: 0; }
body.ctd-locked { overflow: hidden; }

/* ------------------------------------------------------------------ forms */

.ctd-form { position: relative; width: 100%; }
.ctd-form__grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.ctd-form__field label { display: block; margin-bottom: 6px; color: #1d1d1d; font-size: 15px; font-weight: 600; }
.ctd-form__req { color: var(--ctd-red); }
.ctd-form input,
.ctd-form textarea,
.ctd-form select {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid #9fc9d2;
	border-radius: 8px;
	background: #fff;
	color: #000;
	font: inherit;
	font-size: 16px;
}
.ctd-form textarea { min-height: 120px; resize: vertical; }
.ctd-form input:focus,
.ctd-form textarea:focus { border-color: var(--ctd-brand); box-shadow: 0 0 0 3px rgba(0, 157, 187, .2); outline: 0; }
.ctd-form .is-invalid input,
.ctd-form .is-invalid textarea { border-color: #c62828; }
.ctd-form__error { display: block; margin-top: 4px; color: #c62828; font-size: 13px; }
.ctd-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ctd-form__actions { margin-top: 18px; }
.ctd-form__submit { min-width: 140px; }
.ctd-form__submit[disabled] { opacity: .6; cursor: progress; }
.ctd-form__notice { margin-top: 16px; padding: 12px 16px; border-radius: 8px; font-weight: 600; }
.ctd-form__notice.is-success { background: #e7f7ec; color: #1b5e20; }
.ctd-form__notice.is-error { background: #fdecea; color: #b71c1c; }
.is-dark .ctd-form__field label { color: #fff; }

/* ------------------------------------------------------------------ 404 */

.ctd-404 { padding-block: clamp(60px, 10vw, 120px); text-align: center; background: var(--ctd-tint); }
.ctd-404__code { margin: 0; color: var(--ctd-brand); font-size: clamp(80px, 14vw, 160px); font-weight: 800; line-height: 1; }
.ctd-404__title { font-size: var(--wp--preset--font-size--huge); }
.ctd-404__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 24px 0; }
.ctd-404 .ctd-search { max-width: 520px; margin: 0 auto; }

/* ------------------------------------------------------------------ block editor */

.editor-styles-wrapper .ctd-hide-mobile,
.editor-styles-wrapper .ctd-hide-tablet,
.editor-styles-wrapper .ctd-hide-desktop { display: block !important; outline: 1px dashed #b0b8bf; outline-offset: 2px; }

/* Article call-to-action box (insurance articles) */
.ctd-blog-cta {
	margin: 32px 0;
	padding: clamp(20px, 4vw, 32px);
	background: #edf8fa;
	border: 1px solid var(--ctd-brand);
	border-left-width: 5px;
	border-radius: 16px;
	color: var(--ctd-navy);
}
.ctd-blog-cta p { color: var(--ctd-navy); font-size: 17px; }
.ctd-blog-cta .ctd-blog-cta__title { margin-bottom: 10px; font-size: clamp(21px, 2.2vw, 25px); font-weight: 700; line-height: 1.25; }
.ctd-blog-cta .wp-block-button__link { border-radius: 8px; }
.ctd-blog-cta .is-style-outline .wp-block-button__link { color: var(--ctd-navy); }

/* Language switcher (inc/translate.php): out of the way while the mobile menu is open. */
body:has(.ctd-burger[aria-expanded="true"]) .gt_switcher_wrapper { display: none !important; }

/* ------------------------------------------------------------------ UI audit fixes (2026-11) */

/* Image cards (home "Our Advanced Dentistry…" and similar grids — rows whose first two columns are picture-and-title
   cards; cards with a description paragraph stay one per row, as on the live /about/ page):
   equal heights, image fills the card, two cards per row on phones (as on the live site). */
.wp-block-columns:has(> .wp-block-column.ctd-panel:first-child > .wp-block-image:first-child):has(> .wp-block-column.ctd-panel:nth-child(2) > .wp-block-image:first-child):not(:has(> .wp-block-column.ctd-panel > p:not(.ctd-hide-mobile))) > .wp-block-column.ctd-panel { align-self: stretch; }
.wp-block-column.ctd-panel > .wp-block-image:first-child img { width: 100%; height: auto; }
@media (max-width: 781px) {
	.wp-block-columns:has(> .wp-block-column.ctd-panel:first-child > .wp-block-image:first-child):has(> .wp-block-column.ctd-panel:nth-child(2) > .wp-block-image:first-child):not(:has(> .wp-block-column.ctd-panel > p:not(.ctd-hide-mobile))) { flex-direction: row; flex-wrap: wrap; gap: 12px; }
	.wp-block-columns:has(> .wp-block-column.ctd-panel:first-child > .wp-block-image:first-child):has(> .wp-block-column.ctd-panel:nth-child(2) > .wp-block-image:first-child):not(:has(> .wp-block-column.ctd-panel > p:not(.ctd-hide-mobile))) > .wp-block-column.ctd-panel { flex: 0 0 calc(50% - 6px) !important; min-width: 0; padding: 10px; text-align: center; }
	.wp-block-columns:has(> .wp-block-column.ctd-panel:first-child > .wp-block-image:first-child):has(> .wp-block-column.ctd-panel:nth-child(2) > .wp-block-image:first-child):not(:has(> .wp-block-column.ctd-panel > p:not(.ctd-hide-mobile))) > .wp-block-column.ctd-panel :is(h3, h4, h5) { font-size: 15px; line-height: 1.3; }
	.wp-block-columns:has(> .wp-block-column.ctd-panel:first-child > .wp-block-image:first-child):has(> .wp-block-column.ctd-panel:nth-child(2) > .wp-block-image:first-child):not(:has(> .wp-block-column.ctd-panel > p:not(.ctd-hide-mobile))) > .wp-block-column.ctd-panel .wp-block-buttons { justify-content: center; }
}

/* A dark section always has a dark background, even when the block has none set (white text was invisible
   on /external-payment-plans/ "More Dental Financing Questions?"). */
.ctd-section.is-dark:not(.has-background):not([class*="has-overlay-"]) { background-color: var(--ctd-brand); }

/* Phone dock: "Book Appointment" no longer cut off on narrow phones. */
@media (max-width: 400px) {
	.ctd-dock { gap: 8px; padding-inline: 10px; }
	.ctd-dock__pill { gap: 6px; padding: 0 6px; }
	.ctd-dock__short { font-size: 12.5px; }
}
@media (max-width: 360px) {
	.ctd-dock__short { white-space: normal; line-height: 1.15; text-align: left; }
}

/* Media columns (photo on a brand panel): on tablets the stacked column no longer stretches a small photo. */
@media (max-width: 781px) {
	.wp-block-column.ctd-media-col .wp-block-image img { width: auto; max-width: 100%; height: auto; margin-inline: auto; display: block; }
}

/* Readability / contrast (WCAG AA). */
.ctd-doctor__link { color: #006a80; }
.ctd-card__badge { font-size: 12px; font-weight: 600; background: #2e7d32; }
.ctd-card__more { font-size: 13px; }
.bn-author.s4a-box .s4a-box__ph .s4a-initials { background: linear-gradient(135deg, #2f6db5, #123f7e); }
/* Small text in the brand teal: the darker brand shade so it passes WCAG AA (4.5:1) on white, tint and cream. */
.ctd-eyebrow,
.ctd-banner__eyebrow,
.ctd-card__more,
.ctd-review__more { color: #00687d; }
.is-dark .ctd-eyebrow { color: var(--ctd-cream); }
.ctd-card__meta { font-size: 12px; color: #666; }

/* Small featured images of older articles are shown at their own size instead of being stretched (blurry). */
.ctd-article__image { text-align: center; background: #f6f9fa; }
.ctd-article__image img { width: auto; max-width: 100%; height: auto; margin-inline: auto; }
@media (max-width: 781px) {
	/* consecutive 2-up image card rows keep the same spacing as inside a row */
	.wp-block-columns:has(> .wp-block-column.ctd-panel:first-child > .wp-block-image:first-child):has(> .wp-block-column.ctd-panel:nth-child(2) > .wp-block-image:first-child):not(:has(> .wp-block-column.ctd-panel > p:not(.ctd-hide-mobile))) + .wp-block-columns:has(> .wp-block-column.ctd-panel:first-child > .wp-block-image:first-child):has(> .wp-block-column.ctd-panel:nth-child(2) > .wp-block-image:first-child):not(:has(> .wp-block-column.ctd-panel > p:not(.ctd-hide-mobile))) { margin-top: 12px; }
}
/* light panels and FAQ items placed inside a dark section keep dark text (was white on white) */
.is-dark :is(.has-white-background-color, .has-cream-background-color, .ctd-faq-item):not(.wp-block-button__link):not(.ctd-btn),
.is-dark :is(.has-white-background-color, .has-cream-background-color, .ctd-faq-item) :is(p, li, h1, h2, h3, h4, h5, h6, summary, a:not(.wp-block-button__link):not(.ctd-btn)) { color: var(--ctd-text); }
.is-dark :is(.has-white-background-color, .has-cream-background-color, .ctd-faq-item) :is(h1, h2, h3, h4, h5, h6, summary) { color: var(--ctd-navy); }
.ctd-404__code { color: #00687d; }
.is-dark .wp-block-column:is(.has-white-background-color, .has-cream-background-color):not([style*="padding"]) { padding: 24px 18px; border-radius: 8px; }

/* ------------------------------------------------------------------ "Read more" on phones (main.js) */

.ctd-more > * { margin-block: 0; }
.ctd-more > * + * { margin-block-start: var(--wp--style--block-gap, 20px); }
.ctd-more__toggle { display: none; }
@media (max-width: 767px) {
	.ctd-more { position: relative; overflow: hidden; }
	.ctd-more:not(.is-open):not(.is-short) {
		max-height: var(--ctd-more-h, 6.8em);
		-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.6em), rgba(0, 0, 0, .15));
		mask-image: linear-gradient(to bottom, #000 calc(100% - 1.6em), rgba(0, 0, 0, .15));
	}
	.ctd-more.is-moving { transition: max-height .4s ease; }
	.ctd-more.is-short { max-height: none; }
	.ctd-more.is-short + .ctd-more__toggle { display: none; }
	.ctd-more__toggle {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		min-height: 40px;
		margin: 0 0 4px;
		padding: 0;
		border: 0;
		background: none;
		color: #00687d;
		font: inherit;
		font-size: 15px;
		font-weight: 600;
		cursor: pointer;
	}
	.ctd-more__toggle.is-center { display: flex; margin-inline: auto; }
	.ctd-more__toggle svg { transition: transform .3s ease; }
	.ctd-more__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
	.ctd-more__toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }
	.is-dark .ctd-more__toggle { color: #fff; }
	.is-dark :is(.has-white-background-color, .has-cream-background-color) .ctd-more__toggle { color: #00687d; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
	.ctd-more.is-moving, .ctd-more__toggle svg { transition: none; }
}
@media (max-width: 781px) {
	/* buttons inside the 2-up cards: no words broken mid-letter */
	.wp-block-columns:has(> .wp-block-column.ctd-panel:first-child > .wp-block-image:first-child):has(> .wp-block-column.ctd-panel:nth-child(2) > .wp-block-image:first-child):not(:has(> .wp-block-column.ctd-panel > p:not(.ctd-hide-mobile))) .wp-block-button__link { padding: 10px 12px; font-size: 14px; word-break: normal; overflow-wrap: normal; hyphens: none; }
}

/* ------------------------------------------------------------------ Phones: no oversized empty areas */

@media (max-width: 767px) {
	/* Page heroes: as tall as their text (the 500px desktop height left 200–380px of empty colour under the title);
	   photo heroes keep enough height to show the picture, with the text centred vertically (as on the live site). */
	.ctd-hero { min-height: 0; padding-block: 36px; align-content: center; }
	.ctd-hero.has-bg-image { min-height: 360px; }
	/* Title banners of service and area pages */
	.ctd-banner--pattern { min-height: 220px; }
	/* Blog article header */
	.ctd-article__hero { min-height: 300px; padding: 32px 0; }
	/* Spacer blocks sized for desktop */
	.wp-block-spacer { max-height: 40px; }
}
@media (max-width: 781px) {
	/* Empty columns only space things out side by side on desktop */
	.wp-block-columns > .wp-block-column:empty { display: none; }
}

/* ------------------------------------------------------------------ One typeface everywhere: Inter */

/* Inter, tuned for reading: slightly tighter tracking on large headings (as Inter's designers recommend),
   smoother rendering. Explicit letter-spacing on eyebrows and labels still wins (:where has no specificity). */
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
:where(h1, h2, h3, .ctd-banner__title, .ctd-article__title) { letter-spacing: -0.02em; }
:where(h4, h5, h6) { letter-spacing: -0.01em; }

/* The authors plugin asks for Lato / Noto Sans, which are not loaded, so author pages fell back to the device's
   system font. */
:root,
body .s4a { --s4a-head: var(--wp--preset--font-family--inter); --s4a-body: var(--wp--preset--font-family--inter); }
/* Language switcher (GTranslate sets Arial) */
.gt_switcher_wrapper, .gt_switcher_wrapper *, #ctd-gt-wrapper, #ctd-gt-wrapper * { font-family: var(--wp--preset--font-family--inter) !important; }
/* 2-up card titles: whole words only; a little smaller on the narrowest phones so "Orthodontics" fits */
@media (max-width: 781px) {
	.wp-block-column.ctd-panel :is(h3, h4, h5) { overflow-wrap: normal; word-break: normal; hyphens: manual; }
}
@media (max-width: 360px) {
	.wp-block-columns:has(> .wp-block-column.ctd-panel:first-child > .wp-block-image:first-child):has(> .wp-block-column.ctd-panel:nth-child(2) > .wp-block-image:first-child) > .wp-block-column.ctd-panel :is(h3, h4, h5) { font-size: 14px; }
}

/* ================================================================== Layout system (QA 2026-11-17)
   Shared rules for every page built from sections. They replace page-by-page patches: each one targets a block
   pattern (a row with a photo, a card grid, two plain sections in a row …), not a specific page. */

/* ---------- 1. Section rhythm: two plain (white) sections in a row are spaced like one section, not two.
   Before, the bottom padding of one and the top padding of the next added up to 144px of white. */
.ctd-section:not(.has-background):not([class*="has-overlay-"]):not(.has-bg-image):not(.is-dark):not(.ctd-pad-sm):not(.ctd-pad-0)
	+ .ctd-section:not(.has-background):not([class*="has-overlay-"]):not(.has-bg-image):not(.is-dark) { padding-top: 0; }
.ctd-section.ctd-pad-sm:not(.has-background):not([class*="has-overlay-"]):not(.has-bg-image):not(.is-dark)
	+ .ctd-section:not(.ctd-pad-sm):not(.ctd-pad-0):not(.has-background):not([class*="has-overlay-"]):not(.has-bg-image):not(.is-dark) { padding-top: calc(var(--ctd-section-y) - 24px); }
/* The doctors cards after a page that ends on a white section: no second band of white above them. */
.site-main:has(.ctd-entry > .ctd-section:last-child:not(.has-background):not([class*="has-overlay-"]):not(.has-bg-image):not(.is-dark)) + .ctd-doctors { padding-top: 0; }

/* ---------- 2. Rows of a photo and text (two columns, one of them only images).
   Both columns are centred on each other, so text and photo start and end in balance, and a tall portrait photo is
   cropped to a sensible height instead of running far past the text (it was up to 820px next to 500px of text). */
.wp-block-columns.ctd-media-row > .wp-block-column:not(.is-vertically-aligned-top):not(.is-vertically-aligned-bottom):not(.ctd-media-col) { align-self: center; }
.ctd-media-row > .wp-block-column:has(> .wp-block-image):not(:has(> :not(.wp-block-image))):not(.ctd-media-col) > .wp-block-image:not(.ctd-img-badge):not(.ctd-img-icon):not(.ctd-img-small):not(.ctd-circle):not(.ctd-ring) img {
	max-height: var(--ctd-media-max);
	object-fit: cover;
	object-position: center 30%;
}
@media (max-width: 781px) {
	.ctd-media-row > .wp-block-column:has(> .wp-block-image):not(:has(> :not(.wp-block-image))):not(.ctd-media-col) > .wp-block-image:not(.ctd-img-badge):not(.ctd-img-icon):not(.ctd-img-small):not(.ctd-circle):not(.ctd-ring) img { max-height: var(--ctd-media-max-sm); width: 100%; }
}
/* A photo's round icon badge (a small image right after the photo) sits on the photo's corner, as on the live
   site, instead of below it on some rows and on the corner on others. The class is added in inc/content.php. */
.wp-block-column:has(> .wp-block-image + .ctd-img-badge:last-child) { position: relative; }
.wp-block-column > .wp-block-image + .ctd-img-badge:last-child {
	position: absolute;
	right: clamp(8px, 2vw, 24px);
	bottom: -28px;
	z-index: 2;
	width: clamp(72px, 7vw, 100px);
	margin: 0;
}
.wp-block-column > .wp-block-image + .ctd-img-badge:last-child img { width: 100%; height: auto; max-height: none; }
.wp-block-columns:has(> .wp-block-column > .wp-block-image + .ctd-img-badge:last-child) { padding-bottom: 28px; }

/* ---------- 3. Card grids (rows of three or four panels): equal heights, the last line (label / buttons) on the
   same baseline in every card; empty spacer columns stay invisible (they showed as empty white cards). */
.wp-block-columns:has(> .wp-block-column.ctd-panel:nth-child(3)) > .wp-block-column.ctd-panel { align-self: stretch; display: flex; flex-direction: column; }
.wp-block-columns:has(> .wp-block-column.ctd-panel:nth-child(3)) > .wp-block-column.ctd-panel > :last-child:is(.wp-block-buttons, .ctd-pill-label) { margin-top: auto; }
.wp-block-columns:has(> .wp-block-column.ctd-panel:nth-child(3)) > .wp-block-column.ctd-panel > p:nth-last-child(2):not(.ctd-pill-label) { margin-bottom: var(--ctd-space-sm); }
.wp-block-column.ctd-panel > .ctd-pill-label { align-self: flex-start; }
.wp-block-column.ctd-panel.has-text-align-center > .ctd-pill-label { align-self: center; }
.wp-block-column.ctd-panel:empty { padding: 0; background: none !important; box-shadow: none !important; border: 0; }

/* ---------- 4. "Tour our office" gallery: an even grid of equal photos (mixed portrait / landscape photos made rows
   of 252, 566 and 710px with a gap in the last row). */
.wp-block-gallery.ctd-gallery.is-cropped { display: grid !important; grid-template-columns: repeat(var(--ctd-gal-cols, 3), minmax(0, 1fr)); gap: var(--ctd-space-xs) !important; }
.wp-block-gallery.ctd-gallery.columns-2 { --ctd-gal-cols: 2; }
.wp-block-gallery.ctd-gallery.columns-4 { --ctd-gal-cols: 4; }
.wp-block-gallery.ctd-gallery.columns-5 { --ctd-gal-cols: 5; }
.wp-block-gallery.ctd-gallery.is-cropped > .wp-block-image { width: auto !important; margin: 0 !important; aspect-ratio: 3 / 2; }
.wp-block-gallery.ctd-gallery.is-cropped > .wp-block-image img { width: 100% !important; height: 100% !important; object-fit: cover; }
@media (max-width: 767px) { .wp-block-gallery.ctd-gallery.is-cropped { --ctd-gal-cols: 2 !important; } }

/* ---------- 5. Check-mark features whose text was imported as one bold run ("Label: text" all bold): only the label
   is bold, as on the live site. */
.ctd-feature__title:has(> strong:only-child > strong) { font-weight: 400; color: var(--ctd-text); line-height: 1.6; }
.ctd-feature__title > strong:only-child { font-weight: inherit; }
.ctd-feature__title > strong:only-child > strong { font-weight: 700; color: var(--ctd-navy); }
.is-dark .ctd-feature__title:has(> strong:only-child > strong),
.is-dark .ctd-feature__title > strong:only-child > strong { color: #fff; }

/* ---------- 6. Contact form: two fields per row on wider screens (as on the live site); messages full width. */
@media (min-width: 768px) {
	.ctd-form--contact .ctd-form__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ctd-space-md) var(--ctd-space-lg); }
	.ctd-form--contact .ctd-form__field.is-textarea { grid-column: 1 / -1; }
}

/* ---------- 6b. Area pages (/dental-services/<area>/), rebuilt from sections like the live pages. */
.ctd-loc-hero h1 { margin-bottom: var(--ctd-space-sm); line-height: 1.15; }
.ctd-loc-hero .ctd-lead-title { margin-bottom: var(--ctd-space-xs); font-weight: 600; }
.ctd-loc-hero .ctd-rating { margin-bottom: var(--ctd-space-md); }
.wp-block-image.ctd-ring { position: relative; max-width: 420px; margin-inline: auto; padding: 14px; }
.wp-block-image.ctd-ring img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 8px solid var(--ctd-navy); border-radius: 50%; box-shadow: 0 18px 40px rgba(5, 35, 72, .3); }
.wp-block-image.ctd-ring::before { content: ""; position: absolute; inset: 0; border: 2px dashed rgba(255, 255, 255, .55); border-radius: 50%; }
.ctd-badges .ctd-feature { margin: 0; }
.ctd-badges .ctd-badges__row { align-items: center; }
.ctd-badges .ctd-feature--image { grid-template-columns: 48px 1fr; }
.ctd-badges .ctd-feature--image img { width: 48px; height: 48px; }
.ctd-cards-row > .wp-block-column.ctd-panel { padding: 10px 10px 14px; }
.ctd-cards-row > .wp-block-column.ctd-panel .wp-block-image img { width: 100%; aspect-ratio: 261 / 185; object-fit: cover; border-radius: 4px; }
.ctd-cards-row > .wp-block-column.ctd-panel h3 { margin: 10px 0 0; }
.ctd-note { margin-block: var(--ctd-space-md); padding: var(--ctd-space-md) var(--ctd-space-lg); background: var(--ctd-cream); border-left: 4px solid var(--ctd-brand); border-radius: 0 var(--ctd-radius) var(--ctd-radius) 0; }
.ctd-note p { margin: 0; font-size: 15px !important; }
.ctd-area-links { gap: 10px; }
.ctd-area-links .wp-block-button__link { min-width: 150px; justify-content: flex-start; }
.ctd-entry .ctd-faq { max-width: 860px; margin-inline: auto; }
@media (max-width: 781px) {
	.ctd-loc-hero .wp-block-columns { flex-direction: column-reverse; }
	.wp-block-image.ctd-ring { max-width: 280px; }
	.ctd-badges .wp-block-columns { gap: var(--ctd-space-md); }
	.ctd-area-links .wp-block-button { flex: 1 1 calc(50% - 10px); }
	.ctd-area-links .wp-block-button__link { width: 100%; min-width: 0; }
}
.ctd-badges .ctd-feature__title { text-align: left; }
@media (max-width: 767px) {
	/* phones: as on the live area pages, the hero shows the text and buttons first (no round photo) and the badges
	   are stacked icon-over-text */
	.ctd-loc-hero .wp-block-column:has(> .ctd-ring) { display: none; }
	.ctd-badges .ctd-feature--image { grid-template-columns: 1fr; justify-items: center; text-align: center; }
	.ctd-badges .ctd-feature--image > .wp-block-image { grid-row: auto; }
	.ctd-badges .ctd-feature__title { text-align: center; }
}

/* Home: "Accepting New Patients / 5 Star / Free Consultations" band under the hero — a slim strip as on the live
   site (24px above and below instead of the full 72px section padding). */
.ctd-section.has-navy-background-color:has(> .wp-block-columns > .wp-block-column > .ctd-feature--image) { padding-block: clamp(16px, 2vw, 24px); }

/* Home: "No Dental Insurance? No Problem!" — the same section spacing as the sections around it, and the $199
   membership panel as tall as the text beside it (content centred in it). Stacked on phones/tablets, the panel takes
   its own natural height. */
.ctd-section.ctd-pad-sm:has(> .wp-block-columns > .wp-block-column.ctd-panel.has-brand-background-color:last-child) { padding-block: var(--ctd-section-y); }
@media (min-width: 782px) {
	.ctd-section.ctd-pad-sm > .wp-block-columns > .wp-block-column.ctd-panel.has-brand-background-color:last-child {
		align-self: stretch;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
	.ctd-section.ctd-pad-sm > .wp-block-columns > .wp-block-column.ctd-panel.has-brand-background-color:last-child > * { margin-inline: auto; }
	.ctd-section.ctd-pad-sm > .wp-block-columns:has(> .wp-block-column.ctd-panel.has-brand-background-color:last-child) > .wp-block-column:first-child > :last-child { margin-bottom: 0; }
}

/* ------------------------------------------------------------------ S4E Page Popups plugin (inc/page-popups.php) */
/* The popup box takes focus when it opens: no focus ring around the whole popup (its buttons keep theirs). */
.s4epp__dialog:focus,
.s4epp__dialog:focus-visible { outline: 0; }

/* QA 2026-11 fixes ------------------------------------------------------------------------------------------- */
/* Paragraph that follows a list needs a visible gap (Fillings: "replacement filling" paragraph). */
.ctd-mt { margin-top: 1.5em; }
/* Service pages with sidebar: rating + booking/call buttons under the page title, like the other service pages. */
.ctd-banner__cta { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 14px; }
.ctd-banner__cta .ctd-rating { margin: 0; }
.ctd-banner--pattern .ctd-rating { color: #fff; }
.ctd-banner__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.ctd-banner__actions .ctd-btn { display: inline-flex; align-items: center; gap: 8px; }
.ctd-banner--pattern .ctd-btn--outline { color: #fff; border-color: var(--ctd-cream); }
.ctd-banner--pattern .ctd-btn--outline:hover,
.ctd-banner--pattern .ctd-btn--outline:focus-visible { background: var(--ctd-cream); color: var(--ctd-brand); }
