/**
 * FocalX — Hero section (reusable).
 *
 * Bruges af:
 *   - Frontpage                 (template-parts/frontpage/hero.php)
 *   - Vehicle Inspection arkiv  (archive-vehicle-inspection.php)
 *   - Andre landings-sider      (template-parts/sections/hero.php)
 *
 * Selvstændig: typografi afhænger ikke af parent scope (`.fx-main--frontpage`),
 * så hero kan placeres på enhver side uden ekstra CSS.
 */

.fx-hero {
	padding-top:    clamp(48px, 7vw, 80px);
	padding-bottom: clamp(40px, 6vw, 64px);
	padding-left:   0;
	padding-right:  0;
	background: var(--fx-bg);
	overflow-x: clip;
	font-family: var(--fx-font-body);
	color: var(--fx-text-body);
}

/* Forhindr lange ord / strings i at tvinge horisontal scroll */
.fx-hero__title,
.fx-hero__subtitle,
.fx-hero__intro,
.fx-hero__bullet-text {
	overflow-wrap: break-word;
	word-wrap: break-word;
	hyphens: auto;
}

.fx-hero__container {
	max-width: var(--fx-max-content);
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--fx-col-gap);
	align-items: center;
}

.fx-hero__content {
	max-width: 560px;
	min-width: 0;
}

/* Indhold: overskrift/brød/checkmarks (top) + CTA/WHIW/ToC (bottom).
   To-kolonne-layout med billede: rækken får ens højde, venstre søjle fyldes
   så toppen sidder højest og action-rækken længst nede. Kun når billede +
   .fx-hero__content-bottom findes (se template-parts/sections/hero.php). */
.fx-hero__content-bottom {
	display:         flex;
	flex-direction:  column;
	gap:              20px;
	min-width:        0;
}

.fx-hero__container:has(.fx-hero__media) {
	align-items: stretch;
}

/* Bund-blok: margin-top fra .fx-hero__scroller erstattes af .content-bottom gap. */
.fx-hero__content-bottom .fx-hero__scroller {
	margin-top: 0;
}

@media (min-width: 768px) {
	.fx-hero:has(.fx-hero__media) .fx-hero__content:has(.fx-hero__content-bottom) {
		display:         flex;
		flex-direction:  column;
		justify-content: space-between;
		gap:             0;
		height:          100%;
		min-height:      0;
		align-self:      stretch;
	}
}

.fx-hero__title {
	font-family: var(--fx-font-heading);
	font-size: var(--fx-h1);
	font-weight: 700;
	color: var(--fx-text);
	line-height: 1.1;
	letter-spacing: -0.01em;
	margin: 0 0 20px;
}

/* Subtitle / tagline — valgfri lead-tekst mellem H1 og intro. Bruges fx på
   about-us ("We build intelligent inspection software to empower automotive"). */
.fx-hero__subtitle {
	font-family: var(--fx-font-heading);
	font-size: clamp(20px, 2vw, 26px);
	font-weight: 500;
	line-height: 1.35;
	color: var(--fx-text, #2d2f31);
	margin: -8px 0 20px;
	max-width: 520px;
}

.fx-hero__intro {
	font-family: var(--fx-font-body);
	font-size: var(--fx-text-base);
	line-height: 1.6;
	color: var(--fx-text-body);
	margin: 0 0 24px;
	max-width: 500px;
}

.fx-hero__bullets {
	list-style: none;
	padding: 0;
	margin: 0 0 32px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fx-hero__bullet {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
	line-height: 1.5;
	color: var(--fx-text);
	font-weight: 500;
}

.fx-hero__check {
	flex-shrink: 0;
	display: inline-flex;
	width: 22px;
	height: 22px;
}

.fx-hero__check svg {
	display: block;
	width: 100%;
	height: 100%;
}

.fx-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0;
	align-items: center;
}

.fx-hero__actions .whiw-trigger { margin: 0; }

.fx-hero__scroller { margin-top: 20px; }

.fx-hero__media {
	position: relative;
	min-width: 0;
}

.fx-hero__image-wrap {
	position: relative;
	aspect-ratio: 1 / 1; /* Kvadratisk på alle viewports — fælles visuel
	                        rytme med opshub- og image-accordion-billeder. */
	border-radius: var(--fx-radius-xl);
	overflow: hidden;
	max-width: 560px;
	margin-left: auto;
}

.fx-hero__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Under desktop: gutter på selve sektionen så indholdet ikke går flush
   med viewport-kanten (container fylder tæt på 100% her). */
@media (max-width: 1199px) {
	.fx-hero {
		padding-left:  var(--fx-gutter, 24px);
		padding-right: var(--fx-gutter, 24px);
	}
}

/* Tablet: beholder 2 kolonner — gap kommer fra --fx-col-gap-token. */
@media (max-width: 1024px) {
	.fx-hero__content { max-width: 100%; }
}

/* Mobil: stack til 1 kolonne, centreret indhold. Billedet beholder
   1:1-ratioet fra base-reglen. Gap kommer fra --fx-col-gap-token. */
@media (max-width: 767px) {
	.fx-hero__container { grid-template-columns: minmax(0, 1fr); }
	.fx-hero__image-wrap { max-width: 100%; margin: 0; }

	.fx-hero__content {
		text-align: center;
		max-width: 100%;
	}

	.fx-hero__title,
	.fx-hero__subtitle,
	.fx-hero__intro {
		max-width: 100%;
	}

	/* Checkmarks + brødtekst venstrejusteret som på tablet/PC (undgår
	 * centreret “zigzag” når linjer har forskellig længde). */
	.fx-hero__bullets {
		align-items: stretch;
		width: 100%;
		max-width: 100%;
	}

	.fx-hero__bullet {
		justify-content: flex-start;
		text-align: left;
		width: 100%;
	}

	.fx-hero__bullet-text {
		text-align: left;
	}

	.fx-hero__actions {
		justify-content: center;
	}
}

@media (max-width: 720px) {
	.fx-hero__actions {
		flex-direction: column;
		align-items: stretch;
	}
	.fx-hero__actions .fx-btn,
	.fx-hero__actions .whiw-trigger {
		width: 100%;
		justify-content: center;
	}
}
