/*
Theme Name: Schirmherren
Theme URI: https://dieschirmherren.de
Author: COM.lounge GmbH
Author URI: https://comlounge.net
Description: Klassisches Custom-Theme für "Die Schirmherren – Kultur und Inklusion e.V." (Aachen). OnePager mit sticky, farbiger Anker-Navigation und Blog/News-Bereich. Das Aussehen lebt im Theme, die Funktion im Companion-Plugin "Schirmherren Core".
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: schirmherren
*/

/* --------------------------------------------------------------------------
   Lokal gehostete Poppins (DSGVO: kein Google-CDN). Latin-Subset.
   -------------------------------------------------------------------------- */

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("assets/fonts/poppins-400.woff2") format("woff2");
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("assets/fonts/poppins-600.woff2") format("woff2");
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("assets/fonts/poppins-700.woff2") format("woff2");
}

/* --------------------------------------------------------------------------
   Design-Tokens
   -------------------------------------------------------------------------- */

:root {
	--nav-height: 60px;
	--max-width: 1080px;

	/* Helle Flächenfarben (aus dem Entwurf). Dunkler Text darauf erfüllt WCAG AA. */
	--color-verein: #6cb0e8;
	--color-projekte: #6fc97e;
	--color-news: #f5a64f;
	--color-links: #bd97dd;
	--color-kontakt: #ef8480;

	/* Hover: etwas kräftigerer Pastell (dunkler Text bleibt AA-konform). */
	--color-verein-hover: #5aa0de;
	--color-projekte-hover: #54bd68;
	--color-news-hover: #ef9636;
	--color-links-hover: #ad81d2;
	--color-kontakt-hover: #eb6a65;

	/* Kräftige Textfarben (aktiver Punkt + Links/Kontakt-Text), AA auf Weiß. */
	--color-verein-dark: #1f6aa8;
	--color-projekte-dark: #1f7a40;
	--color-news-dark: #915000;
	--color-links-dark: #6e3fb0;
	--color-kontakt-dark: #c5342f;

	--nav-text: #1a1a1a;
	/* AA-konformer Grauton (4.54:1 auf Weiß) für Sekundärtext & feine Ränder. */
	--muted: #767676;

	/* Fünffarbiges Marken-Spektrum (Reihenfolge = Nav). Klammert Kopf (Hero) und Fuß (Footer). */
	--brand-spectrum: linear-gradient(
		to right,
		var(--color-verein) 0 20%,
		var(--color-projekte) 20% 40%,
		var(--color-news) 40% 60%,
		var(--color-links) 60% 80%,
		var(--color-kontakt) 80% 100%
	);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.6;
	color: #222;
	background: #fff;
	/* Sticky Footer: Seite füllt mindestens die Viewport-Höhe, Footer sitzt am Ende. */
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

h1,
h2,
h3 {
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
	font-weight: 700;
	line-height: 1.2;
}

img {
	max-width: 100%;
	height: auto;
}

/* Accessibility: visuell verstecken, für Screenreader sichtbar */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 1000;
	padding: 0.5rem 1rem;
	background: #fff;
	color: #222;
}

.skip-link:focus {
	left: 0;
	/* Vom weißen Hintergrund abheben (sonst nur dunkler Text auf Weiß). */
	outline: 3px solid #1a1a1a;
	outline-offset: 2px;
}

/* Sichtbarer Tastatur-Fokus (WCAG 2.4.7 / 1.4.11). :focus-visible blendet den
   Ring nur bei Tastaturnutzung ein, nicht bei Maus-Klick. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid #1a1a1a;
	outline-offset: 2px;
	border-radius: 2px;
}

/* Auf den fünf farbigen Nav-Flächen zusätzlich ein heller Halo, damit der Ring
   auf jeder Sektionsfarbe sicher trägt. */
.site-nav__item a:focus-visible {
	outline-color: #000;
	box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.9);
}

/* Programmatischer Fokus (z. B. <main> nach dem Skip-Link) ohne sichtbaren Ring. */
[tabindex="-1"]:focus {
	outline: none;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.site-hero {
	width: 100%;
	text-align: center;
}

.site-hero__link {
	display: block;
}

.site-hero__img {
	display: block;
	width: 100%;
	height: auto;
}

/* --------------------------------------------------------------------------
   Wortmarke unterhalb der Navigation
   Gestufte Typo statt flacher Wiederholungszeile; der kompakte fünffarbige
   Akzent zitiert die fünf Sektions-/Nav-Farben (bedeutungstragend, nicht Deko).
   -------------------------------------------------------------------------- */

.site-title {
	text-align: center;
	padding: 2.1rem 1rem 2.3rem;
}

.site-title__nameplate {
	margin: 0;
	line-height: 1.2;
}

.site-title__name {
	display: block;
	font-weight: 700;
	font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.15rem);
	letter-spacing: 0.005em;
	color: #232323;
}

/* Kompakte, segmentierte Akzentleiste (fünf Farben = fünf Sektionen). */
.site-title__accent {
	display: block;
	width: 140px;
	height: 4px;
	margin: 0.85rem auto;
	border-radius: 999px;
	background: var(--brand-spectrum);
}

.site-title__tagline {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: #707070; /* 4.74:1 auf Weiß – AA (vorher #8a8a8a = 3.45:1, Fail). */
}

/* --------------------------------------------------------------------------
   Sticky farbige Anker-Navigation
   -------------------------------------------------------------------------- */

.site-nav {
	position: sticky;
	top: 0;
	z-index: 100;
	/* Randloses Farbband: die Menü-Labels bleiben in der Inhaltsspalte, die
	   seitlichen Lücken setzen nahtlos die erste (Verein) bzw. letzte (Kontakt)
	   Farbe fort – so wirkt die Nav full-bleed wie die Grafik darüber. */
	background: linear-gradient(
		to right,
		var(--color-verein) 0 50%,
		var(--color-kontakt) 50% 100%
	);
	transition: box-shadow 0.2s ease;
}

/* Schatten nur, wenn die Nav beim Scrollen oben klebt (Klasse via nav.js). */
.site-nav.is-stuck {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.13);
}

/* Eingeloggt: die fixe WP-Admin-Bar (32px / mobil 46px) nicht von der Nav verdecken lassen. */
.admin-bar .site-nav {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .site-nav {
		top: 46px;
	}
}

.site-nav__inner {
	max-width: var(--max-width);
	margin: 0 auto;
}

.site-nav__menu {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__item {
	flex: 1 1 0;
}

.site-nav__item a {
	display: block;
	padding: 0 1rem;
	line-height: var(--nav-height);
	text-align: center;
	text-decoration: none;
	font-weight: 600;
	color: var(--nav-text);
	transition: background-color 0.18s ease, color 0.18s ease;
}

.site-nav__item--verein a { background: var(--color-verein); }
.site-nav__item--projekte a { background: var(--color-projekte); }
.site-nav__item--news a { background: var(--color-news); }
.site-nav__item--links a { background: var(--color-links); }
.site-nav__item--kontakt a { background: var(--color-kontakt); }

.site-nav__item--verein a:hover,
.site-nav__item--verein a:focus { background: var(--color-verein-hover); }
.site-nav__item--projekte a:hover,
.site-nav__item--projekte a:focus { background: var(--color-projekte-hover); }
.site-nav__item--news a:hover,
.site-nav__item--news a:focus { background: var(--color-news-hover); }
.site-nav__item--links a:hover,
.site-nav__item--links a:focus { background: var(--color-links-hover); }
.site-nav__item--kontakt a:hover,
.site-nav__item--kontakt a:focus { background: var(--color-kontakt-hover); }

/* Aktiver Punkt (Scroll-Spy): der Tab „leuchtet" in der kräftigen Marken-
   Dunkelfarbe mit weißem Text – klares „Du bist hier", barrierefrei (nicht nur
   Farbe, sondern auch deutlicher Kontrast-/Flächenwechsel). */
.site-nav__item.is-active a {
	color: #fff;
	font-weight: 700;
}

.site-nav__item--verein.is-active a,
.site-nav__item--verein.is-active a:hover,
.site-nav__item--verein.is-active a:focus { background: var(--color-verein-dark); }
.site-nav__item--projekte.is-active a,
.site-nav__item--projekte.is-active a:hover,
.site-nav__item--projekte.is-active a:focus { background: var(--color-projekte-dark); }
.site-nav__item--news.is-active a,
.site-nav__item--news.is-active a:hover,
.site-nav__item--news.is-active a:focus { background: var(--color-news-dark); }
.site-nav__item--links.is-active a,
.site-nav__item--links.is-active a:hover,
.site-nav__item--links.is-active a:focus { background: var(--color-links-dark); }
.site-nav__item--kontakt.is-active a,
.site-nav__item--kontakt.is-active a:hover,
.site-nav__item--kontakt.is-active a:focus { background: var(--color-kontakt-dark); }

/* Hamburger-Button (nur mobil sichtbar) */
.site-nav__toggle {
	display: none;
	position: relative;
	width: 100%;
	height: var(--nav-height);
	padding: 0;
	border: 0;
	background: #333;
	cursor: pointer;
}

.site-nav__toggle-bar,
.site-nav__toggle-bar::before,
.site-nav__toggle-bar::after {
	position: absolute;
	left: 50%;
	width: 26px;
	height: 3px;
	background: #fff;
	transform: translateX(-50%);
	content: "";
}

.site-nav__toggle-bar {
	top: 50%;
	transform: translate(-50%, -50%);
}

.site-nav__toggle-bar::before { top: -8px; }
.site-nav__toggle-bar::after { top: 8px; }

/* --------------------------------------------------------------------------
   Inhaltsbereich & OnePager-Sektionen
   -------------------------------------------------------------------------- */

.site-content {
	width: 100%;
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 1.5rem;
	/* Wächst, damit der Footer bei wenig Inhalt ans Viewport-Ende geschoben wird. */
	flex: 1 0 auto;
}

.onepager-section {
	padding: 3rem 0;
	scroll-margin-top: calc(var(--nav-height) + 1rem);
	border-bottom: 1px solid #eee;
}

.onepager-section:last-child {
	border-bottom: 0;
}

.section-title {
	margin-top: 0;
	margin-bottom: 1.2rem;
	font-size: 1.9rem;
}

.section-inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2.5rem;
	align-items: start;
}

.section-inner--single {
	grid-template-columns: 1fr;
}

/* Platzhalterbild */
.placeholder-image {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 260px;
	background: repeating-linear-gradient(45deg, #f3f3f3, #f3f3f3 12px, #ececec 12px, #ececec 24px);
	color: #999;
	font-size: 0.9rem;
	border-radius: 4px;
}

/* Sektions-Bilder (Verein, Projekte) – ersetzen die alten Platzhalterboxen */
.section-media img {
	display: block;
	width: 100%;
	height: auto;
	min-height: 260px;
	object-fit: cover;
	border-radius: 4px;
}

/* News-Platzhalter */
.news-placeholder {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
	margin-top: 1.5rem;
}

.news-placeholder__item {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 140px;
	background: #f6f6f6;
	color: #aaa;
	font-size: 0.85rem;
	border-radius: 4px;
}

.links-list {
	padding-left: 1.2rem;
	line-height: 2;
}

.links-list a {
	color: var(--color-links-dark);
}

.contact-info {
	margin: 0 0 1rem;
}

.contact-info a {
	color: var(--color-kontakt-dark);
}

/* Sektions-Block (schirmherren/sektion): der Verein pflegt den Text als
   generisches RichText. Statt fester Element-Klassen (.links-list/.contact-info)
   wird der Body daher pro Sektion gestylt – so bleibt das Markup des Blocks
   schlank und das abgenommene Aussehen erhalten. */
.onepager-section--links .section-text ul {
	padding-left: 1.2rem;
	line-height: 2;
}

.onepager-section--links .section-text a {
	color: var(--color-links-dark);
}

.onepager-section--kontakt .section-text p {
	margin: 0 0 1rem;
}

.onepager-section--kontakt .section-text a {
	color: var(--color-kontakt-dark);
}

.blog-entry {
	padding: 2rem 0;
	border-bottom: 1px solid #eee;
}

.placeholder-image--small {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 160px;
}

/* --------------------------------------------------------------------------
   News-Teaser (Startseite)
   -------------------------------------------------------------------------- */

.news-teaser {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin-top: 1.5rem;
}

.news-teaser__media {
	display: block;
}

.news-teaser__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.news-teaser__date {
	display: block;
	margin-top: 0.75rem;
	font-size: 0.8rem;
	color: var(--muted);
}

.news-teaser__title {
	margin: 0.3rem 0 0.5rem;
	font-size: 1.15rem;
}

.news-teaser__title a {
	color: #222;
	text-decoration: none;
}

.news-teaser__title a:hover,
.news-teaser__title a:focus {
	color: var(--color-news-dark);
	text-decoration: underline;
}

.news-teaser__excerpt {
	margin: 0;
	font-size: 0.95rem;
	color: #444;
}

.news-teaser__more {
	margin-top: 1.5rem;
	font-weight: 600;
}

.news-teaser__more a {
	color: var(--color-news-dark);
	text-decoration: none;
}

.news-teaser__more a:hover,
.news-teaser__more a:focus {
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Blog-Übersicht (home.php)
   -------------------------------------------------------------------------- */

.blog-archive {
	padding: 2.5rem 0;
}

.page-title {
	margin-top: 0;
	font-size: 2rem;
}

.post-list {
	display: grid;
	gap: 2rem;
	margin-top: 1.5rem;
}

.post-card {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 1.5rem;
	align-items: start;
	padding-bottom: 2rem;
	border-bottom: 1px solid #eee;
}

.post-card__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.post-card__date {
	display: block;
	font-size: 0.8rem;
	color: var(--muted);
}

.post-card__title {
	margin: 0.3rem 0 0.6rem;
	font-size: 1.4rem;
}

.post-card__title a {
	color: #222;
	text-decoration: none;
}

.post-card__title a:hover,
.post-card__title a:focus {
	color: var(--color-news-dark);
	text-decoration: underline;
}

.post-card__excerpt {
	margin: 0 0 0.8rem;
	color: #444;
}

.post-card__more {
	font-weight: 600;
	color: var(--color-news-dark);
	text-decoration: none;
}

.post-card__more:hover,
.post-card__more:focus {
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Einzelartikel (single.php)
   -------------------------------------------------------------------------- */

.single-article {
	padding: 2.5rem 0 1rem;
}

.single-article__title {
	margin: 0 0 0.5rem;
	font-size: 2.1rem;
}

.single-article__date {
	display: block;
	margin-bottom: 1.5rem;
	font-size: 0.85rem;
	color: var(--muted);
}

.single-article__media {
	margin-bottom: 1.5rem;
}

.single-article__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.single-article__content {
	font-size: 1.05rem;
	max-width: 70ch; /* angenehme Lesebreite, Artikel selbst nutzt volle Inhaltsbreite */
}

.single-article__content p {
	margin: 0 0 1.2rem;
}

.single-article__back {
	margin: 1.5rem 0 3rem;
	font-weight: 600;
}

.single-article__back a {
	color: var(--color-verein-dark);
	text-decoration: none;
}

.single-article__back a:hover,
.single-article__back a:focus {
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Seiten (page.php) – Impressum, Datenschutz
   -------------------------------------------------------------------------- */

.page-article {
	padding: 2.5rem 0 1rem;
}

.page-article__title {
	margin: 0 0 1.5rem;
	font-size: 2.1rem;
}

.page-article__content {
	font-size: 1.05rem;
	max-width: 70ch; /* angenehme Lesebreite */
}

.page-article__content p {
	margin: 0 0 1.2rem;
}

.page-article__content h2 {
	margin: 2rem 0 0.8rem;
	font-size: 1.4rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
	margin-top: 3rem;
	background: #fff;
	color: #333;
	flex-shrink: 0;
}

/* Fünffarbiger Akzentstreifen – dasselbe Marken-Spektrum wie die Hero-Leiste (Klammer Kopf/Fuß). */
.site-footer__accent {
	height: 4px;
	background: var(--brand-spectrum);
}

.site-footer__inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 2.5rem 1.5rem;
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem 2.5rem;
	justify-content: space-between;
	align-items: center;
}

.site-footer__name {
	margin: 0;
	font-weight: 700;
	font-size: 1rem;
}

.site-footer__copy {
	margin: 0.25rem 0 0;
	font-size: 0.85rem;
	color: var(--muted);
}

.site-footer__social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.social-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.5rem 0.9rem;
	border: 1px solid var(--muted); /* 4.54:1 – sichtbare Abgrenzung (WCAG 1.4.11, vorher #e3e3e3 = 1.28:1). */
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 600;
	color: #333;
	text-decoration: none;
	transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.social-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.social-link:hover,
.social-link:focus {
	color: #fff;
}

.social-link--instagram:hover,
.social-link--instagram:focus {
	background: #c13584;
	border-color: #c13584;
}

.social-link--twitch:hover,
.social-link--twitch:focus {
	background: #772ce8;
	border-color: #772ce8;
}

.social-link--mixcloud:hover,
.social-link--mixcloud:focus {
	background: #2a6fb0;
	border-color: #2a6fb0;
}

.site-footer__legal {
	display: flex;
	gap: 1.5rem;
	font-size: 0.9rem;
}

.site-footer__legal a {
	/* Vertikales Padding für ein ausreichend großes Tippziel (WCAG 2.5.8 ≥ 24px). */
	display: inline-block;
	padding: 0.4rem 0;
	color: #555;
	text-decoration: none;
}

.site-footer__legal a:hover,
.site-footer__legal a:focus {
	color: #222;
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Responsive: Hamburger-Menü + Spalten reflowen (≤ 768px)
   -------------------------------------------------------------------------- */

@media (max-width: 768px) {
	.section-inner,
	.news-teaser,
	.post-card {
		grid-template-columns: 1fr;
	}

	.site-nav__toggle {
		display: block;
	}

	.site-nav__menu {
		display: none;
		flex-direction: column;
	}

	.site-nav__menu.is-open {
		display: flex;
	}

	.site-nav__item a {
		line-height: 2.8;
	}

	.site-footer__inner {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* --------------------------------------------------------------------------
   Reduced Motion (WCAG 2.3.3): Bewegung/Übergänge für empfindliche Nutzer:innen
   drosseln. Wichtig u. a. gegen erzwungenes Smooth-Scrolling der Ankersprünge.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.001ms !important;
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}
