/* ============================================
   GS-HAAG.DE – Haupt-Stylesheet
   Responsive Layout: Desktop + Mobil
   ============================================ */

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

:root {
  --farbe-blau:       #1a5276;
  --farbe-blau-hell:  #2e86c1;
  --farbe-bg:         #ffffff;
  --farbe-nav-bg:     #F5FAFF;
  --farbe-nav-border: #c0cfe8;
  --nav-breite:       150px;
  --header-hoehe:     95px;
}

body {
  font-family: "Comic Sans MS", "Chalkboard SE", Verdana, sans-serif;
  font-size: 16px;
  color: #000077;
  background-color: var(--farbe-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: var(--farbe-blau) url('/images/_top_bg.gif') repeat;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-hoehe);
  padding: 0 12px 0 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-start;
}

.header-logo-link {
  display: block;
  flex-shrink: 0;
}

.header-logo {
  height: 95px;
  width: auto;
  display: block;
}

.header-banner {
  height: 94px;
  width: auto;
  display: block;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: auto;
}

.desktop-only { display: block; }
.mobil-only   { display: none; }

.nur-desktop { display: block; }
.nur-mobil   { display: none; }

/* Als inline verwenden wenn nur-desktop/nur-mobil innerhalb von Text steht */
span.nur-desktop { display: inline; }
span.nur-mobil   { display: none; }

/* Burger-Button – auf Desktop versteckt */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 36px;
  height: 26px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
  margin-left: 12px;
}

.burger-btn span {
  display: block;
  height: 3px;
  width: 100%;
  background: #000077;
  border-radius: 3px;
  transition: all 0.3s;
}

.burger-btn.aktiv span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger-btn.aktiv span:nth-child(2) { opacity: 0; }
.burger-btn.aktiv span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================
   LAYOUT
   ============================================ */
.seite-container {
  display: flex;
  flex: 1;
  align-items: stretch;
}

/* ============================================
   NAVIGATION
   ============================================ */
.seitennavigation {
  width: var(--nav-breite);
  min-width: var(--nav-breite);
  background: var(--farbe-nav-bg);
  min-height: 100%;
  padding: 8px 0;
  align-self: stretch;
  box-shadow: 2px 0 6px rgba(0,0,0,0.15);
  clip-path: inset(0 -10px 0 0);
}

.seitennavigation ul {
  list-style: none;
}

/* Haupteinträge (Level 1) */
.nav-level1 {
  list-style: none;
}

.nav-level1 > li > a {
  display: block;
  width: 100%;
  padding: 7px 10px;
  color: #0000FF;
  text-decoration: none;
  font-size: 16px;
  line-height: 20px;
  font-weight: normal;
  transition: background 0.15s, color 0.15s;
}

.nav-level1 > li > a:hover {
  background: var(--farbe-blau-hell);
  color: white;
}

/* Untereinträge (Level 2) */
.nav-level2 {
  list-style: none;
  background: var(--farbe-nav-bg);
}

.nav-level2 > li > a {
  display: block;
  padding: 5px 10px 5px 22px;
  color: #0000FF;
  text-decoration: none;
  font-size: 14px;
  line-height: 18px;
  transition: background 0.15s, color 0.15s;
}

.nav-level2 > li > a:hover {
  background: var(--farbe-blau-hell);
  color: white;
}

/* Login-Status Block im Menü */
.nav-login-block {
  padding: 10px 10px;
  margin-top: 8px;
  margin-left: auto;
  margin-right: auto;
  max-width: var(--nav-breite); /* Breite muss definiert sein */
  border-bottom: 1px solid var(--farbe-nav-border);
  font-size: 13px;
  text-align: center;
  color: var(--farbe-blau);
}

.nav-login-block a:not(.nav-login-btn) {
  display: block;
  color: #0000FF;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 6px;
}

.nav-login-block a:hover {
  text-decoration: underline;
}

.nav-login-btn {
  display: block;
  width:100px;
  padding: 7px 10px;
  margin-top: 6px;
  margin-left: auto;
  margin-right: auto;
  background: var(--farbe-blau);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-family: "Comic Sans MS", "Chalkboard SE", Verdana, sans-serif;
  text-align: center;
  text-decoration: none;
}

.nav-login-btn:hover {
  background: var(--farbe-blau-hell);
  color: white;
}

/* Abschnittsbeschriftung (z.B. "Geschützte Bereiche") */
.nav-label {
  display: block;
  padding: 7px 10px;
  font-size: 15px;
  color: var(--farbe-blau);
  font-weight: bold;
}

/* ============================================
   HAUPTINHALT
   ============================================ */
.inhalt {
  flex: 1;
  padding: 18px 24px;
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  color: #000077;
}

.inhalt .dok-titel {
  font-size: 18px;
  font-weight: bold;
  text-align: left;
  text-decoration: none;
  margin-top: 1em;
  margin-bottom: 6px;
  color: #000077;
}

.inhalt h1, .inhalt .titel {
  font-size: 20px;
  color: #000077;
  text-align: center;
  text-decoration: underline;
  font-weight: bold;
  line-height: 30px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.inhalt h2, .inhalt .subtitel {
  font-size: 18px;
  color: #000055;
  text-align: center;
  font-weight: bold;
  line-height: 24px;
  margin-top: 5px;
  margin-bottom: 5px;
}

.inhalt p {
  line-height: 1.6;
  margin-bottom: 10px;
}

.inhalt ul, .inhalt ol {
  margin-left: 24px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.inhalt a { color: #0000FF; }
.inhalt a:hover { text-decoration: none; }
.inhalt img { max-width: 100%; height: auto; }

.inhalt iframe {
  border: none;
  width: 100%;
  height: calc(100vh - 200px);
}

table.striped tr:nth-child(odd) { background-color: #dddddd; }

/* Tabellen */
table[align="center"] {
  margin-left: auto;
  margin-right: auto;
}

.inhalt table {
  border-collapse: collapse;
}

.inhalt table td, .inhalt table th {
  padding: 8px;
}

.inhalt table th {
  font-weight: bold;
  text-decoration: underline;
  text-align: left;
}

/* Bildgalerie-Layout */
.bild-reihe {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 10px 0;
}

.bild-zelle {
  flex: 1;
  min-width: 150px;
  max-width: 300px;
  text-align: center;
}

.bild-zelle img {
  /* width: 100%; */
  height: auto;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--farbe-nav-bg);
  color: #000077;
  font-size: 0.8rem;
  text-align: center;
  padding: 12px 20px;
  margin-top: auto;
}

.site-footer a {
  color: #0000FF;
  text-decoration: none;
}

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

/* ============================================
   LOGIN-POPUP
   ============================================ */
.login-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.login-overlay.aktiv {
  display: flex;
}

.login-box {
  background: white;
  border: 2px solid var(--farbe-nav-border);
  border-radius: 8px;
  padding: 28px 32px;
  width: 320px;
  max-width: 90vw;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  position: relative;
}

.login-box h2 {
  font-size: 18px;
  color: var(--farbe-blau);
  margin-bottom: 16px;
  text-align: center;
}

.login-box label {
  display: block;
  font-size: 14px;
  color: #000077;
  margin-bottom: 4px;
  margin-top: 12px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
  width: 100%;
  padding: 8px 10px;
  font-size: 15px;
  border: 1px solid var(--farbe-nav-border);
  border-radius: 4px;
  box-sizing: border-box;
}

.login-box button[type="submit"] {
  width: 100%;
  margin-top: 18px;
  padding: 10px;
  background: var(--farbe-blau);
  color: white;
  font-size: 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.login-box button[type="submit"]:hover {
  background: var(--farbe-blau-hell);
}

.login-fehler {
  color: red;
  font-size: 13px;
  margin-top: 10px;
  text-align: center;
  display: none;
}

.login-schliessen {
  position: absolute;
  top: 8px; right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #999;
}

.login-schliessen:hover { color: #333; }

/* ============================================
   RESPONSIVE: MOBIL (unter 768px)
   ============================================ */
@media (max-width: 768px) {

  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 60px;
    overflow: hidden;
  }

  .header-logo  { height: 55px; }
  .desktop-only  { display: none; }
  .mobil-only    { display: block; }
  .header-banner-mobil { height: auto; width: 65%; }
  .burger-btn    { display: flex; }

  .nur-desktop { display: none !important; }
  span.nur-desktop { display: none !important; }
  .nur-mobil   { display: none; }
  span.nur-mobil   { display: inline; }
  .nur-mobil.offen {
    display: block;
    width: 100%;
    border-bottom: 2px solid var(--farbe-nav-border);
  }

  .seite-container { flex-direction: column; }

  .seitennavigation {
    display: none;
  }

  .inhalt img {
    max-width: 100%;
    height: auto;
  }

  /* Fliesstext-Bilder auf Mobil verkleinern */
  img[style*="float"] {
    max-width: 100px !important;
  }

  .nav-level1 > li > a {
    padding: 11px 14px;
    font-size: 17px;
  }

  .nav-level2 a {
    padding: 10px 14px 10px 28px;
    font-size: 15px;
  }

  .inhalt {
    padding: 14px;
    max-width: 100%;
  }
}
