/*
 * Pension Oberhauser – Look „Alpin Nacht“, hell mit dunklem Startbild.
 * Farben, Schriften und Abstände kommen aus theme.json (var(--wp--preset--…)).
 * Hier steht nur, was theme.json nicht kann.
 */

:root {
	--po-rot: var(--wp--preset--color--primary);
	--po-rot-d: var(--wp--preset--color--primary-dark);
	--po-nacht: var(--wp--preset--color--night);
	--po-ink: var(--wp--preset--color--contrast);
	--po-leise: var(--wp--preset--color--muted);
	--po-linie: var(--wp--preset--color--line);
	--po-panel: var(--wp--preset--color--base);
	--po-schatten: 0 10px 30px rgba(20, 40, 70, .07);
	--po-hd: var(--wp--preset--font-family--heading);
	--po-r-s: var(--wp--custom--radius--s);
	--po-r-m: var(--wp--custom--radius--m);
	--po-r-l: var(--wp--custom--radius--l);
}

.wp-site-blocks { position: relative; }
h1, h2, h3 { text-wrap: balance; hyphens: auto; overflow-wrap: break-word; }
:lang(de) h1, :lang(de) h2 { hyphenate-limit-chars: 10 5 5; }

/* ---------- Buttons ---------- */

.wp-element-button, .wp-block-button__link { box-shadow: 0 8px 30px rgba(255, 59, 71, .28); transition: transform .2s ease, background-color .2s ease; }
.wp-element-button:hover, .wp-block-button__link:hover { transform: translateY(-2px); }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; border-color: currentColor; color: inherit; box-shadow: none; padding: 14px 24px; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--po-ink); border-color: var(--po-ink); color: #fff; }
.wp-block-button.is-style-po-hell > .wp-block-button__link { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .45); color: #fff; box-shadow: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.wp-block-button.is-style-po-hell > .wp-block-button__link:hover { background: rgba(255, 255, 255, .22); }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #2b6cb0; outline-offset: 2px; }

/* ---------- Kleine Textbausteine ---------- */

.po-kicker { font-family: var(--po-hd); color: var(--po-rot-d); font-weight: 600; letter-spacing: .2em; text-transform: uppercase; font-size: 1rem; margin-bottom: 6px !important; }
.po-kicker + .wp-block-heading { margin-top: 0 !important; }
.po-lead { font-size: 1.2rem; color: var(--po-leise); max-width: 58ch; }
.po-leise { color: var(--po-leise); }
.po-h-mittel { font-size: clamp(2rem, 4vw, 3rem) !important; }
.po-h-klein { font-size: clamp(1.6rem, 3vw, 2.2rem) !important; margin-top: 2.2em !important; }
mark.po-fehlt { background: #fff4c2; color: #5a4a00; border-radius: 4px; padding: 0 4px; }

/* ---------- Kopf ---------- */

.po-kopf-bereich { background: var(--po-nacht); color: #fff; position: relative; z-index: 20; }
body:has(.po-main .wp-block-post-content > .po-hero:first-child) .po-kopf-bereich { position: fixed; inset: 0 0 auto; background: transparent; }
.po-kopf__leiste { padding-block: 16px; gap: 24px; }
.po-logo { display: block; flex: none; }
.po-logo img { height: 36px; width: auto; display: block; filter: brightness(0) invert(1); }
.po-nav { flex: 1; }
.po-nav .wp-block-navigation-item__content { padding-block: 6px; border-bottom: 2px solid transparent; text-decoration: none; }
.po-nav .wp-block-navigation-item__content:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, .5); }
.po-nav .wp-block-navigation-item__content[aria-current="page"] { border-bottom-color: var(--po-rot); }
.po-nav .wp-block-navigation__container { gap: 22px; }
.po-nav__nur-mobil { display: none !important; }
.po-nav .is-menu-open .po-nav__nur-mobil { display: flex !important; }
.po-nav .wp-block-navigation__responsive-container-open { color: #fff; border: 2px solid rgba(255, 255, 255, .45); border-radius: var(--po-r-s); padding: 8px; }
.po-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 24px; }
.po-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 14px; font-size: 1.4rem; }
.po-kopf__aktion { flex: none; }
.po-kopf__aktion .wp-block-button__link { padding: 11px 18px; }
@media (max-width: 1000px) { .po-kopf__aktion { display: none !important; } .po-nav .wp-block-navigation__container { gap: 16px; } }
@media (max-width: 599px) { .po-nav { flex: 0 0 auto; } }

/* ---------- Startbild ---------- */

.po-hero { color: #eef2f7; padding: 0 !important; align-items: flex-end !important; justify-content: center !important; overflow: hidden; }
.po-hero .wp-block-cover__image-background { animation: po-kb 22s ease-in-out infinite alternate; }
.po-hero .wp-block-cover__background {
	opacity: 1 !important;
	background: radial-gradient(ellipse 60% 55% at 22% 66%, rgba(11, 15, 23, .55), rgba(11, 15, 23, 0) 70%), linear-gradient(180deg, rgba(11, 15, 23, .45) 0%, rgba(11, 15, 23, .08) 30%, rgba(11, 15, 23, .12) 70%, rgba(11, 15, 23, .5) 100%) !important;
}
.po-hero--klein .wp-block-cover__background { background: linear-gradient(180deg, rgba(11, 15, 23, .6), rgba(11, 15, 23, .78)) !important; }
.po-hero .wp-block-cover__inner-container {
	width: min(1240px, 100%) !important; margin: 0 auto !important;
	padding: 110px var(--wp--style--root--padding-right, 24px) 34px var(--wp--style--root--padding-left, 24px);
	box-sizing: border-box; color: #eef2f7;
}
.po-hero .po-hero__titel { font-size: var(--wp--preset--font-size--giant); max-width: 20ch; color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, .35), 0 4px 30px rgba(0, 0, 0, .55); margin-top: 0; }
.po-hero--gross .po-hero__titel { font-size: clamp(2.4rem, 5vw, 4.4rem); margin-top: 12px; }
.po-hero .po-hero__text { max-width: 46ch; font-size: 1.15rem; font-weight: 500; text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 2px 18px rgba(0, 0, 0, .6); }
.po-hero .po-kicker { color: #ff8a91; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.po-hero .wp-block-buttons { margin-top: 22px; }
.po-riesig {
	font: 700 clamp(3rem, 14vw, 12.5rem)/.85 var(--po-hd); text-transform: uppercase; letter-spacing: .01em; margin: 0 !important;
	color: rgba(255, 255, 255, .1); -webkit-text-stroke: 2px rgba(255, 255, 255, .9); filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .35));
	overflow-wrap: normal; hyphens: none;
}
@keyframes po-kb { from { transform: scale(1); } to { transform: scale(1.12) translate(-1.5%, -1%); } }

/* Runder Buchen-Button im Startbild (ersetzt die Schnellanfrage) */
.po-hero .wp-block-cover__inner-container { position: relative; }
.po-rund { margin-top: 26px !important; }
.po-rund .wp-block-button__link {
	width: 148px; height: 148px; border-radius: 50% !important; padding: 18px !important; box-sizing: border-box;
	display: flex; align-items: center; justify-content: center; text-align: center;
	font-size: 1.25rem; line-height: 1.05; letter-spacing: .06em;
	box-shadow: 0 0 0 6px rgba(255, 59, 71, .25), 0 12px 40px rgba(0, 0, 0, .35);
	transform: rotate(-8deg); transition: transform .3s ease, box-shadow .3s ease;
}
.po-rund .wp-block-button__link:hover { transform: rotate(0deg) scale(1.06); box-shadow: 0 0 0 10px rgba(255, 59, 71, .3), 0 16px 48px rgba(0, 0, 0, .4); }
@media (min-width: 901px) {
	.po-hero--gross .po-rund { position: absolute; right: var(--wp--style--root--padding-right, 24px); bottom: 40px; margin: 0 !important; }
	.po-hero--gross .po-rund .wp-block-button__link { width: 176px; height: 176px; font-size: 1.5rem; }
}
@media (max-width: 900px) { .po-rund .wp-block-button__link { width: 120px; height: 120px; font-size: 1.05rem; } }
@media (prefers-reduced-motion: reduce) { .po-rund .wp-block-button__link, .po-rund .wp-block-button__link:hover { transform: none; } }

/* Schnellanfrage (Kurzcode [po_schnellanfrage], aktuell nicht verwendet) */
.po-schnell {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; align-items: end; margin-top: 22px; max-width: 900px;
	background: rgba(20, 27, 39, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
	border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--po-r-m); padding: 16px;
}
.po-schnell label { display: flex; flex-direction: column; gap: 5px; font-size: .88rem; font-weight: 600; color: #dbe3ee; }
.po-schnell input, .po-schnell select { font: inherit; font-weight: 400; padding: 12px; border: 0; border-radius: 10px; background: #fff; color: var(--po-ink); min-width: 0; width: 100%; box-sizing: border-box; }
.po-schnell .wp-element-button { border: 0; cursor: pointer; padding: 15px 20px; }

/* ---------- Abschnitte ---------- */

.po-main--startbild .wp-block-post-content > * { margin-block-start: 0; }
.po-abschnitt { padding-top: clamp(56px, 8vw, 104px) !important; padding-bottom: clamp(56px, 8vw, 104px) !important; margin-block: 0 !important; }
.po-abschnitt--eng { padding-top: 0 !important; }

/* Zahlen */
.po-zahlen, .po-karten, .po-merkmale { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)) !important; }
.po-karten { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)) !important; }
.po-zahlen { gap: 0 !important; border-bottom: 1px solid var(--po-linie); }
.po-zahlen__eintrag { padding: 28px 20px; border-right: 1px solid var(--po-linie); }
.po-zahlen__eintrag:last-child { border-right: 0; }
.po-zahlen__eintrag > * { margin: 0 !important; }
.po-zahl { font: 700 clamp(3rem, 5.5vw, 4.6rem)/1 var(--po-hd); white-space: nowrap; }
.po-zahl__text { color: var(--po-leise); }
@media (max-width: 900px) {
	.po-zahlen { grid-template-columns: 1fr 1fr !important; border-bottom: 0; }
	.po-zahlen__eintrag { padding: 22px 16px 22px 0; border-right: 0; border-bottom: 1px solid var(--po-linie); }
	.po-zahlen__eintrag:nth-child(odd) { border-right: 1px solid var(--po-linie); }
	.po-zahlen__eintrag:nth-child(even) { padding-left: 16px; }
	.po-zahlen__eintrag:nth-last-child(-n+2) { border-bottom: 0; }
	.po-zahl { font-size: clamp(2.4rem, 11vw, 3.2rem); }
	.po-zahl__text { font-size: .95rem; line-height: 1.4; margin-top: 6px !important; }
}

/* Unterkünfte als Karten */
.po-raeume { display: flex; gap: 10px; margin-top: 34px !important; height: 460px; }
.po-raum { flex: 1; min-width: 0; border-radius: var(--po-r-m); overflow: hidden; padding: 22px !important; transition: flex .5s; box-shadow: var(--po-schatten); margin: 0 !important; min-height: 0 !important; height: 100%; }
.po-raum:hover { flex: 2.2; }
.po-raum .wp-block-cover__image-background { filter: saturate(.95) brightness(.85); transition: filter .4s, transform .6s; }
.po-raum:hover .wp-block-cover__image-background { filter: none; transform: scale(1.05); }
.po-raum .wp-block-cover__background, .po-karte .wp-block-cover__background { opacity: 1 !important; background: linear-gradient(transparent 45%, rgba(0, 0, 0, .85)) !important; }
.po-raum .wp-block-cover__inner-container { color: #fff; }
.po-raum h3 { color: #fff; margin: 0 0 12px; }
.po-raum .wp-block-buttons { gap: 8px; }
.po-raum .wp-block-button__link { padding: 10px 16px; font-size: .95rem; }
@media (max-width: 900px) {
	.po-raeume {
		overflow-x: auto; height: 420px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
		margin-inline: calc(-1 * var(--wp--style--root--padding-left, 16px)) !important;
		padding-inline: var(--wp--style--root--padding-left, 16px); scroll-padding-inline: var(--wp--style--root--padding-left, 16px);
	}
	.po-raeume::-webkit-scrollbar { display: none; }
	.po-raum, .po-raum:hover { flex: 0 0 84%; scroll-snap-align: start; }
}

/* Text neben Bild */
.po-text-bild { gap: clamp(24px, 4vw, 60px) !important; }
.po-bild-hoch img { border-radius: 24px; width: 100%; }
.is-style-po-kacheln { list-style: none; padding: 0; display: grid; gap: 12px; margin-top: 22px; }
.is-style-po-kacheln li { background: var(--po-panel); border: 1px solid var(--po-linie); border-radius: 14px; padding: 14px 16px; box-shadow: var(--po-schatten); }
.is-style-po-ohne { list-style: none; padding: 0; }

/* Sommer / Winter */
.po-saison__umschalter { display: inline-flex; border-radius: 999px; padding: 4px; gap: 4px; background: var(--po-panel); border: 1px solid var(--po-linie); margin-bottom: 28px; }
.po-saison__umschalter button { font: 700 1rem/1 var(--wp--preset--font-family--body); border: 0; border-radius: 999px; padding: 10px 20px; min-height: 44px; transition: background-color .25s ease, color .25s ease; cursor: pointer; background: transparent; color: var(--po-ink); }
.po-saison__umschalter button[aria-pressed="true"] { background: var(--po-rot-d); color: #fff; }
.po-saison.ist-bereit .po-saison__teil:not(.ist-aktiv) { display: none; }
.po-saison__spalten { gap: 30px !important; }
.po-saison img { border-radius: 24px; width: 100%; }

/* Großer Aufruf */
.po-aufruf { text-align: center; background: radial-gradient(ellipse at 50% 0%, rgba(255, 59, 71, .16), transparent 60%), #fff; border: 1px solid var(--po-linie); border-radius: var(--po-r-l); padding: clamp(30px, 6vw, 80px) !important; }
.po-aufruf h2 { font-size: clamp(2.6rem, 7vw, 5.6rem); }
.po-aufruf .po-lead { margin-inline: auto !important; }
.po-aufruf .wp-block-buttons { justify-content: center; margin-top: 24px; }

/* ---------- Unterseiten ---------- */

.po-merkmale { gap: 12px !important; margin-top: 28px !important; }
.po-merkmal { background: var(--po-panel); border: 1px solid var(--po-linie); border-radius: 16px; padding: 18px 18px 16px; box-shadow: var(--po-schatten); }
.po-merkmal > * { margin: 0 !important; }
.po-merkmal__titel { font: 700 1.35rem/1 var(--po-hd); text-transform: uppercase; letter-spacing: .02em; margin-bottom: 6px !important; }
.po-merkmal__text { color: var(--po-leise); font-size: .95rem; }

.po-galerie { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 30px !important; }
.po-galerie > figure { margin: 0 !important; grid-column: span 2; }
.po-galerie img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; }
.po-galerie--2 > figure { grid-column: span 3; }
.po-galerie--3 > figure:first-child, .po-galerie--5 > figure:first-child { grid-column: span 4; grid-row: span 2; }
.po-galerie--3 > figure:first-child img, .po-galerie--5 > figure:first-child img { aspect-ratio: auto !important; }
.po-galerie--5 > figure:nth-child(n+4) { grid-column: span 3; }
.po-galerie--5 > figure:nth-child(n+4) img { aspect-ratio: 16/9 !important; }
@media (max-width: 900px) {
	.po-galerie { grid-template-columns: 1fr 1fr; }
	.po-galerie > figure, .po-galerie--2 > figure, .po-galerie--5 > figure:nth-child(n+4) { grid-column: span 1; }
	.po-galerie--3 > figure:first-child, .po-galerie--5 > figure:first-child { grid-column: span 2; grid-row: auto; }
	.po-galerie > figure img { aspect-ratio: 4/3 !important; }
}

.po-box { background: var(--po-panel); border: 1px solid var(--po-linie); border-radius: 22px; padding: clamp(20px, 3vw, 32px) !important; }
.po-box h3 { margin: 0 0 10px; }
.po-box ul { margin: 0; padding-left: 1.1em; }
.po-box li + li { margin-top: 6px; }
.po-box--mitte { text-align: center; }
.po-box--mitte .wp-block-buttons { justify-content: center; }
.po-wissen { gap: 28px !important; align-items: stretch !important; }

.po-karten { gap: 14px !important; margin-top: 26px !important; }
.po-karte { border-radius: var(--po-r-m); overflow: hidden; padding: 18px !important; margin: 0 !important; }
.po-karte .wp-block-cover__image-background { transition: transform .6s; }
.po-karte:hover .wp-block-cover__image-background { transform: scale(1.05); }
.po-karte h3 { margin: 0; font-size: 1.6rem; }
.po-karte h3 a { color: #fff; text-decoration: none; }
.po-karte h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }

/* Anfrage */
.po-anfrage { gap: 28px !important; align-items: flex-start !important; }
.po-anfrage > .wp-block-column { align-self: flex-start !important; }
.po-kontakte { display: grid; gap: 12px; margin-top: 22px !important; }
.po-kontakt { margin: 0 !important; min-height: 44px; box-sizing: border-box; background: var(--po-panel); border: 1px solid var(--po-linie); border-radius: 22px; padding: 18px 22px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.po-kontakt strong { font: 700 1.3rem/1 var(--po-hd); text-transform: uppercase; }
.po-kontakt a { overflow-wrap: anywhere; }
.po-kontakte + .po-box { margin-top: 12px !important; }

.po-formular { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.po-formular label { display: flex; flex-direction: column; gap: 5px; font-size: .88rem; font-weight: 600; }
.po-formular input, .po-formular select, .po-formular textarea { font: inherit; font-weight: 400; padding: 12px; border: 1px solid var(--po-linie); border-radius: 10px; background: #fff; color: var(--po-ink); width: 100%; min-width: 0; box-sizing: border-box; }
.po-formular textarea { min-height: 120px; resize: vertical; }
.po-formular .po-voll { grid-column: 1 / -1; margin: 0; }
.po-formular .po-check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 500; }
.po-formular .po-check input { width: auto; margin-top: 4px; }
.po-formular button { border: 0; cursor: pointer; }
.po-honig { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.po-meldung { grid-column: 1 / -1; border-radius: 12px; padding: 14px 18px; margin: 0; }
.po-meldung--ok { background: #e7f6ec; color: #145a2c; }
.po-meldung--fehler { background: #fde8ea; color: #8a1520; }
@media (max-width: 600px) { .po-formular { grid-template-columns: 1fr; } }

/* Rechtliches */
.po-recht { max-width: 760px; }
.po-hinweis { background: #fff; border-left: 4px solid var(--po-rot); border-radius: 12px; padding: 14px 18px; }

/* Seiten ohne Startbild */
.po-titelband { padding-top: clamp(40px, 6vw, 72px) !important; padding-bottom: clamp(32px, 5vw, 56px) !important; }
.po-titelband h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
.po-inhalt { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(56px, 8vw, 104px); }

/* ---------- Fuß ---------- */

.po-fuss { padding-top: 48px !important; padding-bottom: 48px !important; margin-top: 0 !important; }
.po-fuss__spalten { gap: 24px !important; }
.po-fuss a { text-decoration: none; color: inherit; }
.po-fuss a:hover { color: #fff; }
.po-fuss__titel { color: #fff; font: 600 1rem/1 var(--po-hd) !important; letter-spacing: .12em; margin-bottom: 10px; }
.po-fuss ul { margin: 0; }
.po-fuss li { padding-block: 3px; }
@media (max-width: 900px) {
	.po-fuss__spalten { display: grid !important; grid-template-columns: 1fr 1fr; gap: 28px 20px !important; }
	.po-fuss__spalten > .wp-block-column:first-child, .po-fuss__spalten > .wp-block-column:last-child { grid-column: 1 / -1; }
	.po-fuss li { padding-block: 0; }
	.po-fuss li a { display: inline-block; padding-block: 11px; }
}
.po-logo-fuss { filter: brightness(0) invert(1); height: 34px; width: auto; margin-bottom: 12px; display: block; }

/* ---------- Handy-Leiste ---------- */

.po-handy { display: none; }
@media (max-width: 900px) {
	.po-handy { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(11, 15, 23, .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
	.po-handy .wp-block-buttons { flex-wrap: nowrap; gap: 8px; }
	.po-handy .wp-block-button { flex: 1; }
	.po-handy .wp-block-button__link { width: 100%; padding: 13px 10px; box-sizing: border-box; }
	body { padding-bottom: 76px; }
}

/* ---------- Bewegung reduzieren ---------- */

@media (prefers-reduced-motion: reduce) {
	.po-hero .wp-block-cover__image-background { animation: none !important; }
	.wp-element-button:hover, .wp-block-button__link:hover { transform: none; }
	.po-raum, .po-raum .wp-block-cover__image-background, .po-karte .wp-block-cover__image-background { transition: none !important; }
}

/* ---------- Editor: alles sichtbar und ruhig ---------- */

.editor-styles-wrapper .po-hero .wp-block-cover__image-background { animation: none; }
.editor-styles-wrapper .po-raeume { height: auto; }
.editor-styles-wrapper .po-raum { min-height: 360px !important; }

/* Belegungskalender (hotellogin, Kurzcode [po_kalender]) */
.po-kal { width: 100%; }
.po-kal__rahmen { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--po-linie); border-radius: 22px; padding: 12px; }
.po-kal__rahmen.ist-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.po-kal__frame { display: block; border: 0; transform-origin: 0 0; }
.po-kal__wisch { display: none; font-size: .85rem; color: var(--wp--preset--color--muted); text-align: center; margin: 8px 0 0; }
.po-kal.ist-mobil .po-kal__wisch { display: block; }
.po-kal__fuss { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 16px; }
.po-kal__hinweis { margin: 0; font-size: .92rem; color: var(--wp--preset--color--muted); }
.po-kal__punkt { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin: 0 4px 0 8px; }
.po-kal__punkt:first-child { margin-left: 0; }
.po-kal__punkt--frei { background: #2e7d32; }
.po-kal__punkt--belegt { background: #d32f2f; }
.po-kal__knopf { text-decoration: none; }
@media (max-width: 600px) { .po-kal__knopf { display: block; width: 100%; text-align: center; box-sizing: border-box; } }

/* =====================================================================
   1.0.5 – Bewegung und Handy-Feinschliff
   Alle Animationen nur, wenn das Gerät keine reduzierte Bewegung wünscht
   (html.po-bewegung setzt theme.js). Ohne JavaScript ist alles sofort sichtbar.
   ===================================================================== */

:root { --po-ease: cubic-bezier(.22, 1, .36, 1); }
html { -webkit-tap-highlight-color: transparent; scroll-padding-top: 90px; }
a, button, .wp-block-button__link { touch-action: manipulation; }
img { -webkit-user-drag: none; }

/* Weiche Seitenwechsel (Chrome, Edge, Safari 18) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; animation-timing-function: var(--po-ease); }

/* Knöpfe: spürbarer Druck */
.wp-element-button, .wp-block-button__link { transition: transform .35s var(--po-ease), background-color .2s ease, box-shadow .35s var(--po-ease), color .2s ease; }
.wp-element-button:active, .wp-block-button__link:active { transform: scale(.97); transition-duration: .08s; }
.po-rund .wp-block-button__link:active { transform: rotate(0deg) scale(.95); }

/* Kopf: beim Scrollen dunkel hinterlegt, beim Runterscrollen weg, beim Hochscrollen wieder da */
.po-kopf-bereich { transition: transform .45s var(--po-ease), background-color .3s ease, box-shadow .3s ease; }
body:not(:has(.po-main .wp-block-post-content > .po-hero:first-child)) .po-kopf-bereich { position: sticky; top: 0; }
.admin-bar .po-kopf-bereich { top: var(--wp-admin--admin-bar--height, 0px) !important; }
.po-kopf-bereich.ist-gescrollt { background: rgba(11, 15, 23, .86) !important; -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px rgba(0, 0, 0, .18); }
.po-kopf-bereich.ist-gescrollt .po-kopf__leiste { padding-block: 10px; }
.po-kopf__leiste { transition: padding .3s var(--po-ease); }
.po-kopf-bereich.ist-weg:not(:has(.is-menu-open)) { transform: translateY(-100%); }

/* Handy-Menü: weich einblenden, große Tippflächen */
.po-nav .wp-block-navigation__responsive-container-open, .po-nav .wp-block-navigation__responsive-container-close { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; box-sizing: border-box; }
@media (max-width: 599px) { .po-nav .wp-block-navigation__responsive-container-open { display: inline-flex; } }
.po-nav .wp-block-navigation__responsive-container-close { display: inline-flex; }
.po-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 20px var(--wp--style--root--padding-left, 16px) calc(24px + env(safe-area-inset-bottom, 0px)); }
.po-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 0; width: 100%; font: 700 clamp(1.9rem, 8vw, 2.6rem)/1.1 var(--po-hd); text-transform: uppercase; letter-spacing: .01em; }
.po-nav .is-menu-open .wp-block-navigation-item { width: 100%; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.po-nav .is-menu-open .wp-block-navigation-item__content { display: block; width: 100%; padding-block: 16px !important; border-bottom: 0 !important; }
.po-nav .is-menu-open .wp-block-navigation-item__content[aria-current="page"] { color: var(--po-rot) !important; }
.po-bewegung .po-nav .wp-block-navigation__responsive-container.is-menu-open { animation: po-menue .45s var(--po-ease) both; }
.po-bewegung .po-nav .is-menu-open .wp-block-navigation-item { animation: po-hoch .5s var(--po-ease) both; }
.po-bewegung .po-nav .is-menu-open .wp-block-navigation-item:nth-child(2) { animation-delay: .04s; }
.po-bewegung .po-nav .is-menu-open .wp-block-navigation-item:nth-child(3) { animation-delay: .08s; }
.po-bewegung .po-nav .is-menu-open .wp-block-navigation-item:nth-child(4) { animation-delay: .12s; }
.po-bewegung .po-nav .is-menu-open .wp-block-navigation-item:nth-child(5) { animation-delay: .16s; }
.po-bewegung .po-nav .is-menu-open .wp-block-navigation-item:nth-child(6) { animation-delay: .2s; }
@keyframes po-menue { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes po-hoch { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Startbild: Inhalt fährt beim Laden nacheinander ein */
.po-bewegung .po-hero .wp-block-cover__inner-container > * { animation: po-hoch .9s var(--po-ease) both; }
.po-bewegung .po-hero .wp-block-cover__inner-container > *:nth-child(2) { animation-delay: .08s; }
.po-bewegung .po-hero .wp-block-cover__inner-container > *:nth-child(3) { animation-delay: .16s; }
.po-bewegung .po-hero .wp-block-cover__inner-container > *:nth-child(4) { animation-delay: .24s; }
.po-bewegung .po-hero .wp-block-cover__inner-container > *:nth-child(5) { animation-delay: .32s; }
.po-bewegung .po-hero .po-rund { animation: po-plopp .8s var(--po-ease) .45s both !important; }
@keyframes po-plopp { from { opacity: 0; transform: scale(.6) rotate(-30deg); } to { opacity: 1; transform: none; } }

/* Inhalte beim Scrollen sanft einblenden */
.po-bewegung .po-zeigen { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--po-ease), transform .8s var(--po-ease); transition-delay: calc(var(--po-i, 0) * 70ms); }
.po-bewegung .po-zeigen.ist-sichtbar { opacity: 1; transform: none; }
.po-bewegung .po-zeigen--bild { clip-path: inset(6% 6% 6% 6% round 24px); transform: scale(1.04); transition: clip-path 1.1s var(--po-ease), transform 1.1s var(--po-ease), opacity .6s ease; }
.po-bewegung .po-zeigen--bild.ist-sichtbar { clip-path: inset(0 0 0 0 round 0); transform: none; }

/* Handy */
@media (max-width: 900px) {
	.po-hero--gross { min-height: min(92svh, 760px) !important; }
	.po-hero .wp-block-cover__background { background: linear-gradient(180deg, rgba(11, 15, 23, .5) 0%, rgba(11, 15, 23, .1) 28%, rgba(11, 15, 23, .35) 58%, rgba(11, 15, 23, .82) 100%) !important; }
	.po-hero--klein .wp-block-cover__background { background: linear-gradient(180deg, rgba(11, 15, 23, .6), rgba(11, 15, 23, .8)) !important; }
	.po-hero .wp-block-cover__inner-container { padding-top: 96px; padding-bottom: 28px; }
	.po-hero .po-hero__text { font-size: 1.05rem; line-height: 1.55; }
	.po-hero .wp-block-buttons { gap: 10px; }
	.po-lead { font-size: 1.08rem; }
	.po-abschnitt { padding-top: 64px !important; padding-bottom: 64px !important; }
	.po-abschnitt--eng { padding-top: 0 !important; }
	.po-merkmale { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
	.po-merkmal { padding: 16px 14px; border-radius: 14px; }
	.po-merkmal__titel { font-size: 1.15rem; }
	.po-merkmal__text { font-size: .88rem; line-height: 1.45; }
	.po-aufruf { border-radius: 24px; }
	.po-aufruf .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.po-aufruf .wp-block-button__link, .po-box--mitte .wp-block-button__link { width: 100%; box-sizing: border-box; }
	.po-wissen .wp-block-buttons, .po-box--mitte .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
	.po-rund .wp-block-button__link { min-height: 0; }
	/* Handy-Leiste: auf Seiten mit großem Startbild erst nach dem Startbild einblenden */
	.po-handy { transition: transform .45s var(--po-ease); box-shadow: 0 -10px 30px rgba(0, 0, 0, .18); border-top: 1px solid rgba(255, 255, 255, .06); }
	.po-handy.ist-versteckt { transform: translateY(110%); }
}
@media (max-width: 380px) { .po-merkmale { grid-template-columns: 1fr !important; } }

@media (prefers-reduced-motion: reduce) {
	@view-transition { navigation: none; }
	.po-kopf-bereich, .po-kopf__leiste, .po-handy { transition: none !important; }
	.wp-element-button:active, .wp-block-button__link:active { transform: none; }
}

/* 1.0.5 – Ergänzungen nach Handy-Test */

/* Sommer/Winter: neuer Teil blendet weich ein */
.po-bewegung .po-saison.ist-bereit .po-saison__teil.ist-aktiv { animation: po-hoch .55s var(--po-ease) both; }

/* Zimmer-Karussell: Punkte zeigen, dass es weitergeht (nur Handy, von theme.js erzeugt) */
.po-punkte { display: none; }
@media (max-width: 900px) {
	.po-punkte { display: flex; justify-content: center; gap: 2px; margin-top: 10px; }
	.po-punkte button { width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
	.po-punkte button::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--po-linie, #d5dbe3); transition: width .35s var(--po-ease), background-color .25s ease; }
	.po-punkte button[aria-current="true"]::before { width: 22px; background: var(--po-rot, #ff3b47); }
	.po-raum .wp-block-button__link { min-height: 44px; }

	/* Fuß: besser lesbar, Tippflächen groß, endet nicht in einem hellen Streifen unter der Handy-Leiste */
	body { padding-bottom: 0; }
	.po-fuss { padding-bottom: calc(48px + 76px + env(safe-area-inset-bottom, 0px)) !important; }
	.po-fuss.has-muted-color, .po-fuss p { color: rgba(255, 255, 255, .72) !important; }
	.po-fuss p a { display: inline-block; padding-block: 10px; }
	.po-fuss p:has(a) { line-height: 1.2; }
}

@media (prefers-reduced-motion: reduce) {
	.po-punkte button::before { transition: none; }
}

/* Tablet hochkant (600–899 px): Menü-Knopf statt umbrechender Navigation */
@media (min-width: 600px) and (max-width: 899px) {
	.po-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: inline-flex; }
	.po-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	.po-nav { flex: 0 0 auto; }
}

/* 1.0.7 – Handy-Menü klappt nach dem Scrollen wieder ganz auf.
   Ursache: backdrop-filter bzw. transform am Kopf machen ihn zum Bezugsrahmen
   für position:fixed – das Menü war dann nur so hoch wie der Kopf.
   Lösung: Unschärfe auf eine eigene Ebene (::before) und bei offenem Menü
   am Kopf weder Filter noch Verschiebung. */
.po-kopf-bereich.ist-gescrollt { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.po-kopf-bereich.ist-gescrollt::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.po-kopf-bereich.ist-gescrollt { isolation: isolate; }
.po-kopf-bereich:has(.is-menu-open) { transform: none !important; transition: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; filter: none !important; }
.po-kopf-bereich:has(.is-menu-open)::before { display: none; }

/* [po_anfrage]: Kasten „Online anfragen“ */
.po-online-anfrage h3 { margin: 0 0 10px; }
.po-online-anfrage .wp-block-buttons { gap: 10px; margin-top: 18px; }
