/* Stay In Your Home: base styles. Uses WordPress preset variables only.
   Keep total theme CSS under 30KB. */

:root {
	--siyh-header-h: 88px;
	--siyh-radius: 8px;
	--siyh-shadow: 0 2px 8px rgba(27, 36, 48, 0.08);
}
@media (max-width: 782px) {
	:root { --siyh-header-h: 80px; }
}
@media (max-width: 480px) {
	:root { --siyh-header-h: 128px; }
}

html {
	/* Sticky header must never cover a focused element (WCAG 2.4.11). */
	scroll-padding-top: calc(var(--siyh-header-h) + var(--wp-admin--admin-bar--height, 0px) + 16px);
}
body {
	overflow-wrap: break-word;
	text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; }

/* Text defaults */
:where(.wp-site-blocks) :where(p, li, dd) { max-width: 100%; }
:where(.wp-block-post-content, .entry-content) :where(ul, ol) { padding-left: 1.5em; }
:where(.wp-block-post-content) li + li { margin-top: 0.5em; }
.has-small-font-size, .siyh-small { font-size: var(--wp--preset--font-size--small); }
strong, b, th { font-weight: 700; }
:where(table, .has-tabular, .siyh-price) { font-variant-numeric: tabular-nums; }

/* Visually hidden text */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	clip: auto;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
}

/* Skip link: first element in the header part. */
.skip-link {
	position: absolute;
	left: 8px;
	top: -200px;
	z-index: 100000;
	padding: 1rem 1.5rem;
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	font-weight: 700;
	text-decoration: underline;
	border-radius: 0 0 var(--siyh-radius) var(--siyh-radius);
}
.skip-link:focus {
	top: 0;
	color: var(--wp--preset--color--white);
}

/* ---------- Buttons and controls (48px minimum) ---------- */
.wp-element-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	min-width: 48px;
	box-sizing: border-box;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.wp-block-search__button {
	min-height: 48px;
	min-width: 48px;
}
:where(input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="url"], input[type="number"], input[type="password"], select, textarea) {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 0.5rem 0.75rem;
	border: 2px solid var(--wp--preset--color--steel);
	border-radius: var(--siyh-radius);
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
	font: inherit;
}
:where(textarea) { min-height: 8em; }
:where(label) {
	display: block;
	margin-bottom: 0.25rem;
	font-weight: 600;
}
:where(input[type="checkbox"], input[type="radio"]) {
	width: 1.5rem;
	height: 1.5rem;
	vertical-align: middle;
	accent-color: var(--wp--preset--color--teal);
}
:where(label:has(input[type="checkbox"], input[type="radio"])) {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 48px;
	font-weight: 400;
}
.wp-block-search__inside-wrapper { gap: 8px; }

/* ---------- Header ---------- */
/* The header template part is <header class="wp-block-template-part siyh-header-wrap">.
   Shrink: the site-nav view script (Builder C) adds the class `is-scrolled` once
   the page has scrolled (any ancestor of .siyh-header__inner works, e.g.
   .siyh-header-wrap, <body> or <html>). Header goes from about 88px to about 64px. */
.siyh-header-wrap {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	margin-block-start: 0;
	background: var(--wp--preset--color--white);
	border-bottom: 1px solid rgba(27, 36, 48, 0.15);
	box-shadow: var(--siyh-shadow);
}
.siyh-header { padding-inline: var(--wp--preset--spacing--20); }
.siyh-header .siyh-header__inner { padding-inline: var(--wp--preset--spacing--30); }
@media (max-width: 782px) {
	.siyh-header .siyh-header__inner { padding-inline: 1rem; }
}
.siyh-header__inner {
	box-sizing: border-box;
	flex-wrap: wrap;
	gap: 8px 24px;
	padding-block: 0.75rem;
	min-height: 64px;
	transition: padding 0.2s ease;
}
.is-scrolled .siyh-header__inner { padding-block: 0.25rem; }

.siyh-logo {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: clamp(1.375rem, 1.1rem + 1vw, 1.75rem);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.01em;
}
.siyh-logo a {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	color: var(--wp--preset--color--teal);
	text-decoration: none;
}
.siyh-logo a:hover { text-decoration: underline; }
.is-scrolled .siyh-logo { font-size: 1.375rem; }

/* Desktop: logo left, nav centre, phone and button right. */
.siyh-header__inner > .wp-block-siyh-site-nav,
.siyh-header__inner > nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	margin: 0;
}
.siyh-header__desk { gap: 16px; align-items: center; flex-wrap: nowrap; }
.siyh-header__desk .wp-block-buttons { margin: 0; }
.siyh-header .siyh-header__mob { display: none; }
/* Keep the desktop header on one row (about 88px): wider inner, compact logo and nav,
   number-only phone link; opening hours stay in the footer and quote panel. */
.siyh-header .siyh-header__inner { max-width: none; column-gap: 16px; }
.siyh-header .siyh-logo { font-size: clamp(1.375rem, 1.1rem + 1vw, 1.5rem); }
.siyh-header .siyh-nav__link,
.siyh-header .siyh-nav__toggle { padding-inline: 10px; }
.siyh-header__desk .wp-block-button__link { white-space: nowrap; }
.siyh-header__desk .siyh-phone__hours { display: none; }
/* Label stays in the accessibility tree (accessible name "Call free 0800 ...") but is not shown. */
.siyh-header__desk .siyh-phone__label {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

/* Compact "Call" link (mobile only). Phone icon is drawn with CSS so it needs no request. */
.siyh-mobile-call { margin: 0; }
.siyh-mobile-call a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	box-sizing: border-box;
	min-height: 48px;
	min-width: 48px;
	padding: 0.5rem 1rem;
	border: 2px solid var(--wp--preset--color--teal);
	border-radius: 10px;
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--teal);
	font-weight: 700;
	text-decoration: none;
}
.siyh-mobile-call a::before,
.siyh-phone-icon::before {
	content: "";
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.siyh-header__mob .wp-block-buttons { margin: 0; }
.siyh-header__mob .wp-block-button__link {
	padding: 0.5rem 1rem;
	font-size: var(--wp--preset--font-size--small);
}

@media (max-width: 782px) {
	.siyh-header .siyh-header__desk { display: none; }
	.siyh-header .siyh-header__mob { display: flex; gap: 8px; align-items: center; order: 2; margin-inline-start: auto; }
	.siyh-logo { order: 1; }
	.siyh-header__inner > .wp-block-siyh-phone-link { order: 2; }
	.siyh-header__inner > .wp-block-siyh-site-nav,
	.siyh-header__inner > nav { order: 3; flex: 0 0 auto; }
	.siyh-header__inner { gap: 8px; }
}
@media (max-width: 480px) {
	/* Row 1: logo. Row 2: Call, Quotes, Menu share the width. */
	.siyh-logo { flex: 1 1 100%; }
	.siyh-header .siyh-header__mob { flex: 2 1 0; margin-inline-start: 0; }
	.siyh-header__mob > * { flex: 1 1 0; }
	.siyh-mobile-call a,
	.siyh-header__mob .wp-block-button__link { width: 100%; }
	.siyh-header__inner > .wp-block-siyh-site-nav,
	.siyh-header__inner > nav { flex: 1 1 0; }
}

/* ---------- Main and content ---------- */
.siyh-main { min-height: 50vh; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.siyh-page-title { margin-block: var(--wp--preset--spacing--20) var(--wp--preset--spacing--20); }

/* ---------- Footer ---------- */
.siyh-footer { margin-block-start: var(--wp--preset--spacing--60); }
.siyh-footer a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--white); text-decoration: underline; }
.siyh-footer a:where(:not(.wp-element-button)):hover { text-decoration-thickness: 3px; }
.siyh-footer__heading {
	margin: 0 0 var(--wp--preset--spacing--10);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--body);
	font-weight: 700;
}
.siyh-footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.siyh-footer__list li { margin: 0; }
.siyh-footer__list li + li { margin-top: 0; }
.siyh-footer__list a {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
}
.siyh-footer .siyh-phone__hours { color: var(--wp--preset--color--white); }
.siyh-footer .wp-block-siyh-phone-link,
.siyh-footer .wp-block-siyh-phone-link a { color: var(--wp--preset--color--white); }
.siyh-footer__legal { font-size: var(--wp--preset--font-size--small); }
.siyh-footer .siyh-footer__legal a { min-height: 0; }
.siyh-footer-slim .siyh-footer__list { display: flex; flex-wrap: wrap; gap: 0 24px; }

/* ---------- Cards (whole card is the link) ---------- */
.siyh-card {
	position: relative;
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--30);
	border: 1px solid rgba(27, 36, 48, 0.15);
	border-radius: var(--siyh-radius);
	background: var(--wp--preset--color--white);
	box-shadow: var(--siyh-shadow);
}
.siyh-card:hover { border-color: var(--wp--preset--color--teal); }
.siyh-card :where(h2, h3, h4, p):first-child { margin-top: 0; }
.siyh-card :where(h2, h3, h4) { font-size: var(--wp--preset--font-size--h-4); }
.siyh-card a { text-decoration: none; color: inherit; }
.siyh-card a:hover { text-decoration: underline; }
.siyh-card a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}
.siyh-card--static a::after { content: none; }

/* ---------- Tables ---------- */
:where(.wp-block-table, .wp-block-post-content) table {
	width: 100%;
	border-collapse: collapse;
	background: var(--wp--preset--color--white);
}
:where(.wp-block-table, .wp-block-post-content) :where(th, td) {
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--steel);
	text-align: left;
	vertical-align: top;
}
:where(.wp-block-table, .wp-block-post-content) :where(thead th, th[scope]) { background: var(--wp--preset--color--mist); }
.wp-block-table figcaption, table caption { color: var(--wp--preset--color--slate); font-size: var(--wp--preset--font-size--small); text-align: left; padding-block: 0.5rem; caption-side: top; }
.wp-block-table { overflow-x: auto; }

/* Stacking helper: add class `siyh-stack-table` to a table; cells need data-label. */
@media (max-width: 640px) {
	.siyh-stack-table,
	.siyh-stack-table tbody,
	.siyh-stack-table tr,
	.siyh-stack-table td,
	.siyh-stack-table th { display: block; width: 100%; box-sizing: border-box; }
	.siyh-stack-table thead {
		position: absolute;
		clip: rect(1px, 1px, 1px, 1px);
		width: 1px;
		height: 1px;
		overflow: hidden;
	}
	.siyh-stack-table tr {
		margin-bottom: var(--wp--preset--spacing--20);
		border: 1px solid var(--wp--preset--color--steel);
		border-radius: var(--siyh-radius);
		overflow: hidden;
	}
	.siyh-stack-table td,
	.siyh-stack-table th { border: 0; border-bottom: 1px solid rgba(27, 36, 48, 0.15); }
	.siyh-stack-table td[data-label]::before {
		content: attr(data-label);
		display: block;
		font-weight: 700;
		color: var(--wp--preset--color--slate);
		font-size: var(--wp--preset--font-size--small);
	}
}

/* ---------- FAQ: details/summary (core/details and plain <details>) ----------
   The site-nav mobile accordion (.siyh-mobile__group) has its own styling. */
details:not(.siyh-mobile__group) {
	margin-block: var(--wp--preset--spacing--10);
	border: 2px solid var(--wp--preset--color--steel);
	border-radius: var(--siyh-radius);
	background: var(--wp--preset--color--white);
}
details:not(.siyh-mobile__group) > summary {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 0.75rem 3.5rem 0.75rem 1.25rem;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}
details:not(.siyh-mobile__group) > summary::-webkit-details-marker { display: none; }
details:not(.siyh-mobile__group) > summary::after {
	content: "+";
	position: absolute;
	right: 1.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.75rem;
	line-height: 1;
	color: var(--wp--preset--color--teal);
}
details:not(.siyh-mobile__group)[open] > summary::after { content: "\2212"; }
details:not(.siyh-mobile__group)[open] > summary { border-bottom: 1px solid rgba(27, 36, 48, 0.15); }
details:not(.siyh-mobile__group) > :not(summary) { margin-inline: 1.25rem; }
details:not(.siyh-mobile__group) > :not(summary):last-child { margin-bottom: 1.25rem; }
details:not(.siyh-mobile__group) > summary + * { margin-top: 1rem; }

/* ---------- Query loop / pagination ---------- */
.siyh-card-grid { gap: var(--wp--preset--spacing--30); }
.wp-block-query-pagination { gap: 8px; }
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	min-width: 48px;
	padding-inline: 0.75rem;
}

/* Lists of links on 404 / search pages */
.siyh-link-list { list-style: none; padding: 0; }
.siyh-link-list a { display: inline-flex; align-items: center; min-height: 48px; }

/* Utility surfaces */
.siyh-box { padding: var(--wp--preset--spacing--30); border-radius: var(--siyh-radius); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

@media print {
	.siyh-header-wrap, .siyh-footer, .skip-link { display: none; }
}
