/* Modernisierungs-Schicht: Typographie & Layout (lädt NACH design.css und überschreibt gezielt) */
@import url(https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap);

/* ---------- Grund-Typographie ---------- */
body {
  font-size: 17px;
  line-height: 1.7;
  color: #2e2e2e;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Merriweather', Georgia, serif;
  color: #1f2a18;
  line-height: 1.3;
  margin-top: 1.6em;
  margin-bottom: 0.5em;
}

h1 { font-size: clamp(1.7em, 4vw, 2.2em); }
h2 { font-size: clamp(1.3em, 3vw, 1.6em); }
h3 { font-size: 1.2em; }

/* grüner Akzentstrich unter der Hauptüberschrift */
#content h1:first-of-type {
  margin-top: 0.8em;
  padding-bottom: 0.35em;
  position: relative;
}
#content h1:first-of-type::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: #6da22a;
}

/* alte <font>-Tags neutralisieren */
#content font {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---------- Inhaltsbereich ---------- */
#content {
  max-width: 960px;
  padding-top: 30px;
  padding-bottom: 30px;
  min-height: 40vh;
}

#content p { margin: 0 0 1em; }

#content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Links: durchgehend grün statt altem Blau/Lila, ohne Farb-Animationen */
#content a,
#content a:visited {
  color: #557f20;
  text-decoration: underline;
  text-decoration-color: rgba(109, 162, 42, 0.35);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
#content a:hover {
  animation: none;
  color: #6da22a;
  text-decoration-color: #6da22a;
}

/* Bibelzitat / address-Blöcke als ruhiges Zitat-Element */
#content address {
  font-family: 'Merriweather', Georgia, serif;
  font-style: italic;
  color: #55603f;
  border-left: 4px solid #6da22a;
  border-radius: 0 8px 8px 0;
  background: #f7faf2;
  padding: 14px 20px;
  margin: 20px 0;
}

/* alte Inline-Grauboxen (Pfarrblatt, Nachberichte …) weich einfärben */
#content div[style*="rgba(0,0,0,0.1)"],
#content span[style*="rgba(0,0,0,0.1)"] {
  display: block;
  background: #f7faf2 !important;
  border: 1px solid #e4ecd6;
  border-radius: 10px;
  padding: 16px 20px !important;
  margin-bottom: 24px;
}
#content span[style*="float:right"][style*="rgba(0,0,0,0.1)"] {
  max-width: 340px;
  margin-left: 20px !important;
}

hr {
  border: none;
  border-top: 1px solid #e6e6e6;
  margin: 18px 0;
}

/* ---------- Navigation ---------- */
#navigation {
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.07);
}

a.nav {
  font-size: 1.05em;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}
a.nav:hover {
  animation: none;
  color: #6da22a;
}

/* Subnav: helle Karte statt schwarzem Kasten */
ul.subnav {
  background: #ffffff;
  background-image: none;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
  border: 1px solid #eee;
  padding: 8px 0;
  width: 230px;
}
ul.subnav > li { line-height: 1.4; }
a.subnav {
  display: block;
  color: #333;
  padding: 9px 18px;
  transition: background 0.15s ease, color 0.15s ease;
}
a.subnav:hover {
  animation: none;
  background: #f2f6ec;
  color: #557f20;
}

/* ---------- Presse ---------- */
/* Jahrgangs-Kacheln in der Übersicht */
div.presse_flex {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: auto;
  min-width: 130px;
  margin: 0 14px 14px 0;
  padding: 14px 22px;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
div.presse_flex:hover {
  background: #fafcf7;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
div.presse_flex img {
  float: none !important;
  width: 34px;
  height: auto;
  border-radius: 0;
}
div.presse_flex a { text-decoration: none; }

/* Datei-Zeilen im Jahrgang */
div.presse_flex_table {
  display: flex;
  align-items: center;
  width: auto;
  height: auto;
  margin: 0 0 10px 0;
  padding: 12px 16px;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.2s ease, background 0.2s ease;
  word-break: break-word;
}
div.presse_flex_table:hover {
  background: #fafcf7;
  border-color: #cfe0b8;
}
div.presse_flex_table a {
  display: flex;
  align-items: center;
  text-decoration: none;
  width: 100%;
}
div.presse_flex_table img {
  float: none !important;
  border-radius: 0;
  flex-shrink: 0;
}

/* ---------- Footer ---------- */
#footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 90%;
  max-width: 960px;
  margin: 40px auto 0;
  border-top: 1px solid #ececec;
  padding: 22px 0 26px;
  height: auto;
  line-height: 1.6;
  color: #888;
  font-size: 0.92em;
  text-align: left;
}
#footer a,
#footer a:visited {
  color: #666;
  text-decoration: none;
  transition: color 0.2s ease;
}
#footer a:hover {
  animation: none;
  color: #6da22a;
}
#footer .footer-logo {
  display: inline-flex;
  align-items: center;
  opacity: 0.75;
  transition: opacity 0.2s ease;
}
#footer .footer-logo:hover { opacity: 1; }
#footer img.footer_krug { height: 22px; }

/* ---------- Bildkarten in Inhaltsseiten (z.B. Biographie) ---------- */
.bio-bilder {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
  margin: 26px 0 30px;
}
/* ab Tablet-Breite: immer zwei Spalten nebeneinander */
@media (min-width: 700px) {
  .bio-bilder {
    grid-template-columns: 1fr 1fr;
  }
}
.bio-bilder.bio-einzeln {
  grid-template-columns: minmax(0, 440px) !important;
  justify-content: start;
}
.bio-bilder figure {
  margin: 0;
  background: #f7faf2;
  border: 1px solid #e4ecd6;
  border-radius: 10px;
  padding: 12px;
}
.bio-bilder img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
.bio-bilder figcaption {
  text-align: center;
  color: #6b7660;
  font-size: 0.9em;
  padding-top: 10px;
}

/* ---------- Spruch des Tages (Ersatz für das alte zitante-Widget) ---------- */
aside.spruch-box {
  position: relative;
  background: linear-gradient(135deg, #f7faf2 0%, #edf4e1 100%);
  border: 1px solid #e4ecd6;
  border-left: 4px solid #6da22a;
  border-radius: 12px;
  padding: 24px 32px 18px 92px;
  margin: 34px 0 14px;
  overflow: hidden;
}
/* großes dekoratives Anführungszeichen */
aside.spruch-box::before {
  content: "\201C";
  position: absolute;
  top: -14px;
  left: 18px;
  font-family: 'Merriweather', Georgia, serif;
  font-size: 110px;
  line-height: 1;
  color: rgba(109, 162, 42, 0.25);
  pointer-events: none;
}
.spruch-kopf {
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  font-size: 0.78em;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6da22a;
  margin-bottom: 10px;
}
blockquote.spruch-text,
.spruch-text {
  font-family: 'Merriweather', Georgia, serif;
  font-style: italic;
  font-size: 1.08em;
  line-height: 1.75;
  color: #3c4433;
  margin: 0;
  padding: 0;
  text-align: left;
}
.spruch-text strong { font-weight: 700; }
.spruch-text a,
.spruch-text a:visited {
  font-style: normal;
  color: #557f20;
  text-decoration: none;
  font-weight: 600;
}
.spruch-text a:hover { color: #6da22a; animation: none; }
.spruch-quelle {
  margin-top: 12px;
  font-size: 0.8em;
  text-align: right;
}
.spruch-quelle a,
.spruch-quelle a:visited {
  color: #9aa58c !important;
  text-decoration: none;
}
.spruch-quelle a:hover { color: #6da22a !important; animation: none; }
@media (max-width: 700px) {
  aside.spruch-box {
    padding: 20px 20px 14px 24px;
    margin: 24px 0 10px;
  }
  aside.spruch-box::before { display: none; }
  blockquote.spruch-text, .spruch-text { font-size: 1em; }
}

/* ---------- Kalenderblatt auf der WoKru-Seite (1999er-Skript, neu eingekleidet) ---------- */
.kalender-box {
  float: right;
  margin: 6px 0 30px 30px;
}
.kalender-box table {
  background: #fff !important;
  border: 1px solid #e4ecd6;
  border-radius: 12px;
  border-spacing: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  width: 210px !important;
}
.kalender-box td {
  background: #fff;
  padding: 0 10px;
}
/* Abriss-Perforation oben */
.kalender-box hr.borde {
  border: none;
  border-top: 3px dashed #d9e4c8;
  height: 0;
  width: 90%;
  margin: 12px auto 8px;
}
.kalender-box span.Wochentaganzeige {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.78em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6da22a;
}
.kalender-box span.Taganzeige {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 56px;
  font-weight: 700;
  color: #2e3a22;
  line-height: 1.15;
}
.kalender-box p.Infoanzeige {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.78em;
  text-align: center;
  color: #55603f;
  background: #f7faf2;
  border: 1px solid #e9f1dc;
  border-radius: 6px;
  padding: 5px 8px;
  margin: 0 0 6px;
  line-height: 1.4;
}
.kalender-box tr:last-child td { padding-bottom: 10px; }
@media (max-width: 700px) {
  .kalender-box {
    float: none;
    margin: 20px auto;
    display: table;
  }
}

/* ---------- Diakon-Seite ---------- */
.diakon-intro {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin: 24px 0 10px;
}
.diakon-intro figure {
  flex: 0 0 230px;
  margin: 0;
  background: #f7faf2;
  border: 1px solid #e4ecd6;
  border-radius: 10px;
  padding: 10px;
}
.diakon-intro img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
.diakon-intro p { margin-top: 6px; }
@media (max-width: 700px) {
  .diakon-intro { flex-direction: column; }
  .diakon-intro figure { flex: none; max-width: 280px; }
}

/* Link-Sammlungen (Nach-/Vorberichte) als Karte */
.link-kasten {
  background: #f7faf2;
  border: 1px solid #e4ecd6;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 18px 0 26px;
}
.link-kasten .kasten-titel {
  font-weight: 700;
  color: #3c4433;
  margin-bottom: 8px;
}
.link-kasten a,
.link-kasten a:visited {
  display: block;
  padding: 5px 0;
  color: #557f20;
  text-decoration: none;
  border-bottom: 1px solid #eaf1de;
}
.link-kasten a:last-child { border-bottom: none; }
.link-kasten a:hover {
  animation: none;
  color: #6da22a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* grüner Button-Link (z.B. zur Bildergalerie) */
a.gruen-button,
a.gruen-button:visited {
  display: inline-block;
  background: #6da22a;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  transition: background 0.2s ease;
}
a.gruen-button:hover {
  background: #557f20;
  animation: none;
}

/* ---------- Galerie-Feinschliff ---------- */
a.zurueck-link,
a.zurueck-link:visited {
  color: #557f20;
  text-decoration: none;
}

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  body { font-size: 16px; }
  ul.subnav {
    box-shadow: none;
    border: none;
    border-radius: 0;
    width: calc(100% - 50px);
    background: none;
  }
  a.subnav { color: #333; padding: 8px 0; }
  #content span[style*="float:right"][style*="rgba(0,0,0,0.1)"] {
    float: none !important;
    max-width: none;
    margin-left: 0 !important;
  }
}

/* Diakon-Bild rechts: Position kommt jetzt aus dem CSS statt inline (base.html.twig) */
#diakon_badge {
  top: 227px;
}

/* ---------- Hero-Header auf der Startseite ---------- */
/* Nur Desktop: mobil (<=900px) blendet design.css die Slideshow ohnehin aus. */
@media (min-width: 901px) {
  body.home {
    --hero-h: max(70vh, 480px);
  }
  body.home #header,
  body.home #image_show {
    height: var(--hero-h);
  }
  body.home #image_show .slide {
    height: 100%;
  }
  body.home #image_show img.header {
    height: 100%;
    object-fit: cover;
    object-position: top center;
  }
  /* WoKru-Schriftzug bleibt an der Unterkante des Heros */
  body.home img.header_wokru {
    top: calc(var(--hero-h) - 110px);
  }
  /* Diakon-Bild rechts rutscht mit: gleicher Abstand zur Hero-Unterkante wie vorher (450px - 227px) */
  body.home #diakon_badge {
    top: calc(var(--hero-h) - 223px);
  }
}
