/*
 * Grabartenkonfigurator (heimseiten, 11/2026)
 * Farben aus dem Theme: --color_1 Rot, --color_2 Grün, --color_3 Dunkelblau, --color_4 Anthrazit, Beige #F1EBE5
 */
.gk {
	--gk-rot: var(--color_1, #e82027);
	--gk-gruen: var(--color_2, #6EB074);
	--gk-blau: var(--color_3, #192942);
	--gk-anthrazit: var(--color_4, #4A4A4C);
	--gk-text: var(--font_color, #444);
	--gk-beige: #F1EBE5;
	--gk-linie: #cfc6bc;
	--gk-weich: cubic-bezier(.22, .8, .24, 1);
	--gk-dauer: .3s;

	color: var(--gk-text);
	background: var(--gk-beige);
	padding: clamp(1.25rem, 4vw, 3rem);
	font-size: 1rem;
	line-height: 1.55;
	transition: opacity .2s ease;
}

.gk *,
.gk *::before,
.gk *::after { box-sizing: border-box; }

.gk--laedt { opacity: .55; pointer-events: none; }

.gk a { color: inherit; }

.gk-icon { width: 1.1em; height: 1.1em; flex: none; }

/* Kopf: Schritt, Fortschritt, Zähler */
.gk-kopf {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: .5rem 1.5rem;
	margin-bottom: 1.75rem;
}
.gk-schritt,
.gk-zaehler { margin: 0; font-size: .95rem; letter-spacing: .02em; }
.gk-zaehler { text-align: right; grid-column: 2; grid-row: 1; }
.gk-zaehler strong { color: var(--gk-rot); font-size: 1.15em; font-weight: 600; }
.gk-kopf:not(:has(.gk-schritt)) .gk-zaehler { grid-column: 1 / -1; text-align: left; }
.gk-fortschritt {
	grid-column: 1 / -1;
	height: 3px;
	background: var(--gk-linie);
	overflow: hidden;
}
.gk-fortschritt span {
	display: block;
	height: 100%;
	width: var(--gk-anteil, 0%);
	background: var(--gk-rot);
	transition: width .5s var(--gk-weich);
}

/* Ihre Auswahl */
.gk-auswahl {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .75rem;
	margin-bottom: 2rem;
}
.gk-auswahl-titel {
	margin: 0 .25rem 0 0;
	font-size: .95rem;
	font-weight: 400;
	letter-spacing: .02em;
}
.gk-auswahl-liste {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.gk-auswahl-liste a {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .35rem .7rem;
	background: #fff;
	border: 1px solid var(--gk-linie);
	text-decoration: none;
	font-size: .9rem;
	line-height: 1.3;
	transition: border-color var(--gk-dauer), background-color var(--gk-dauer), transform .15s;
}
.gk-auswahl-frage { opacity: .7; }
.gk-auswahl-frage::after { content: ":"; }
.gk-auswahl-antwort { font-weight: 600; }
.gk-auswahl-liste .gk-icon { width: .95em; height: .95em; opacity: .45; transition: opacity var(--gk-dauer), color var(--gk-dauer); }
.gk-auswahl-liste a:hover,
.gk-auswahl-liste a:focus-visible { border-color: var(--gk-anthrazit); }
.gk-auswahl-liste a:hover .gk-icon,
.gk-auswahl-liste a:focus-visible .gk-icon { opacity: 1; color: var(--gk-rot); }
.gk-auswahl-liste a:active { transform: scale(.97); }

.gk-neu {
	font-size: .9rem;
	text-decoration: underline;
	text-underline-offset: .2em;
	text-decoration-color: var(--gk-linie);
	transition: text-decoration-color var(--gk-dauer);
}
.gk-neu:hover { text-decoration-color: var(--gk-rot); }

/* Hinweise */
.gk-hinweis {
	margin: 0 0 2rem;
	padding: 1rem 1.25rem;
	background: #fff;
	border-left: 3px solid var(--gk-rot);
}
.gk-hinweis p { margin: 0 0 .5rem; }
.gk-hinweis p:last-child { margin-bottom: 0; }
.gk-hinweis h3 { margin: 0 0 .5rem; font-size: 1.1rem; font-weight: 600; }
.gk-hinweis ul { margin: 0 0 .5rem; padding-left: 1.2rem; }
.gk-hinweis--kind { border-left-color: var(--gk-blau); }

/* Frage */
.gk-frage-titel,
.gk-ergebnis-titel {
	margin: 0 0 .5rem;
	font-size: clamp(1.5rem, 3.2vw, 2.1rem);
	line-height: 1.25;
	font-weight: 400;
	color: var(--gk-anthrazit);
	outline: none;
}
.gk-frage-hinweis { margin: 0 0 1.5rem; max-width: 60ch; font-size: .95rem; }
.gk-frage-titel + .gk-optionen { margin-top: 1.5rem; }

/* Antworten als Kacheln mit gleitender Fläche (magnetischer Bento-Hover) */
.gk-optionen {
	position: relative;
	isolation: isolate;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
	gap: 1rem;
	margin: 0 0 1.75rem;
	padding: 0;
	list-style: none;
}
.gk-optionen--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); max-width: 44rem; }
.gk-optionen > li { display: flex; }
.gk-optionen > li:nth-of-type(4n+1) { --gk-ton: #fbe4e2; --gk-kraeftig: var(--gk-rot); }
.gk-optionen > li:nth-of-type(4n+2) { --gk-ton: #e3f0e4; --gk-kraeftig: #3f8a47; }
.gk-optionen > li:nth-of-type(4n+3) { --gk-ton: #e3e7f0; --gk-kraeftig: var(--gk-blau); }
.gk-optionen > li:nth-of-type(4n+4) { --gk-ton: #fbeedd; --gk-kraeftig: #b85d00; }

.gk-option {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto 1fr;
	align-content: start;
	gap: .2rem 1rem;
	width: 100%;
	min-height: 7.5rem;
	padding: 1.25rem 1.25rem 1.1rem;
	text-decoration: none;
	color: var(--gk-text);
	transition: transform .15s ease;
}
/* Kachelgrund als ::before, damit die gleitende Fläche (z −1) darüber und unter dem Text liegt */
.gk-option::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background: #fff;
	box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 6px 18px -10px rgb(0 0 0 / .18);
	transition: background-color var(--gk-dauer);
}
.gk-option-label {
	grid-column: 1;
	font-size: 1.3rem;
	line-height: 1.25;
	font-weight: 600;
	color: var(--gk-anthrazit);
	transition: color var(--gk-dauer);
}
.gk-option-text { grid-column: 1; font-size: .95rem; }
.gk-option-anzahl {
	grid-column: 1;
	align-self: end;
	margin-top: .75rem;
	font-size: .85rem;
	letter-spacing: .03em;
	opacity: .75;
}
.gk-option-pfeil {
	grid-column: 2;
	grid-row: 1 / -1;
	align-self: center;
	width: 1.6rem;
	height: 1.6rem;
	color: var(--gk-linie);
	transition: color var(--gk-dauer), transform var(--gk-dauer) var(--gk-weich);
}
/* Theme unterstreicht Links beim Überfahren */
.gk-option,
.gk-option:hover,
.gk-option:focus-visible,
.gk-auswahl-liste a,
.gk-auswahl-liste a:hover,
.gk-zurueck,
.gk-zurueck:hover,
.gk-knopf:hover { text-decoration: none; }

.gk-option:hover .gk-option-label,
.gk-option:focus-visible .gk-option-label { color: var(--gk-kraeftig); }
.gk-option:hover .gk-option-pfeil,
.gk-option:focus-visible .gk-option-pfeil { color: var(--gk-kraeftig); transform: translateX(4px); }
.gk-option:active { transform: scale(.98); }
.gk-option:focus-visible { outline: 2px solid var(--gk-blau); outline-offset: 3px; }

/* ohne Skript oder ohne Zeiger: Ton direkt an der Kachel */
.gk-option:hover::before,
.gk-option:focus-visible::before { background: var(--gk-ton); }

/* mit Skript: eine Fläche gleitet zur überfahrenen Kachel */
.gk-magnet {
	position: absolute;
	z-index: -1;
	left: 0;
	top: 0;
	width: 0;
	height: 0;
	background: var(--gk-ton, #f3efe9);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, background-color .45s var(--gk-weich);
}
.gk-optionen.gk-magnet-laeuft .gk-magnet {
	opacity: 1;
	transition: opacity .2s ease, background-color .45s var(--gk-weich), translate .45s var(--gk-weich), width .45s var(--gk-weich), height .45s var(--gk-weich);
}
.gk-optionen.gk-magnet-an .gk-option:hover::before { background: #fff; }

/* Kacheln kommen gestaffelt herein */
.gk--neu .gk-optionen > li,
.gk--neu .gk-grab {
	animation: gk-herein .45s var(--gk-weich) both;
	animation-delay: calc(var(--gk-i, 0) * 55ms);
}
.gk--neu .gk-frage-titel,
.gk--neu .gk-ergebnis-titel,
.gk--neu .gk-frage-hinweis { animation: gk-herein .4s var(--gk-weich) both; }
@keyframes gk-herein {
	from { opacity: 0; translate: 0 12px; }
	to { opacity: 1; translate: 0 0; }
}

/* Navigation unter der Frage */
.gk-navigation {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin: 0;
	font-size: .95rem;
}
.gk-zurueck {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	text-decoration: none;
	padding: .35rem 0;
}
.gk-zurueck .gk-icon { transition: transform var(--gk-dauer) var(--gk-weich); }
.gk-zurueck:hover .gk-icon { transform: translateX(-4px); color: var(--gk-rot); }
.gk-alle {
	margin-left: auto;
	text-decoration: underline;
	text-underline-offset: .2em;
	text-decoration-color: var(--gk-linie);
	transition: text-decoration-color var(--gk-dauer);
}
.gk-alle:hover { text-decoration-color: var(--gk-rot); }

/* Ergebnis */
.gk-ergebnis-titel { margin-bottom: 1rem; }
.gk-entfallen { margin: 0 0 1.5rem; font-size: .9rem; opacity: .8; }
.gk-ergebnis > .gk-navigation { margin-bottom: 1.5rem; }

.gk-grabarten {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
	gap: 1.25rem;
	margin-bottom: 2rem;
}
.gk-grab {
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px -14px rgb(0 0 0 / .22);
	border-top: 3px solid var(--gk-anthrazit);
}
.gk-grab figure { margin: 0; }
.gk-grab img { display: block; width: 100%; height: auto; }
.gk-grab-text { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.35rem 1.35rem; }
.gk-grab-titel {
	margin: 0 0 .75rem;
	font-size: 1.35rem;
	line-height: 1.25;
	font-weight: 600;
	color: var(--gk-anthrazit);
}
.gk-merkmale {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
	margin: 0 0 1rem;
	padding: 0;
	list-style: none;
}
.gk-merkmale li {
	padding: .15rem .55rem;
	background: var(--gk-beige);
	font-size: .82rem;
	line-height: 1.4;
}
.gk-grab-teaser { margin: 0 0 1rem; }
.gk-angaben { margin: 0 0 1rem; display: grid; grid-template-columns: 1fr; gap: .45rem; font-size: .95rem; } /* Theme: dl ist zweispaltig */
.gk-angaben > div { display: grid; grid-template-columns: minmax(8.5rem, auto) 1fr; gap: .75rem; }
.gk-angaben dt { opacity: .7; }
.gk-angaben dd { margin: 0; }
.gk-angaben a { text-decoration: underline; text-underline-offset: .18em; text-decoration-color: var(--gk-linie); transition: text-decoration-color var(--gk-dauer), color var(--gk-dauer); }
.gk-angaben a:hover { color: var(--gk-rot); text-decoration-color: currentColor; }
.gk-grab-hinweis { margin: 0 0 1rem; font-size: .92rem; font-style: italic; }

/* Mehr erfahren: auf und zu animiert */
.gk-mehr { margin-top: auto; border-top: 1px solid var(--gk-linie); }
.gk-mehr summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: .8rem 0 0;
	cursor: pointer;
	list-style: none;
	font-size: .95rem;
}
.gk-mehr summary::-webkit-details-marker { display: none; }
.gk-mehr summary::after {
	content: "";
	width: .55rem;
	height: .55rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	rotate: 45deg;
	translate: 0 -.15rem;
	transition: rotate var(--gk-dauer) var(--gk-weich), translate var(--gk-dauer) var(--gk-weich);
}
.gk-mehr[open] summary::after { rotate: 225deg; translate: 0 .15rem; }
.gk-mehr summary:hover { color: var(--gk-rot); }
.gk-mehr-inhalt { padding-top: .75rem; font-size: .95rem; }
.gk-mehr-inhalt > :first-child { margin-top: 0; }
.gk-mehr-inhalt > :last-child { margin-bottom: 0; }
@supports (interpolate-size: allow-keywords) {
	.gk-mehr { interpolate-size: allow-keywords; }
	.gk-mehr::details-content {
		block-size: 0;
		overflow: clip;
		transition: block-size .35s var(--gk-weich), content-visibility .35s allow-discrete;
	}
	.gk-mehr[open]::details-content { block-size: auto; }
}

/* Kontakt */
.gk-kontakt {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--gk-linie);
}
.gk-kontakt p { margin: 0; flex: 1 1 22rem; }
.gk-knopf {
	display: inline-block;
	padding: .65rem 1.6rem;
	background: var(--gk-rot);
	color: #fff !important;
	text-decoration: none;
	transition: background-color var(--gk-dauer), transform .15s;
}
.gk-knopf:hover { background: var(--gk-anthrazit); }
.gk-knopf:active { transform: scale(.97); }

@media (max-width: 600px) {
	.gk-kopf { grid-template-columns: 1fr; }
	.gk-zaehler { grid-column: 1; grid-row: auto; text-align: left; }
	.gk-option { min-height: 0; }
	.gk-angaben > div { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.gk *,
	.gk *::before,
	.gk *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

@media print {
	.gk { background: none; padding: 0; }
	.gk-navigation, .gk-neu, .gk-knopf, .gk-fortschritt, .gk-auswahl-liste .gk-icon { display: none !important; }
	.gk-grab { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
	.gk-mehr::details-content { block-size: auto !important; content-visibility: visible !important; }
}
