/* ==========================================================================
   Woeste Theme – ergänzende Styles zu theme.json
   ========================================================================== */

:root {
	--woeste-radius: 14px;
	--woeste-focus: 0 0 0 3px var(--wp--preset--color--base), 0 0 0 6px var(--wp--preset--color--primary);
}

html { scroll-padding-top: 1rem; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--sun); color: var(--wp--preset--color--contrast); }

/* Gut sichtbarer Tastaturfokus (BITV) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--sun);
	outline-offset: 2px;
	box-shadow: 0 0 0 6px var(--wp--preset--color--primary-dark);
	border-radius: 4px;
}

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--sun);
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
	padding: 0.8rem 1.2rem;
	z-index: 100000;
}

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

/* --------------------------------------------------------------------------
   Kopfbereich
   -------------------------------------------------------------------------- */
.woeste-topbar a { color: var(--wp--preset--color--base); text-decoration: none; }
.woeste-topbar a:hover { text-decoration: underline; color: var(--wp--preset--color--sun); }
.woeste-topbar-claim { margin: 0; opacity: 0.85; }
.woeste-topbar-nav { gap: 0.25rem 1.25rem; }
@media (max-width: 700px) {
	.woeste-topbar-claim { display: none; }
	.woeste-topbar .wp-block-group { justify-content: center !important; }
}

.woeste-header { border-bottom: 1px solid var(--wp--preset--color--line); position: relative; z-index: 20; }
.woeste-brand .wp-block-site-title a { color: var(--wp--preset--color--primary-dark); text-decoration: none; font-size: clamp(1.15rem, 2.2vw, 1.45rem); }
.woeste-brand .woeste-brand-sub { margin: 0; font-size: 0.85rem; color: var(--wp--preset--color--muted); line-height: 1.2; }
.woeste-brand .wp-block-site-logo img { border-radius: 12px; }

.woeste-mainnav .wp-block-navigation-item__content { text-decoration: none; color: var(--wp--preset--color--contrast); padding: 0.4rem 0.15rem; }
.woeste-mainnav .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content { border-bottom: 3px solid transparent; }
.woeste-mainnav .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
.woeste-mainnav .wp-block-navigation__container > .current-menu-item > .wp-block-navigation-item__content,
.woeste-mainnav .wp-block-navigation__container > .current-menu-ancestor > .wp-block-navigation-item__content { border-bottom-color: var(--wp--preset--color--sun); }
.woeste-mainnav .wp-block-navigation__container { gap: 1.4rem; }
.woeste-mainnav .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: var(--woeste-radius);
	box-shadow: var(--wp--preset--shadow--card);
	padding: 0.5rem !important;
	min-width: 16rem !important;
	font-weight: 400;
}
.woeste-mainnav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.5rem 0.75rem !important; border-radius: 8px; }
.woeste-mainnav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--mist); }
.woeste-mainnav .wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
.woeste-mainnav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { gap: 1rem; font-size: 1.15rem; }
.woeste-mainnav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { border: 0 !important; box-shadow: none; padding: 0 0 0 1rem !important; font-size: 1rem; }
/* Mobilmenü linksbündig: lange Listen lassen sich so leichter überfliegen */
.woeste-mainnav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.woeste-mainnav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,
.woeste-mainnav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,
.woeste-mainnav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { align-items: flex-start !important; text-align: left; }
.woeste-mainnav .wp-block-navigation__responsive-container-open,
.woeste-search .wp-block-search__button {
	border-radius: 999px;
	background: var(--wp--preset--color--mist);
	color: var(--wp--preset--color--primary-dark);
	padding: 0.55rem;
	border: 0;
}
.woeste-search .wp-block-search__inside-wrapper { border: 0; }
.woeste-search .wp-block-search__input { border: 1px solid var(--wp--preset--color--line); border-radius: 999px; padding-left: 1rem; }
.woeste-header-actions { flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Seitenkopf und Seitenraster
   -------------------------------------------------------------------------- */
.woeste-main { min-height: 50vh; }
.wp-site-blocks > * { margin-block-start: 0; }
.woeste-cta .wp-block-button.is-style-outline .wp-block-button__link { color: var(--wp--preset--color--base); border-color: var(--wp--preset--color--base); }
.woeste-cta .wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--wp--preset--color--base); color: var(--wp--preset--color--primary-dark); }
.woeste-pagehead .wp-block-post-title, .woeste-pagehead h1 { overflow-wrap: break-word; hyphens: auto; }
.woeste-lead, .woeste-lead p { color: var(--wp--preset--color--muted); margin-top: 0.75rem; }
/* Einleitung lesbar schmal halten, aber linksbündig mit dem Inhalt */
.is-layout-constrained > .woeste-lead { max-width: 60ch; margin-left: max(0px, calc((100% - 1240px) / 2)) !important; }
.woeste-pagehead.is-layout-constrained > .woeste-lead { margin-left: max(0px, calc((100% - 1240px) / 2)) !important; }
.woeste-pagehead .wp-block-post-excerpt__more-text { display: none; }

.woeste-page-inner { display: grid; gap: var(--wp--preset--spacing--50); }
@media (min-width: 1000px) {
	.woeste-page-inner:has(> .woeste-aside) { grid-template-columns: minmax(0, 1fr) 19rem; align-items: start; }
	.woeste-aside { position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow: auto; }
}
@media (max-width: 999px) {
	.woeste-aside { order: 2; }
}
.woeste-content { max-width: 760px; }
.woeste-page-inner > .woeste-content { margin-top: 0 !important; }

/* --------------------------------------------------------------------------
   Inhalte
   -------------------------------------------------------------------------- */
.woeste-content > h2, .woeste-content > .wp-block-heading:where(h2) { margin-top: 2.5rem; }
.woeste-content > h3 { margin-top: 2rem; }
.woeste-content > :first-child { margin-top: 0; }
.woeste-content li + li { margin-top: 0.35rem; }
.woeste-content img, .wp-block-image img { border-radius: 10px; height: auto; }
.woeste-content a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.woeste-content a:hover { text-decoration-thickness: 2px; }

.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th, .wp-block-table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 0.6rem 0.75rem; text-align: left; vertical-align: top; }
.wp-block-table thead th, .wp-block-table thead { border-bottom: 2px solid var(--wp--preset--color--primary); background: var(--wp--preset--color--mist); }
.wp-block-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--wp--preset--color--paper) 70%, transparent); }
.wp-block-table { overflow-x: auto; }

.wp-block-details summary { cursor: pointer; font-weight: 700; list-style: none; position: relative; padding-right: 2rem; color: var(--wp--preset--color--primary-dark); }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; position: absolute; right: 0.25rem; top: -0.1rem; font-size: 1.5rem; line-height: 1; color: var(--wp--preset--color--primary); }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details[open] summary { margin-bottom: 0.75rem; }

/* Hinweisboxen */
.is-style-hinweis-info, .is-style-hinweis-warnung, .is-style-hinweis-tipp, .woeste-hinweis {
	padding: 1.1rem 1.3rem !important;
	border-radius: var(--woeste-radius);
	border-left: 6px solid var(--wp--preset--color--primary);
	background: var(--wp--preset--color--mist);
}
.is-style-hinweis-warnung { background: var(--wp--preset--color--sun-light); border-left-color: #c98900; }
.is-style-hinweis-tipp { background: var(--wp--preset--color--paper); border-left-color: var(--wp--preset--color--coral); }
:is(.is-style-hinweis-info, .is-style-hinweis-warnung, .is-style-hinweis-tipp, .woeste-hinweis) > :first-child { margin-top: 0; }
:is(.is-style-hinweis-info, .is-style-hinweis-warnung, .is-style-hinweis-tipp, .woeste-hinweis) > :last-child { margin-bottom: 0; }
.is-style-karte { padding: 1.5rem !important; border-radius: var(--woeste-radius); background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); box-shadow: var(--wp--preset--shadow--card); }

.wp-block-button.is-style-sonne .wp-block-button__link { background: var(--wp--preset--color--sun); color: var(--wp--preset--color--contrast); }
.wp-block-button.is-style-sonne .wp-block-button__link:hover { background: #ffd36e; color: var(--wp--preset--color--contrast); }
.wp-block-button.is-style-outline .wp-block-button__link { border: 2px solid currentColor; background: transparent; color: var(--wp--preset--color--primary); }

ul.is-style-haken { list-style: none; padding-left: 0; }
ul.is-style-haken li { padding-left: 2rem; position: relative; }
ul.is-style-haken li::before { content: ""; position: absolute; left: 0.2rem; top: 0.45em; width: 0.9rem; height: 0.5rem; border-left: 3px solid var(--wp--preset--color--primary); border-bottom: 3px solid var(--wp--preset--color--primary); transform: rotate(-45deg); }

/* Galerie */
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: 10px; }

/* --------------------------------------------------------------------------
   Beitragskarten, Badges, Kategorien
   -------------------------------------------------------------------------- */
.woeste-cards { gap: 1.5rem; }
.woeste-card { display: flex; flex-direction: column; height: 100%; border-radius: var(--woeste-radius); background: var(--wp--preset--color--base); border: 1px solid var(--wp--preset--color--line); overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.woeste-card:hover { box-shadow: var(--wp--preset--shadow--card); transform: translateY(-2px); }
.woeste-card .wp-block-post-featured-image { margin: 0; }
.woeste-card .wp-block-post-featured-image img { border-radius: 0; }
.woeste-card:not(:has(.wp-block-post-featured-image img))::before {
	content: ""; display: block; aspect-ratio: 3/2;
	background:
		radial-gradient(circle at 82% 22%, var(--wp--preset--color--sun) 0 11%, transparent 11.5%),
		radial-gradient(circle at 10% 110%, rgba(255,255,255,.08) 0 38%, transparent 38.5%),
		linear-gradient(135deg, var(--wp--preset--color--primary), var(--wp--preset--color--primary-dark));
}
.category-elternbriefe > .woeste-card:not(:has(.wp-block-post-featured-image img))::before {
	background:
		radial-gradient(circle at 82% 22%, var(--wp--preset--color--primary) 0 11%, transparent 11.5%),
		linear-gradient(135deg, var(--wp--preset--color--sun-light), var(--wp--preset--color--sun));
}
.woeste-card-body { padding: 1.1rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: 0.5rem; }
.woeste-card-body > * { margin: 0 !important; }
.woeste-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--primary-dark); }
.woeste-card .wp-block-post-title a:hover { text-decoration: underline; }
.woeste-card .wp-block-post-excerpt__excerpt { margin: 0; color: var(--wp--preset--color--muted); }
.woeste-card .wp-block-post-excerpt__more-text { display: none; }

.woeste-badges a { display: inline-block; padding: 0.15rem 0.65rem; border-radius: 999px; background: var(--wp--preset--color--sun-light); color: var(--wp--preset--color--primary-dark); font-size: 0.82rem; font-weight: 700; text-decoration: none; }
.woeste-badges a:hover { background: var(--wp--preset--color--sun); }
.woeste-badges .wp-block-post-terms__separator { display: none; }

.woeste-catnav { list-style: none; padding: 0; margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.woeste-catnav li a { display: inline-block; padding: 0.35rem 0.95rem; border-radius: 999px; border: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--base); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.woeste-catnav li.current-cat a, .woeste-catnav li a:hover { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); border-color: var(--wp--preset--color--primary); }

.woeste-searchresults > li { padding: 1.25rem 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.wp-block-query-pagination { margin-top: 2.5rem; gap: 0.5rem; }
.wp-block-query-pagination .page-numbers { padding: 0.3rem 0.75rem; border-radius: 8px; }
.wp-block-query-pagination .page-numbers.current { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); }

.wp-block-post-navigation-link { margin-top: 0.5rem; }
.wp-block-post-navigation-link .post-navigation-link__label { display: block; font-size: 0.85rem; color: var(--wp--preset--color--muted); }

/* --------------------------------------------------------------------------
   Startseite
   -------------------------------------------------------------------------- */
.woeste-hero { position: relative; overflow: hidden; }
.woeste-hero h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); line-height: 1.05; letter-spacing: -0.02em; max-width: 14ch; }
.woeste-hero .woeste-hero-img img { border-radius: 28px 28px 28px 120px; aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.woeste-cta-img img { border-radius: 24px; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.woeste-hero::after { content: ""; position: absolute; right: -6rem; top: -6rem; width: 18rem; height: 18rem; border-radius: 50%; background: var(--wp--preset--color--sun); opacity: 0.35; z-index: 0; pointer-events: none; }
.woeste-hero > * { position: relative; z-index: 1; }
.woeste-quick { margin-top: -2.5rem !important; position: relative; z-index: 2; }
.woeste-section-head { align-items: baseline; }
.woeste-section-head h2 { margin: 0; }
.woeste-profil-karte { height: 100%; border-radius: var(--woeste-radius); padding: 1.5rem !important; background: var(--wp--preset--color--base); border-top: 6px solid var(--wp--preset--color--sun); box-shadow: var(--wp--preset--shadow--card); }
.woeste-profil-karte h3 a { text-decoration: none; color: var(--wp--preset--color--primary-dark); }
.woeste-profil-karte h3 a:hover { text-decoration: underline; }
.woeste-zitat { font-family: var(--wp--preset--font-family--heading); }

/* --------------------------------------------------------------------------
   Fußbereich
   -------------------------------------------------------------------------- */
.woeste-footer h2 { margin-bottom: 0.75rem; }
.woeste-footer-links { list-style: none; padding: 0; margin: 0; }
.woeste-footer-links li { padding: 0.25rem 0; }
.woeste-footer a { text-decoration: none; }
.woeste-footer a:hover { text-decoration: underline; color: var(--wp--preset--color--sun) !important; }
.woeste-footer .wp-block-site-title a { color: var(--wp--preset--color--base); }
.woeste-footer .woeste-kontakt { margin-top: 1.25rem; }
.woeste-footer .woeste-kontakt-liste { list-style: none; padding: 0; margin: 0; }

/* --------------------------------------------------------------------------
   Plugins: Kalender, Formulare, Login
   -------------------------------------------------------------------------- */
.tribe-common, .tribe-events, .tribe-events-pg-template {
	--tec-color-accent-primary: var(--wp--preset--color--primary);
	--tec-color-accent-primary-hover: var(--wp--preset--color--primary-dark);
	--tec-color-button-primary: var(--wp--preset--color--primary);
	--tec-font-family-sans-serif: var(--wp--preset--font-family--body);
	--tec-font-family-base: var(--wp--preset--font-family--body);
}
.tribe-events-pg-template, .tribe-common.tribe-events { padding-inline: clamp(1rem, 4vw, 2rem); box-sizing: border-box; }
.tribe-events-single a:not(.tribe-common-c-btn), .tribe-events-meta-group a { color: var(--wp--preset--color--primary); }
.tribe-common .tribe-common-h1, .tribe-common .tribe-common-h2, .tribe-common .tribe-common-h3,
.tribe-events .tribe-events-calendar-list__event-title { font-family: var(--wp--preset--font-family--heading) !important; }

.fluentform .ff-el-form-control { border-radius: 10px; border-color: var(--wp--preset--color--line); padding: 0.7rem 0.85rem; font-size: 1rem; font-family: inherit; }
.fluentform .ff-el-input--label label { font-weight: 700; }
.fluentform .ff-btn-submit { background: var(--wp--preset--color--primary) !important; border-radius: 999px !important; padding: 0.75rem 1.6rem !important; font-weight: 700; font-size: 1rem; }
.fluentform .ff-btn-submit:hover { background: var(--wp--preset--color--primary-dark) !important; }
.fluentform { padding: 1.5rem; border-radius: var(--woeste-radius); background: var(--wp--preset--color--paper); }

.woeste-login-hinweis #loginform { max-width: 26rem; margin-top: 1.25rem; padding: 1.5rem; border-radius: var(--woeste-radius); background: var(--wp--preset--color--paper); }
.woeste-login-hinweis #loginform label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
.woeste-login-hinweis #loginform input[type="text"], .woeste-login-hinweis #loginform input[type="password"] { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--wp--preset--color--line); border-radius: 10px; font-size: 1rem; box-sizing: border-box; }
.woeste-login-hinweis #wp-submit { background: var(--wp--preset--color--primary); color: #fff; border: 0; border-radius: 999px; padding: 0.7rem 1.5rem; font-weight: 700; font-size: 1rem; cursor: pointer; }

/* Druck */
@media print {
	.woeste-topbar, .woeste-header-actions, .woeste-footer, .woeste-aside, .woeste-brotkrumen { display: none !important; }
	.woeste-pagehead { background: none !important; padding: 0 !important; }
	a { color: inherit; }
}
