/*
 * Advocate for Special Needs: block styles and small layout details.
 * Colors, type and spacing live in theme.json. This file only adds what
 * theme.json cannot express. Loaded on the front end and in the editor.
 */

:root {
	--advocate-rose-500: #de5079;
	--advocate-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M8 12.5l2.5 2.5L16 9.5'/%3E%3C/svg%3E");
	--advocate-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

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

:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(p) { text-wrap: pretty; }

/* Leave room for the sticky header when jumping to #anchors. */
[id] { scroll-margin-top: 110px; }

/* ---------- Header ---------- */
.advocate-header {
	background: #fff;
	border-bottom: 1px solid var(--wp--preset--color--neutral-200);
	box-shadow: var(--wp--preset--shadow--sm);
	position: sticky;
	top: 0;
	z-index: 50;
}
body.admin-bar .advocate-header { top: var(--wp-admin--admin-bar--height, 32px); }

.advocate-header .wp-block-site-logo img { width: 64px; height: 64px; object-fit: contain; }
.advocate-header .wp-block-navigation-item__content { color: var(--wp--preset--color--body); padding-bottom: 4px; border-bottom: 2px solid transparent; }
.advocate-header .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--rose-700); }
.advocate-header .current-menu-item > .wp-block-navigation-item__content,
.advocate-header .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--rose-700);
	border-bottom-color: var(--advocate-rose-500);
}
/* Mobile overlay menu: left-aligned rows with dividers, padded close button. */
.advocate-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 16px 24px 32px;
	background:
		radial-gradient(120% 60% at 100% 100%, var(--wp--preset--color--rose-50, #fff1f4) 0%, transparent 60%),
		#fff;
}
.advocate-header .is-menu-open .wp-block-navigation__responsive-close {
	max-width: none;
	width: 100%;
}
.advocate-header .is-menu-open .wp-block-navigation__responsive-container-close {
	top: 0;
	right: 0;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 9999px;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--neutral-100, #f4f4f5);
}
.advocate-header .is-menu-open .wp-block-navigation__responsive-container-close svg { width: 22px; height: 22px; }
.advocate-header .is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 64px !important;
	align-items: stretch !important;
}
.advocate-header .is-menu-open .wp-block-navigation__container {
	align-items: stretch !important;
	gap: 0 !important;
	width: 100%;
}
.advocate-header .is-menu-open .wp-block-navigation-item {
	width: 100%;
	border-bottom: 1px solid var(--wp--preset--color--neutral-200);
}
.advocate-header .is-menu-open .wp-block-navigation-item__content {
	display: flex !important;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 60px;
	padding: 12px 4px 12px 16px !important;
	font-size: 22px;
	font-weight: 700;
	color: var(--wp--preset--color--ink);
	border-bottom: 0 !important;
	border-left: 4px solid transparent;
	border-radius: 0;
}
.advocate-header .is-menu-open .current-menu-item > .wp-block-navigation-item__content,
.advocate-header .is-menu-open .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--wp--preset--color--rose-700);
	border-left-color: var(--advocate-rose-500);
}
.advocate-header .is-menu-open .wp-block-navigation-item__content:focus-visible {
	outline: 2px solid var(--advocate-rose-500);
	outline-offset: -2px;
}
.advocate-header .wp-block-button__link { min-height: 44px; display: inline-flex; align-items: center; padding: 12px 22px; }

@media (max-width: 599px) {
	/* On phones the menu holds Contact, so the header stays on one row. */
	.advocate-header .wp-block-buttons { display: none; }
	/* The admin bar scrolls away on phones, so don't leave room for it. */
	body.admin-bar .advocate-header { top: 0; }
}

/* ---------- Footer ---------- */
.advocate-footer a { color: var(--wp--preset--color--neutral-300); font-weight: 400; text-decoration: none; }
.advocate-footer a:hover { color: #fff; text-decoration: underline; }
.advocate-footer p { color: var(--wp--preset--color--neutral-300); }

/* ---------- Paragraph & heading styles ---------- */
.is-style-script-eyebrow {
	font-family: var(--wp--preset--font-family--pacifico) !important;
	font-weight: 400 !important;
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.5;
	text-transform: none !important;
	letter-spacing: 0 !important;
}
.is-style-script-eyebrow:not(.has-text-color) { color: var(--wp--preset--color--rose-600); }

h1.is-style-label, h2.is-style-label, h3.is-style-label, h4.is-style-label, h5.is-style-label, h6.is-style-label {
	font-size: var(--wp--preset--font-size--small);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

p.is-style-pill {
	display: inline-block;
	width: fit-content;
	padding: 6px 14px;
	border-radius: 9999px;
	border: 1px solid var(--wp--preset--color--gold-300);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}
p.is-style-pill:not(.has-background) { background: var(--wp--preset--color--gold-50); }
p.is-style-pill:not(.has-text-color) { color: var(--wp--preset--color--gold-700); }
.is-layout-flex > p.is-style-pill, .is-layout-constrained > p.is-style-pill { margin-inline: 0; }
.has-text-align-center.is-style-pill { margin-inline: auto !important; }

p.is-style-callout {
	padding: 14px 16px;
	border-radius: 10px;
	border: 1px solid var(--wp--preset--color--gold-200);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.55;
}
p.is-style-callout:not(.has-background) { background: var(--wp--preset--color--gold-50); }
p.is-style-callout strong { color: #5a3d10; }

p.is-style-step-number {
	width: 64px;
	height: 64px;
	margin-inline: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 9999px;
	border: 2px solid var(--wp--preset--color--gold-400);
	background: #fff;
	color: var(--wp--preset--color--gold-700);
	font-size: 24px;
	font-weight: 800;
	line-height: 1;
}

p.is-style-fine-print {
	font-size: var(--wp--preset--font-size--small);
	font-style: italic;
	line-height: 1.6;
}
p.is-style-fine-print:not(.has-text-color) { color: var(--wp--preset--color--muted); }

/* ---------- Lists ---------- */
.wp-block-list li::marker { color: #3d7d5e; }
.wp-block-list li + li { margin-top: 8px; }

ul.is-style-checks, ul.is-style-checks-rose, ul.is-style-plain, ul.is-style-pills {
	list-style: none;
	padding-left: 0;
}
ul.is-style-checks li, ul.is-style-checks-rose li {
	position: relative;
	padding-left: 32px;
	line-height: 1.5;
}
ul.is-style-checks li::before, ul.is-style-checks-rose li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.1em;
	width: 21px;
	height: 21px;
	background: var(--wp--preset--color--sage-600);
	-webkit-mask: var(--advocate-check) center / contain no-repeat;
	mask: var(--advocate-check) center / contain no-repeat;
}
ul.is-style-checks-rose li::before { background: var(--wp--preset--color--rose-700); }
ul.is-style-checks li + li, ul.is-style-checks-rose li + li { margin-top: 10px; }

ul.is-style-pills { display: flex; flex-wrap: wrap; gap: 10px; }
ul.is-style-pills li {
	margin: 0;
	padding: 6px 14px;
	border-radius: 9999px;
	background: #fff;
	border: 1px solid var(--wp--preset--color--gold-300);
	color: #5a3d10;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}

/* ---------- Cards ---------- */
.wp-block-group.is-style-card,
.wp-block-group.is-style-card-gold,
.wp-block-group.is-style-card-feature {
	border-radius: 16px;
	padding: clamp(24px, 3vw, 32px);
}
.wp-block-group.is-style-card:not(.has-background),
.wp-block-group.is-style-card-gold:not(.has-background),
.wp-block-group.is-style-card-soft:not(.has-background),
.wp-block-group.is-style-card-feature:not(.has-background) { background: #fff; }
.wp-block-group.is-style-card-gold { border: 1px solid var(--wp--preset--color--gold-300); box-shadow: var(--wp--preset--shadow--lg); }
.wp-block-group.is-style-card-gold .wp-block-image:not(.is-style-avatar) img { border-radius: 14px; }
.wp-block-group.is-style-card-soft { border: 1px solid var(--wp--preset--color--rose-100); border-radius: 12px; padding: 24px; }
.wp-block-group.is-style-card:not(.has-border-color) { border: 1px solid var(--wp--preset--color--neutral-200); }
.wp-block-group.is-style-card { box-shadow: var(--wp--preset--shadow--lg); }
.wp-block-group.is-style-card-feature {
	border: 2px solid var(--wp--preset--color--rose-300);
	box-shadow: var(--wp--preset--shadow--rose);
}
.wp-block-group.is-style-card-dark {
	border-radius: 20px;
	padding: clamp(28px, 4vw, 40px);
	box-shadow: var(--wp--preset--shadow--xl);
	color: #fff;
}
.wp-block-group.is-style-card-dark:not(.has-background) { background: var(--wp--preset--color--rose-800); }
.wp-block-group.is-style-card-dark :where(h1, h2, h3, h4, h5, h6) { color: #fff; }
.wp-block-group.is-style-card-dark :where(p, li):not(.has-text-color) { color: var(--wp--preset--color--rose-100); }
.wp-block-group.is-style-card-dark ul.is-style-checks li::before { background: var(--wp--preset--color--gold-300); }

/* Push the last item (e.g. a price) to the bottom of equal-height cards. */
.advocate-push-last > :last-child { margin-top: auto !important; }

/* Service cards (they contain a price) keep their natural height in grids. */
.is-layout-grid > .wp-block-group:has(> .wp-block-group > .advocate-price) { align-self: start; }

/* Price block inside service cards. */
.advocate-price { text-align: right; flex-shrink: 0; }
.advocate-price p { margin: 0; }
.advocate-price p + p { margin-top: 4px; }

/* ---------- Buttons ---------- */
.wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link {
	background: #fff;
	color: var(--wp--preset--color--rose-800);
	border: 2px solid var(--wp--preset--color--rose-300);
	padding: 12px 24px;
}
.wp-block-buttons .wp-block-button.is-style-outline > .wp-block-button__link:hover { border-color: var(--wp--preset--color--rose-700); color: var(--wp--preset--color--rose-800); background: var(--wp--preset--color--rose-50); }

.wp-block-buttons .wp-block-button.is-style-gold > .wp-block-button__link {
	background: var(--wp--preset--color--gold-300);
	color: var(--wp--preset--color--gold-900);
	font-weight: 800;
	box-shadow: var(--wp--preset--shadow--gold);
}
.wp-block-buttons .wp-block-button.is-style-gold > .wp-block-button__link:hover { background: #f4dc80; color: var(--wp--preset--color--gold-900); }

.wp-block-buttons .wp-block-button.is-style-outline-light > .wp-block-button__link {
	background: transparent;
	color: #fff;
	border: 2px solid #fff;
	padding: 12px 24px;
}
.wp-block-buttons .wp-block-button.is-style-outline-light > .wp-block-button__link:hover { background: rgb(255 255 255 / 0.12); color: #fff; }

.wp-block-buttons .wp-block-button.is-style-chip > .wp-block-button__link,
.wp-block-buttons .wp-block-button.is-style-chip-active > .wp-block-button__link {
	border-radius: 9999px;
	padding: 10px 18px;
	font-size: 15px;
}
.wp-block-buttons .wp-block-button.is-style-chip > .wp-block-button__link {
	background: #fff;
	color: var(--wp--preset--color--rose-800);
	border: 1px solid var(--wp--preset--color--rose-200);
}
.wp-block-buttons .wp-block-button.is-style-chip > .wp-block-button__link:hover { border-color: var(--wp--preset--color--rose-700); background: #fff; color: var(--wp--preset--color--rose-800); }
.wp-block-buttons .wp-block-button.is-style-chip-active > .wp-block-button__link { border: 1px solid var(--wp--preset--color--rose-700); }

/* ---------- Images ---------- */
.wp-block-image.is-style-framed img { width: 100%; }
.wp-block-image.is-style-framed img,
.wp-block-image.is-style-framed .components-placeholder {
	background: #fff;
	padding: 12px;
	border: 1px solid var(--wp--preset--color--gold-300);
	border-radius: 24px;
	box-shadow: var(--wp--preset--shadow--xl);
	box-sizing: border-box;
}
.wp-block-image.is-style-avatar img {
	border-radius: 9999px;
	border: 2px solid var(--wp--preset--color--gold-300);
	object-fit: cover;
	aspect-ratio: 1;
}

/* ---------- Pricing table ---------- */
.wp-block-table.is-style-pricing {
	overflow-x: auto;
	border: 1px solid var(--wp--preset--color--neutral-200);
	border-radius: 16px;
	box-shadow: var(--wp--preset--shadow--lg);
}
.wp-block-table.is-style-pricing table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: var(--wp--preset--font-size--medium); }
.wp-block-table.is-style-pricing :where(th, td) { border: 0; padding: 14px 24px; text-align: left; }
.wp-block-table.is-style-pricing thead { border: 0; }
.wp-block-table.is-style-pricing thead tr { background: var(--wp--preset--color--rose-800); color: #fff; }
.wp-block-table.is-style-pricing thead th { padding-block: 16px; font-weight: 800; }
.wp-block-table.is-style-pricing tbody tr { border-top: 1px solid var(--wp--preset--color--neutral-200); }
.wp-block-table.is-style-pricing tbody tr:nth-child(even) { background: #fdfcfb; }
.wp-block-table.is-style-pricing :where(th, td):last-child { text-align: right; white-space: nowrap; }
.wp-block-table.is-style-pricing tbody td:last-child { font-weight: 800; color: var(--wp--preset--color--rose-700); }
.wp-block-table.is-style-pricing figcaption { margin: 0; padding: 12px 24px; }

/* ---------- FAQ (Details block) ---------- */
.wp-block-details {
	border: 1px solid var(--wp--preset--color--neutral-200);
	border-radius: 12px;
	padding: 0 24px;
	background: #fff;
}
.wp-block-details summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	min-height: 44px;
	padding: 20px 0;
	cursor: pointer;
	list-style: none;
	font-size: 18px;
	font-weight: 800;
	color: var(--wp--preset--color--ink);
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "";
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	background: var(--wp--preset--color--rose-700);
	-webkit-mask: var(--advocate-chevron) center / contain no-repeat;
	mask: var(--advocate-chevron) center / contain no-repeat;
	transition: transform 0.2s ease;
}
.wp-block-details[open] summary::after { transform: rotate(180deg); }
.wp-block-details summary:focus-visible { outline: 2px solid var(--wp--preset--color--rose-700); outline-offset: 2px; border-radius: 4px; }
.wp-block-details > :not(summary) { margin-top: 0; }
.wp-block-details > :last-child:not(summary) { margin-bottom: 20px; }
.wp-block-details + .wp-block-details { margin-top: 12px; }

/* ---------- Testimonial ---------- */
.wp-block-quote.is-style-testimonial {
	border: 0;
	padding: 0;
	margin-inline: auto;
	text-align: center;
}
.wp-block-quote.is-style-testimonial p { color: var(--wp--preset--color--ink); }
.wp-block-quote.is-style-testimonial cite {
	display: block;
	margin-top: 24px;
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	color: var(--wp--preset--color--gold-700);
}

/* ---------- Icon block ---------- */
.wp-block-advocate-icon {
	--advocate-icon-size: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 0;
	box-sizing: border-box;
}
.wp-block-advocate-icon.is-shape-square,
.wp-block-advocate-icon.is-shape-circle {
	width: calc(var(--advocate-icon-size) * 2);
	height: calc(var(--advocate-icon-size) * 2);
}
.wp-block-advocate-icon.is-shape-square { border-radius: 12px; }
.wp-block-advocate-icon.is-shape-circle { border-radius: 9999px; }
.wp-block-advocate-icon.is-shape-square:not(.has-background),
.wp-block-advocate-icon.is-shape-circle:not(.has-background) { background: var(--wp--preset--color--rose-100); }
.wp-block-advocate-icon:not(.has-text-color) { color: var(--wp--preset--color--rose-700); }
.has-text-align-center > .wp-block-advocate-icon,
.is-content-justification-center > .wp-block-advocate-icon { margin-inline: auto; }

/* ---------- Posts (Resources) ---------- */
.advocate-post-card .wp-block-post-featured-image img { border-radius: 12px; aspect-ratio: 16 / 10; object-fit: cover; }
.advocate-post-card .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.advocate-post-card .wp-block-post-title a:hover { color: var(--wp--preset--color--rose-700); }

/* Full-width sections stack edge to edge, with no gaps between them. */
.wp-site-blocks > * { margin-block-start: 0 !important; }
.advocate-sections > .alignfull + .alignfull { margin-block-start: 0 !important; }
