/* Staufenwald – Wald-Seite, Rangliste & Wald-Editor (Hybrid-Design). */

.swld-forest,
.swld-rank,
.swld-editor,
.swld-editor__live {
	--swld-green: #0c8a2d;
	--swld-green-deep: #06631f;
	--swld-mint: #d9fade;
	--swld-ink: #23312a;
	--swld-muted: #5a6b60;
	--swld-line: rgba(12, 138, 45, 0.16);
	color: var(--swld-ink);
}

/* ---- Öffentliche Wald-Seite ---- */
.swld-forest__cover {
	height: clamp(160px, 30vw, 320px);
	background-size: cover;
	background-position: center;
}

.swld-forest__body {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 20px 64px;
}

.swld-forest__logo {
	display: block;
	max-width: 96px;
	max-height: 96px;
	margin-top: -48px;
	border-radius: 12px;
	border: 4px solid #fff;
	background: #fff;
	box-shadow: 0 6px 20px rgba(35, 49, 42, 0.12);
	object-fit: contain;
}

.swld-forest__title {
	margin: 24px 0 0;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(30px, 5vw, 48px);
	line-height: 1.1;
}

.swld-forest__desc {
	margin: 14px 0 0;
	max-width: 60ch;
	font-size: 18px;
	line-height: 1.6;
	color: var(--swld-muted);
}

.swld-forest__kpis {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(20px, 6vw, 40px);
	margin: 30px 0 0;
}

.swld-forest__kpi span {
	display: block;
	font-family: Georgia, serif;
	font-size: clamp(28px, 4vw, 40px);
	font-weight: 600;
	color: var(--swld-green-deep);
	line-height: 1;
}

.swld-forest__kpi small {
	display: block;
	margin-top: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--swld-muted);
}

.swld-forest__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 28px 0 0;
}

.swld-forest__chip {
	padding: 5px 14px;
	border: 1px solid var(--swld-line);
	border-radius: 999px;
	font-size: 13px;
	color: var(--swld-muted);
}

.swld-forest__cta {
	display: inline-block;
	margin: 32px 0 0;
	padding: 13px 28px;
	border-radius: 999px;
	background: var(--swld-green);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.swld-forest__cta:hover {
	filter: brightness(0.94);
}

.swld-forest__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 32px 0 0;
}

.swld-forest__actions .swld-forest__cta {
	margin: 0;
}

.swld-forest__share {
	appearance: none;
	cursor: pointer;
	padding: 13px 26px;
	border-radius: 999px;
	background: transparent;
	border: 1px solid rgba(12, 138, 45, 0.4);
	color: var(--swld-green-deep);
	font: inherit;
	font-weight: 700;
}

.swld-forest__share:hover {
	background: rgba(217, 250, 222, 0.5);
}

/* Sekundär-CTAs als Link gerendert (Geschenk/B2B) – gleiche Pillen-Optik wie der Button. */
a.swld-forest__share {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

/* ---- Rangliste ---- */
.swld-rank {
	max-width: 960px;
	margin: 0 auto;
	padding: clamp(24px, 5vw, 56px) 20px;
}

.swld-rank__head {
	text-align: center;
	max-width: 620px;
	margin: 0 auto 40px;
}

.swld-rank__eyebrow {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: #8a5f06; /* WCAG-AA-tauglicher Gold-Ton für Text (>=4.5:1 auf Weiß). */
	margin: 0 0 8px;
}

.swld-rank__head h1 {
	font-family: Georgia, serif;
	font-size: clamp(30px, 5vw, 48px);
	margin: 0;
}

.swld-rank__head p {
	color: var(--swld-muted);
	margin: 14px 0;
}

.swld-rank__boards {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

.swld-board {
	border: 1px solid var(--swld-line);
	border-radius: 16px;
	padding: 22px 24px;
	background: #fff;
}

.swld-board h2 {
	margin: 0 0 14px;
	font-family: Georgia, serif;
	font-size: 24px;
}

.swld-board__empty {
	color: var(--swld-muted);
	text-align: center;
	padding: 18px 0;
}

.swld-board__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.swld-board__row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 0;
	border-top: 1px solid var(--swld-line);
}

.swld-board__row:first-child {
	border-top: 0;
}

.swld-board__rank {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	font-family: Georgia, serif;
	font-weight: 700;
	background: var(--swld-mint);
	color: var(--swld-green-deep);
}

.swld-board__rank--1 {
	background: #c8860a;
	color: #fff;
}

.swld-board__rank--2 {
	background: var(--swld-green);
	color: #fff;
}

.swld-board__rank--3 {
	background: #5c3d2e;
	color: #fff;
}

.swld-board__main {
	flex: 1;
	min-width: 0;
}

.swld-board__top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.swld-board__top a,
.swld-board__top > span {
	color: var(--swld-ink);
	text-decoration: none;
	font-weight: 600;
	/* Lange Firmen-/Waldnamen kürzen, damit die Baumzahl mobil sichtbar bleibt. */
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.swld-board__top a:hover {
	color: var(--swld-green);
}

.swld-board__top strong {
	font-family: Georgia, serif;
	color: var(--swld-green-deep);
	white-space: nowrap;
	flex: 0 0 auto;
}

.swld-board__bar {
	height: 6px;
	margin-top: 8px;
	border-radius: 999px;
	background: rgba(12, 138, 45, 0.1);
	overflow: hidden;
}

.swld-board__bar span {
	display: block;
	height: 100%;
	border-radius: 999px;
}

/* B2B-Lead-Zeile unter der Firmen-Bestenliste. */
.swld-board__b2b {
	margin: 16px 0 0;
	padding-top: 12px;
	border-top: 1px solid var(--swld-line);
	font-size: 14px;
	color: var(--swld-muted);
}

.swld-board__b2b a {
	color: var(--swld-green-deep);
	font-weight: 700;
	text-decoration: none;
}

.swld-board__b2b a:hover {
	text-decoration: underline;
}

@media (min-width: 820px) {
	.swld-rank__boards {
		grid-template-columns: 1fr 1fr;
		align-items: start;
	}
}

/* ---- Wald-Editor (Konto) ---- */
.swld-editor__live {
	padding: 12px 16px;
	background: rgba(217, 250, 222, 0.4);
	border: 1px solid var(--swld-line);
	border-radius: 10px;
	margin-bottom: 18px;
}

.swld-editor {
	max-width: 560px;
	display: grid;
	gap: 16px;
}

.swld-editor__row {
	display: grid;
	gap: 6px;
}

.swld-editor__row > span {
	font-size: 13px;
	font-weight: 700;
	color: var(--swld-ink);
}

.swld-editor input[type="text"],
.swld-editor input[type="url"],
.swld-editor input[type="email"],
.swld-editor input[type="number"],
.swld-editor textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid var(--swld-line);
	border-radius: 8px;
	font: inherit;
	color: var(--swld-ink);
}

.swld-editor__radios {
	display: flex;
	gap: 18px;
}

.swld-editor__swatches {
	display: flex;
	gap: 10px;
}

.swld-swatch input {
	position: absolute;
	opacity: 0;
}

.swld-swatch span {
	display: block;
	width: 40px;
	height: 40px;
	border-radius: 8px;
	border: 2px solid transparent;
	cursor: pointer;
}

.swld-swatch input:checked + span {
	border-color: var(--swld-ink);
	box-shadow: 0 0 0 2px #fff inset;
}

.swld-editor__check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 14px;
}

/* ---- Pflanzaktionen ---- */
.swld-events {
	--swld-green: #0c8a2d;
	--swld-green-deep: #06631f;
	--swld-mint: #d9fade;
	--swld-ink: #23312a;
	--swld-muted: #5a6b60;
	--swld-line: rgba(12, 138, 45, 0.16);
	max-width: 960px;
	margin: 0 auto;
	padding: clamp(24px, 5vw, 56px) 20px;
	color: var(--swld-ink);
}

.swld-events__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
	gap: 16px;
}

.swld-event {
	display: block;
	padding: 20px 22px;
	border: 1px solid var(--swld-line);
	border-radius: 16px;
	background: #fff;
	text-decoration: none;
	color: var(--swld-ink);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.swld-event:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(12, 138, 45, 0.1);
}

.swld-event__date {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #8a5f06; /* WCAG-AA-tauglicher Gold-Ton für Text (>=4.5:1 auf Weiß). */
}

.swld-event h3 {
	margin: 8px 0 4px;
	font-family: Georgia, serif;
	font-size: 22px;
	color: var(--swld-ink);
}

.swld-event p {
	margin: 0;
	color: var(--swld-muted);
}

.swld-event__spots {
	display: inline-block;
	margin-top: 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--swld-green);
}

.swld-event-detail h1 {
	font-family: Georgia, serif;
	font-size: clamp(28px, 5vw, 44px);
	color: var(--swld-ink);
	margin: 0 0 6px;
}

.swld-event__meta {
	color: var(--swld-muted);
	font-weight: 600;
}

.swld-event__back {
	display: inline-block;
	margin-bottom: 12px;
	color: var(--swld-green);
	text-decoration: none;
	font-weight: 600;
}

.swld-events .swld-btn {
	display: inline-block;
	margin-top: 6px;
	padding: 12px 26px;
	border-radius: 999px;
	background: var(--swld-green);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
}

.swld-events .swld-btn:hover {
	background: var(--swld-green-deep);
	color: #fff;
}

.swld-events .swld-keybox {
	margin: 14px 0;
	padding: 14px 16px;
	border: 1px solid var(--swld-green);
	background: rgba(217, 250, 222, 0.4);
	border-radius: 10px;
}

/* ---- Einbett-Blöcke / Shortcodes ---- */
.swld-forest__cta {
	--swld-green: #0c8a2d;
	--swld-green-deep: #06631f;
}

.swld-stats {
	--swld-green-deep: #06631f;
	--swld-muted: #5a6b60;
	justify-content: center;
	text-align: center;
	gap: clamp(24px, 6vw, 56px);
}

.swld-verify {
	--swld-line: rgba(12, 138, 45, 0.16);
	max-width: 440px;
	margin: 0 auto;
}

.swld-verify__lbl {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 700;
	color: #23312a;
}

.swld-verify__row {
	display: flex;
	gap: 8px;
}

.swld-verify__input {
	flex: 1;
	/* Inputs haben eine intrinsische Mindestbreite – ohne min-width:0 drückt der
	   Button bei 320px sonst aus der Zeile. */
	min-width: 0;
	padding: 11px 14px;
	border: 1px solid var(--swld-line);
	border-radius: 999px;
	font: inherit;
}

@media (max-width: 380px) {
	.swld-verify__row {
		flex-wrap: wrap;
	}

	.swld-verify__btn {
		flex: 1 1 100%;
	}
}

.swld-verify__btn {
	white-space: nowrap;
	cursor: pointer;
	border: 0;
}

/* ---- Wälder-Verzeichnis /waelder/ ---- */
.swld-dir {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr));
	gap: 14px;
}

.swld-dir__card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 20px;
	border: 1px solid var(--swld-line);
	border-left: 4px solid var(--dir-accent, #0c8a2d);
	border-radius: 14px;
	background: #fff;
	text-decoration: none;
	color: var(--swld-ink);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.swld-dir__card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(12, 138, 45, 0.1);
}

.swld-dir__card:focus-visible {
	outline: 2px solid var(--swld-green-deep, #06631f);
	outline-offset: 2px;
}

.swld-dir__type {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--swld-muted);
}

.swld-dir__title {
	font-family: Georgia, serif;
	font-size: 19px;
	color: var(--swld-ink);
}

.swld-dir__count {
	font-weight: 700;
	color: var(--swld-green-deep);
}

.swld-dir__pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 26px;
}

.swld-dir__pageinfo {
	color: var(--swld-muted);
	font-size: 14px;
}

/* ---- Sichtbarer Tastatur-Fokus (WCAG 2.4.7) ---- */
.swld-forest__cta:focus-visible,
.swld-forest__share:focus-visible,
.swld-verify__btn:focus-visible,
.swld-verify__input:focus-visible,
.swld-board__top a:focus-visible,
.swld-event:focus-visible,
.swld-event__back:focus-visible,
.swld-events .swld-btn:focus-visible,
.swld-editor input:focus-visible,
.swld-editor textarea:focus-visible,
.swld-editor button:focus-visible {
	outline: 2px solid var(--swld-green-deep, #06631f);
	outline-offset: 2px;
}

/* Verstecktes Radio: Fokus auf dem sichtbaren Farbfeld anzeigen. */
.swld-swatch input:focus-visible + span {
	outline: 2px solid var(--swld-ink, #23312a);
	outline-offset: 2px;
}
