/* ============================================================
   BM-Wahl Gechingen – Stylesheet v5
   Schriftart: Work Sans (Google Fonts)
   Analytics:  IONOS WebAnalytics (serverseitig, kein JS nötig)
   ============================================================ */

/* Farb- und Maß-Variablen */
:root {
  --dark-blue:      #1C3A6B;
  --orange:         #F5821F;
  --max-width:      1200px;
  --nav-height:     60px;
  --footer-height:  40px;
  --card-bg:        #F2F2F2;
  --card-border:    #606060;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Body – weiß außerhalb des 1200px-Containers */
body {
  font-family: 'Work Sans', sans-serif;
  background: #ffffff;
  color: #000000;
}

/* Zentrierter Seitencontainer, max. 1200px */
.page-outer {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

/* ============================================================
   NAVIGATIONSLEISTE
   ============================================================ */
.navbar {
  background: var(--dark-blue);
  height: var(--nav-height);
  border-bottom: 2px solid #ffffff;   /* Weiße Trennlinie, 2px */
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-shrink: 0;
}

/* Innencontainer: Brand links, Menü rechts */
.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: relative;   /* Anker für das mobile Dropdown */
}

/* Logo + Titelbereich links */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo {
  height: 44px;
  width: auto;
  border-radius: 3px;
}

.nav-title {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

/* Zeile 1: Name, 19px, weiß, medium bold */
.nav-title-line1 {
  font-size: 19px;
  color: #ffffff;
  font-weight: 500;
}

/* Zeile 2: Motto, 13px, orange, medium bold */
.nav-title-line2 {
  font-size: 13px;
  color: var(--orange);
  font-weight: 500;
}

/* Desktop-Menü rechts */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 2px;
  align-items: center;
}

.nav-menu li a {
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 4px;
  transition: color 0.2s;
  white-space: nowrap;
}

/* Hover und aktive Seite → orange */
.nav-menu li a:hover,
.nav-menu li a.active {
  color: var(--orange);
}

/* Hamburger-Button (nur auf schmalen Screens) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.3s;
}

/* Kreuz-Animation des Hamburger-Buttons im offenen Zustand */
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobiles Dropdown (Breite = breitester Eintrag) */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--dark-blue);
  list-style: none;
  z-index: 999;
  border-top: 2px solid #ffffff;
  min-width: max-content;
}

.nav-dropdown.open { display: block; }

.nav-dropdown li a {
  display: block;
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 24px;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: color 0.2s;
}

.nav-dropdown li a:hover,
.nav-dropdown li a.active {
  color: var(--orange);
}

/* ============================================================
   BILDERKARUSSELL
   ============================================================ */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.carousel-slide {
  min-width: 100%;
  position: relative;
  flex-shrink: 0;
}

/* Karussell-Bilder: feste Höhe, Seitenverhältnis durch object-fit */
.carousel-slide img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

/* Textoverlay: dunkelblaues Kästchen unten links, 20px Abstand */
.carousel-caption {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: var(--dark-blue);
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  padding: 10px 16px;
  max-width: calc(100% - 40px);
  line-height: 1.4;
}

/* Karussell-Navigationstasten */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(28, 58, 107, 0.65);
  color: #ffffff;
  border: none;
  cursor: pointer;
  font-size: 22px;
  padding: 14px 16px;
  z-index: 10;
  transition: background 0.2s;
  line-height: 1;
  user-select: none;
}

.carousel-btn:hover { background: rgba(28, 58, 107, 0.92); }
.carousel-btn.prev  { left: 0; }
.carousel-btn.next  { right: 0; }

/* Navigationspunkte */
.carousel-dots {
  position: absolute;
  bottom: 10px;
  right: 16px;
  display: flex;
  gap: 7px;
}

.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.carousel-dot.active { background: #ffffff; }

/* ============================================================
   INHALTSBEREICH
   ============================================================ */
.content-area {
  flex: 1;
  padding: 40px 30px 48px;
}

/* Über-Überschrift: 16px, orange, normal */
.ueber-ueberschrift {
  font-size: 16px;
  color: var(--orange);
  font-weight: 400;
  margin-bottom: 8px;
}

/* Überschrift: 24px, Semi-Bold */
.ueberschrift {
  font-size: 24px;
  font-weight: 600;
  color: #000000;
  margin-bottom: 20px;
}

/* Fließtext: 16px, schwarz, normal */
.content-text {
  font-size: 16px;
  color: #000000;
  font-weight: 400;
  line-height: 1.75;
}

.content-text p        { margin-bottom: 1em; }
.content-text p:last-child { margin-bottom: 0; }

/* Aufzählungslisten im Inhaltstext */
.content-text ul {
  margin: 0 0 1em 0;
  padding-left: 0;
  list-style: none;
}

.content-text ul li {
  padding: 3px 0 3px 20px;
  position: relative;
}

.content-text ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 600;
}

/* Gruppe von Listeneinträgen: visueller Abstand */
.content-text ul + ul { margin-top: 12px; }

/* Unterabschnitt-Überschriften (z.B. "Kindergärten und Schulen:") */
.content-text .section-head {
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.3em;
}

/* Unterschrift-Block auf der Startseite */
.signature-block {
  display: inline-block;
  margin-top: 8px;
  text-align: left;
}

.signature-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 280px;
}

.signature-name {
  font-size: 16px;
  font-weight: 400;
  color: #000000;
  white-space: nowrap;
}

/* ============================================================
   BEITRÄGE (Neuigkeiten-Posts)
   Immer volle Seitenbreite, Datum oben links, dann Bild+Text
   ============================================================ */
.beitraege {
  margin-top: 36px;
}

/* Beiträge werden vertikal gestapelt (immer eine Spalte) */
.beitraege-grid {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Einzelnes Beitrags-Kästchen */
.beitrag {
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--card-bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;   /* Datum oben, darunter Bild+Text */
}

/* Datumszeile im oberen linken Eck, oberhalb von Text und Bildern */
.beitrag-datum {
  padding: 10px 20px 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--dark-blue);
  border-bottom: 1px solid rgba(96, 96, 96, 0.25);
  background: rgba(28, 58, 107, 0.06);
}

/* Inhalt des Beitrags: Bilder + Text nebeneinander */
.beitrag-body {
  display: flex;
  flex: 1;
}

/* Bild links wenn Bilder in der Spec zuerst genannt */
.beitrag.image-left  .beitrag-body { flex-direction: row; }

/* Bild rechts wenn Text in der Spec zuerst genannt */
.beitrag.image-right .beitrag-body { flex-direction: row-reverse; }

/* Bildspalte: 30% der Seitenbreite, Bilder vertikal gestapelt */
.beitrag-images {
  flex: 0 0 30%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-self: flex-start;   /* Höhe durch Bilder bestimmt, nicht gereckt */
}

/* Einzelner Bild-Container */
.beitrag-image-wrapper {
  position: relative;
}

.beitrag-image-wrapper img {
  width: 100%;
  height: auto;             /* Seitenverhältnis beibehalten */
  display: block;
}

/* Bildtitel-Overlay: grau, mittig, 20px vom unteren Rand */
.beitrag-image-title {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(110, 110, 110, 0.88);
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  padding: 6px 14px;
  max-width: calc(100% - 20px);
  text-align: center;
  border-radius: 2px;
  white-space: nowrap;
}

/* Textspalte des Beitrags */
.beitrag-text {
  padding: 20px 24px;
  flex: 1;
  font-size: 16px;
  color: #000000;
  font-weight: 400;
  line-height: 1.75;
}

.beitrag-text p              { margin-bottom: 1em; }
.beitrag-text p:last-child   { margin-bottom: 0; }

/* ============================================================
   KONTAKT-SEITE: Buttons
   ============================================================ */
.contact-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 28px;
  min-width: 300px;
  max-width: 420px;
  width: 100%;
  color: #000000;
  font-size: 16px;
  font-weight: 500;
  font-family: 'Work Sans', sans-serif;
  transition: background 0.2s, box-shadow 0.2s;
}

.contact-btn:hover {
  background: #e4e4e4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.contact-btn img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ============================================================
   IMPRESSUM / DATENSCHUTZ: Inhaltsstruktur
   ============================================================ */
.legal-content {
  font-size: 16px;
  line-height: 1.75;
  color: #000000;
}

.legal-content h2 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 10px;
}

.legal-content p,
.legal-content address {
  margin-bottom: 10px;
  font-style: normal;
}

.legal-content ul {
  margin: 8px 0 10px 20px;
}

.legal-content a { color: var(--dark-blue); }

/* ============================================================
   FUSSLEISTE: 40px, dunkelblaues Farbton wie Navbar
   ============================================================ */
.footer {
  background: var(--dark-blue);
  min-height: var(--footer-height);
  flex-shrink: 0;
}

.footer-container {
  min-height: var(--footer-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-wrap: wrap;
  gap: 4px;
}

/* Copyright-Text linksbündig */
.footer-copyright {
  color: #ffffff;
  font-size: 13px;
  font-weight: 400;
}

/* Impressum + Datenschutz rechtsbündig */
.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: #ffffff;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 960px) {
  .nav-menu li a { font-size: 14px; padding: 8px 7px; }
}

@media (max-width: 768px) {
  /* Hamburger-Menü einblenden */
  .nav-menu   { display: none; }
  .nav-toggle { display: flex; }

  .carousel-slide img { height: 260px; }
  .carousel-caption   { font-size: 14px; padding: 8px 12px; }

  .content-area { padding: 24px 16px 36px; }

  /* Beitrag: Bild über Text (statt nebeneinander) */
  .beitrag-body              { flex-direction: column !important; }
  .beitrag-images            { flex: none; width: 100%; }
  .beitrag-image-wrapper img { max-height: 300px; object-fit: cover; }

  .contact-btn { min-width: 0; }

  .footer-container { padding: 8px 14px; }
}

@media (max-width: 480px) {
  .nav-title-line1 { font-size: 15px; }
  .nav-title-line2 { font-size: 11px; }
  .nav-logo        { height: 36px; }

  .carousel-slide img { height: 200px; }
  .ueberschrift       { font-size: 20px; }

  .signature-img { max-width: 200px; }
}
