/*
 * Faiha managed pages: /about/, /contact/, the /services/ hub and every
 * service page created by src/migrations/2026-09-27-service-pages.php
 * (pages carrying the _faiha_service_page meta; body class
 * .faiha-service-page).
 *
 * All content is ordinary core blocks:
 *   section.faiha-page-hero        breadcrumb, eyebrow, H1, line, buttons
 *   section.faiha-page-about       overview (+ at-a-glance facts)
 *   section.faiha-page-info        info cards: who / documents / important /
 *                                  cost factors / why Faiha
 *   section.faiha-hub              /services/ only: 10 category cards
 *   section.faiha-services         child / related service cards
 *                                  (the homepage card component, services.css)
 *   section.faiha-page-steps       How It Works + "Good to know" note
 *   section.faiha-faq              FAQ (homepage component, homepage.css)
 *   section.faiha-contact          Contact page details + map (homepage component)
 *   section.faiha-page-cta         main contact only
 *
 * Section backgrounds come from faiha-tone-surface / faiha-tone-alt, which
 * the migration alternates, so any combination of sections keeps the rhythm.
 *
 * The hero and the CTA panel are permanently dark brand surfaces (raw
 * navy/on-dark tokens, like hero.css); everything else uses the semantic
 * light/dark tokens and follows the theme toggle.
 *
 * Selectors are section-scoped (two classes or more) so they win over
 * Kadence's `.single-content p/h2/ul` margins.
 */

body.faiha-service-page {
	background-color: var(--faiha-surface);
	color: var(--faiha-text);
}

.faiha-service-page .content-area {
	margin-block: 0;
}

.faiha-service-page {
	--pg-accent: var(--faiha-color-brand-strong);
	--pg-accent-soft: rgba(217, 32, 50, 0.08);
	--pg-line: rgba(4, 17, 26, 0.08);
	--pg-card: var(--faiha-surface);
}

:root[data-theme="dark"] .faiha-service-page {
	/* Brand red lifted so normal-size red text stays >= 4.5:1 on navy. */
	--pg-accent: color-mix(in srgb, var(--faiha-color-brand) 85%, #fff);
	--pg-accent-soft: rgba(242, 51, 67, 0.14);
	--pg-line: rgba(255, 255, 255, 0.08);
	--pg-card: var(--faiha-navy-700);
}

/* ---------------------------------------------------------------- */
/* Shared section frame                                              */
/* ---------------------------------------------------------------- */

:is(.faiha-page-hero, .faiha-page-section, .faiha-page-cta).wp-block-group {
	box-sizing: border-box;
	margin-block: 0;
	padding: var(--faiha-space-section) var(--faiha-container-padding);
}

:is(.faiha-page-hero, .faiha-page-section, .faiha-page-cta).wp-block-group > * {
	max-width: var(--faiha-container-max);
	margin-inline: auto;
}

.faiha-page-section.wp-block-group {
	background-color: var(--faiha-surface);
	color: var(--faiha-text);
	transition:
		background-color var(--faiha-duration-theme) var(--faiha-ease-standard),
		color var(--faiha-duration-theme) var(--faiha-ease-standard);
}

.faiha-page-section .faiha-page__eyebrow,
.faiha-page-cta .faiha-page__eyebrow {
	margin-block: 0 var(--faiha-space-xs);
	color: var(--pg-accent);
	font-family: var(--faiha-font-heading);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.4;
}

.faiha-page-section .faiha-page__title {
	margin-block: 0;
	color: var(--faiha-text);
	font-family: var(--faiha-font-heading);
	font-size: var(--faiha-text-h2);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.faiha-page-section .faiha-page__text {
	max-width: 46rem;
	margin-block: var(--faiha-space-sm) 0;
	margin-inline: 0;
	color: var(--faiha-text-secondary);
	font-family: var(--faiha-font-primary);
	font-size: clamp(1rem, calc(0.96rem + 0.2vw), 1.125rem);
	line-height: 1.7;
	text-wrap: pretty;
}

/* ---------------------------------------------------------------- */
/* Hero: compact, permanently dark                                   */
/* ---------------------------------------------------------------- */

.faiha-page-hero.wp-block-group {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: clamp(23.75rem, calc(20rem + 10vw), 30rem); /* 380-480px */
	padding-block: var(--faiha-space-2xl);
	overflow: hidden;
	background-color: var(--faiha-navy-900);
	background-image:
		radial-gradient(ellipse 55% 80% at 100% 0%, rgba(217, 32, 50, 0.16), transparent 70%),
		radial-gradient(ellipse 70% 90% at 0% 100%, rgba(12, 36, 51, 0.9), transparent 75%),
		linear-gradient(135deg, var(--faiha-navy-900) 0%, var(--faiha-navy-800) 100%);
	color: var(--faiha-text-on-dark);
}

/* Faint grid texture, decorative only. */
.faiha-page-hero.wp-block-group::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 3.5rem 3.5rem;
	-webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
	mask-image: linear-gradient(100deg, transparent 35%, #000 100%);
	pointer-events: none;
}

.faiha-page-hero.wp-block-group > * {
	position: relative;
	width: 100%;
}

.faiha-page-hero .faiha-breadcrumb {
	margin-block: 0 var(--faiha-space-lg);
}

.faiha-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0;
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--faiha-font-primary);
	font-size: 0.875rem;
	line-height: 1.5;
}

.faiha-breadcrumb li {
	display: inline-flex;
	align-items: center;
	margin: 0;
	color: var(--faiha-text-on-dark-secondary);
}

.faiha-breadcrumb li + li::before {
	content: "/";
	content: "/" / "";
	margin-inline: 0.625rem;
	color: rgba(255, 255, 255, 0.32);
}

.faiha-breadcrumb a {
	color: var(--faiha-text-on-dark-secondary);
	text-decoration: none;
	text-underline-offset: 0.2em;
}

.faiha-breadcrumb a:hover {
	color: var(--faiha-text-on-dark);
	text-decoration: underline;
}

.faiha-breadcrumb a:focus-visible {
	outline-color: var(--faiha-text-on-dark);
	border-radius: 2px;
}

.faiha-breadcrumb [aria-current="page"] {
	color: var(--faiha-text-on-dark);
	font-weight: 600;
}

.faiha-page-hero .faiha-page-hero__eyebrow {
	margin-block: 0 var(--faiha-space-sm);
	color: color-mix(in srgb, var(--faiha-color-brand) 70%, #fff);
	font-family: var(--faiha-font-heading);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.4;
}

/* Children span the container; line length is limited with padding so they stay left-aligned in it. */
.faiha-page-hero .faiha-page-hero__title {
	margin-block: 0;
	padding-right: max(0px, calc(100% - 64rem));
	color: var(--faiha-text-on-dark);
	font-family: var(--faiha-font-heading);
	font-size: var(--faiha-text-service-h1);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.faiha-page-hero .faiha-page-hero__text {
	margin-block: var(--faiha-space-sm) 0;
	padding-right: max(0px, calc(100% - 40rem));
	color: var(--faiha-text-on-dark-secondary);
	font-family: var(--faiha-font-primary);
	font-size: clamp(1rem, calc(0.94rem + 0.25vw), 1.1875rem);
	line-height: 1.6;
	text-wrap: pretty;
}

.faiha-page-hero .faiha-page-hero__actions {
	gap: var(--faiha-space-xs);
	margin-block: var(--faiha-space-lg) 0;
}

/* ---------------------------------------------------------------- */
/* Buttons on the dark surfaces (hero + CTA panel)                   */
/* ---------------------------------------------------------------- */

:is(.faiha-page-hero, .faiha-page-cta) .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 3rem;
	padding: 0.75rem 1.5rem;
	border: 1px solid transparent;
	border-radius: var(--faiha-radius-button);
	font-family: var(--faiha-font-heading);
	font-size: 1rem;
	font-weight: var(--faiha-weight-button);
	line-height: 1.2;
	text-decoration: none;
	transition:
		background-color var(--faiha-duration-fast) var(--faiha-ease-standard),
		border-color var(--faiha-duration-fast) var(--faiha-ease-standard);
}

:is(.faiha-page-hero, .faiha-page-cta) .faiha-btn-primary .wp-block-button__link {
	background-color: var(--faiha-color-brand-strong);
	color: var(--faiha-text-on-dark);
}

:is(.faiha-page-hero, .faiha-page-cta) .faiha-btn-primary .wp-block-button__link:hover {
	background-color: color-mix(in srgb, var(--faiha-color-brand-strong) 86%, #000);
	color: var(--faiha-text-on-dark);
}

:is(.faiha-page-hero, .faiha-page-cta) .faiha-btn-ghost .wp-block-button__link {
	background-color: transparent;
	border-color: rgba(255, 255, 255, 0.28);
	color: var(--faiha-text-on-dark);
}

:is(.faiha-page-hero, .faiha-page-cta) .faiha-btn-ghost .wp-block-button__link:hover {
	background-color: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.5);
	color: var(--faiha-text-on-dark);
}

:is(.faiha-page-hero, .faiha-page-cta) .wp-block-button__link:focus-visible {
	outline-width: 2px;
	outline-style: solid;
	outline-color: var(--faiha-text-on-dark);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------- */
/* Overview                                                          */
/* ---------------------------------------------------------------- */

.faiha-page-about.wp-block-group > .faiha-page__text {
	max-width: 46rem;
	margin-inline: auto;
}

.faiha-page-about.wp-block-group > .faiha-page__eyebrow,
.faiha-page-about.wp-block-group > .faiha-page__title {
	max-width: 46rem;
}

.faiha-page-about.wp-block-group > .faiha-page__title + .faiha-page__text {
	margin-top: var(--faiha-space-md);
}

/* At-a-glance facts under the overview (detailed pages). */
.faiha-page-about .faiha-page-facts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--faiha-space-sm);
	max-width: 46rem;
	margin: var(--faiha-space-lg) auto 0;
	padding: 0;
	list-style: none;
}

.faiha-page-about .faiha-page-facts__item {
	margin: 0;
	padding: var(--faiha-space-sm);
	border: 1px solid var(--pg-line);
	border-radius: 0.75rem;
	background-color: var(--pg-card);
	color: var(--faiha-text-secondary);
	font-family: var(--faiha-font-primary);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.faiha-page-about .faiha-page-facts__item strong {
	display: block;
	margin-bottom: 0.25rem;
	color: var(--pg-accent);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.faiha-page-about .faiha-page-facts__item a {
	color: var(--faiha-text);
	font-weight: 600;
	text-underline-offset: 0.2em;
}

@media (max-width: 767px) {
	.faiha-page-about .faiha-page-facts {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------------------------------------------------------------- */
/* Section tones: the migration alternates faiha-tone-surface /     */
/* faiha-tone-alt, so every page gets the same rhythm whatever its   */
/* sections. Cards sit on the opposite surface of their section.     */
/* Includes the reused homepage FAQ / Contact and services.css cards. */
/* ---------------------------------------------------------------- */

.faiha-service-page .faiha-tone-surface.wp-block-group {
	--pg-card: var(--faiha-surface-alt);
	--svc-bg: var(--faiha-surface);
	--svc-card: var(--faiha-surface-alt);
	--fh-card: var(--faiha-surface-alt);
	background-color: var(--faiha-surface);
}

.faiha-service-page .faiha-tone-alt.wp-block-group {
	--pg-card: var(--faiha-surface);
	--svc-bg: var(--faiha-surface-alt);
	--svc-card: var(--faiha-surface);
	--fh-card: var(--faiha-surface);
	background-color: var(--faiha-surface-alt);
}

:root[data-theme="dark"] .faiha-service-page .faiha-tone-surface.wp-block-group {
	--pg-card: var(--faiha-navy-700);
	--svc-card: var(--faiha-navy-700);
	--fh-card: var(--faiha-navy-700);
}

:root[data-theme="dark"] .faiha-service-page .faiha-tone-alt.wp-block-group {
	--pg-card: var(--faiha-navy-600);
	--svc-card: var(--faiha-navy-600);
	--fh-card: var(--faiha-navy-600);
}

/* ---------------------------------------------------------------- */
/* Info cards: Who it is for / Documents / Important / Cost / Why    */
/* ---------------------------------------------------------------- */

.faiha-page-info.wp-block-group {
	text-align: center;
}

.faiha-page-info .faiha-page__text {
	margin-inline: auto;
}

.faiha-page-info .faiha-page-info__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--faiha-space-md);
	margin-block: var(--faiha-space-xl) 0;
	text-align: left;
}

.faiha-page-info .faiha-page-info__grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.faiha-page-info .faiha-page-info__grid--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Four long lists (category pages) read better two by two. */
.faiha-page-info:not(.faiha-page-why) .faiha-page-info__grid--4 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.faiha-page-info .faiha-page-info__card {
	box-sizing: border-box;
	margin: 0;
	padding: var(--faiha-space-md);
	border: 1px solid var(--pg-line);
	border-radius: var(--faiha-radius-card);
	background-color: var(--pg-card);
	transition:
		background-color var(--faiha-duration-theme) var(--faiha-ease-standard),
		border-color var(--faiha-duration-theme) var(--faiha-ease-standard);
}

.faiha-page-info .faiha-page-info__title {
	margin: 0;
	color: var(--faiha-text);
	font-family: var(--faiha-font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
}

.faiha-page-info .faiha-page-info__text,
.faiha-page-info .faiha-page-info__note {
	margin: var(--faiha-space-xs) 0 0;
	color: var(--faiha-text-secondary);
	font-family: var(--faiha-font-primary);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.faiha-page-info .faiha-page-info__note {
	padding-top: var(--faiha-space-xs);
	border-top: 1px solid var(--pg-line);
	font-size: 0.875rem;
}

.faiha-page-info .faiha-page-info__list {
	margin: var(--faiha-space-sm) 0 0;
	padding: 0;
	list-style: none;
}

.faiha-page-info .faiha-page-info__list li {
	position: relative;
	margin: 0;
	padding-left: 1.5rem;
	color: var(--faiha-text-secondary);
	font-family: var(--faiha-font-primary);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.faiha-page-info .faiha-page-info__list li + li {
	margin-top: 0.5rem;
}

/* Small red check mark (decorative). */
.faiha-page-info .faiha-page-info__list li::before {
	content: "";
	position: absolute;
	top: 0.45em;
	left: 0.125rem;
	width: 0.5rem;
	height: 0.3rem;
	border-bottom: 2px solid var(--pg-accent);
	border-left: 2px solid var(--pg-accent);
	transform: rotate(-45deg);
}

/* Why Faiha: numbered-free short cards with a red top rule. */
.faiha-page-why .faiha-page-info__card {
	border-top: 3px solid var(--pg-accent);
}

@media (max-width: 1023px) {
	.faiha-page-info .faiha-page-info__grid--3,
	.faiha-page-info .faiha-page-info__grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.faiha-page-info .faiha-page-info__grid,
	.faiha-page-info .faiha-page-info__grid--3,
	.faiha-page-info .faiha-page-info__grid--4,
	.faiha-page-info:not(.faiha-page-why) .faiha-page-info__grid--4 {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------------------------------------------------------------- */
/* How It Works                                                      */
/* ---------------------------------------------------------------- */

.faiha-page-steps.wp-block-group {
	text-align: center;
}

.faiha-page-steps .faiha-page-steps__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--faiha-space-md);
	margin-block: var(--faiha-space-xl) 0;
	counter-reset: faiha-step;
	text-align: left;
}

.faiha-page-steps .faiha-page-steps__item {
	position: relative;
	box-sizing: border-box;
	margin: 0;
	padding: var(--faiha-space-md);
	border: 1px solid var(--pg-line);
	border-radius: var(--faiha-radius-card);
	background-color: var(--pg-card);
	counter-increment: faiha-step;
	transition:
		background-color var(--faiha-duration-theme) var(--faiha-ease-standard),
		border-color var(--faiha-duration-theme) var(--faiha-ease-standard);
}

.faiha-page-steps .faiha-page-steps__item::before {
	content: counter(faiha-step, decimal-leading-zero);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	margin-bottom: var(--faiha-space-sm);
	border-radius: 50%;
	background-color: var(--pg-accent-soft);
	color: var(--pg-accent);
	font-family: var(--faiha-font-primary);
	font-size: 0.875rem;
	font-weight: 700;
}

.faiha-page-steps .faiha-page-steps__title {
	margin: 0;
	color: var(--faiha-text);
	font-family: var(--faiha-font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
}

.faiha-page-steps .faiha-page-steps__text {
	margin: var(--faiha-space-2xs) 0 0;
	color: var(--faiha-text-secondary);
	font-family: var(--faiha-font-primary);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.faiha-page-steps .faiha-page-note {
	max-width: 46rem;
	margin: var(--faiha-space-xl) auto 0;
	padding: var(--faiha-space-sm) var(--faiha-space-md);
	border-left: 3px solid var(--pg-accent);
	border-radius: 0 0.5rem 0.5rem 0;
	background-color: var(--pg-accent-soft);
	color: var(--faiha-text-secondary);
	font-family: var(--faiha-font-primary);
	font-size: 0.9375rem;
	line-height: 1.6;
	text-align: left;
}

.faiha-page-steps .faiha-page-note strong {
	color: var(--faiha-text);
}

@media (max-width: 1023px) {
	.faiha-page-steps .faiha-page-steps__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.faiha-page-steps .faiha-page-steps__list {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------------------------------------------------------------- */
/* /services/ hub                                                    */
/* ---------------------------------------------------------------- */

.faiha-hub.wp-block-group {
	text-align: center;
}

.faiha-hub .faiha-page__text {
	margin-inline: auto;
}

.faiha-hub .faiha-hub__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--faiha-space-md);
	margin-block: var(--faiha-space-xl) 0;
	text-align: left;
}

.faiha-hub .faiha-hub__card {
	position: relative;
	box-sizing: border-box;
	margin: 0;
	padding: var(--faiha-space-md);
	border: 1px solid var(--pg-line);
	border-radius: var(--faiha-radius-card);
	background-color: var(--pg-card);
	transition:
		border-color var(--faiha-duration-fast) var(--faiha-ease-standard),
		background-color var(--faiha-duration-theme) var(--faiha-ease-standard);
}

.faiha-hub .faiha-hub__text {
	margin: var(--faiha-space-xs) 0 0;
	padding-left: calc(2.75rem + var(--faiha-space-sm));
	color: var(--faiha-text-secondary);
	font-family: var(--faiha-font-primary);
	font-size: 0.9375rem;
	line-height: 1.55;
}

@media (max-width: 767px) {
	.faiha-hub .faiha-hub__text {
		padding-left: 0;
	}
}

.faiha-hub .faiha-hub__card:hover,
.faiha-hub .faiha-hub__card:focus-within {
	border-color: rgba(217, 32, 50, 0.45);
}

.faiha-hub .faiha-hub__title {
	margin: 0;
	font-family: var(--faiha-font-heading);
	font-size: 1.3125rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.faiha-hub .faiha-hub__title a {
	display: inline-flex;
	align-items: center;
	gap: var(--faiha-space-sm);
	color: var(--faiha-text);
	text-decoration: none;
}

.faiha-hub .faiha-hub__title a:hover {
	color: var(--pg-accent);
}

/* Category icon (icons.css maps the approved URL to its glyph). Decorative. */
.faiha-hub .faiha-hub__title a {
	position: relative;
}

/* ::before = soft badge, ::after = the red glyph on top of it. */
.faiha-hub .faiha-hub__title a::before {
	content: "";
	flex: none;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 0.75rem;
	background-color: var(--pg-accent-soft);
}

.faiha-hub .faiha-hub__title a::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0.6875rem;
	width: 1.375rem;
	height: 1.375rem;
	margin-top: -0.6875rem;
	background-color: var(--pg-accent);
	-webkit-mask: var(--faiha-icon) center / contain no-repeat;
	mask: var(--faiha-icon) center / contain no-repeat;
}

.faiha-hub .faiha-hub__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: var(--faiha-space-sm) 0 0;
	padding: 0 0 0 calc(2.75rem + var(--faiha-space-sm));
	list-style: none;
}

.faiha-hub .faiha-hub__links li {
	margin: 0;
}

.faiha-hub .faiha-hub__links a {
	display: inline-flex;
	align-items: center;
	min-height: 2.25rem;
	padding: 0.375rem 0.875rem;
	border: 1px solid var(--pg-line);
	border-radius: 999px;
	background-color: var(--faiha-surface);
	color: var(--faiha-text-secondary);
	font-family: var(--faiha-font-primary);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	transition:
		border-color var(--faiha-duration-fast) var(--faiha-ease-standard),
		color var(--faiha-duration-fast) var(--faiha-ease-standard);
}

:root[data-theme="dark"] .faiha-hub .faiha-hub__links a {
	background-color: var(--faiha-navy-600);
}

.faiha-hub .faiha-hub__links a:hover {
	border-color: var(--pg-accent);
	color: var(--pg-accent);
}

.faiha-hub a:focus-visible {
	outline-color: var(--pg-accent);
	outline-offset: 3px;
	border-radius: 0.5rem;
}

@media (max-width: 767px) {
	.faiha-hub .faiha-hub__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.faiha-hub .faiha-hub__links {
		padding-left: 0;
	}
}

/* ---------------------------------------------------------------- */
/* CTA: dark panel on the page surface, main contact only            */
/* ---------------------------------------------------------------- */

.faiha-page-cta.wp-block-group {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	background-color: var(--faiha-surface);
	transition: background-color var(--faiha-duration-theme) var(--faiha-ease-standard);
}

/* After a section on the same (surface) tone, don't double the gap (class set by the migration). */
.faiha-page-cta.faiha-page-cta--flush.wp-block-group {
	padding-top: 0;
}

.faiha-page-cta.wp-block-group > .faiha-page-cta__intro,
.faiha-page-cta.wp-block-group > .faiha-page-cta__contact {
	width: 100%;
	box-sizing: border-box;
	margin: 0 auto;
	background-color: var(--faiha-navy-800);
	color: var(--faiha-text-on-dark);
}

.faiha-page-cta.wp-block-group > .faiha-page-cta__intro {
	padding: var(--faiha-space-xl) var(--faiha-space-xl) var(--faiha-space-md);
	border-radius: var(--faiha-radius-card) var(--faiha-radius-card) 0 0;
	background-image: radial-gradient(ellipse 60% 120% at 100% 0%, rgba(217, 32, 50, 0.16), transparent 70%);
}

.faiha-page-cta.wp-block-group > .faiha-page-cta__contact {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--faiha-space-md);
	padding: 0 var(--faiha-space-xl) var(--faiha-space-xl);
	border-radius: 0 0 var(--faiha-radius-card) var(--faiha-radius-card);
}

.faiha-page-cta .faiha-page__eyebrow {
	color: color-mix(in srgb, var(--faiha-color-brand) 70%, #fff);
}

.faiha-page-cta .faiha-page-cta__title {
	margin: 0;
	color: var(--faiha-text-on-dark);
	font-family: var(--faiha-font-heading);
	font-size: clamp(1.5rem, calc(1.2rem + 1.2vw), 2.25rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.faiha-page-cta .faiha-page-cta__text {
	max-width: 40rem;
	margin: var(--faiha-space-xs) 0 0;
	color: var(--faiha-text-on-dark-secondary);
	font-family: var(--faiha-font-primary);
	font-size: 1rem;
	line-height: 1.6;
}

.faiha-page-cta .faiha-page-cta__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--faiha-space-xs) var(--faiha-space-lg);
	margin: 0;
	padding: 0;
	list-style: none;
}

.faiha-page-cta .faiha-page-cta__list li {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	margin: 0;
	color: color-mix(in srgb, var(--faiha-color-brand) 70%, #fff);
	font-family: var(--faiha-font-primary);
	font-size: 1rem;
	line-height: 1.4;
}

.faiha-page-cta .faiha-page-cta__list a {
	color: var(--faiha-text-on-dark);
	font-weight: 600;
	text-decoration: none;
	text-underline-offset: 0.2em;
	overflow-wrap: anywhere;
}

.faiha-page-cta .faiha-page-cta__list a:hover {
	text-decoration: underline;
}

.faiha-page-cta .faiha-page-cta__list a:focus-visible {
	outline-color: var(--faiha-text-on-dark);
	outline-offset: 3px;
	border-radius: 2px;
}

.faiha-page-cta .faiha-page-cta__actions {
	gap: var(--faiha-space-xs);
	margin: 0;
}

@media (max-width: 767px) {
	.faiha-page-cta.wp-block-group > .faiha-page-cta__intro {
		padding: var(--faiha-space-lg) var(--faiha-space-md) var(--faiha-space-md);
	}

	.faiha-page-cta.wp-block-group > .faiha-page-cta__contact {
		padding: 0 var(--faiha-space-md) var(--faiha-space-lg);
	}

	.faiha-page-cta .faiha-page-cta__list {
		flex-direction: column;
	}
}

@media (max-width: 599px) {
	/* CTA panel: stacked full-width buttons. */
	.faiha-page-cta .wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
	}

	.faiha-page-cta .wp-block-button,
	.faiha-page-cta .wp-block-button__link {
		width: 100%;
	}

	/* Hero: the two short buttons share one row, keeping the hero compact. */
	.faiha-page-hero .wp-block-buttons {
		flex-wrap: nowrap;
	}

	.faiha-page-hero .wp-block-button {
		flex: 1 1 0;
	}

	.faiha-page-hero .wp-block-button__link {
		width: 100%;
		padding-inline: 1rem;
	}

	.faiha-page-hero.wp-block-group {
		padding-block: var(--faiha-space-xl);
	}

	.faiha-page-hero .faiha-breadcrumb {
		margin-bottom: var(--faiha-space-md);
	}
}

/* Dark theme: a hairline keeps the navy panel distinct from the navy page. */
:root[data-theme="dark"] .faiha-page-cta.wp-block-group > .faiha-page-cta__intro,
:root[data-theme="dark"] .faiha-page-cta.wp-block-group > .faiha-page-cta__contact {
	border: 1px solid rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .faiha-page-cta.wp-block-group > .faiha-page-cta__intro {
	border-bottom: 0;
}

:root[data-theme="dark"] .faiha-page-cta.wp-block-group > .faiha-page-cta__contact {
	border-top: 0;
}

/* ---------------------------------------------------------------- */
/* Inner-page system (final pass): the approved homepage language    */
/* applied to the managed pages. Shared components (cards, FAQ,      */
/* buttons, eyebrow lines, secondary text) come from the homepage    */
/* polish block in homepage.css; these rules cover inner-only parts. */
/* ---------------------------------------------------------------- */

/* Compact hero: much shorter than the homepage hero, no empty band. */
.faiha-page-hero.wp-block-group {
	min-height: clamp(16.5rem, calc(13rem + 8vw), 22.5rem); /* ~264-360px */
	padding-block: var(--faiha-space-xl);
}

.faiha-page-hero .faiha-breadcrumb {
	margin-block-end: var(--faiha-space-md);
}

.faiha-page-hero .faiha-page-hero__eyebrow::before,
.faiha-page-section .faiha-page__eyebrow::before,
.faiha-page-cta .faiha-page__eyebrow::before {
	content: "";
	display: inline-block;
	width: 1.5rem;
	height: 2px;
	margin-right: 0.625rem;
	border-radius: 2px;
	background-color: currentColor;
	vertical-align: middle;
	transform: translateY(-1px);
}

.faiha-page-hero .faiha-page-hero__eyebrow,
.faiha-page-section .faiha-page__eyebrow,
.faiha-page-cta .faiha-page__eyebrow {
	font-family: var(--faiha-font-heading);
	letter-spacing: 0.14em;
}

.faiha-page-hero .faiha-page-hero__text {
	color: rgba(255, 255, 255, 0.86);
	line-height: 1.65;
}

/* Section headings and reading rhythm. */
.faiha-page-section .faiha-page__title {
	font-weight: var(--faiha-weight-heading);
	letter-spacing: var(--faiha-tracking-heading);
}

.faiha-page-section .faiha-page__text {
	line-height: 1.75;
}

/* How It Works on inner pages: the homepage's red step badges. */
.faiha-page-steps .faiha-page-steps__item::before {
	width: 3rem;
	height: 3rem;
	border-radius: 0.75rem;
	background-color: var(--faiha-color-brand-strong);
	color: var(--faiha-text-on-dark);
	font-family: var(--faiha-font-heading);
	font-size: 1rem;
}

.faiha-page-steps .faiha-page-steps__item {
	padding: var(--faiha-space-lg);
}

/* Info cards: a light shadow in light mode, flat navy steps in dark mode. */
:root:not([data-theme="dark"]) .faiha-page-info .faiha-page-info__card,
:root:not([data-theme="dark"]) .faiha-page-steps .faiha-page-steps__item,
:root:not([data-theme="dark"]) .faiha-hub .faiha-hub__card {
	box-shadow: var(--faiha-shadow-card);
}

.faiha-page-info .faiha-page-info__title {
	font-size: 1.1875rem;
}

.faiha-page-info .faiha-page-info__list li {
	line-height: 1.65;
}

/* At-a-glance facts: quieter cards. */
.faiha-page-about .faiha-page-facts__item {
	border-radius: var(--faiha-radius-card);
}

/* About: company text + factual company-details panel. */
.faiha-page-about--split.wp-block-group > .faiha-page-about__columns {
	max-width: var(--faiha-container-max);
	gap: var(--faiha-space-2xl);
	align-items: start;
	margin: 0 auto;
}

.faiha-page-about--split .faiha-page-about__main > * {
	max-width: 42rem;
}

.faiha-page-about--split .faiha-page-about__main .faiha-page__text {
	margin-inline: 0;
}

.faiha-page-about--split .faiha-page-about__main .faiha-page__title + .faiha-page__text {
	margin-top: var(--faiha-space-md);
}

.faiha-page-about--split .faiha-page-about__aside {
	padding: var(--faiha-space-lg);
	border: 1px solid var(--pg-line);
	border-top: 3px solid var(--faiha-color-brand);
	border-radius: var(--faiha-radius-card);
	background-color: var(--pg-card);
}

:root:not([data-theme="dark"]) .faiha-page-about--split .faiha-page-about__aside {
	box-shadow: var(--faiha-shadow-card);
}

.faiha-page-about--split .faiha-company__title {
	margin: 0 0 var(--faiha-space-sm);
	color: var(--faiha-text);
	font-size: 1.1875rem;
	font-weight: 700;
}

.faiha-page-about--split .faiha-company {
	margin: 0;
	padding: 0;
	list-style: none;
}

.faiha-page-about--split .faiha-company__item {
	display: grid;
	gap: 0.125rem;
	margin: 0;
	padding: 0.75rem 0;
	border-top: 1px solid var(--pg-line);
	font-family: var(--faiha-font-primary);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.faiha-page-about--split .faiha-company__item:first-child {
	border-top: 0;
	padding-top: 0;
}

.faiha-page-about--split .faiha-company__item strong {
	color: var(--pg-accent);
	font-family: var(--faiha-font-heading);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.faiha-page-about--split .faiha-company__item span {
	color: var(--faiha-text);
}

.faiha-page-about--split .faiha-company__item a {
	color: var(--faiha-text);
	text-underline-offset: 0.2em;
}

.faiha-page-about--split .faiha-company__item a:hover {
	color: var(--pg-accent);
}

@media (min-width: 782px) {
	.faiha-page-about--split .faiha-page-about__columns > .faiha-page-about__aside {
		flex: 0 0 22rem;
	}
}

/* Legal pages: one comfortable reading column. */
.faiha-legal.wp-block-group > * {
	max-width: 46rem;
}

.faiha-legal .faiha-legal__heading {
	margin: var(--faiha-space-xl) 0 var(--faiha-space-xs);
	color: var(--faiha-text);
	font-size: clamp(1.375rem, calc(1.2rem + 0.6vw), 1.75rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.faiha-legal .faiha-legal__heading:first-child {
	margin-top: 0;
}

.faiha-legal .faiha-legal__text,
.faiha-legal .faiha-legal__list li {
	color: var(--faiha-text-secondary);
	font-family: var(--faiha-font-primary);
	font-size: 1.0625rem;
	line-height: 1.75;
}

.faiha-legal .faiha-legal__text {
	margin: 0 0 var(--faiha-space-sm);
}

.faiha-legal .faiha-legal__list {
	margin: 0 0 var(--faiha-space-sm);
	padding-left: 1.25rem;
}

.faiha-legal .faiha-legal__list li + li {
	margin-top: 0.375rem;
}

.faiha-legal a {
	color: var(--pg-accent);
	text-underline-offset: 0.2em;
}

/* Blog: post grid (when posts exist) and the empty state. */
.faiha-blog.wp-block-group {
	text-align: center;
}

.faiha-blog .faiha-blog__query {
	margin-block: var(--faiha-space-xl) 0;
	text-align: left;
}

.faiha-blog .faiha-blog__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
	gap: var(--faiha-space-md);
	margin: 0;
	padding: 0;
	list-style: none;
}

.faiha-blog .faiha-blog__grid > li {
	margin: 0;
	padding: var(--faiha-space-lg);
	border: 1px solid var(--pg-line);
	border-radius: var(--faiha-radius-card);
	background-color: var(--pg-card);
}

.faiha-blog .faiha-blog__title {
	margin: 0;
	font-size: 1.1875rem;
	line-height: 1.35;
}

.faiha-blog .faiha-blog__title a {
	color: var(--faiha-text);
	text-decoration: none;
}

.faiha-blog .faiha-blog__title a:hover {
	color: var(--pg-accent);
}

.faiha-blog .faiha-blog__date {
	margin-top: var(--faiha-space-2xs);
	color: var(--faiha-text-secondary);
	font-size: 0.875rem;
}

.faiha-blog .faiha-blog__excerpt {
	margin-top: var(--faiha-space-xs);
	color: var(--faiha-text-secondary);
	line-height: 1.65;
}

.faiha-blog .faiha-blog__empty {
	max-width: 36rem;
	margin: 0 auto;
	padding: var(--faiha-space-xl);
	border: 1px dashed var(--pg-line);
	border-radius: var(--faiha-radius-card);
	background-color: var(--pg-card);
	text-align: center;
}

.faiha-blog .faiha-blog__empty-title {
	margin: 0;
	color: var(--faiha-text);
	font-size: 1.25rem;
	font-weight: 700;
}

.faiha-blog .faiha-blog__empty-text {
	margin: var(--faiha-space-xs) 0 0;
	color: var(--faiha-text-secondary);
	line-height: 1.7;
}

.faiha-blog .faiha-blog__empty-actions {
	justify-content: center;
	gap: var(--faiha-space-xs);
	margin-top: var(--faiha-space-lg);
}

.faiha-blog :is(.faiha-btn-primary, .faiha-btn-secondary) .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding: 0.625rem 1.25rem;
	border: 1px solid transparent;
	border-radius: var(--faiha-radius-button);
	font-family: var(--faiha-font-heading);
	font-weight: var(--faiha-weight-button);
	text-decoration: none;
}

.faiha-blog .faiha-btn-primary .wp-block-button__link {
	background-color: var(--faiha-color-brand-strong);
	color: var(--faiha-text-on-dark);
}

.faiha-blog .faiha-btn-secondary .wp-block-button__link {
	border-color: color-mix(in srgb, var(--faiha-text) 22%, transparent);
	background-color: transparent;
	color: var(--faiha-text);
}

/* Services hub: calmer cards, clear parent -> child structure. */
.faiha-hub .faiha-hub__card {
	padding: var(--faiha-space-lg);
}

.faiha-hub .faiha-hub__text {
	line-height: 1.6;
}

@media (max-width: 599px) {
	.faiha-page-about--split .faiha-page-about__aside,
	.faiha-blog .faiha-blog__empty {
		padding: var(--faiha-space-md);
	}
}

/* ---------------------------------------------------------------- */
/* Reveal (homepage.js; only below-the-fold elements, never no-JS)   */
/* ---------------------------------------------------------------- */

.fh-reveal {
	opacity: 0;
	transform: translateY(1.25rem);
}

.fh-reveal.fh-revealing {
	opacity: 1;
	transform: none;
	transition:
		opacity 600ms var(--faiha-ease-standard),
		transform 600ms var(--faiha-ease-standard);
}

@media (prefers-reduced-motion: reduce) {
	body.faiha-service-page,
	.faiha-page-section.wp-block-group,
	.faiha-page-cta.wp-block-group,
	.faiha-page-steps .faiha-page-steps__item,
	.faiha-page-info .faiha-page-info__card,
	.faiha-hub .faiha-hub__card,
	.faiha-hub .faiha-hub__links a,
	:is(.faiha-page-hero, .faiha-page-cta) .wp-block-button__link {
		transition: none;
	}

	.fh-reveal {
		opacity: 1;
		transform: none;
	}
}
