/*
Theme Name: CSU Teising
Description: Schlankes, mobilfreundliches Theme für den CSU Ortsverband Teising. Startseite mit Aktuelles, Jahreslauf, Vorstandschaft und Mitmachen – alle Texte im Customizer änderbar, Vorstand als eigene Einträge.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Author: CSU Ortsverband Teising
License: GPL-2.0-or-later
Text Domain: csu-teising
*/

:root {
	--blue: #0a6fb8;
	--blue-dark: #06365f;
	--blue-soft: #e8f2fa;
	--ink: #14212e;
	--muted: #5a6878;
	--line: #dde4ec;
	--bg: #fff;
	--bg-alt: #f5f8fb;
	--radius: 14px;
	--shadow: 0 6px 24px rgba(6, 54, 95, .10);
	--wrap: 1160px;
	--header-h: 72px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 18px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 820px; }
.skip, .screen-reader-text { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 999; }
:focus-visible { outline: 3px solid #f5b400; outline-offset: 2px; }

/* ---------- Kopfbereich ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--blue); box-shadow: 0 2px 12px rgba(6, 54, 95, .25); }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { height: 38px; width: auto; }
.brand-name { font-size: 20px; }
.brand span { font-weight: 700; font-size: 15px; line-height: 1.15; opacity: .9; border-left: 2px solid rgba(255, 255, 255, .4); padding-left: 12px; }
.main-nav .menu { display: flex; gap: 4px; list-style: none; align-items: center; padding: 0; margin: 0; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: #fff; font-weight: 600; font-size: 16px; }
.main-nav a:hover, .main-nav .current-menu-item > a { background: rgba(255, 255, 255, .15); }
.main-nav a.cta { background: #fff; color: var(--blue-dark); margin-left: 8px; }
.main-nav a.cta:hover { background: var(--blue-soft); }
.menu-btn { display: none; background: none; color: #fff; border: 1px solid rgba(255, 255, 255, .5); border-radius: 8px; padding: 8px 12px; font: inherit; font-weight: 700; cursor: pointer; }

/* ---------- Startbild ---------- */
.hero { position: relative; min-height: 560px; display: flex; align-items: flex-end; color: #fff; background-color: var(--blue-dark);
	background-image: linear-gradient(180deg, rgba(6, 54, 95, .10) 10%, rgba(6, 54, 95, .88) 100%), var(--hero-img, none);
	background-size: cover; background-position: center 30%; }
.hero .wrap { padding-top: 120px; padding-bottom: 64px; width: 100%; }
.eyebrow { display: inline-block; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; background: rgba(255, 255, 255, .16); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1.05; font-weight: 800; max-width: 14ch; }
.hero p { font-size: clamp(18px, 2vw, 22px); max-width: 46ch; margin-top: 16px; opacity: .95; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-block; padding: 14px 24px; border-radius: 10px; font-weight: 700; text-decoration: none; font-size: 17px; line-height: 1.2; }
.btn-primary { background: #fff; color: var(--blue-dark); }
.btn-primary:hover { background: var(--blue-soft); }
.btn-ghost { border: 2px solid rgba(255, 255, 255, .7); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-outline { border: 2px solid var(--blue); color: var(--blue); }

/* ---------- Zahlen ---------- */
.stats { background: var(--blue-dark); color: #fff; }
.stats ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stats li { padding: 28px 20px; border-left: 1px solid rgba(255, 255, 255, .12); }
.stats li:first-child { border-left: 0; }
.stats b { display: block; font-size: 40px; font-weight: 800; line-height: 1; }
.stats span { font-size: 16px; opacity: .85; }

/* ---------- Abschnitte ---------- */
section { padding: 88px 0; }
.alt { background: var(--bg-alt); }
.head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.head h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.1; font-weight: 800; color: var(--blue-dark); }
.head p { color: var(--muted); max-width: 52ch; margin-top: 8px; }
.link { font-weight: 700; text-decoration: none; white-space: nowrap; }
.link:hover { text-decoration: underline; }
.admin-hint { background: #fff8e1; border: 1px dashed #e0b400; padding: 16px; border-radius: 10px; }

/* ---------- Beitragskarten ---------- */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .2s; }
.card:hover { transform: translateY(-4px); }
.card > img, .card-placeholder { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; background: linear-gradient(135deg, var(--blue-soft), #cfe2f2); display: block; }
.card > div { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card time { font-size: 14px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .05em; }
.card h3 { font-size: 22px; line-height: 1.25; color: var(--blue-dark); }
.card p { color: var(--muted); font-size: 16px; }
.card .more { margin-top: auto; font-weight: 700; color: var(--blue); font-size: 16px; }
.card.feature { grid-column: span 2; flex-direction: row; }
.card.feature > img, .card.feature .card-placeholder { width: 55%; aspect-ratio: auto; height: 100%; min-height: 320px; }
.card.feature h3 { font-size: 28px; }
.list { padding-top: 48px; }

/* Seitennummern */
.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.pagination .page-numbers { padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.pagination .page-numbers.current { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- Jahreslauf ---------- */
.year { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0; }
.year li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.year .m { font-size: 14px; font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: .06em; }
.year h3 { font-size: 20px; margin: 6px 0 4px; color: var(--blue-dark); }
.year p { font-size: 16px; color: var(--muted); }

/* ---------- Vorstand ---------- */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.person { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.person > img, .person-placeholder { aspect-ratio: 1; object-fit: cover; object-position: center top; width: 100%; background: linear-gradient(160deg, var(--blue-soft), #cfe2f2); }
.person-placeholder { display: flex; align-items: center; justify-content: center; font-size: 64px; font-weight: 800; color: var(--blue); }
.person > div { padding: 14px 16px 18px; }
.person h3 { font-size: 19px; line-height: 1.2; color: var(--blue-dark); }
.person .role { font-size: 15px; color: var(--muted); }
.person a { font-size: 15px; font-weight: 600; text-decoration: none; display: inline-block; margin-top: 6px; }
.person a:hover { text-decoration: underline; }
.person.lead { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; }
.person.lead > img, .person.lead .person-placeholder { height: 100%; }
.person.lead > div { display: flex; flex-direction: column; justify-content: center; padding: 24px; }
.person.lead h3 { font-size: 26px; }

/* ---------- Mitmachen ---------- */
.join { background: linear-gradient(120deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; border-radius: 22px; padding: 56px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.join h2 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; font-weight: 800; }
.join p { margin-top: 12px; opacity: .92; }
.join ul { list-style: none; padding: 0; display: grid; gap: 10px; margin-top: 20px; }
.join li::before { content: "✓"; font-weight: 800; margin-right: 10px; }
.join .btns { flex-direction: column; align-items: stretch; margin-top: 0; }
.join .btn { text-align: center; }

/* ---------- Seiten & Beiträge ---------- */
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 56px 0 40px; }
.page-head h1 { font-size: clamp(32px, 4.5vw, 48px); line-height: 1.1; font-weight: 800; color: var(--blue-dark); }
.page-head time { display: block; font-size: 15px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.page-head .back { display: inline-block; font-weight: 600; text-decoration: none; margin-bottom: 20px; font-size: 16px; }
.page-intro { color: var(--muted); margin-top: 12px; }
.lead-image { margin-top: 40px; }
.lead-image img { border-radius: var(--radius); width: 100%; }
.prose { padding-top: 40px; padding-bottom: 72px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 28px; line-height: 1.2; color: var(--blue-dark); margin-top: 1.6em; }
.prose h3 { font-size: 22px; color: var(--blue-dark); margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose img { border-radius: 10px; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption, .wp-caption-text { font-size: 15px; color: var(--muted); margin-top: 6px; }
.prose blockquote { border-left: 4px solid var(--blue); padding-left: 20px; color: var(--muted); font-style: italic; }
.prose .wp-block-gallery { gap: 12px; }
.prose .alignwide { max-width: 1000px; margin-left: 50%; transform: translateX(-50%); width: 100vw; }
.prose .alignleft { float: left; margin: 0 24px 16px 0; }
.prose .alignright { float: right; margin: 0 0 16px 24px; }
.prose .aligncenter { margin-left: auto; margin-right: auto; }
.elementor-wrap { padding-bottom: 48px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: -40px 0 56px; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.post-nav { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 72px; border-top: 1px solid var(--line); padding-top: 24px; font-weight: 600; }
.post-nav a { text-decoration: none; }
.post-nav span:last-child { text-align: right; }

/* ---------- Jahresarchiv ---------- */
.year-nav { position: sticky; top: var(--header-h); z-index: 40; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.admin-bar .year-nav { top: calc(var(--header-h) + 32px); }
.year-nav .wrap { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: thin; }
.year-nav a { flex: none; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 700; color: var(--blue-dark); font-size: 16px; }
.year-nav a:hover { background: var(--blue-soft); border-color: var(--blue); }
.year-nav span { font-weight: 600; color: var(--muted); font-size: 14px; margin-left: 2px; }
.archive-intro { padding-bottom: 0; }
.archive-years { padding-bottom: 72px; }
section.archive-year { padding: 48px 0 0; scroll-margin-top: calc(var(--header-h) + 72px); }
.archive-year-head { display: flex; align-items: baseline; gap: 16px; border-bottom: 3px solid var(--blue); padding-bottom: 8px; margin-bottom: 20px; }
.archive-year-head h2 { font-size: 40px; line-height: 1; font-weight: 800; color: var(--blue-dark); }
.archive-year-head span { color: var(--muted); font-weight: 600; }
.archive-year-head .to-top { margin-left: auto; font-size: 15px; font-weight: 600; text-decoration: none; }
.archive-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px; }
.archive-list a { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: inherit; height: 100%; transition: border-color .15s, box-shadow .15s; }
.archive-list a:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.archive-list img, .thumb-placeholder { flex: none; width: 88px; height: 66px; object-fit: cover; border-radius: 8px; background: linear-gradient(135deg, var(--blue-soft), #cfe2f2); display: block; }
.archive-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.archive-text time { font-size: 13px; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: .04em; }
.archive-text strong { font-size: 17px; line-height: 1.3; color: var(--blue-dark); }

/* ---------- Fußzeile ---------- */
.site-footer { background: var(--ink); color: #c9d3de; padding: 64px 0 28px; font-size: 16px; }
.fgrid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.site-footer h2 { color: #fff; font-size: 18px; margin-bottom: 12px; }
.site-footer p + p { margin-top: 12px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.legal { border-top: 1px solid #2c3a48; margin-top: 40px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 15px; }
.legal-menu { display: flex !important; gap: 16px; }

/* ---------- Responsiv ---------- */
@media (max-width: 960px) {
	.news { grid-template-columns: 1fr 1fr; }
	.year { grid-template-columns: 1fr 1fr; }
	.join { grid-template-columns: 1fr; padding: 40px; }
	.fgrid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
	.menu-btn { display: block; }
	.main-nav .menu { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--blue); flex-direction: column; align-items: stretch; padding: 12px 16px 20px; box-shadow: var(--shadow); }
	.main-nav .menu.open { display: flex; }
	.main-nav a { padding: 12px; }
	.main-nav a.cta { margin: 8px 0 0; text-align: center; }
}
@media (max-width: 640px) {
	body { font-size: 17px; }
	.wrap { padding: 0 16px; }
	section { padding: 60px 0; }
	.brand span { display: none; }
	.hero { min-height: 520px; }
	.stats ul { grid-template-columns: 1fr 1fr; }
	.stats li { border-top: 1px solid rgba(255, 255, 255, .12); }
	.stats li:nth-child(odd) { border-left: 0; }
	.stats b { font-size: 32px; }
	.news { grid-template-columns: 1fr; }
	.card.feature { grid-column: auto; flex-direction: column; }
	.card.feature > img, .card.feature .card-placeholder { width: 100%; aspect-ratio: 16 / 10; min-height: 0; }
	.card.feature h3 { font-size: 22px; }
	.year { grid-template-columns: 1fr; }
	.team { grid-template-columns: 1fr 1fr; gap: 12px; }
	.person.lead { grid-template-columns: 1fr; }
	.person h3 { font-size: 17px; }
	.join { padding: 28px 22px; border-radius: 16px; }
	.fgrid { grid-template-columns: 1fr; }
	.page-head { padding: 40px 0 28px; }
	.prose .alignleft, .prose .alignright { float: none; margin: 0 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.card { transition: none; }
}
