/* Mobile-first header. Custom hand-built hamburger + nav — deliberately NOT
   using WordPress core's wp:navigation block, which broke twice (its own
   overlay-toggle JS conflicted with the WooCommerce blocks nested inside it,
   and even after un-nesting them the toggle stopped working again). This is
   plain HTML/CSS/JS (see assets/js/nav.js) with no dependency on core block
   behaviour, so it's directly testable and debuggable. */

.site-header-row {
	align-items: center;
	gap: 12px;
	width: 100%;
}

.header-right {
	align-items: center;
	gap: 14px;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}

.site-branding__badge {
	width: 40px;
	height: 40px;
	border-radius: 12px;
	display: block;
}

.site-branding__name {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	font-size: 1.125rem;
	line-height: 1;
	white-space: nowrap;
}

.hamburger {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 4px;
	width: 44px;
	height: 44px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}

.hamburger span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--wp--preset--color--ink);
	border-radius: 2px;
}

.desktop-nav {
	display: none;
}

.mobile-nav {
	display: none;
	flex-direction: column;
	padding: 6px 20px 18px;
}

.mobile-nav.open {
	display: flex;
}

.mobile-nav a {
	padding: 11px 0;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	font-size: 0.95rem;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.mobile-nav a.mobile-sub {
	padding-left: 14px;
	color: var(--wp--preset--color--body-text);
	font-size: 0.875rem;
}

.mobile-nav a.contact {
	color: var(--wp--preset--color--orange);
	font-weight: 700;
	border-bottom: none;
}

.has-dropdown {
	position: relative;
}

.has-dropdown .dropdown {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	padding: 10px 0;
	min-width: 260px;
	box-shadow: 0 12px 28px rgba(54, 59, 64, 0.12);
	z-index: 5;
	/* Hide on a short delay so a brief, imprecise mouse path from the
	   trigger to the panel doesn't break hover and close it early. */
	transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 0.15s ease, visibility 0s linear 0s;
}

.dropdown a {
	display: block;
	padding: 8px 18px;
	font-size: 0.9rem;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.dropdown a:hover,
.dropdown a:focus-visible {
	background: var(--wp--preset--color--bg-subtle);
}

/* Visible keyboard focus on nav links (browser default outline is fine as a
   fallback, but an explicit ring is more consistent across browsers). */
.desktop-nav a:focus-visible,
.mobile-nav a:focus-visible,
.hamburger:focus-visible {
	outline: 2px solid var(--wp--preset--color--orange);
	outline-offset: 2px;
}

/* Current-page nav link, set by assets/js/nav.js comparing location.pathname
   (hand-rolled nav has no server-side "current menu item" the way
   wp:navigation would provide it). */
.desktop-nav a[aria-current="page"],
.mobile-nav a[aria-current="page"] {
	color: var(--wp--preset--color--orange);
	font-weight: 700;
}

/* Skip link: visually hidden until focused, so keyboard users can jump
   past the nav straight to page content. */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--wp--preset--color--ink);
	color: #fff;
	padding: 12px 20px;
	border-radius: 0 0 8px 0;
	z-index: 100;
	font-size: 0.9375rem;
	text-decoration: none;
}

.skip-link:focus {
	left: 0;
}

@media (min-width: 1024px) {
	.hamburger {
		display: none;
	}
	.header-right {
		order: -1;
	}
	.desktop-nav {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		justify-content: flex-end;
		gap: 10px 18px;
		font-size: 0.9375rem;
		order: 1;
	}
	.desktop-nav a {
		color: var(--wp--preset--color--ink);
		text-decoration: none;
	}
	.desktop-nav a.contact {
		color: #fff;
		background: var(--wp--preset--color--orange);
		padding: 9px 18px;
		border-radius: 999px;
	}
	.header-icons {
		order: 2;
	}
	.mobile-nav {
		display: none !important;
	}
}

/* Account + basket: icon-only, matching the header's touch-target sizing.
   Lives in its own group (header-icons), on the far right — separate from
   header-right (logo) so it can sit past the nav on desktop and past the
   logo on mobile. */
.header-icons {
	align-items: center;
	gap: 4px;
}

.header-icons .wp-block-woocommerce-customer-account a,
.header-icons .wc-block-mini-cart__button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: var(--wp--preset--color--ink);
}

.header-icons .wp-block-woocommerce-customer-account a:hover,
.header-icons .wc-block-mini-cart__button:hover {
	color: var(--wp--preset--color--orange);
}

.header-icons .wc-block-mini-cart__button .wc-block-mini-cart__badge {
	background: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--bg);
}

/* Mobile-first section spacing: the rendered padding-top/bottom on each
   .section-pad block IS the mobile value (see patterns/*.php). Each block
   also carries a --pad-y custom property holding its intended larger value
   for bigger screens, applied here rather than inline so there's a single
   min-width breakpoint to tune instead of one per pattern. */
@media (min-width: 700px) {
	.section-pad {
		padding-top: var(--pad-y);
		padding-bottom: var(--pad-y);
	}
}

@media (min-width: 480px) {
	.section-pad {
		padding-left: 24px;
		padding-right: 24px;
	}
}

/* Footer social icons: white glyph on a subtle translucent white circle,
   overriding WooCommerce/core's per-platform brand colours directly rather
   than relying on the social-links block's own (undocumented, easy to get
   wrong) icon/background colour attributes, since it's a static block and
   the front end renders the saved HTML as-is. */
footer .wp-block-social-links .wp-social-link {
	background-color: rgba(255, 255, 255, 0.18) !important;
}

footer .wp-block-social-links .wp-social-link svg {
	fill: #fff !important;
}

/* Fees table */
.fee-list {
	margin: 12px 0 0;
}

.fee-list__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.fee-list__row:last-child {
	border-bottom: none;
}

.fee-list__row dt {
	font-size: 0.9375rem;
	color: var(--wp--preset--color--body-text);
}

.fee-list__row dt span {
	display: block;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--body-text);
	opacity: 0.75;
}

.fee-list__row dd {
	margin: 0;
	font-weight: 700;
	color: var(--wp--preset--color--ink);
	white-space: nowrap;
}

/* Contact form */
.contact-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.contact-form__row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.contact-form__row .contact-form__field {
	flex: 1 1 200px;
}

.contact-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--ink);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	font-weight: 400;
	padding: 11px 14px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--bg);
}

.contact-form input:focus,
.contact-form textarea:focus {
	outline: 2px solid var(--wp--preset--color--orange);
	outline-offset: 1px;
}

.contact-form .btn-submit {
	display: inline-block;
	padding: 12px 26px;
	border: none;
	border-radius: 999px;
	background: var(--wp--preset--color--orange);
	color: #fff;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
}

.contact-form .btn-submit:hover {
	background: var(--wp--preset--color--orange-dark);
}

.contact-notice {
	padding: 14px 18px;
	border-radius: 10px;
	font-size: 0.9375rem;
}

.contact-notice--success {
	background: #EAF6EC;
	color: #1E4620;
}

.contact-notice--error {
	background: #FCEBEA;
	color: #5C1A15;
}

/* Contact page: trust badges + phone/email chips (mirrors the badges used
   in the homepage "about" band, and the pill-button language used elsewhere). */
.badges {
	display: flex;
	gap: 14px;
	flex-wrap: wrap;
	align-items: center;
}

.badge {
	background: var(--wp--preset--color--bg);
	border-radius: 8px;
	padding: 8px 14px;
	display: flex;
	align-items: center;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.badge img {
	display: block;
}

.contact-chips {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 20px;
}

.contact-chip {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	padding: 10px 18px;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9375rem;
}

.contact-chip:hover,
.contact-chip:focus-visible {
	border-color: var(--wp--preset--color--orange);
	color: var(--wp--preset--color--orange);
}

/* Contact form card — matches the bordered-card language used on the
   services grid and fees table rather than floating unstyled on the page. */
.contact-form-card {
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	padding: 32px 28px;
}

/* About page: coloured registration chips. Dot + label (matching the
   services-card dot motif already used elsewhere) rather than a left-border
   accent — a thick side border on a card is a recognizable generic-AI-UI
   tell. Dark text on light bg keeps contrast safe for any of the 4 accent
   colours, unlike solid-fill + white text, which fails for teal/green
   (checked: 2.81:1 and 2.17:1, both under the 4.5:1 minimum). */
.reg-chips {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.reg-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--wp--preset--color--bg-subtle);
	border-radius: 999px;
	padding: 5px 12px 5px 10px;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--wp--preset--color--ink);
}

.reg-chip::before {
	content: "";
	display: block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--dot-color, var(--wp--preset--color--orange));
}

/* Small coloured accent bar above the bio card, echoing the service-card
   dots elsewhere on the site. */
.accent-bar {
	height: 4px;
	width: 64px;
	border-radius: 4px 4px 0 0;
	background: linear-gradient(90deg, var(--wp--preset--color--blue), var(--wp--preset--color--teal), var(--wp--preset--color--green));
}

/* Bio card text was reported unreadable (washed-out) despite the underlying
   --wp--preset--color--body-text variable checking out correctly server-side
   — defensive fix: force dark, high-contrast text explicitly regardless of
   cause. */
.about-bio-card,
.about-bio-card p {
	color: var(--wp--preset--color--ink) !important;
}

/* Blog listing (/latest-posts/) card grid */
.blog-card {
	overflow: hidden;
	background: var(--wp--preset--color--bg);
}

.blog-card__image img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
	margin: 0;
}

.blog-card .wp-block-post-title,
.blog-card .wp-block-post-title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.blog-card .wp-block-post-excerpt {
	color: var(--wp--preset--color--body-text);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.blog-grid .wp-block-query-pagination {
	margin-top: 32px;
	gap: 8px;
}

.blog-grid .wp-block-query-pagination a,
.blog-grid .wp-block-query-pagination span {
	padding: 8px 14px;
	border-radius: 6px;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.blog-grid .wp-block-query-pagination .current {
	background: var(--wp--preset--color--orange);
	color: #fff;
	font-weight: 700;
}

/* Areas of Specialization: dot-tagged chips, same motif as .reg-chip and
   the service-card dots — deliberately not a bordered/side-tab tile. */
.area-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 12px;
}

.area-chip {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: var(--wp--preset--color--bg);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	padding: 14px 16px;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--ink);
	line-height: 1.4;
}

.area-chip::before {
	content: "";
	flex-shrink: 0;
	margin-top: 6px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--dot-color, var(--wp--preset--color--orange));
}
