/* =========================================================
   Neil Davies Domestic — site-wide layout & component styles
   ========================================================= */

/* ---------- Text links (site-wide, matches the requested at-rest / hover spec) ---------- */
a {
	text-decoration: underline;
	text-decoration-thickness: auto;
	text-decoration-thickness: max(1px, .0625rem);
	text-underline-offset: .2em;
	transition: text-decoration-thickness 0.15s ease;
}
a:hover,
a:focus {
	text-decoration-thickness: max(3px, .0625rem);
	text-underline-offset: .15em;
}

/* Buttons should never pick up the underline link styling above. */
.wp-block-button__link {
	text-decoration: none !important;
}

/* ---------- Header ---------- */
.ndd-header {
	background-color: var(--wp--preset--color--base);
	padding: 16px var(--wp--style--root--padding-right, 24px) 0;
}
.ndd-header__top {
	align-items: center;
	gap: 20px;
	padding-bottom: 16px;
}
.ndd-header__logo img {
	height: 46px;
	width: auto;
}
.ndd-header__badges {
	align-items: center;
	gap: 20px;
}
.ndd-header__badges img {
	height: 44px;
	width: auto;
}
.ndd-header__cta .wp-block-buttons {
	gap: 10px;
}
.ndd-header__nav {
	background-color: var(--wp--preset--color--primary);
	align-items: center;
	padding: 10px 24px;
	margin: 0 calc(-1 * var(--wp--style--root--padding-right, 24px));
}
.ndd-header__nav .wp-block-navigation-item a {
	color: var(--wp--preset--color--white);
	text-decoration: none;
}
.ndd-header__nav .wp-block-navigation-item a:hover {
	color: var(--wp--preset--color--secondary);
}
.ndd-header__facebook a {
	background: var(--wp--preset--color--white);
}
.ndd-header__facebook svg {
	fill: var(--wp--preset--color--primary);
}

/* Call / Message pill buttons in header + footer CTA row */
.ndd-btn-call .wp-block-button__link,
.ndd-btn-message .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--white);
	border-radius: 5px;
	padding: 8px 16px;
	font-weight: 600;
}
.ndd-btn-call .wp-block-button__link:hover,
.ndd-btn-message .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--link-hover);
}
.ndd-btn-icon {
	width: 18px;
	height: 18px;
	display: inline-block;
}

/* ---------- Hamburger: three lines, swapping to a cross when open ---------- */
/* CSS-only — keyed off the aria-expanded state WordPress core already sets. */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	position: relative;
	width: 44px;
	height: 44px;
}
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg {
	display: none;
}
/* Middle bar (open state) drawn as ::before, top/bottom bars via box-shadow. */
.wp-block-navigation__responsive-container-open::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 22px;
	height: 2px;
	background: currentColor;
	transform: translate(-50%, -50%);
	box-shadow:
		0 -7px 0 currentColor,
		0 7px 0 currentColor;
}
/* Close icon (shown once the overlay menu is open) drawn as an X. */
.wp-block-navigation__responsive-container-close::before,
.wp-block-navigation__responsive-container-close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 22px;
	height: 2px;
	background: currentColor;
}
.wp-block-navigation__responsive-container-close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}
.wp-block-navigation__responsive-container-close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

/* ---------- Book a Repair band (full-width Primary background, white text) ---------- */
.ndd-book-a-repair {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	padding: 48px var(--wp--style--root--padding-right, 24px);
}
.ndd-book-a-repair,
.ndd-book-a-repair h2,
.ndd-book-a-repair p {
	color: var(--wp--preset--color--white);
}
.ndd-book-a-repair .wp-block-button__link {
	font-size: 18px;
	padding: 14px 28px;
}

/* ---------- Footer ---------- */
.ndd-footer {
	padding: 48px var(--wp--style--root--padding-right, 24px) 0;
}
.ndd-footer,
.ndd-footer a,
.ndd-footer p,
.ndd-footer li {
	color: var(--wp--preset--color--white);
}
.ndd-footer__top {
	align-items: center;
	gap: 20px;
	padding-bottom: 24px;
}
.ndd-footer__logo img {
	height: 46px;
}
.ndd-footer__established img,
.ndd-footer__google img {
	height: 44px;
}
.ndd-footer__divider {
	border-color: rgba(255, 255, 255, 0.25);
	margin: 0;
}
.ndd-footer__columns {
	gap: 40px;
	padding: 32px 0;
}
.ndd-footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ndd-footer__col li {
	margin-bottom: 8px;
}
.ndd-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	padding: 16px 0;
	text-align: center;
}
.ndd-footer__site-info {
	margin: 0;
	opacity: 0.85;
}

/* ---------- FAQ / testimonials / brand carousel spacing ---------- */
.wp-block-carousel-block {
	--carousel-block-nav-color: #000;
}

/* =========================================================
   Responsive — mobile (below 768px)
   ========================================================= */
@media (max-width: 767px) {

	/* Header: single row — logo, icon-only Call/Message, Facebook, hamburger. */
	.ndd-header {
		padding: 12px 16px 0;
	}
	.ndd-header__top {
		flex-wrap: nowrap;
		gap: 8px;
	}
	.ndd-header__badges {
		display: none;
	}
	.ndd-header__logo img {
		height: 34px;
	}
	.ndd-header__cta {
		margin-left: auto;
	}

	/* Icon-only Call/Message buttons on mobile: hide the text label visually,
	   keep it for assistive tech rather than removing it outright. */
	.ndd-btn-call .wp-block-button__link,
	.ndd-btn-message .wp-block-button__link {
		padding: 8px;
	}
	.ndd-btn-label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.ndd-header__nav {
		margin: 0 -16px;
		padding: 8px 16px;
	}
	.ndd-header__facebook {
		margin-left: auto;
	}

	.ndd-footer__top {
		flex-direction: column;
		align-items: flex-start;
	}
	.ndd-footer__columns {
		flex-direction: column;
		gap: 24px;
	}

	/* Fluid heading sizes for mobile, per spec. */
	h1, .wp-block-post-title {
		font-size: 24px !important;
		line-height: 1.25 !important;
	}
	h2 {
		font-size: 20px !important;
		line-height: 1.3 !important;
	}
	h3 {
		font-size: 18px !important;
		line-height: 1.35 !important;
	}
	h4 {
		font-size: 16px !important;
		line-height: 1.4 !important;
	}
	body, p {
		font-size: 16px;
	}
}
