/**
 * KFC Buseck – ergänzende Stile (Frontend + Editor).
 * Farben/Schriften kommen aus theme.json (CSS-Variablen --wp--preset--*).
 */

:root {
	--kfc-weinrot: var(--wp--preset--color--weinrot);
	--kfc-weinrot-dunkel: var(--wp--preset--color--weinrot-dunkel);
	--kfc-gold: var(--wp--preset--color--gold);
	--kfc-gold-hell: var(--wp--preset--color--gold-hell);
	--kfc-akzent: var(--wp--preset--color--weinrot);
	--kfc-uebergang: 0.25s ease;
}

body {
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

/* ---------- Schreibschrift-Akzent: kursives Wort in Überschriften ---------- */
:where(h1, h2, h3, .wp-block-heading) em {
	font-family: var(--wp--preset--font-family--dancing-script);
	font-style: normal;
	font-weight: 700;
	font-size: 1.15em;
	letter-spacing: 0;
	color: var(--kfc-akzent);
}

/* Auf dunklen Flächen wird der Akzent golden */
.has-weinrot-background-color,
.has-weinrot-dunkel-background-color,
.has-weinrot-tief-background-color,
.has-weinrot-flaeche-gradient-background,
.wp-block-cover {
	--kfc-akzent: var(--wp--preset--color--gold-hell);
}

/* ---------- Kopfbereich (fixiert) ---------- */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
}

.admin-bar header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
	.admin-bar header.wp-block-template-part {
		top: 0;
	}
}

/* Milchglas-Effekt liegt auf einer eigenen Ebene (::before): backdrop-filter
   direkt auf .kfc-kopf würde das mobile Menü (position: fixed) auf die Höhe
   der Kopfleiste einsperren. */
.kfc-kopf {
	position: relative;
	background-color: transparent !important;
	border-bottom: 1px solid rgba(122, 31, 43, 0.1);
}

.kfc-kopf::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: rgba(250, 246, 239, 0.92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	pointer-events: none;
}

.kfc-kopf .wp-block-image img {
	filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
}

.kfc-kopf .kfc-marke-titel a {
	text-decoration: none;
	color: inherit;
}

.kfc-kopf .wp-block-navigation-item__content {
	padding: 0.5rem 0.85rem;
	border-radius: 999px;
	transition: background-color var(--kfc-uebergang), color var(--kfc-uebergang);
}

.kfc-kopf .wp-block-navigation-item__content:hover,
.kfc-kopf .current-menu-item > .wp-block-navigation-item__content {
	background-color: rgba(122, 31, 43, 0.07);
	color: var(--kfc-weinrot);
}

.kfc-kopf .wp-block-navigation__submenu-container {
	border: 1px solid rgba(201, 162, 74, 0.3) !important;
	border-radius: 14px;
	padding: 0.5rem !important;
	box-shadow: var(--wp--preset--shadow--karte);
}

.kfc-kopf .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	border-radius: 10px;
}

/* Nur im mobilen Menü sichtbar */
.kfc-nur-mobil {
	display: none !important;
}

.wp-block-navigation__responsive-container.is-menu-open .kfc-nur-mobil {
	display: flex !important;
}

@media (max-width: 600px) {
	.kfc-kopf .kfc-kopf-button {
		display: none;
	}

	.kfc-kopf .kfc-untertitel {
		font-size: 0.6rem !important;
	}
}

/* ---------- Mobiles Menü (Vollbild) ---------- */
.kfc-kopf .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1rem 1.25rem 2.5rem;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.kfc-kopf .is-menu-open .wp-block-navigation__responsive-container-close {
	top: 0.35rem;
	right: 0.35rem;
	padding: 0.6rem;
	border-radius: 50%;
	background: rgba(122, 31, 43, 0.07);
}

.kfc-kopf .is-menu-open .wp-block-navigation__responsive-container-close svg {
	width: 28px;
	height: 28px;
}

.kfc-kopf .is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 3.75rem !important;
	align-items: stretch !important;
	max-width: 34rem;
	margin: 0 auto;
}

.kfc-kopf .is-menu-open .wp-block-navigation__container {
	align-items: stretch !important;
	gap: 0 !important;
	width: 100%;
}

.kfc-kopf .is-menu-open .wp-block-navigation__container > .wp-block-navigation-item {
	width: 100%;
	align-items: stretch !important;
	border-bottom: 1px solid rgba(122, 31, 43, 0.1);
	padding: 0.2rem 0 !important;
}

.kfc-kopf .is-menu-open .wp-block-navigation-item__content {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 0.8rem 0.75rem !important;
	font-size: 1.2rem;
	font-weight: 600;
	border-radius: 12px;
	text-align: left;
}

/* Untermenüs (Gruppen, Termine): immer offen, zweispaltig, kompakt */
.kfc-kopf .is-menu-open .wp-block-navigation__submenu-container {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: 0.35rem !important;
	padding: 0 0 0.75rem !important;
	margin: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	width: 100% !important;
}

.kfc-kopf .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item {
	width: 100%;
}

.kfc-kopf .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 1rem;
	font-weight: 500;
	padding: 0.7rem 0.8rem !important;
	background: rgba(122, 31, 43, 0.05);
	line-height: 1.25;
}

/* „Karten bestellen“ als goldener Button am Ende */
.kfc-kopf .is-menu-open .wp-block-navigation__container > .kfc-nur-mobil {
	border-bottom: 0;
	padding-top: 1.25rem !important;
}

.kfc-kopf .is-menu-open .kfc-nur-mobil > .wp-block-navigation-item__content {
	text-align: center;
	border-radius: 999px;
	background: linear-gradient(135deg, #f5d58a 0%, #c9a24a 100%);
	color: var(--kfc-weinrot-dunkel);
	box-shadow: var(--wp--preset--shadow--gold);
}

/* ---------- Buttons ---------- */
.wp-element-button,
.wp-block-button__link {
	transition: transform var(--kfc-uebergang), box-shadow var(--kfc-uebergang), background-color var(--kfc-uebergang);
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
}

.wp-block-button.is-style-kfc-gold .wp-block-button__link {
	background: linear-gradient(135deg, #f5d58a 0%, #c9a24a 100%);
	color: var(--kfc-weinrot-dunkel);
	box-shadow: var(--wp--preset--shadow--gold);
}

.wp-block-button.is-style-kfc-gold .wp-block-button__link:hover {
	color: var(--kfc-weinrot-dunkel);
	background: linear-gradient(135deg, #f8dea0 0%, #d4ad55 100%);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-width: 2px;
	background: transparent;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.12);
}

/* ---------- Kicker (kleine Überzeile) ---------- */
.is-style-kfc-kicker {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	font-size: 0.8rem !important;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--kfc-gold);
}

.is-style-kfc-kicker::before {
	content: "";
	flex: none;
	width: 28px;
	height: 2px;
	background: currentColor;
}

.is-style-kfc-kicker.has-text-align-center {
	justify-content: center;
}

.wp-block-cover .is-style-kfc-kicker,
.has-weinrot-dunkel-background-color .is-style-kfc-kicker,
.has-weinrot-tief-background-color .is-style-kfc-kicker {
	color: var(--kfc-gold-hell);
}

/* ---------- Karte mit Goldkante ---------- */
.wp-block-group.is-style-kfc-karte {
	position: relative;
	overflow: hidden;
	background-color: #fff;
	border: 1px solid rgba(201, 162, 74, 0.25);
	border-radius: 18px;
	box-shadow: var(--wp--preset--shadow--karte);
	transition: transform var(--kfc-uebergang);
}

.wp-block-group.is-style-kfc-karte::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 5px;
	background: linear-gradient(90deg, var(--kfc-weinrot), var(--kfc-gold));
}

.wp-block-group.is-style-kfc-karte:hover {
	transform: translateY(-4px);
}

/* ---------- Gruppen-Kachel ---------- */
.wp-block-cover.is-style-kfc-kachel {
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid rgba(245, 213, 138, 0.18);
	transition: transform var(--kfc-uebergang), border-color var(--kfc-uebergang);
}

.wp-block-cover.is-style-kfc-kachel:hover {
	transform: translateY(-5px);
	border-color: var(--kfc-gold);
}

.wp-block-cover.is-style-kfc-kachel .wp-block-cover__inner-container {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	height: 100%;
}

.wp-block-cover.is-style-kfc-kachel a {
	color: inherit;
	text-decoration: none;
}

.wp-block-cover.is-style-kfc-kachel a::after {
	/* ganze Kachel klickbar */
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* ---------- Banner mit Konfetti ---------- */
.wp-block-cover.is-style-kfc-banner::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	opacity: 0.85;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 700' preserveAspectRatio='xMidYMid slice'%3E%3Crect x='80' y='120' width='10' height='18' rx='2' fill='%23f5d58a' transform='rotate(25 85 129)'/%3E%3Crect x='1040' y='420' width='10' height='18' rx='2' fill='%23f5d58a' transform='rotate(-30 1045 429)'/%3E%3Ccircle cx='210' cy='60' r='5' fill='%23c9a24a'/%3E%3Ccircle cx='960' cy='90' r='4' fill='%23fff'/%3E%3Crect x='640' y='70' width='8' height='15' rx='2' fill='%23fff' transform='rotate(50 644 77)'/%3E%3Ccircle cx='1130' cy='300' r='6' fill='%23c9a24a'/%3E%3Crect x='30' y='420' width='9' height='16' rx='2' fill='%23c9a24a' transform='rotate(-15 34 428)'/%3E%3Cpath d='M760 150l4 9 10 1-7 7 2 10-9-5-9 5 2-10-7-7 10-1z' fill='%23f5d58a'/%3E%3Cpath d='M150 300l3 7 8 1-6 5 2 8-7-4-7 4 2-8-6-5 8-1z' fill='%23f5d58a'/%3E%3C/svg%3E");
	background-size: cover;
	background-position: center;
}

.wp-block-cover.is-style-kfc-banner .wp-block-cover__inner-container {
	z-index: 2;
	/* Bei „Inhalt unten links“ schrumpft WordPress den Innenbereich – hier volle Breite, damit der Text bündig mit dem Logo steht */
	width: 100% !important;
}

.wp-block-cover.is-style-kfc-banner :where(h1, h2, p) {
	text-shadow: 0 2px 18px rgba(30, 5, 10, 0.45);
}

/* Zusätzlicher Verlauf von links für bessere Lesbarkeit */
.wp-block-cover.is-style-kfc-banner .wp-block-cover__background {
	background-image: linear-gradient(90deg, rgba(58, 10, 18, 0.75) 0%, rgba(58, 10, 18, 0.35) 45%, rgba(58, 10, 18, 0) 70%), var(--wp--preset--gradient--banner-verlauf) !important;
}

/* ---------- Zierlinie ---------- */
.wp-block-separator.is-style-kfc-zierlinie {
	border: 0 !important;
	height: 6px !important;
	max-width: none !important;
	width: 100% !important;
	opacity: 1 !important;
	background: repeating-linear-gradient(90deg, var(--kfc-weinrot) 0 40px, var(--kfc-gold) 40px 60px, #fff 60px 70px) !important;
}

/* ---------- Bilder ---------- */
.wp-block-image.is-style-kfc-gerundet img {
	border-radius: 18px;
	box-shadow: var(--wp--preset--shadow--karte);
}

.wp-block-post-featured-image img {
	object-position: center 20%;
}

/* ---------- Neuigkeiten (Query Loop) ---------- */
.kfc-beitrag {
	height: 100%;
	transition: transform var(--kfc-uebergang), box-shadow var(--kfc-uebergang);
}

.kfc-beitrag:hover {
	transform: translateY(-4px);
	box-shadow: var(--wp--preset--shadow--karte);
}

.kfc-beitrag .wp-block-post-featured-image {
	overflow: hidden;
}

.kfc-beitrag .wp-block-post-featured-image img {
	transition: transform 0.5s ease;
}

.kfc-beitrag:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}

.kfc-beitrag .wp-block-post-title a::after {
	/* ganze Karte klickbar */
	content: "";
	position: absolute;
	inset: 0;
}

.kfc-beitrag {
	position: relative;
}

.kfc-beitrag .wp-block-read-more {
	position: relative;
	z-index: 1;
}

.kfc-beitrag .wp-block-read-more::after {
	content: " →";
}

/* ---------- Sponsoren-Platzhalter ---------- */
.kfc-logo-platz {
	border: 1.5px dashed #dccfba;
	border-radius: 12px;
	min-height: 80px;
}

/* ---------- Fußbereich ---------- */
.kfc-fuss a {
	text-decoration: none;
}

.kfc-fuss a:hover {
	color: var(--kfc-gold-hell) !important;
}

.kfc-fuss .wp-block-social-links .wp-social-link {
	background: rgba(255, 255, 255, 0.08) !important;
	transition: background var(--kfc-uebergang);
}

.kfc-fuss .wp-block-social-links .wp-social-link:hover {
	background: var(--kfc-gold) !important;
}

/* ---------- Tabellen (Gruppen-Steckbrief) ---------- */
.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background-color: var(--wp--preset--color--creme-dunkel);
}

.wp-block-table td:first-child {
	font-weight: 600;
	color: var(--kfc-weinrot-dunkel);
	width: 38%;
}

/* ---------- Abschnitte ohne Lücken ---------- */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* ---------- Boxen mit runden Ecken ---------- */
.kfc-beitrag,
.kfc-box {
	overflow: hidden;
}

.kfc-voll-hoehe {
	height: 100%;
}

/* Kleine News-Karte: Bild füllt die ganze Kartenhöhe */
.kfc-beitrag .wp-block-column > .wp-block-post-featured-image {
	height: 100%;
	min-height: 160px;
}

/* ---------- Liste mit Gold-Haken ---------- */
.wp-block-list.is-style-kfc-haken {
	list-style: none;
	padding-left: 0;
	display: grid;
	gap: 0.85rem;
}

.wp-block-list.is-style-kfc-haken li {
	position: relative;
	padding-left: 2.4rem;
	color: var(--wp--preset--color--text-leise);
}

.wp-block-list.is-style-kfc-haken li strong {
	color: var(--kfc-weinrot-dunkel);
}

.wp-block-list.is-style-kfc-haken li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0.1rem;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 0.85rem;
	font-weight: 700;
	background: var(--kfc-gold-hell);
	color: var(--kfc-weinrot-dunkel);
}

/* ---------- Kicker auf Verlaufsflächen ---------- */
.has-weinrot-flaeche-gradient-background .is-style-kfc-kicker,
.has-gold-schimmer-gradient-background .is-style-kfc-kicker {
	color: var(--kfc-gold-hell);
}

/* ---------- Menü: Burger schon unter 1080px ---------- */
@media (max-width: 1080px) {
	.kfc-kopf .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}

	.kfc-kopf .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* ---------- Ausverkauft-Siegel ----------
   Im Editor die Termin-Karte auswählen → Block-Einstellungen → Erweitert →
   „Zusätzliche CSS-Klasse(n)“: kfc-ausverkauft
   Zum Entfernen die Klasse wieder löschen. */
.wp-block-group.is-style-kfc-karte.kfc-ausverkauft {
	container-type: inline-size;
}

.wp-block-group.is-style-kfc-karte.kfc-ausverkauft:hover {
	transform: none;
}

.wp-block-group.is-style-kfc-karte.kfc-ausverkauft > * {
	opacity: 0.38;
	filter: grayscale(0.7);
}

/* Kein Anfrage-Button mehr, damit keine Mails für den vollen Abend kommen */
.wp-block-group.is-style-kfc-karte.kfc-ausverkauft .wp-block-buttons {
	visibility: hidden;
}

.wp-block-group.is-style-kfc-karte.kfc-ausverkauft::after {
	content: "Ausverkauft";
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	transform: translate(-50%, -50%) rotate(-12deg);
	padding: 0.42em 0.8em 0.38em;
	white-space: nowrap;
	font-family: var(--wp--preset--font-family--outfit);
	font-size: clamp(1.1rem, 9cqi, 2rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--kfc-weinrot);
	background: rgba(255, 255, 255, 0.92);
	border: 0.14em solid var(--kfc-weinrot);
	border-radius: 0.35em;
	box-shadow:
		inset 0 0 0 0.1em #fff,
		inset 0 0 0 0.17em var(--kfc-gold),
		0 10px 24px -10px rgba(74, 15, 24, 0.45);
	pointer-events: none;
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
		scroll-behavior: auto !important;
	}
}
