/* ==========================================================
   Badesee Immelborn – gemeinsames Stylesheet
   Wird von index.html, impressum.html, datenschutz.html (und
   später wetter.html) eingebunden.
   ========================================================== */

:root {
  --primary: #1b3a28;        /* dunkles Waldgrün */
  --primary-dark: #2e5a3a;   /* helleres Grün für Hover */
  --bg-light: #f8f9fa;
  --text-dark: #222;
  --text-light: #fff;
  --focus-outline: 3px solid #ffd43b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: Arial, sans-serif;
  color: var(--text-dark);
  background-color: #fff;
  line-height: 1.6;
}

/* Unterseiten: Footer immer am unteren Rand */
body.seite {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
body.seite main { flex: 1; padding-top: 6rem; }

a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 3px;
}

/* Sprunglink für Tastatur- und Screenreader-Nutzer */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: #ffd43b;
  color: #000;
  padding: 0.5rem 1rem;
  z-index: 4000;
}
.skip-link:focus { left: 0; }

/* ==========================================
   NAVIGATION
   ========================================== */

nav {
  background: var(--primary);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  z-index: 1000;
}

.logo a {
  color: var(--text-light);
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-light);
  font-weight: 500;
  text-decoration: none;
  padding: 0.25rem 0;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

/* Mobiles Menü (der Breakpoint ist etwas höher als vorher,
   weil die Menüleiste sonst auf schmalen Desktop-Fenstern umbricht) */
@media (max-width: 960px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--primary-dark);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    text-align: center;
  }
  .nav-links.active { display: flex; }
  .menu-toggle { display: block; }
}

/* ==========================================
   HINWEISBANNER (Startseite)
   ========================================== */

.hinweis-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff3cd;
  color: #664d03;
  border-bottom: 3px solid #ffc107;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 900;
  transform: translateY(-110%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.hinweis-banner.aktiv {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.hinweis-inhalt {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.hinweis-text { flex: 1; }

.hinweis-text h2 {
  color: #664d03;
  font-size: 1.25rem;
  margin: 0 0 0.3rem 0;
  text-align: left;
}

.hinweis-text p {
  margin: 0;
  text-align: left;
  white-space: pre-line; /* Zeilenumbrüche aus hinweis.txt bleiben erhalten */
}

.hinweis-button {
  flex-shrink: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.3s;
}
.hinweis-button:hover { background: var(--primary-dark); }

@media (max-width: 960px) {
  .hinweis-inhalt {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 0.8rem;
    padding: 1rem;
  }
  .hinweis-text h2 { text-align: center; font-size: 1.15rem; }
  .hinweis-text p { text-align: center; font-size: 0.95rem; }
  .hinweis-button { width: 100%; }
}

/* ==========================================
   HERO
   ========================================== */

header.hero {
  background: url('./img/KG7.jpeg') center/cover no-repeat;
  color: var(--text-light);
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
}

header.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hero-content {
  text-align: center;
  z-index: 2;
  position: relative;
  padding: 0 1rem;
  margin-top: 8rem;
  margin-bottom: 5rem;
}

.hero-content h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero-content p { margin-bottom: 2rem; font-size: 1.1rem; }

.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: 0.7; cursor: progress; }

/* Auf dem dunklen Hero-Bild braucht der Button einen hellen Rand */
.hero .btn { border: 2px solid rgba(255, 255, 255, 0.85); }

/* ==========================================
   INHALT
   ========================================== */

main { background-color: #fff; }

section { padding: 4rem 5%; }
.bg-light { background: var(--bg-light); }

section p { text-align: center; }
h3 { text-align: center; }

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--primary);
}

.container { max-width: 1100px; margin: 0 auto; }

.grid { display: grid; gap: 2rem; align-items: center; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

img.rounded { border-radius: 10px; width: 100%; height: auto; }

/* Listen mit Emojis (Angebote, Ausflugsziele) */
.liste { list-style: none; text-align: center; }
.liste li { margin-bottom: 0.6rem; }
.liste-abstand { margin-top: 1rem; }

/* Langer Fließtext: linksbündig und mit begrenzter Zeilenlänge */
.fliesstext {
  max-width: 70ch;
  margin: 0 auto 1rem;
  text-align: left;
}
section p.fliesstext { text-align: left; }

/* Preislisten */
.preis-block { margin-bottom: 2rem; }
.preis-block h3 { margin-bottom: 0.75rem; }

.preisliste { max-width: 440px; margin: 0 auto; }
.preisliste > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #ddd;
}
.preisliste dd { font-weight: bold; white-space: nowrap; }
.preisliste dt small { display: block; font-weight: normal; }

.preis-hinweis {
  max-width: 440px;
  margin: 0.75rem auto 0;
  font-size: 0.9rem;
  text-align: left;
}
section p.preis-hinweis { text-align: left; }

/* ==========================================
   GALERIE
   ========================================== */

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

.gallery-item {
  display: block;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
}

.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s;
}
.gallery-item:hover img { transform: scale(1.05); }

/* ==========================================
   LIGHTBOX
   ========================================== */

.lightbox[hidden] { display: none !important; }

.lightbox {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.lightbox img {
  max-width: 80%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem 1rem;
}
.lightbox-close { top: 15px; right: 20px; font-size: 2.2rem; }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 3rem; }
.lightbox-nav.prev { left: 10px; }
.lightbox-nav.next { right: 10px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================
   KARTE
   ========================================== */

#map {
  height: 400px;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Platzhalter, solange die Karte nicht geladen wurde */
#map.platzhalter {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem;
  background: var(--bg-light);
  text-align: center;
}
#map.platzhalter p { font-size: 0.95rem; max-width: 40ch; }

/* ==========================================
   WETTER
   ========================================== */

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  justify-items: center;
}

.weather-card {
  background: var(--bg-light);
  padding: 2rem 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 100%;
  max-width: 250px;
}
.weather-card h2,
.weather-card h3 { margin-bottom: 1rem; color: var(--primary); font-size: 1.2rem; }
.weather-card p { font-size: 2rem; margin: 0; }
.weather-card small { display: block; margin-top: 0.4rem; }

.wetter-status { margin-top: 2rem; }
.wetter-hinweis { margin-top: 0.5rem; font-size: 0.9rem; }

/* ==========================================
   RECHTSTEXTE (Impressum, Datenschutz)
   ========================================== */

.legal { max-width: 900px; margin: 0 auto; }

.legal h1 {
  font-size: 2rem;
  color: var(--primary);
  text-align: center;
  margin-bottom: 1.5rem;
}
.legal h2 {
  font-size: 1.5rem;
  text-align: left;
  margin: 2.5rem 0 0.75rem;
}
.legal h3 { font-size: 1.2rem; text-align: left; margin: 1.5rem 0 0.5rem; color: var(--primary); }
.legal h4 { font-size: 1.05rem; margin: 1rem 0 0.4rem; }
.legal p,
.legal ul { margin-bottom: 0.9rem; text-align: left; }
.legal ul { padding-left: 1.5rem; }
.legal p, .legal li { overflow-wrap: anywhere; }

/* ==========================================
   FOOTER
   ========================================== */

footer {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 2rem 5%;
  font-size: 0.9rem;
}
footer a { color: #fff; }

/* ==========================================
   BEWEGUNG REDUZIEREN
   ========================================== */

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