/* ÖFOU – ergänzende Stile zu theme.json */

:root {
	--oefou-green: var(--wp--preset--color--dunkelgruen);
	--oefou-mint: var(--wp--preset--color--mint);
	--oefou-tint: var(--wp--preset--color--mint-hell);
	--oefou-muted: var(--wp--preset--color--gruen-text);
}

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 24px; }

/* Kopfzeile */
.oefou-header-bar { row-gap: 12px; }
.oefou-logo img, .oefou-footer img, .oefou-partner img { border-radius: 0 !important; }
.oefou-logo img { display: block; height: auto; }
.oefou-nav a { text-decoration: none; }
.oefou-nav a:hover, .oefou-nav a:focus-visible, .oefou-nav .current-menu-item > a { color: var(--oefou-mint); }

/* Kleine Überschriften */
.oefou-eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--oefou-muted); margin: 0; }
.oefou-eyebrow--mint { color: var(--oefou-mint); }
.oefou-kicker { color: var(--oefou-mint); font-weight: 500; letter-spacing: .02em; margin: 0; }
.oefou-muted { color: var(--oefou-muted); font-size: 16px; }
.oefou-credit { font-size: 14px; color: var(--wp--preset--color--grau-gruen); }
.oefou-hinweis { background: var(--oefou-tint); padding: 16px 20px; border-radius: 12px; }

/* Buttons */
.wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; box-sizing: border-box; text-decoration: none; }
.is-style-outline > .wp-block-button__link:hover { background: rgba(29, 77, 69, .07); color: inherit; }
.wp-block-cover .is-style-outline > .wp-block-button__link:hover,
.has-dunkelgruen-background-color .is-style-outline > .wp-block-button__link:hover { background: rgba(255, 255, 255, .14); }
.is-style-oefou-dunkel > .wp-block-button__link { background: var(--oefou-green); color: #fff; }
.is-style-oefou-dunkel > .wp-block-button__link:hover { background: var(--wp--preset--color--tiefgruen); color: #fff; }
.oefou-button-gross > .wp-block-button__link { font-size: 20px; min-height: 64px; padding: 18px 48px; }
.oefou-button-inaktiv > .wp-block-button__link:not([href]) { border-style: dashed; opacity: .8; cursor: not-allowed; }

/* Bildkarten oben */
.oefou-hero-cards .wp-block-cover { height: 100%; }
.oefou-hero-cards .wp-block-cover__inner-container,
.oefou-zw-hero .wp-block-cover__inner-container { display: flex; flex-direction: column; gap: 14px; }
.oefou-hero-cards .wp-block-cover__inner-container > *,
.oefou-zw-hero .wp-block-cover__inner-container > * { margin: 0; }
.oefou-hero-cards .wp-block-cover { padding: clamp(28px, 3vw, 40px); }
.oefou-hero-cards .wp-block-buttons, .oefou-zw-hero .wp-block-buttons { margin-top: 8px; }

/* Veranstaltungen */
.oefou-events .wp-block-post-template { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.oefou-events .wp-block-post-template > li { margin: 0; }
.oefou-event-card { border: 1.5px solid var(--oefou-mint); border-radius: 20px; padding: 28px 32px; gap: 20px 40px !important; }
.oefou-event-card__when { flex: 0 0 200px; }
.oefou-event-card__label { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--oefou-muted); margin: 0; }
.oefou-event-card__date { font-size: 22px; font-weight: 600; margin: 0; }
.oefou-event-card__body { flex: 1 1 360px; min-width: 0; }
.oefou-event-card__title { font-family: var(--wp--preset--font-family--dm-sans) !important; font-size: 23px; font-weight: 500; margin: 0; }
.oefou-event-card__details { color: var(--oefou-muted); margin: 0; }
.oefou-event-card__actions { gap: 12px; }
.oefou-pill-muted, .oefou-pill-disabled { display: inline-flex; align-items: center; min-height: 48px; padding: 0 26px; border-radius: 999px; font-weight: 500; font-size: 16px; box-sizing: border-box; }
.oefou-pill-muted { background: var(--oefou-tint); color: var(--oefou-muted); }
.oefou-pill-disabled { border: 1.5px dashed #9DB8B3; color: var(--wp--preset--color--grau-gruen); }
.oefou-event-head .oefou-eyebrow { font-size: 16px; }
.oefou-back { margin-top: var(--wp--preset--spacing--60); }

/* Vorstand */
.oefou-team__member > * { margin: 0; }
.oefou-team__photo { margin-bottom: 12px !important; }
.oefou-team__photo img { width: 100%; }
.oefou-team__name { font-size: 19px; font-weight: 500; }
.oefou-team__role { font-size: 15px; font-style: italic; color: var(--oefou-muted); }
.oefou-team__desc { font-size: 15px; }

/* FAQ (Details-Block) */
.oefou-faq .wp-block-columns > .wp-block-column { display: flex; flex-direction: column; gap: 28px; }
.oefou-faq .wp-block-columns > .wp-block-column > * { margin: 0; }
.oefou-faq__topic { font-size: 20px; font-weight: 500; margin: 0 0 4px; }
.wp-block-details { background: #fff; border-radius: 20px; overflow: hidden; margin: 0; font-size: 16px; }
.wp-block-details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 20px; font-weight: 500; background: var(--oefou-green); color: #fff; border-radius: 20px; }
.wp-block-details > summary::-webkit-details-marker { display: none; }
.wp-block-details > summary::before { content: "+"; font-size: 22px; line-height: 1; transition: transform .2s; flex: 0 0 auto; }
.wp-block-details[open] > summary { background: var(--oefou-mint); color: var(--oefou-green); }
.wp-block-details[open] > summary::before { transform: rotate(45deg); }
.wp-block-details > summary:focus-visible { outline: 2px solid var(--oefou-green); outline-offset: 2px; }
.wp-block-details > :not(summary) { margin: 12px 22px 0; }
.wp-block-details > :not(summary):last-child { margin-bottom: 22px; }
.wp-block-details > summary + * { margin-top: 18px; }

/* Partner */
.oefou-partner__logos img { width: auto; }

/* Infobox Sportmedizin */
.oefou-infobox a { color: var(--oefou-mint); }
.oefou-bar { height: 14px; border-radius: 7px; overflow: hidden; }
.oefou-bar > .oefou-bar__seg { height: 14px; margin: 0 !important; min-width: 0; }
.oefou-bar__seg--a { flex: 80 1 0; background: #5DD8C3; }
.oefou-bar__seg--b { flex: 40 1 0; background: #A9ECE0; }
.oefou-bar__seg--c { flex: 40 1 0; background: #FFFFFF; }
.oefou-bar__seg--d { flex: 20 1 0; background: #C9D6D3; }
.oefou-infobox__col--theorie { flex: 2 1 460px; }
.oefou-infobox__col--praxis { flex: 1 1 300px; }
.oefou-infobox__total { border-bottom: 1px solid rgba(255, 255, 255, .25); padding-bottom: 12px; }
.oefou-infobox__total > * { margin: 0; }
.oefou-infobox__big { font-family: var(--wp--preset--font-family--dm-serif-display); font-size: 48px; line-height: 1; color: var(--oefou-mint); }
.oefou-infobox__unit { font-size: 20px; font-weight: 500; }
.oefou-infobox__tiles > .oefou-infobox__tile { flex: 1 1 180px; }
.oefou-infobox__tile { background: rgba(255, 255, 255, .08); border-radius: 20px; padding: 22px; }
.oefou-infobox__tile > * { margin: 0; }
.oefou-infobox__num { font-size: 26px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.oefou-infobox__num::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--swatch, #5DD8C3); flex: 0 0 auto; }
.oefou-swatch--a { --swatch: #5DD8C3; }
.oefou-swatch--b { --swatch: #A9ECE0; }
.oefou-swatch--c { --swatch: #FFFFFF; }
.oefou-swatch--d { --swatch: #C9D6D3; }
.oefou-infobox__title { font-weight: 500; }
.oefou-infobox__desc { font-size: 15px; color: #D3E6E2; }

/* Karten und Flächen */
.is-style-oefou-karte { border: 1.5px solid var(--oefou-mint); border-radius: 20px; padding: 28px; }
.is-style-oefou-flaeche { background: var(--oefou-tint); border-radius: 20px; padding: 28px 32px; }
.is-style-oefou-karte > *, .is-style-oefou-flaeche > * { margin: 0; }
.oefou-step { font-family: var(--wp--preset--font-family--dm-serif-display); font-size: 34px; line-height: 1; color: #2E8F80; }
.oefou-fact { font-size: 19px; font-weight: 500; line-height: 1.4; }
.oefou-fact__label { display: inline-block; margin-bottom: 2px; font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--oefou-muted); }
.oefou-facts__cta, .oefou-facts__cta .wp-block-button, .oefou-facts__cta .wp-block-button__link { width: 100%; }

/* Großer Aufruf */
.oefou-cta__text { flex: 1 1 520px; }
.oefou-cta__text > * { margin: 0; }

/* Tabelle */
.wp-block-table.is-style-oefou { overflow-x: auto; border: 1.5px solid var(--oefou-mint); border-radius: 20px; }
.wp-block-table.is-style-oefou table { table-layout: auto; width: 100%; border-collapse: collapse; font-size: 16px; }
.wp-block-table.is-style-oefou th, .wp-block-table.is-style-oefou td { border: 0; padding: 18px 24px; text-align: left; vertical-align: top; word-break: normal; overflow-wrap: normal; }
.wp-block-table.is-style-oefou thead { border: 0; }
.wp-block-table.is-style-oefou thead th { background: var(--oefou-green); color: #fff; font-weight: 500; padding-block: 16px; }
.wp-block-table.is-style-oefou tbody tr { border-top: 1px solid #CDEDE6; }
.wp-block-table.is-style-oefou tbody tr:nth-child(even) { background: #F5FBFA; }
.wp-block-table.is-style-oefou th:first-child, .wp-block-table.is-style-oefou td:first-child { font-weight: 600; width: 1%; white-space: nowrap; }
.wp-block-table.is-style-oefou td:nth-child(2) { font-weight: 500; }
.wp-block-table.is-style-oefou td:nth-child(3) { color: var(--oefou-muted); }

/* Galerien */
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 14px; }
.is-style-oefou-mosaik.wp-block-gallery.has-nested-images { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 220px; gap: 16px; }
.is-style-oefou-mosaik.wp-block-gallery.has-nested-images.columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 260px; }
.is-style-oefou-mosaik.wp-block-gallery.has-nested-images figure.wp-block-image { width: auto !important; margin: 0 !important; height: 100%; }
.is-style-oefou-mosaik.wp-block-gallery.has-nested-images figure.wp-block-image:first-child { grid-column: span 2; grid-row: span 2; }
.is-style-oefou-mosaik.wp-block-gallery.has-nested-images figure.wp-block-image img { height: 100%; width: 100%; object-fit: cover; border-radius: 20px; }
@media (max-width: 781px) {
	.is-style-oefou-mosaik.wp-block-gallery.has-nested-images,
	.is-style-oefou-mosaik.wp-block-gallery.has-nested-images.columns-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 160px; }
}
/* Leere Galerien/Fotobereiche nur im Frontend ausblenden */
body:not(.editor-styles-wrapper) .wp-block-gallery:not(:has(img)) { display: none; }
body:not(.editor-styles-wrapper) .oefou-fotos:not(:has(img)) { display: none; }

/* Fußzeile */
.oefou-footer a { color: var(--oefou-mint); }
.oefou-footer__legal a { display: inline-block; padding-block: 5px; }
.oefou-footer__col { flex: 1 1 220px; }
.oefou-footer__col--wide { flex: 1 1 380px; }
.oefou-footer__col > * { margin: 0; }
.oefou-footer .wp-block-social-links { margin-top: 8px; }

/* Mobil */
@media (max-width: 781px) {
	.oefou-hero-cards .wp-block-cover__background,
	.oefou-zw-hero .wp-block-cover__background { background: linear-gradient(0deg, rgba(18,53,48,.96) 0%, rgba(18,53,48,.82) 55%, rgba(18,53,48,.45) 100%) !important; }
}
@media (max-width: 600px) {
	.oefou-team.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; column-gap: 16px !important; }
	.oefou-team__name { font-size: 17px; }
	.oefou-faq { padding: 28px 16px !important; }
	.wp-block-details > :not(summary) { margin-left: 16px; margin-right: 16px; }
	.oefou-event-card { padding: 22px; }
	.oefou-event-card__when { flex-basis: 100%; }
	.oefou-header-bar { padding-left: 20px !important; padding-right: 20px !important; }
}

/* ---------- Barrierefreiheit ---------- */

/* Nur für Screenreader (im Editor sichtbar, damit man den Text bearbeiten kann). */
body:not(.editor-styles-wrapper) .screen-reader-text:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.editor-styles-wrapper .screen-reader-text { font-family: var(--wp--preset--font-family--dm-sans); font-size: 14px !important; color: var(--wp--preset--color--grau-gruen); border: 1px dashed #9DB8B3; padding: 4px 8px; }

/* „Zum Inhalt springen“ gut sichtbar. */
.skip-link.screen-reader-text:focus {
	background: var(--oefou-green) !important; color: #fff !important; font-size: 16px !important;
	padding: 12px 20px !important; border-radius: 0 0 12px 0; box-shadow: none !important; z-index: 100000;
}

/* Deutlich sichtbarer Fokus für Tastaturbedienung. */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid var(--oefou-green); outline-offset: 3px; border-radius: 4px;
}
:where(.has-dunkelgruen-background-color, .wp-block-cover, .oefou-header-bar, .oefou-footer) :where(a, button, summary):focus-visible {
	outline-color: var(--oefou-mint);
}
.wp-block-button__link:focus-visible { outline-offset: 4px; border-radius: 999px; }

/* Platzhalter in Texten auffällig markieren. */
mark.oefou-platzhalter { background: #FFE7A3; color: #3D2E00; padding: 0 4px; border-radius: 4px; }

/* Bewegung reduzieren, wenn im System gewünscht. */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Hoher Kontrast / erzwungene Farben (Windows). */
@media (forced-colors: active) {
	.wp-block-details > summary, .oefou-event-card, .is-style-oefou-karte, .wp-block-button__link { border: 1px solid CanvasText; }
}

/* ---------- Lange Überschriften: nie über den Rand ---------- */
h1, h2, h3, .wp-block-post-title { overflow-wrap: break-word; }
.wp-block-cover__inner-container { min-width: 0; max-width: 100%; }
@media (max-width: 600px) {
	.oefou-zw-hero, .oefou-hero-cards .wp-block-cover { padding: 28px 22px !important; }
	.oefou-zw-hero { min-height: 520px !important; }
	/* Tabelle am Handy als Liste: Tag + Region in einer Zeile, Schwerpunkte darunter */
	.wp-block-table.is-style-oefou table, .wp-block-table.is-style-oefou tbody { display: block; }
	.wp-block-table.is-style-oefou thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
	.wp-block-table.is-style-oefou tbody tr { display: grid; grid-template-columns: 3.6em minmax(0, 1fr); column-gap: 10px; row-gap: 4px; padding: 16px 18px; }
	.wp-block-table.is-style-oefou tbody td { display: block; padding: 0; width: auto !important; white-space: normal; word-break: normal; overflow-wrap: normal; hyphens: manual; }
	.wp-block-table.is-style-oefou tbody td:first-child { white-space: nowrap; }
	.wp-block-table.is-style-oefou tbody td:nth-child(3) { grid-column: 2; font-size: 15px; }
}

/* ---------- Galerien: Bilder öffnen sich groß ---------- */
.wp-block-gallery .wp-lightbox-container { height: 100%; }
.wp-block-gallery .wp-lightbox-container img { cursor: zoom-in; }
.wp-block-gallery .wp-lightbox-container button.lightbox-trigger { opacity: 1; background: rgba(29, 77, 69, .75); border-radius: 999px; }
.wp-lightbox-overlay .scrim { background-color: rgba(18, 53, 48, .94) !important; }
.wp-lightbox-overlay .close-button { color: #fff; }

/* ---------- Mobile Navigation als Box ---------- */
/* Hamburger-Menü bis 899 px (sonst brechen die Menüpunkte in der Kopfzeile um) */
@media (max-width: 899px) {
	.oefou-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	.oefou-nav .wp-block-navigation__responsive-container-open:not(.always-shown),
	.oefou-nav .is-menu-open .wp-block-navigation__responsive-container-close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; }
	.oefou-nav .wp-block-navigation__responsive-container-open:hover { background: rgba(255, 255, 255, .1); }
}
@media (max-width: 899px) {
	.oefou-nav .wp-block-navigation__responsive-container.is-menu-open {
		top: 16px; left: 16px; right: 16px; bottom: auto;
		height: auto; max-height: calc(100dvh - 32px);
		padding: 24px 32px 32px !important;
		border-radius: 20px;
		background: var(--wp--preset--color--dunkelgruen) !important;
		box-shadow: 0 0 0 100vmax rgba(18, 53, 48, .45), 0 24px 60px rgba(0, 0, 0, .35);
		transform-origin: top right;
		animation: oefou-menu-in .42s cubic-bezier(.16, 1, .3, 1) both;
	}
	.admin-bar .oefou-nav .wp-block-navigation__responsive-container.is-menu-open { top: 62px; }
	.oefou-nav .is-menu-open .wp-block-navigation__responsive-dialog { margin-top: 0 !important; }
	.oefou-nav .is-menu-open .wp-block-navigation__responsive-container-close { top: 22px; right: -18px; color: #fff; }
	.oefou-nav .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 52px !important; align-items: stretch !important; }
	.oefou-nav .is-menu-open .wp-block-navigation__container { width: 100%; align-items: stretch !important; gap: 0 !important; }
	.oefou-nav .is-menu-open .wp-block-navigation-item { width: 100%; border-top: 1px solid rgba(255, 255, 255, .14); }
	.oefou-nav .is-menu-open .wp-block-navigation-item:first-child { border-top: 0; }
	.oefou-nav .is-menu-open .wp-block-navigation-item__content { display: block; width: 100%; padding: 14px 4px !important; font-size: 20px; font-weight: 500; }
	.oefou-nav .is-menu-open .wp-block-navigation-item__content:hover,
	.oefou-nav .is-menu-open .wp-block-navigation-item__content:focus-visible { color: var(--oefou-mint); }
}
.oefou-nav-logo { display: none; }
@media (max-width: 899px) {
	.oefou-nav .is-menu-open .oefou-nav-logo { display: block; position: absolute; top: 22px; left: -8px; line-height: 0; border-radius: 6px; }
	.oefou-nav .is-menu-open .oefou-nav-logo img { width: 96px; height: auto; border-radius: 0; }
	.oefou-nav .is-menu-open .wp-block-navigation__responsive-container-content { padding-top: 84px !important; }
}
@media (min-width: 600px) and (max-width: 899px) {
	.oefou-nav .wp-block-navigation__responsive-container.is-menu-open { left: auto; width: 380px; }
}
@keyframes oefou-menu-in {
	from { opacity: 0; transform: translateY(-14px) scale(.96); }
	to { opacity: 1; transform: none; }
}
@keyframes oefou-menu-out {
	from { opacity: 1; transform: none; }
	to { opacity: 0; transform: translateY(-10px) scale(.97); }
}
@keyframes oefou-item-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}
@media (max-width: 899px) {
	.oefou-nav .is-menu-open .oefou-nav-logo,
	.oefou-nav .is-menu-open .wp-block-navigation-item { animation: oefou-item-in .45s cubic-bezier(.16, 1, .3, 1) both; }
	.oefou-nav .is-menu-open .oefou-nav-logo { animation-delay: .06s; }
	.oefou-nav .is-menu-open .wp-block-navigation-item:nth-child(1) { animation-delay: .10s; }
	.oefou-nav .is-menu-open .wp-block-navigation-item:nth-child(2) { animation-delay: .14s; }
	.oefou-nav .is-menu-open .wp-block-navigation-item:nth-child(3) { animation-delay: .18s; }
	.oefou-nav .is-menu-open .wp-block-navigation-item:nth-child(4) { animation-delay: .22s; }
	.oefou-nav .is-menu-open .wp-block-navigation-item:nth-child(5) { animation-delay: .26s; }
	.oefou-nav .is-menu-open .wp-block-navigation-item:nth-child(n+6) { animation-delay: .30s; }
	.oefou-nav .wp-block-navigation__responsive-container.is-menu-open.oefou-closing { animation: oefou-menu-out .24s cubic-bezier(.4, 0, 1, 1) both; }
	.oefou-nav .is-menu-open.oefou-closing .oefou-nav-logo,
	.oefou-nav .is-menu-open.oefou-closing .wp-block-navigation-item { animation: none; }
}
