/* ==========================================================================
   Rosenhagen – Stylesheet
   Farbwelt aus dem Dorflogo: Tannengrün, Rosenrot, Ährengold, Creme
   ========================================================================== */

:root {
  --gruen:        #1F4A38;
  --gruen-dunkel: #143026;
  --gruen-hell:   #2F6B52;
  --rot:          #B32B26;
  --rot-hell:     #D0433D;
  --gold:         #DFA426;
  --creme:        #FAF6EC;
  --creme-tief:   #F1E9D8;
  --text:         #2A2A28;
  --text-leise:   #5F625C;
  --weiss:        #FFFFFF;
  --linie:        #E2DBC9;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius:    10px;
  --radius-gr: 18px;
  --schatten:  0 2px 6px rgba(20, 48, 38, .07), 0 12px 28px rgba(20, 48, 38, .07);
  --breite:    1140px;
}

/* --------------------------------------------------------------- Basis -- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--gruen-dunkel);
  line-height: 1.2;
  margin: 0 0 .5em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); letter-spacing: .02em; }

p { margin: 0 0 1.1em; }

a { color: var(--gruen-hell); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rot); }

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

hr { border: 0; border-top: 1px solid var(--linie); margin: 2.5rem 0; }

.inhalt { width: min(100% - 2.5rem, var(--breite)); margin-inline: auto; }
.schmal { width: min(100% - 2.5rem, 780px); margin-inline: auto; }

.abschnitt      { padding: 4.5rem 0; }
.abschnitt-eng  { padding: 3rem 0; }
.abschnitt.hell { background: var(--weiss); }
.abschnitt.tief { background: var(--creme-tief); }
.abschnitt.gruen{ background: var(--gruen); color: #EFEAD9; }
.abschnitt.gruen h2, .abschnitt.gruen h3 { color: var(--weiss); }
.abschnitt.gruen a { color: var(--gold); }

.zentriert { text-align: center; }
.vorspann {
  font-size: 1.15rem;
  color: var(--text-leise);
  max-width: 62ch;
}
.zentriert .vorspann { margin-inline: auto; }

/* Sprungmarke für Tastaturnutzer */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--gruen); color: #fff; padding: .8rem 1.2rem;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ------------------------------------------------------------- Header -- */

.kopf {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 236, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linie);
}

.kopf-innen {
  display: flex; align-items: center; gap: 1rem;
  width: min(100% - 2.5rem, var(--breite));
  margin-inline: auto;
  min-height: 78px;
}

.marke { display: flex; align-items: center; gap: .8rem; text-decoration: none; margin-right: auto; }
.marke img { width: 54px; height: 54px; }
.marke-text { display: flex; flex-direction: column; line-height: 1.15; }
.marke-name {
  font-family: var(--serif); font-size: 1.4rem; font-weight: 700;
  color: var(--gruen-dunkel); letter-spacing: .01em;
}
.marke-zusatz { font-size: .78rem; color: var(--text-leise); letter-spacing: .06em; text-transform: uppercase; }

.menue-schalter {
  display: none; background: none; border: 1px solid var(--linie);
  border-radius: var(--radius); padding: .55rem .8rem; cursor: pointer;
  font: inherit; font-size: .9rem; color: var(--gruen-dunkel); align-items: center; gap: .5rem;
}
.menue-schalter .balken { display: block; width: 20px; height: 2px; background: currentColor; position: relative; }
.menue-schalter .balken::before,
.menue-schalter .balken::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; }
.menue-schalter .balken::before { top: -6px; }
.menue-schalter .balken::after  { top: 6px; }

.navigation ul { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0; }
.navigation > ul > li { position: relative; }

.navigation a {
  display: block; padding: .55rem .8rem; border-radius: var(--radius);
  color: var(--gruen-dunkel); text-decoration: none; font-size: .96rem; font-weight: 500;
  white-space: nowrap;
}
.navigation a:hover { background: var(--creme-tief); color: var(--gruen); }
.navigation a[aria-current="page"] { color: var(--rot); font-weight: 600; }

/* Untermenü */
.navigation li ul {
  position: absolute; top: 100%; left: 0; min-width: 235px;
  flex-direction: column; gap: 0; padding: .4rem;
  background: var(--weiss); border: 1px solid var(--linie);
  border-radius: var(--radius); box-shadow: var(--schatten);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s, transform .15s, visibility .15s;
}
.navigation li:hover > ul,
.navigation li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.navigation li ul a { font-size: .92rem; padding: .5rem .7rem; }

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

.hero { position: relative; background: var(--gruen-dunkel); color: #fff; overflow: hidden; }
.hero img.hero-bild {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .42;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,48,38,.55) 0%, rgba(20,48,38,.85) 100%);
}
.hero-innen {
  position: relative; z-index: 2;
  width: min(100% - 2.5rem, var(--breite)); margin-inline: auto;
  padding: 6rem 0 5rem; text-align: center;
}
.hero-innen h1 { color: #fff; margin-bottom: .3em; }
.hero-innen p  { color: #E5E0D0; font-size: 1.2rem; max-width: 60ch; margin-inline: auto; }
.hero-wappen { width: 118px; height: 118px; margin: 0 auto 1.5rem; }
.hero-klein .hero-innen { padding: 3.6rem 0 3.2rem; }

/* -------------------------------------------------------------- Karten -- */

.raster { display: grid; gap: 1.6rem; }
.raster-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.raster-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.raster-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.karte {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--radius-gr);
  padding: 1.7rem;
  box-shadow: var(--schatten);
  display: flex; flex-direction: column;
}
.karte h3 { margin-bottom: .4rem; }
.karte p:last-child { margin-bottom: 0; }
.karte .karte-fuss { margin-top: auto; padding-top: 1rem; }

a.karte { text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
a.karte:hover { transform: translateY(-3px); box-shadow: 0 6px 14px rgba(20,48,38,.1), 0 18px 40px rgba(20,48,38,.12); }

.karte-bild {
  border-radius: var(--radius-gr); overflow: hidden;
  border: 1px solid var(--linie); box-shadow: var(--schatten);
}
.karte-bild img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.karte-bild figcaption { padding: .8rem 1rem; background: var(--weiss); font-size: .88rem; color: var(--text-leise); }

.emblem {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; margin-bottom: .9rem;
  background: var(--creme-tief); color: var(--gruen); flex: none;
}
.emblem svg { width: 24px; height: 24px; }
.emblem.rot   { background: #F6E2E1; color: var(--rot); }
.emblem.gold  { background: #FAF0D6; color: #9C6F0C; }

/* Zahlen / Eckdaten */
.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; }
.zahl { text-align: center; padding: 1.4rem 1rem; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius-gr); }
.zahl b { display: block; font-family: var(--serif); font-size: 2rem; color: var(--rot); line-height: 1.1; }
.zahl span { font-size: .9rem; color: var(--text-leise); }

/* Zwei-Spalten-Block */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.duo.schmal-links { grid-template-columns: 5fr 6fr; }
@media (max-width: 820px) { .duo, .duo.schmal-links { grid-template-columns: 1fr; gap: 2rem; } }

/* Zeitleiste */
.zeitleiste { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--linie); }
.zeitleiste li { position: relative; padding: 0 0 1.8rem 1.8rem; }
.zeitleiste li::before {
  content: ""; position: absolute; left: -7px; top: .55rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--creme);
}
.zeitleiste b { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--rot); }
.zeitleiste strong { display: block; margin-bottom: .1rem; }
.zeitleiste span { color: var(--text-leise); font-size: .95rem; }

/* -------------------------------------------------------------- Knöpfe -- */

.knopf {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.5rem; border-radius: 999px;
  background: var(--gruen); color: #fff !important; text-decoration: none;
  font-weight: 600; font-size: .98rem; border: 2px solid var(--gruen);
  cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s, transform .12s;
}
.knopf:hover { background: var(--gruen-hell); border-color: var(--gruen-hell); transform: translateY(-1px); }
.knopf.zweitrangig { background: transparent; color: var(--gruen) !important; }
.knopf.zweitrangig:hover { background: var(--gruen); color: #fff !important; }
.knopf.hell { background: var(--gold); border-color: var(--gold); color: var(--gruen-dunkel) !important; }
.knopf.hell:hover { background: #EBB744; border-color: #EBB744; }
.knopf[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------------------------------------------------------- Formulare -- */

.formular { display: grid; gap: 1.1rem; }
.feld-paar { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 640px) { .feld-paar { grid-template-columns: 1fr; } }

.feld label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: .35rem; }
.feld .hinweis { font-weight: 400; color: var(--text-leise); font-size: .85rem; }

.feld input, .feld textarea, .feld select {
  width: 100%; padding: .75rem .9rem; font: inherit; font-size: .98rem;
  border: 1px solid #CFC7B4; border-radius: var(--radius);
  background: var(--weiss); color: var(--text);
}
.feld input:focus, .feld textarea:focus { border-color: var(--gruen-hell); }
.feld textarea { min-height: 130px; resize: vertical; }

.pflicht { color: var(--rot); }

.zustimmung { display: flex; gap: .7rem; align-items: flex-start; font-size: .94rem; }
.zustimmung input { width: 20px; height: 20px; flex: none; margin-top: .2rem; accent-color: var(--gruen); }

.honigtopf { position: absolute; left: -9999px; opacity: 0; height: 0; }

.meldung { padding: 1rem 1.2rem; border-radius: var(--radius); font-size: .95rem; display: none; }
.meldung.sichtbar { display: block; }
.meldung.erfolg { background: #E4F1E8; border: 1px solid #A9CDB6; color: #1D5730; }
.meldung.fehler { background: #FBE7E6; border: 1px solid #E3AFAC; color: #8E211D; }
.meldung.info   { background: #FBF1D9; border: 1px solid #E5CE91; color: #6E5310; }

/* --------------------------------------------------------- Kalender -- */

.kalender-kopf {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap;
}
.kalender-nav { display: flex; gap: .5rem; }
.kalender-nav button {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--linie); background: var(--weiss);
  font-size: 1.1rem; cursor: pointer; color: var(--gruen-dunkel); line-height: 1;
}
.kalender-nav button:hover { background: var(--creme-tief); }
.kalender-nav button[disabled] { opacity: .35; cursor: not-allowed; }

.legende { display: flex; gap: 1.3rem; flex-wrap: wrap; font-size: .88rem; color: var(--text-leise); }
.legende span { display: inline-flex; align-items: center; gap: .45rem; }
.legende i { width: 15px; height: 15px; border-radius: 4px; display: inline-block; border: 1px solid rgba(0,0,0,.08); }
.legende i.frei     { background: var(--weiss); border-color: #CFC7B4; }
.legende i.belegt   { background: #E7CFCE; border-color: #C99C99; }
.legende i.gewaehlt { background: var(--gruen); }

.monate { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 2rem; }

.monat h3 { text-align: center; font-size: 1.15rem; margin-bottom: .7rem; }
.monat table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.monat th {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-leise); font-weight: 600; padding-bottom: .4rem;
}
.monat td { padding: 2px; text-align: center; }

.tag {
  width: 100%; aspect-ratio: 1; border: 1px solid transparent; border-radius: 8px;
  background: var(--weiss); font: inherit; font-size: .92rem; color: var(--text);
  cursor: pointer; display: grid; place-items: center;
  border-color: #E3DBCA;
}
.tag:hover:not([disabled]) { border-color: var(--gruen-hell); background: var(--creme-tief); }
.tag.leer { background: none; border-color: transparent; cursor: default; }
.tag.vergangen { color: #B7B2A5; background: #F4F1E8; border-color: transparent; cursor: not-allowed; }
.tag.belegt {
  background: #E7CFCE; border-color: #C99C99; color: #8E211D;
  cursor: not-allowed; text-decoration: line-through;
}
.tag.gewaehlt { background: var(--gruen); border-color: var(--gruen); color: #fff; font-weight: 700; }
.tag.spanne   { background: #CFE0D6; border-color: #A9C6B6; color: var(--gruen-dunkel); }
.tag.heute    { box-shadow: inset 0 0 0 2px var(--gold); }

.auswahl-anzeige {
  background: var(--creme-tief); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: .9rem 1.1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .95rem;
}
.auswahl-anzeige b { color: var(--gruen-dunkel); }
.auswahl-anzeige button {
  background: none; border: 0; color: var(--rot); cursor: pointer;
  font: inherit; font-size: .9rem; text-decoration: underline;
}

/* Terminliste */
.termine { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.termin {
  display: grid; grid-template-columns: 82px 1fr; gap: 1.2rem; align-items: center;
  background: var(--weiss); border: 1px solid var(--linie);
  border-radius: var(--radius-gr); padding: 1.1rem 1.3rem;
}
.termin-datum {
  text-align: center; background: var(--creme-tief); border-radius: var(--radius);
  padding: .5rem; line-height: 1.15;
}
.termin-datum b { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--rot); }
.termin-datum span { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-leise); }
.termin h3 { font-size: 1.1rem; margin-bottom: .15rem; }
.termin p { margin: 0; font-size: .92rem; color: var(--text-leise); }

/* ------------------------------------------------------------- Galerie -- */

.galerie { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.galerie img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* Info-/Datenliste */
.datenliste { margin: 0; }
.datenliste div { display: grid; grid-template-columns: 190px 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--linie); }
.datenliste dt { font-weight: 600; color: var(--gruen-dunkel); }
.datenliste dd { margin: 0; }
@media (max-width: 600px) { .datenliste div { grid-template-columns: 1fr; gap: .1rem; } }

/* Hinweiskasten */
.kasten {
  background: var(--weiss); border: 1px solid var(--linie);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 1.2rem 1.4rem;
}
.kasten p:last-child { margin-bottom: 0; }
.kasten.gruen-rand { border-left-color: var(--gruen-hell); }

/* Aufklappbare Abschnitte */
details.falter {
  background: var(--weiss); border: 1px solid var(--linie);
  border-radius: var(--radius); padding: 0; margin-bottom: .8rem;
}
details.falter > summary {
  cursor: pointer; padding: 1rem 1.3rem; font-weight: 600; color: var(--gruen-dunkel);
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
details.falter > summary::-webkit-details-marker { display: none; }
details.falter > summary::after { content: "+"; font-size: 1.3rem; color: var(--gold); line-height: 1; }
details.falter[open] > summary::after { content: "−"; }
details.falter > div { padding: 0 1.3rem 1.2rem; }

/* --------------------------------------------------------------- Fuß -- */

.fuss { background: var(--gruen-dunkel); color: #C9CFC7; padding: 3.5rem 0 1.5rem; font-size: .93rem; }
.fuss h4 { color: var(--weiss); font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: .09em; margin-bottom: .9rem; }
.fuss a { color: #C9CFC7; text-decoration: none; }
.fuss a:hover { color: var(--gold); text-decoration: underline; }
.fuss ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.fuss-raster { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 860px) { .fuss-raster { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 480px) { .fuss-raster { grid-template-columns: 1fr; } }
.fuss-marke { display: flex; gap: .8rem; align-items: center; margin-bottom: 1rem; }
.fuss-marke img { width: 52px; height: 52px; }
.fuss-marke b { color: var(--weiss); font-family: var(--serif); font-size: 1.2rem; }
.fuss-unten {
  margin-top: 2.5rem; padding-top: 1.3rem; border-top: 1px solid rgba(255,255,255,.13);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: #9AA69C;
}

/* ------------------------------------------------------- Mobil / Print -- */

@media (max-width: 980px) {
  .menue-schalter { display: inline-flex; }
  .navigation {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--creme); border-bottom: 1px solid var(--linie);
    padding: .8rem 1.25rem 1.4rem; display: none;
    max-height: calc(100vh - 78px); overflow-y: auto;
    box-shadow: var(--schatten);
  }
  .navigation.offen { display: block; }
  .navigation ul { flex-direction: column; gap: .1rem; }
  .navigation li ul {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: none; padding: .1rem 0 .4rem 1rem;
    border-left: 2px solid var(--linie); margin-left: .8rem;
  }
  .navigation a { padding: .65rem .7rem; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .abschnitt { padding: 3rem 0; }
  .hero-innen { padding: 4rem 0 3.5rem; }
  .marke-name { font-size: 1.15rem; }
  .marke img { width: 44px; height: 44px; }
  .termin { grid-template-columns: 66px 1fr; gap: .9rem; padding: .9rem 1rem; }
}

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

@media print {
  .kopf, .fuss, .knopf, .kalender-nav { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .abschnitt { padding: 1rem 0; }
}
