/* ============================================================
 * REUSABLE DASHBOARDS SECTION
 *
 * 2-kolonne sektion: eyebrow + H2 + intro i venstre kolonne,
 * hero-billede med op til 2 overlay-kort i højre kolonne.
 * Eyebrow-pillen arver styling fra .fx-eyebrow i tokens.css.
 * ============================================================ */

.fx-dashboards {
	box-sizing: border-box;
	padding-block: var(--fx-section-py, 96px);
}

.fx-dashboards__container {
	max-width: var(--fx-max-content, 1200px);
	margin: 0 auto;
	padding-inline: var(--fx-container-x, clamp(16px, 4vw, 32px));

	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--fx-col-gap, 96px);
	align-items: center;
}

/* ---------- Left column ---------- */

.fx-dashboards__text {
	min-width: 0;
}

.fx-dashboards__eyebrow {
	margin-bottom: 20px;
}

.fx-dashboards__title {
	margin: 0 0 20px;
	font-size: clamp(28px, 3.6vw, 44px);
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--fx-text, #0f1115);
}

.fx-dashboards__intro {
	margin: 0;
	font-size: clamp(16px, 1.1vw, 18px);
	line-height: 1.6;
	color: var(--fx-text-muted, #5c5f62);
	max-width: 44ch;
}

/* ---------- Right column (media stack) ---------- */

.fx-dashboards__media {
	position: relative;
	width: 100%;
	aspect-ratio: 5 / 6;
	/* Så skygge på overlay-kort ikke klippes: holder hero clipped, overlay uden for */
	isolation: isolate;
}

.fx-dashboards__hero {
	position: absolute;
	inset: 0;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(15, 17, 21, 0.12);
	z-index: 0;
}

.fx-dashboards__hero-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* Indre bund-strimmel: kantafstand sættes her; rækken indeholder de to kort. */
.fx-dashboards__overlay {
	--fx-db-inset: clamp(14px, 2.2vw, 28px);
	position: absolute;
	z-index: 1;
	left: var(--fx-db-inset);
	right: var(--fx-db-inset);
	bottom: var(--fx-db-inset);
	pointer-events: none;
}

.fx-dashboards__card-row {
	display: flex;
	width: 100%;
	/* Kun gap — ikke `space-between`, ellers lægger al fri bredde sig som et kæmpe hul. */
	gap: clamp(6px, 1vw, 10px);
	justify-content: flex-start;
	align-items: stretch;
}

.fx-dashboards__card {
	flex: 1 1 0;
	min-width: 0;
	background: #fff;
	/* Screenshot: tydelige afrundede "product UI"-kort */
	border-radius: 20px;
	border: 1px solid rgba(15, 17, 21, 0.06);
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.9) inset,
		0 8px 24px rgba(15, 17, 21, 0.1),
		0 2px 6px rgba(15, 17, 21, 0.06);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	padding: clamp(12px, 1.4vw, 18px) clamp(12px, 1.2vw, 16px) clamp(10px, 1.1vw, 14px);
	align-self: stretch;
}

.fx-dashboards__card-title {
	margin: 0 0 clamp(4px, 0.5vw, 8px);
	font-size: clamp(12px, 0.95vw, 14px);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: #2d2f31;
}

/* Graf/donut fylder resten af kortet, centreret som på mockup */
.fx-dashboards__card-graph {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
}

.fx-dashboards__card-img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Venstre kort lidt bredere (graf), højre smalnere (donut) — fælles bredde fylder rækken, kun `gap` imellem. */
.fx-dashboards__card--1 {
	flex: 1.2 1 0;
}

.fx-dashboards__card--2 {
	flex: 0.9 1 0;
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
	.fx-dashboards__container {
		gap: clamp(28px, 4vw, 48px);
	}
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
	.fx-dashboards {
		padding-block: clamp(48px, 9vw, 72px);
	}

	.fx-dashboards__container {
		grid-template-columns: 1fr;
		gap: clamp(40px, 10vw, 56px);
	}

	.fx-dashboards__intro {
		max-width: none;
	}

	.fx-dashboards__media {
		aspect-ratio: 5 / 6;
	}

	.fx-dashboards__hero {
		border-radius: 18px;
	}

	.fx-dashboards__overlay {
		--fx-db-inset: clamp(10px, 3vw, 18px);
	}

	.fx-dashboards__card {
		border-radius: 12px;
	}
}
