/*
Theme Name: Walsumer Hof
Description: Kadence-Child-Theme für den Walsumer Hof.
Template: kadence
Version: 1.1.0
Author: Kreativstrecke
Author URI: https://www.kreativstrecke.de
Text Domain: walsumerhof
Requires PHP: 8.0
*/

/* Font-Awesome-Duo-Icons: Kontur Friesisch-Blau, Füllung helles Blau */
:root {
	--fa-primary-color: var(--global-palette1);
	--fa-secondary-color: #8fb3d4;
	--fa-secondary-opacity: 0.45;
}

/* Auf blauem Grund (Header, Footer, Buttons) einfarbig hell */
.site-header,
.site-footer,
.wp-block-button__link {
	--fa-primary-color: currentColor;
	--fa-secondary-color: currentColor;
	--fa-secondary-opacity: 0.3;
}

/*
 * Icons an Blöcken per CSS-Klasse (editorfest, kein leeres <i> im Text):
 *   "wh-ico fa-clock"          → Slab-Duo-Icon vor Überschrift/Absatz
 *   "wh-ico wh-ico--mono …"    → nur Kontur (z. B. auf blauem Grund)
 *   "wh-ico wh-ico--duotone …" → Ersatz aus Duotone für Icons, die Slab Duo nicht hat
 *   "wh-ico-btn fa-phone"      → Icon im Button-Block
 * Die Klasse fa-<name> liefert über Font Awesome die Variable --fa (Zeichen des Icons).
 */
.wh-ico {
	position: relative;
	padding-left: 1.6em;
}

.wh-ico::before,
.wh-ico::after,
.wh-ico-btn .wp-block-button__link::before {
	content: var(--fa);
	content: var(--fa) / "";
	font-family: var(--fa-family-slab-duo);
	font-style: normal;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
}

.wh-ico::before,
.wh-ico::after {
	position: absolute;
	top: 0;
	left: 0;
	line-height: inherit;
}

.wh-ico::before {
	color: var(--fa-primary-color);
}

.wh-ico::after {
	color: var(--fa-secondary-color);
	opacity: var(--fa-secondary-opacity);
	font-feature-settings: "ss01";
}

/* Einfarbig und im Textfluss – funktioniert auch in zentrierten Bereichen */
.wh-ico--mono {
	padding-left: 0;
}

.wh-ico--mono::before {
	position: static;
	display: inline-block;
	margin-right: 0.45em;
}

.wh-ico--mono::after {
	content: none;
}

/* Großes Icon zentriert über der Überschrift (Info-Leiste) */
.wh-ico--top {
	padding-left: 0;
	padding-top: 2.4em;
	text-align: center;
}

.wh-ico--top::before,
.wh-ico--top::after {
	left: 50%;
	transform: translateX(-50%);
	font-size: 1.9em;
	line-height: 1;
}

.wh-ico--duotone::before,
.wh-ico--duotone::after {
	font-family: var(--fa-family-duotone);
}

.wh-ico-btn .wp-block-button__link::before {
	display: inline-block;
	margin-right: 0.5em;
}

/* Info-Leiste auf der Startseite (Öffnungszeiten, Reservierung, Anfahrt) */
.wh-infobar {
	padding: 1.75rem 1.5rem 1rem;
	margin: 2rem 0;
	background: var(--global-palette8);
	border-radius: 16px;
}

.wh-infobar h3 {
	margin-top: 0;
	color: var(--global-palette1);
}

.wh-infobar p {
	margin-top: 0;
	margin-bottom: 0.5rem;
}

/* Speisekarte (Haus-Spezialitäten): Intro mit PDF-Button, Kategorien als Karten im Raster, Gerichte als Liste */
.wh-menu-intro {
	margin: 1.5rem 0;
}

.wh-menu-season {
	margin-bottom: 0.75rem;
}

.wh-menu-grid,
.wh-card-grid {
	gap: 1.25rem;
	align-items: start;
	margin: 1.5rem 0;
}

.wh-menu-grid > .wh-menu-section,
.wh-card-grid > .wh-card {
	margin: 0;
}

/* .wh-card: gleiche Karte für andere Seiten (z. B. Impressum) */
.wh-menu-section,
.wh-card {
	padding: 1.25rem 1.5rem 1.5rem;
	background: var(--global-palette8);
	border-radius: 16px;
}

.wh-menu-section h2,
.wh-card h2 {
	margin-top: 0;
	margin-bottom: 0.75rem;
	font-size: 1.5rem;
}

.wh-menu-sub {
	margin: 0 0 0.75rem;
	font-style: italic;
	color: var(--global-palette5);
}

.entry-content .wh-menu-list {
	margin: 0 0 0.5rem;
	padding: 0;
	list-style: none;
}

.wh-menu-list li {
	padding: 0.45rem 0;
	border-bottom: 1px dotted var(--global-palette6);
}

.wh-menu-list li:last-child {
	border-bottom: 0;
}

.wh-menu-list .wh-menu-extra {
	font-style: italic;
	color: var(--global-palette5);
}

.wh-menu-highlight {
	margin: 0.5rem 0 1rem;
	padding: 1rem 1.5rem 1rem 3.1rem;
	background: #eaf1f7;
	border-left: 6px solid var(--global-palette1);
	border-radius: 14px;
	color: var(--global-palette1);
}

.wh-menu-highlight.wh-ico::before,
.wh-menu-highlight.wh-ico::after {
	top: 1rem;
	left: 1.25rem;
}

.wh-menu-note {
	margin: 1rem 0 0;
	font-size: 0.9rem;
	color: var(--global-palette5);
}

/* Bild + Text nebeneinander (Gartenwirtschaft, Kegelbahnen) */
.wh-split {
	gap: 2rem;
	margin: 1.5rem 0;
}

.wh-photo img {
	border-radius: 16px;
}

/* Merkmale als kleine Karten mit Icon links */
.wh-features .wh-feature {
	margin: 0 0 0.75rem;
	padding: 0.9rem 1.1rem 0.9rem 3.2rem;
	background: var(--global-palette8);
	border-radius: 12px;
}

.wh-features .wh-feature:last-child {
	margin-bottom: 0;
}

.wh-feature.wh-ico::before,
.wh-feature.wh-ico::after {
	top: 0.9rem;
	left: 1.1rem;
	font-size: 1.25em;
}

/* Hinweis-Box mit Handlungsaufforderung (z. B. freie Kegelbahntermine) */
/* Kadence legt den Gruppeninhalt in .wp-block-group__inner-container – dort wird geflext */
.wh-cta > .wp-block-group__inner-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 2rem;
}

.wh-cta h2 {
	margin: 0;
}

.wh-card p:last-child {
	margin-bottom: 0;
}

/* Gestapelte Karten außerhalb eines Rasters (z. B. Datenschutzerklärung) */
.wh-card {
	margin-bottom: 1.25rem;
}

.wh-card ul {
	margin-bottom: 1rem;
}

/* Inhaltsverzeichnis: auf breiten Bildschirmen zweispaltig */
.wh-toc h3 {
	margin-top: 0;
}

.entry-content .wh-toc ul {
	margin: 0;
	padding-left: 1.1rem;
}

@media (min-width: 782px) {
	.entry-content .wh-toc ul {
		columns: 2;
		column-gap: 2.5rem;
	}
}

/* Lange Wörter (z. B. "Verbraucherstreitbeilegung") sauber trennen */
.wh-card h2,
.wh-menu-section h2 {
	hyphens: auto;
	overflow-wrap: break-word;
}

/* Presse: Zeitungsausschnitte nicht hochskalieren, leicht abgesetzt wie Papier */
.wh-press.wp-block-gallery {
	align-items: flex-start;
}

.wh-press .wp-block-image img {
	width: auto !important;
	max-width: 100%;
	margin: 0 auto;
	border-radius: 4px;
	box-shadow: 0 4px 14px rgba(60, 40, 20, 0.15);
}

/* Google Maps: Platzhalter bis zum Klick (Zwei-Klick-Lösung) */
.wh-map-consent {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	min-height: 320px;
	margin: 1.5rem 0;
	padding: 2rem 1.5rem;
	text-align: center;
	background: var(--global-palette8);
	border: 2px dashed var(--global-palette6);
	border-radius: 16px;
}

.wh-map-consent p {
	max-width: 36rem;
	margin: 0 0 0.75rem;
}

.wh-map-consent .wh-map-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.75rem 1.5rem;
}

.wh-map-consent.is-loaded {
	padding: 0;
	border: 0;
	overflow: hidden;
}

.wh-map-consent.is-loaded iframe {
	width: 100%;
	height: 400px;
	border: 0;
}

/* Terminliste [wh_termine] auf Öffnungszeiten → Termine */
.entry-content .wh-termine {
	margin: 0 0 1.5rem;
	padding: 0;
	list-style: none;
}

.wh-termin {
	margin: 0 0 0.75rem;
	padding: 1rem 1.25rem;
	background: var(--global-palette8);
	border-left: 6px solid var(--global-palette1);
	border-radius: 12px;
}

.wh-termin p,
.wh-termin-beschreibung > :last-child {
	margin: 0;
}

.wh-termin-datum {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--global-palette1);
}

.wh-termin-titel {
	margin-top: 0.15rem !important;
	font-family: var(--global-heading-font-family);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--global-palette3);
}

.wh-termin-kategorie {
	display: inline-block;
	margin-left: 0.6rem;
	padding: 0.1rem 0.6rem;
	font-family: var(--global-body-font-family);
	font-size: 0.75rem;
	font-weight: 600;
	vertical-align: middle;
	color: var(--global-palette1);
	background: #eaf1f7;
	border-radius: 999px;
}

.wh-termin-beschreibung {
	margin-top: 0.35rem;
	color: var(--global-palette4);
}

.wh-termine-leer {
	font-style: italic;
	color: var(--global-palette5);
}

/* Kacheln in Suchergebnissen/Archiven: normaler Titel, kein Ornament */
.content-bg.loop-entry .entry-header .entry-title {
	font-size: 1.5rem;
	line-height: 1.3;
}

.content-bg.loop-entry .entry-header {
	padding-bottom: 0;
	margin-bottom: 0.75rem;
}

.content-bg.loop-entry .entry-header::before,
.content-bg.loop-entry .entry-header::after {
	content: none;
}

/* 404-Seite: "Da ist uns wohl ein Fisch durchs Netz gegangen" */
.wh-404 .entry-content-wrap {
	text-align: center;
}

.wh-404-hero {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.15em;
	margin: 1rem 0 0.5rem;
	font-family: var(--global-heading-font-family);
	font-size: clamp(5rem, 3rem + 10vw, 9rem);
	font-weight: 700;
	line-height: 1;
	color: var(--global-palette1);
}

/* Der Fisch ersetzt die Null und schwimmt sanft hin und her */
.wh-404-fisch {
	display: inline-block;
	font-size: 0.8em;
	animation: wh-schwimmen 3.5s ease-in-out infinite;
	--fa-primary-color: var(--global-palette1);
	--fa-secondary-color: #8fb3d4;
	--fa-secondary-opacity: 0.5;
}

.wh-404-blasen {
	position: absolute;
	top: 0;
	left: 50%;
	width: 0;
	height: 100%;
}

.wh-404-blasen i {
	position: absolute;
	bottom: 55%;
	width: 0.12em;
	height: 0.12em;
	border: 2px solid #8fb3d4;
	border-radius: 50%;
	opacity: 0;
	animation: wh-blasen 3.5s ease-in infinite;
}

.wh-404-blasen i:nth-child(2) {
	left: 0.15em;
	width: 0.08em;
	height: 0.08em;
	animation-delay: 1.1s;
}

.wh-404-blasen i:nth-child(3) {
	left: -0.1em;
	width: 0.06em;
	height: 0.06em;
	animation-delay: 2.2s;
}

@keyframes wh-schwimmen {
	0%, 100% { transform: translateX(-0.08em) rotate(-6deg); }
	50%      { transform: translateX(0.08em) rotate(6deg); }
}

@keyframes wh-blasen {
	0%   { transform: translateY(0); opacity: 0; }
	20%  { opacity: 0.9; }
	100% { transform: translateY(-0.9em); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.wh-404-fisch,
	.wh-404-blasen i {
		animation: none;
	}
}

.wh-404 .entry-header .entry-title {
	max-width: 38rem;
	margin: 0 auto;
}

/* Titel-Ornament mittig, passend zur zentrierten Seite */
.wh-404 .content-bg .entry-header::after {
	left: 50%;
	transform: translateX(-50%);
}

.wh-404-text {
	max-width: 40rem;
	margin: 0 auto 1.5rem;
}

.wh-404-suche {
	max-width: 32rem;
	margin: 0 auto 2rem;
}

.entry-content .wh-404-links {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
	gap: 1rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.entry-content .wh-404-links > li::before {
	content: none;
}

.wh-404-links a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	height: 100%;
	padding: 1.25rem 1rem;
	text-decoration: none;
	color: var(--global-palette4);
	background: var(--global-palette8);
	border-radius: 16px;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wh-404-links a:hover,
.wh-404-links a:focus {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(60, 40, 20, 0.12);
}

.wh-404-links .wh-404-icon {
	font-size: 2rem;
	line-height: 1;
	margin-bottom: 0.35rem;
}

.wh-404-links strong {
	font-family: var(--global-heading-font-family);
	font-size: 1.15rem;
	color: var(--global-palette1);
}

.wh-404-links span:last-child {
	font-size: 0.9rem;
	color: var(--global-palette5);
}

.wh-404-hinweis {
	font-style: italic;
	color: var(--global-palette5);
}

/* Links-Seite: Freunde und Partner als Karten */
.wh-partner-deco img {
	max-width: 70px;
}

.wh-partners {
	gap: 1.25rem;
	align-items: stretch;
	margin-top: 1rem;
	/* auto-fit statt auto-fill: wenige Karten füllen die Breite, keine leere Spalte */
	grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)) !important;
}

.wh-partners > .wh-partner {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	margin: 0;
	padding: 1.5rem 1.25rem 1.25rem;
	background: var(--global-palette8);
	border-radius: 16px;
}

.wh-partner-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 160px;
	margin: 0 0 1rem;
}

.wh-partner-logo img {
	max-height: 160px;
	width: auto;
	object-fit: contain;
}

.wh-partner h3 {
	margin: 0;
	font-size: 1.15rem;
}

.wh-partner h3 a {
	color: var(--global-palette1);
	text-decoration: none;
}

.wh-partner h3 a:hover,
.wh-partner h3 a:focus {
	text-decoration: underline;
}

/* Hinweis-Box (ehemals inline gestylte div-Boxen auf der Startseite) */
.wh-box {
	padding: 1.25rem 1.5rem;
	margin-bottom: 1.5rem;
	background: #eaf1f7; /* helles Friesisch-Blau */
	border-left: 6px solid var(--global-palette1);
	border-radius: 14px;
}

.wh-box > :last-child,
.wh-box > .wp-block-group__inner-container > :last-child {
	margin-bottom: 0;
}

/* Original-Logo im Startseiten-Intro */
.wh-intro-logo img {
	width: 100%;
	max-width: 280px;
}

@media (max-width: 781px) {
	.wh-intro-logo img {
		max-width: 200px;
	}
}

/* Seitentitel (in der Inhaltsbox) und Überschriften im Content im Akzent-Ton */
.entry-header .entry-title,
.entry-content h2 {
	color: var(--global-palette1);
}

/*
 * Seitentitel mit feiner Trennlinie zum Inhalt, klar größer als die h2.
 * .wh-page-title: gleicher Stil für die H1 im Content der Startseite (dort ist der Kadence-Titel ausgeblendet).
 */
.content-bg .entry-header .entry-title,
.entry-content .wh-page-title {
	font-size: clamp(2rem, 1.4rem + 1.6vw, 2.75rem);
	line-height: 1.25;
	color: var(--global-palette1);
}

.content-bg .entry-header,
.entry-content .wh-page-title {
	position: relative;
	padding-bottom: 1.6rem;
	margin-top: 0;
	margin-bottom: 1.5rem;
}

/* Trennlinie mit kleinem Fisch-Ornament (wie auf dem Tisch-Set) */
.content-bg .entry-header::before,
.entry-content .wh-page-title::before {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0.6rem;
	left: 0;
	border-bottom: 1px solid color-mix(in srgb, var(--global-palette6) 70%, transparent);
}

.content-bg .entry-header::after,
.entry-content .wh-page-title::after {
	content: "\f578";
	content: "\f578" / "";
	position: absolute;
	bottom: 0;
	left: 1.25rem;
	padding: 0 0.5rem;
	font-family: var(--fa-family-slab-duo);
	font-size: 1.2rem;
	font-style: normal;
	font-weight: 400;
	line-height: 1.2rem;
	color: var(--global-palette1);
	background: var(--global-palette9);
	-webkit-font-smoothing: antialiased;
}

/* Aufzählungen: kleiner Fisch statt Punkt (gleiches Motiv wie das Titel-Ornament) */
.entry-content ul.wp-block-list:not(.wh-menu-list) {
	padding-left: 1.75em;
	list-style: none;
}

.entry-content ul.wp-block-list:not(.wh-menu-list) > li {
	position: relative;
}

.entry-content ul.wp-block-list:not(.wh-menu-list) > li::before {
	content: "\f578";
	content: "\f578" / "";
	position: absolute;
	top: 0;
	left: -1.6em;
	font-family: var(--fa-family-slab-duo);
	font-size: 0.9em;
	font-style: normal;
	font-weight: 400;
	line-height: inherit;
	color: var(--global-palette1);
	-webkit-font-smoothing: antialiased;
}

/* Zitate (ehemals [quote]) */
.entry-content .wp-block-quote {
	border-left-color: var(--global-palette1);
	font-style: italic;
}

/* Tabellen (Öffnungszeiten) */
.entry-content .wp-block-table td {
	border: 0;
	border-bottom: 1px solid var(--global-palette6);
}

/*
 * Sprungziele (z. B. #reservierung) nicht unter dem fixierten Header verstecken.
 * Kadence scrollt per JS exakt bis Unterkante Header (ohne Linie) – das Padding gibt Luft.
 */
.entry-content [id] {
	scroll-margin-top: 90px;
	padding-top: 0.75rem;
}

/* Icons an Überschriften mit Sprungmarke um denselben Puffer nach unten */
.entry-content [id].wh-ico::before,
.entry-content [id].wh-ico::after {
	top: 0.75rem;
}

/* "Nach oben"-Button rund, passend zu den abgerundeten Boxen */
#kt-scroll-up,
#kt-scroll-up-reader {
	border-radius: 50%;
}

/* Reservierungs-Button im Header einzeilig */
.header-button-wrap .button {
	white-space: nowrap;
}

/* Hinweis "keine Termine" (Events Shortcodes) lesbar */
.ect-no-events,
#ect-no-events {
	color: var(--global-palette5);
}

/* Footer (blauer Grund): Text, Links und Überschrift hell */
.site-footer,
.site-footer .widget,
.site-footer .footer-html,
.site-footer .widget .wp-block-heading {
	color: var(--global-palette9);
}

.site-footer .widget a,
.site-footer .footer-html a {
	color: var(--global-palette9);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.site-footer .widget a:hover,
.site-footer .footer-html a:hover {
	color: #c9d8e6;
}
