/* Theme "gruene" – Bündnis 90/Die Grünen Ortsverband. Reines CSS, keine externen Ressourcen. */

@font-face { font-family: "PT Sans"; src: url(../fonts/pt-sans-regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "PT Sans"; src: url(../fonts/pt-sans-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "PT Sans"; src: url(../fonts/pt-sans-bold.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "PT Sans Narrow"; src: url(../fonts/pt-sans-narrow-bold.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --tanne: #005538;
  --tanne-dunkel: #003a26;
  --klee: #008939;
  --grashalm: #8abd24;
  --sonne: #fff17a;
  --himmel: #0ba1dd;
  --sand: #f5f1e9;
  --text: #1b2a22;
  --muted: #4a5a51;
  --font: "PT Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "PT Sans Narrow", "PT Sans", "Arial Narrow", system-ui, sans-serif;
  --wrap: 72rem;
  --header-h: 5.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
/* Scrollbar ausgeblendet (Scrollen geht weiter): gleiche Breite auf allen Seiten, kein Springen und kein leerer Streifen */
html { -webkit-text-size-adjust: 100%; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
/* sticky footer: main grows, footer sits at the bottom on short pages */
body { margin: 0; font: 1.125rem/1.6 var(--font); color: var(--text); background: #fff; min-height: 100vh; display: flex; flex-direction: column; }
#main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; color: var(--tanne); margin: 1.6em 0 .5em; }
h1, h2 { text-transform: uppercase; letter-spacing: .01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.4rem; }
p, ul, ol { margin: 0 0 1em; }

a { color: var(--klee); text-underline-offset: .15em; }
a:hover { color: var(--tanne); }
:focus-visible { outline: 3px solid var(--tanne); outline-offset: 2px; }
.hero :focus-visible, .section--tanne :focus-visible, .site-footer :focus-visible { outline-color: var(--sonne); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.prose { max-width: 48rem; }
.prose > :first-child { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; background: var(--sonne); color: var(--tanne); padding: .5rem 1rem; font-weight: 700; }
.skip:focus { top: 1rem; }

/* Headline-Balken (CD): jede Zeile bekommt einen eigenen Balken */
.balken { background: var(--tanne); color: #fff; padding: .05em .3em; line-height: 1.35; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.balken--sonne { background: var(--sonne); color: var(--tanne); }
.balken--klee { background: var(--klee); }

/* Buttons – auch per Markdown: [Text](url?classes=button) */
.button { display: inline-block; background: var(--sonne); color: var(--tanne); font: 700 1.1rem/1.2 var(--font-head); text-transform: uppercase; letter-spacing: .03em; text-decoration: none; padding: .8em 1.4em; border: 2px solid var(--tanne); transition: background .15s; }
.button:hover { background: var(--grashalm); color: var(--tanne); }
.button--klee { background: var(--klee); color: #fff; border-color: var(--klee); }
.button--klee:hover { background: var(--tanne); color: #fff; }

/* Header */
.site-header { background: #fff; border-bottom: 4px solid var(--grashalm); position: sticky; top: 0; z-index: 5; transition: box-shadow .3s; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); transition: min-height .3s; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--tanne); }
.brand img { height: 4rem; width: auto; transition: height .3s, transform .6s; }
/* .is-stuck is set by site.js once the page is scrolled: header shrinks, logo turns a bit */
.site-header.is-stuck { box-shadow: 0 2px 12px rgb(0 0 0 / .12); }
.is-stuck .header-inner { min-height: 3.75rem; }
.is-stuck .brand img { height: 2.75rem; transform: rotate(45deg); }
.brand-party { transition: font-size .3s; }
.is-stuck .brand-party { font-size: .7rem; }
@media (prefers-reduced-motion: reduce) {
  .site-header, .header-inner, .brand img, .brand-party, .nav-icon * { transition: none; }
  .is-stuck .brand img { transform: none; }
}
.logo-ph { display: grid; place-items: center; width: 4rem; height: 4rem; background: var(--sonne); border: 2px dashed var(--tanne); color: var(--tanne); font: 700 .8rem var(--font); text-transform: uppercase; }
.brand-text { display: flex; flex-direction: column; white-space: nowrap; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; line-height: 1.1; }
.brand-party { font-size: .85rem; color: var(--klee); }
.brand-ov { font-size: 1.35rem; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.1rem; }
.nav a { display: block; padding: .4rem 0; font: 700 1.15rem var(--font-head); text-transform: uppercase; letter-spacing: .02em; color: var(--tanne); text-decoration: none; border-bottom: 4px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: var(--grashalm); }
.nav-toggle { display: none; }
/* Login/Abmelden als Symbol (Schloss/Tür), beide gleich breit: Menü springt nicht */
.nav-login a { display: flex; align-items: center; gap: .5rem; }
.nav-icon { width: 1.4em; height: 1.4em; flex: none; }
.nav-icon * { transform-box: view-box; transition: transform .35s ease; }
/* Schloss: Bügel hebt sich und schwenkt um das rechte Bein auf */
.lock-shackle { transform-origin: 16px 11px; }
.nav-login a:hover .lock-shackle, .nav-login a:focus-visible .lock-shackle { transform: translateY(-3px) rotate(-25deg); }
/* Tür: Türblatt steht angelehnt (gestaucht um das Scharnier links) und schwenkt beim Hover zu */
.door-leaf { transform-origin: 6px 12px; transform: scaleX(.45) skewY(-14deg); }
.nav-login a:hover .door-leaf, .nav-login a:focus-visible .door-leaf { transform: none; }

/* zwischen Handy-Menü und voller Breite: Menü und Name etwas kleiner, damit alles in eine Zeile passt */
@media (max-width: 75rem) {
  .nav ul { gap: .8rem; }
  .nav a { font-size: 1rem; }
  .brand-ov { font-size: 1.1rem; }
}

@media (max-width: 62rem) {
  .brand-text { white-space: normal; }
  .nav-login .visually-hidden { position: static; width: auto; height: auto; clip-path: none; } /* im Handy-Menü Text neben dem Symbol */
  .nav-toggle { display: inline-flex; align-items: center; gap: .5rem; background: var(--tanne); color: #fff; border: 0; padding: .6rem 1rem; font: 700 1rem var(--font-head); text-transform: uppercase; cursor: pointer; }
  .nav-toggle::before { content: "☰"; font-size: 1.2rem; line-height: 1; }
  .nav-toggle[aria-expanded="true"]::before { content: "✕"; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--tanne); padding: 1rem 1.25rem 1.5rem; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { color: #fff; font-size: 1.4rem; }
  .nav a:hover, .nav a[aria-current] { border-bottom-color: var(--sonne); }
  .nav :focus-visible { outline-color: var(--sonne); }
  .brand-ov { font-size: 1.1rem; }
}

/* Hero (Startseite) – Bild als Page-Media "hero.jpg", sonst CD-Farbverlauf */
.hero { position: relative; min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h)); display: flex; align-items: flex-end; overflow: hidden; color: #fff;
  background: radial-gradient(circle at 85% 20%, var(--sonne) 0 7rem, transparent 7.1rem), linear-gradient(135deg, var(--tanne) 0%, var(--klee) 60%, var(--grashalm) 100%); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero.has-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 40 26 / .75) 0%, rgb(0 40 26 / .25) 55%, rgb(0 0 0 / .05) 100%); }
.hero-content { position: relative; z-index: 1; width: 100%; padding-bottom: clamp(3rem, 10vh, 7rem); }
.hero h1 { margin: 0 0 1.2rem; font-size: clamp(2.4rem, 7vw, 5rem); max-width: 16ch; color: #fff; }
.hero-text { font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 700; margin: 0 0 2rem; max-width: 36rem; }

/* Abschnitte */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section--sand { background: var(--sand); }
.section--tanne { background: var(--tanne); color: #fff; }
.section--klee { background: var(--klee); }
.section--tanne.section--klee a:not(.button) { color: #fff; }
.section--tanne h2, .section--tanne h3 { color: #fff; }
.section--tanne a:not(.button) { color: var(--sonne); }
.section > .wrap > h2:first-child { margin-top: 0; }
.section-foot { margin: 2rem 0 0; }

.page-head { background: var(--sand); padding: clamp(2rem, 5vw, 3.5rem) 0; margin-bottom: 2.5rem; }
.page-head h1 { margin: 0; }
.page-head .meta { margin: 1rem 0 0; }
.page-body { padding-bottom: 4rem; }

.meta { color: var(--muted); font-size: .95rem; margin: 0 0 .4rem; }

/* Karten (News) */
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); }
.card { background: #fff; display: flex; flex-direction: column; border-bottom: 5px solid var(--grashalm); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.card-body { padding: 1.2rem 1.3rem 1.4rem; }
.card h3 { margin: 0 0 .5rem; }
.card h3 a { color: var(--tanne); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p:last-child { margin: 0; }
.card-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

/* Termine */
.events { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.event { display: flex; gap: 1.2rem; align-items: flex-start; background: #fff; padding: 1rem; box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.event h3 { margin: .1rem 0 .3rem; font-size: 1.3rem; }
.event h3 a { color: var(--tanne); text-decoration: none; }
.event h3 a:hover { text-decoration: underline; }
.event p { margin: 0; }
.date-badge { flex: none; width: 4.5rem; text-align: center; background: var(--tanne); color: #fff; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; padding: .5rem 0; line-height: 1; }
.date-badge .d { display: block; font-size: 2rem; }
.date-badge .m { display: block; color: var(--sonne); font-size: 1rem; margin-top: .2rem; }
.events--past .date-badge { background: var(--muted); }
.event-facts { background: var(--sand); padding: 1rem 1.25rem; border-left: 5px solid var(--klee); margin: 0 0 2rem; }
.event-facts dt { font-weight: 700; }
.event-facts dd { margin: 0 0 .5rem; }

/* Kategorie-Filter / Schlagworte */
.chips { list-style: none; padding: 0; margin: 0 0 2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.chips a { display: inline-block; padding: .3rem .9rem; border: 2px solid var(--klee); color: var(--tanne); text-decoration: none; font-weight: 700; }
.chips a:hover, .chips a[aria-current] { background: var(--klee); color: #fff; }

/* Themen-Kacheln */
.tiles { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); list-style: none; padding: 0; margin: 0; }
.tile { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--tanne); color: #fff; transition: transform .15s; }
.tile:hover { transform: translateY(-3px); color: #fff; }
.tile img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.tile-body { padding: 1.2rem 1.3rem 1.5rem; }
.tile h2 { font-size: 1.6rem; margin: 0 0 .5rem; color: inherit; }
.tile p { margin: 0; }
.tiles li:nth-child(4n+2) .tile { background: var(--klee); }
.tiles li:nth-child(4n+3) .tile { background: var(--grashalm); color: #00271a; }
.tiles li:nth-child(4n+4) .tile { background: var(--sonne); color: var(--tanne); }

/* Personen */
.people { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); list-style: none; padding: 0; margin: 0 0 3rem; }
.person { background: var(--sand); text-align: center; padding: 1.5rem 1rem; }
.person img, .person .avatar { width: 9rem; height: 9rem; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 4px solid var(--grashalm); }
.person .avatar { display: grid; place-items: center; background: var(--tanne); color: #fff; font: 700 2.4rem var(--font-head); }
.person h3 { margin: 0 0 .2rem; }
.person p { margin: 0 0 .3rem; }
.person .role { color: var(--klee); font-weight: 700; }

/* Inhalte */
.prose img { margin: 1.5rem 0; }
.prose blockquote { margin: 1.5rem 0; padding: .5rem 1.25rem; border-left: 5px solid var(--grashalm); background: var(--sand); }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border-bottom: 1px solid #d9d3c6; padding: .5rem; text-align: left; }
.article-img { margin: 0 0 2rem; }

/* Footer */
.site-footer { background: var(--tanne); color: #fff; padding-top: 3rem; font-size: 1rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--sonne); }
.footer-cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); padding-bottom: 2.5rem; }
.site-footer h2 { color: var(--sonne); font-size: 1.3rem; margin: 0 0 .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
address { font-style: normal; }
.footer-bottom { background: var(--tanne-dunkel); padding: 1rem 0; }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.footer-bottom ul { display: flex; gap: 1.5rem; }
/* bis der Inhalt schmaler als das Fenster ist: rechts Platz für den Scroll-Pfeil, damit er keine Links verdeckt */
@media (max-width: 82rem) { .footer-bottom .wrap { padding-right: 5rem; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Login (Login-Plugin) */
#grav-login { max-width: 26rem; }
#grav-login .form-field { margin-bottom: 1rem; }
#grav-login label { display: block; font-weight: 700; margin-bottom: .3rem; }
#grav-login input[type=text], #grav-login input[type=email], #grav-login input[type=password] { width: 100%; box-sizing: border-box; padding: .6rem .8rem; font: inherit; border: 2px solid var(--tanne); }
#grav-login .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.5rem; }
#grav-login .rememberme { flex-basis: 100%; }
#grav-login .rememberme label { display: inline; font-weight: 400; }
#grav-login .button.secondary { background: #fff; }

/* Scroll-Pfeil unten rechts: runter, am Seitenende gedreht = nach oben */
.scroll-btn { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 6; width: 3rem; height: 3rem; display: grid; place-items: center; padding: 0; border: 2px solid var(--tanne); border-radius: 50%; background: var(--sonne); color: var(--tanne); cursor: pointer; box-shadow: 0 2px 10px rgb(0 0 0 / .2); transition: background .15s, transform .3s; }
.scroll-btn[hidden] { display: none; }
.scroll-btn:hover { background: var(--grashalm); }
.scroll-btn svg { transition: transform .3s; }
.scroll-btn.is-up svg { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .scroll-btn, .scroll-btn svg { transition: none; } }
