/* =========================================================================
   Kaffemøllen Content Blocks — frontend styles
   Lifted from /Landing Page/kaffemoellen/sections/template.html (v3),
   reorganised so each block consumes shared spacing CSS variables.
   ========================================================================= */

/* Custom field wrapper override (kept from template.html). */
.beskrivelse_i_bunden_seo,
.km-section {
	width: 100% !important;
	border-left: none !important;
	float: unset !important;
}

/* -------------------------------------------------------------------------
   Block wrapper — consumes spacing CSS variables emitted per-block.
   Defaults match the legacy template; ACF overrides win when set.
   ------------------------------------------------------------------------- */
.km-block {
	background: var(--km-bg, #fff);
	color: #1a1a1a;
	padding-top: var(--km-pad-top, 48px);
	padding-bottom: var(--km-pad-bottom, 48px);
	margin-top: var(--km-mar-top, 0);
	margin-bottom: var(--km-mar-bottom, 0);
}
.km-block--boxed {
	max-width: 1340px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 32px;
	padding-right: 32px;
}
.km-block--full {
	padding-left: 0;
	padding-right: 0;
}

@media (max-width: 768px) {
	.km-block {
		padding-top:    var(--km-pad-top-mob,    var(--km-pad-top, 32px));
		padding-bottom: var(--km-pad-bottom-mob, var(--km-pad-bottom, 32px));
		margin-top:     var(--km-mar-top-mob,    var(--km-mar-top, 0));
		margin-bottom:  var(--km-mar-bottom-mob, var(--km-mar-bottom, 0));
	}
	.km-block--boxed {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* -------------------------------------------------------------------------
   Shared headings
   ------------------------------------------------------------------------- */
.km-h2 {
	font-size: 26px;
	font-weight: 500;
	color: #8b1a1a;
	margin: 0 0 20px;
	line-height: 1.3;
}
.km-h3 {
	font-size: 22px;
	font-weight: 500;
	color: #8b1a1a;
	margin: 0 0 20px;
	line-height: 1.3;
}
.km-h3.centered {
	text-align: center;
}

/* -------------------------------------------------------------------------
   Block — Hero Band (5-star + headline + intro)
   ------------------------------------------------------------------------- */
.km-block--hero-band {
	background: #8b1a1a;
	color: #fff;
	text-align: center;
	position: relative;
	overflow: hidden;
}
.km-block--hero-band::before,
.km-block--hero-band::after {
	content: '';
	position: absolute;
	border-radius: 50%;
}
.km-block--hero-band::before {
	top: -40px;
	right: -40px;
	width: 200px;
	height: 200px;
	border: 40px solid rgba(255, 255, 255, 0.06);
}
.km-block--hero-band::after {
	bottom: -60px;
	left: -20px;
	width: 160px;
	height: 160px;
	border: 30px solid rgba(255, 255, 255, 0.04);
}
.km-hero-band__inner {
	position: relative;
	z-index: 1;
	max-width: 720px;
	margin: 0 auto;
}
.km-hero-band__stars {
	color: #f5c842;
	font-size: 20px;
	letter-spacing: 2px;
	margin-bottom: 20px;
}
.km-hero-band__headline {
	font-size: 30px;
	font-weight: 700;
	margin: 0 0 16px;
	line-height: 1.25;
	color: #fff;
}
.km-hero-band__intro {
	font-size: 16px;
	font-weight: 300;
	opacity: 0.88;
	max-width: 560px;
	margin: 0 auto;
	line-height: 1.7;
	color: #fff;
}

/* -------------------------------------------------------------------------
   Block — Why Grid (3-col benefit tiles)
   ------------------------------------------------------------------------- */
.km-block--why-grid .km-why-grid {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	gap: 16px !important;
	margin-bottom: 8px;
}
.km-block--why-grid .km-why-grid[data-cols="2"] {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.km-why-card {
	background: #faf7f5;
	border-left: 3px solid #8b1a1a;
	padding: 20px 18px;
	border-radius: 0 8px 8px 0;
}
.km-why-card__icon {
	margin-bottom: 10px;
	line-height: 1;
}
.km-why-card__icon img {
	width: 40px;
	height: 40px;
	object-fit: contain;
	display: block;
}
.km-why-card__title {
	font-size: 14px;
	font-weight: 600;
	color: #8b1a1a;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 6px;
}
.km-why-card__text {
	font-size: 14px;
	color: #444;
	line-height: 1.6;
	font-weight: 300;
}

/* -------------------------------------------------------------------------
   Block — Who Grid (audience tiles)
   ------------------------------------------------------------------------- */
.km-block--who-grid .km-who-grid {
	display: grid !important;
	gap: 12px !important;
}
.km-block--who-grid .km-who-grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.km-block--who-grid .km-who-grid[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.km-block--who-grid .km-who-grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.km-who-card {
	background: #fff;
	border: 1px solid #e8ddd8;
	border-radius: 10px;
	padding: 20px 14px;
	text-align: center;
}
.km-who-card__icon {
	margin-bottom: 10px;
	line-height: 1;
}
.km-who-card__icon img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}
.km-who-card__name {
	font-size: 13px;
	font-weight: 600;
	color: #1a1a1a;
	margin-bottom: 4px;
}
.km-who-card__desc {
	font-size: 12px;
	color: #666;
	line-height: 1.5;
}

/* -------------------------------------------------------------------------
   Block — Compare Table (Sammenlign)
   ------------------------------------------------------------------------- */
.km-compare-wrap {
	overflow-x: auto;
	margin: 0 0 8px;
	border-radius: 10px;
	border: 1px solid #e8ddd8;
}
.km-compare {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.km-compare th {
	background: #8b1a1a;
	color: #fff;
	padding: 14px 18px;
	text-align: left;
	font-weight: 600;
	font-size: 13px;
}
.km-compare td {
	padding: 12px 18px;
	border-bottom: 1px solid #f0e8e4;
	color: #333;
	background: #fff;
	font-weight: 300;
	vertical-align: top;
}
.km-compare tr:nth-child(even) td {
	background: #faf7f5;
}
.km-compare tr:last-child td {
	border-bottom: none;
}
.km-compare__badge {
	display: inline-block;
	background: #8b1a1a;
	color: #fff;
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 20px;
	font-weight: 600;
	margin-top: 4px;
}

/* -------------------------------------------------------------------------
   Block — Steps (Sådan vælger du...)
   ------------------------------------------------------------------------- */
.km-steps {
	display: flex !important;
	flex-direction: column !important;
}
.km-step {
	display: flex !important;
	gap: 20px !important;
	padding: 20px 0;
	border-bottom: 1px solid #f0e8e4;
}
.km-step:last-child {
	border-bottom: none;
}
.km-step__num {
	flex-shrink: 0 !important;
	width: 36px;
	height: 36px;
	background: #8b1a1a;
	color: #fff;
	border-radius: 50%;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 16px;
	font-weight: 700;
	margin-top: 2px;
}
.km-step__body h4 {
	font-size: 15px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 5px;
}
.km-step__body p {
	font-size: 14px;
	color: #555;
	margin: 0;
	line-height: 1.6;
	font-weight: 300;
}

/* -------------------------------------------------------------------------
   Block — VS Cards (X eller Y?)
   ------------------------------------------------------------------------- */
.km-vs-cards {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 16px !important;
}
.km-vs-card {
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid #e8ddd8;
}
.km-vs-card__head {
	padding: 18px 20px;
	font-weight: 600;
	font-size: 15px;
	color: #fff;
}
.km-vs-card__head.filter   { background: #8b1a1a; }
.km-vs-card__head.espresso { background: #2c2c2c; }
.km-vs-card__body {
	padding: 16px 20px;
	background: #fff;
}
.km-vs-item {
	display: flex !important;
	align-items: flex-start !important;
	gap: 10px !important;
	margin-bottom: 10px;
	font-size: 13px;
	color: #444;
	font-weight: 300;
	line-height: 1.5;
}
.km-vs-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	flex-shrink: 0 !important;
	margin-top: 5px;
}
.km-vs-dot.r { background: #8b1a1a; }
.km-vs-dot.b { background: #2c2c2c; }

/* -------------------------------------------------------------------------
   Block — FAQ Grid
   ------------------------------------------------------------------------- */
.km-faq-grid {
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 16px !important;
}
.km-faq-card {
	background: #faf7f5;
	border-radius: 10px;
	padding: 22px 22px;
	border-top: 3px solid #8b1a1a;
}
.km-faq-card__q {
	font-size: 14px;
	font-weight: 600;
	color: #1a1a1a;
	margin: 0 0 10px;
	line-height: 1.45;
}
.km-faq-card__a {
	font-size: 13px;
	color: #555;
	line-height: 1.7;
	font-weight: 300;
	margin: 0;
}
.km-faq-card__a p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------------------
   Block — CTA Band
   ------------------------------------------------------------------------- */
.km-block--cta-band {
	color: #fff;
	text-align: center;
	border-radius: 12px;
}
.km-block--cta-band[data-theme="dark"] {
	background: #1a1a1a;
}
.km-block--cta-band[data-theme="red"] {
	background: #8b1a1a;
}
.km-cta-band__heading {
	font-size: 24px;
	font-weight: 500;
	margin: 0 0 12px;
	color: #fff;
}
.km-cta-band__intro {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.75);
	margin: 0 0 24px;
	font-weight: 300;
}
.km-cta-band__btn {
	display: inline-block;
	background: #8b1a1a;
	color: #fff !important;
	padding: 14px 36px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.km-block--cta-band[data-theme="red"] .km-cta-band__btn {
	background: #fff;
	color: #8b1a1a !important;
}

/* -------------------------------------------------------------------------
   Block — Prose
   ------------------------------------------------------------------------- */
.km-prose__body {
	font-size: 15px;
	line-height: 1.7;
	color: #333;
	font-weight: 300;
}
.km-prose__body p { margin: 0 0 1em; }
.km-prose__body ul,
.km-prose__body ol { padding-left: 1.5rem; margin: 0 0 1em; }
.km-prose__body li { margin-bottom: 0.4em; }
.km-prose__body a { color: #8b1a1a; text-decoration: underline; }
.km-prose__cta {
	display: inline-block;
	background: #8b1a1a;
	color: #fff !important;
	padding: 12px 28px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	margin-top: 12px;
}

/* -------------------------------------------------------------------------
   Mobile reflow for the grid-based blocks
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
	.km-block--why-grid .km-why-grid,
	.km-block--who-grid .km-who-grid,
	.km-vs-cards,
	.km-faq-grid {
		grid-template-columns: 1fr !important;
		gap: 14px !important;
	}

	.km-h2 { font-size: 1.35rem; }
	.km-h3 { font-size: 1.15rem; margin-bottom: 14px; }
	.km-h3.centered { text-align: left; }

	.km-block--hero-band .km-hero-band__headline { font-size: 1.45rem; }
	.km-block--hero-band .km-hero-band__intro { font-size: 15px; }

	.km-compare-wrap {
		margin-left: -4px;
		margin-right: -4px;
		-webkit-overflow-scrolling: touch;
	}
	.km-compare { font-size: 13px; min-width: 520px; }
	.km-compare th,
	.km-compare td { padding: 10px 12px !important; }

	.km-step { gap: 14px !important; flex-wrap: nowrap; }
	.km-step__num { width: 32px !important; height: 32px !important; font-size: 14px !important; }

	.km-block--cta-band .km-cta-band__heading { font-size: 1.2rem; }
	.km-who-card__name { word-break: break-word; }
}

/* Tablet: 2-col fallback for 4-up who grid. */
@media (min-width: 481px) and (max-width: 768px) {
	.km-block--who-grid .km-who-grid[data-cols="4"] {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}
