/* ==========================================================================
   custom.css – Full-Width Layout, Typografie, Komponenten, Utilities
   Voraussetzung: Nach Bootstrap laden
   ========================================================================== */

/* ---------------------------------------
   CSS-Variablen (Farben, Maße, Radius)
   --------------------------------------- */
:root {

  --clr-text: #212529;
  --clr-muted: #6c757d;
  --clr-bg: #ffffff;
  /* --clr-primary: #b87b4e;      */
   --clr-primary: #3a3a3a;        
  --clr-primary-600: #0a66cc;
  --clr-secondary: #1e90ff;        /* Akzent */
  --clr-border: #d0d7de;
  --clr-soft: #f6f8fa;
  --clr-success: #28a745;
  --clr-danger: #dc3545;
  --clr-warning: #ffc107;
   --clr-grau: #cccccc;
  --radius: .5rem;
  --shadow-1: 0 1px 4px rgba(0,0,0,.06);
  --shadow-2: 0 6px 24px rgba(0,0,0,.08);
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
}

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

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--clr-text);
  background: var(--clr-bg);
  overflow-x: hidden; /* Full-width ohne horizont. Scrollen */
}

/* Sanfte Standard-Transition für interaktive Elemente */
a, button, [role="button"], .btn, .card {
  transition: all .18s ease-in-out;
}

/* ---------------------------------------
   Container auf 100% Breite (Bootstrap-Override)
   --------------------------------------- */
.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-xxl,
.container-fluid {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: var(--space-4) !important;
  padding-right: var(--space-4) !important;
}

.row { --bs-gutter-x: 1rem; } /* etwas schmalere Gutter */

/* Optional: Bereich mit fester Maxbreite (wenn gewünscht) */
.max-1200 { max-width: 1200px; margin-inline: auto; }

/* ---------------------------------------
   Typografie
   --------------------------------------- */
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
  margin: 1.5rem 0 1rem;
  line-height: 1.25;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: .95rem; }

p, li, td, th { font-size: 1rem; }

a {
  color: var(--clr-primary);
  text-decoration: none;
}
a:hover, a:focus-visible {
  color: var(--clr-primary-600);
  text-decoration: none;
  outline: none;
}

/* Unterstrich-Heading (Seitenabschnitt) */
.heading-full-underline {
  border-bottom: 1px solid var(--clr-primary);
  padding-bottom: .5rem;
  margin-bottom: 1rem;
  display: block;
  width: 100%;
}

/* Muted Text */
.text-muted-custom { color: var(--clr-muted) !important; }

/* ---------------------------------------
   Header / Hero
   --------------------------------------- */
.header {
  /* background-image: url('/design/img/kopf.jpg'); */
  background-size: cover;
  background-position: center;
  min-height: 80px;
  color: var(--clr-soft);
  padding: 2rem 0;
  position: relative;
}
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.25) 0%,
    rgba(0,0,0,.25) 40%,
    rgba(0,0,0,0) 100%
  );
  z-index: 1;
}

.header .container { position: relative; z-index: 2; }
.header h1 { margin: 0; }
.header p { margin: .5rem 0 0; }

@media (max-width: 576px) {
  .header { min-height: 120px; padding: 1rem 0; }
  .header h1 { font-size: 1.8rem; }
  .header p { font-size: 1rem; }
}


.header-title {
  margin-bottom: 0;      /* kein Abstand nach unten */
  line-height: 1.1;      /* engerer Zeilenabstand */
}

.header-subtitle {
  margin-top: -2px;      /* enger an das H1 rücken */
  margin-bottom: 0;      /* kein Abstand nach unten */
  line-height: 1.2;
}
/* ---------------------------------------
   Navbar / Breadcrumbs
   --------------------------------------- */
.navbar, .breadcrumb {
  background: transparent;
}

.breadcrumb {
  margin: 0;
  padding: 0;
}


/* ---------------------------------------
   Navigation
   --------------------------------------- */
.nav-bg {
  background-color: #f8f9fa;
  border-radius: 6px;
  padding: 0.5rem;
}

.nav-bg .nav-link {
  color: #333;
  transition: all 0.2s ease;
  font-size: 0.9rem; /* alle kleiner */
}
/* Standard-Links */
.nav-bg .nav-link {
  color: #333;
  transition: all 0.2s ease;
}

/* Hover-Effekt */
.nav-bg .nav-link:hover {
  color: #0d6efd;
  background-color: rgba(13,110,253,0.1);
  border-radius: .375rem;
}

/* Aktiver Link */
.nav-bg .nav-link.active {
  color: #fff;
  background-color: #757576;
}


/* ---------------------------------------
   Footer
   --------------------------------------- */
footer {
  background: #0b1d33;
  color: #ffffff;
  padding: 1.25rem 0;
}
footer a {
  color: #ffffff;
  text-decoration: none;
}
footer a:hover { color: #cce6ff; }

/* ---------------------------------------
   Kartenbereich (Leaflet) + Popups
   --------------------------------------- */
#map, .map {
  width: 100%;
  height: 70vh;                /* kann projektspezifisch angepasst werden */
  min-height: 420px;
  border: 1px solid #aaa;
  border-radius: var(--radius);
  z-index: 1;
  background: #e9ecef;
}

.leaflet-container a { color: var(--clr-primary); }
.leaflet-control-attribution { font-size: .75rem; }

/* Popup: kompakt + Bildbereich + Titel/Meta */
.leaflet-popup-content {
  margin: 0 !important;
  padding: .5rem !important;
}
.leaflet-popup-content-wrapper {
  border-radius: var(--radius);
  padding: 0 !important;
  max-width: 280px !important;
  box-shadow: var(--shadow-2);
}
.leaflet-popup-tip { background: #fff; }

.leaflet-custom-popup {
  max-width: 260px;
  text-align: center;
  font-size: .9rem;
  padding: 0;
}
.popup-image {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: .25rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  margin: 0 auto;
  display: block;
}
.popup-title {
  font-weight: 600;
  margin-top: .5rem;
  color: #333;
  text-decoration: none;
  font-size: 1rem;
}

/* ---------------------------------------
   Karten/Slider/Steuerung
   --------------------------------------- */
.slider-container {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 1rem 0;
}
.slider { flex: 1; }
.button {
  background: var(--clr-secondary);
  color: #fff;
  border: none;
  padding: .45rem .9rem;
  font-size: 1.05rem;
  border-radius: .5rem;
  line-height: 1.2rem;
  cursor: pointer;
}
.button:disabled {
  background: #adb5bd;
  cursor: not-allowed;
}
#controls { text-align: center; margin: 1rem 0; }
#playButton {
  background: var(--clr-success);
  color: #fff;
  border: none;
  padding: .55rem 1.1rem;
  border-radius: .5rem;
  cursor: pointer;
}
#playButton.pause { background: var(--clr-danger); }

/* ---------------------------------------
   Karten – Popup Card (Alternative kompakt)
   --------------------------------------- */
.custom-popup .leaflet-popup-content-wrapper {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,.22);
  padding: 0;
  min-width: 300px;
  max-width: 360px;
  height: 300px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.custom-popup .leaflet-popup-tip { background: #fff; }
.popup-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.popup-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}
.popup-text {
  padding: 4px 6px;
  font-size: .8rem;
  color: #333;
  text-align: center;
  width: 100%;
  line-height: 1.25;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

/* ---------------------------------------
   Cards / Links
   --------------------------------------- */
.card {
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  background: #fff;
}
.card:hover { box-shadow: var(--shadow-2); }

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
}
.card-link:hover {
  background-color: var(--clr-soft);
  color: var(--clr-primary);
  box-shadow: var(--shadow-1);
}

/* ---------------------------------------
   Buttons (Varianten)
   --------------------------------------- */
.btn-primary-custom {
  background: var(--clr-primary);
  color: #fff;
  border: 1px solid var(--clr-primary);
  border-radius: var(--radius);
  padding: .5rem .9rem;
}
.btn-primary-custom:hover { background: var(--clr-primary-600); }

.btn-outline-custom {
  background: transparent;
  color: var(--clr-primary);
  border: 1px solid var(--clr-primary);
  border-radius: var(--radius);
  padding: .5rem .9rem;
}
.btn-outline-custom:hover {
  background: var(--clr-primary);
  color: #fff;
}

/* ---------------------------------------
   Preloader
   --------------------------------------- */
#preloader {
  position: fixed; inset: 0;
  background: #fff; z-index: 9999;
}
#status {
  width: 200px; height: 200px;
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: url('/assets/img/loader.gif') no-repeat center;
}

/* ---------------------------------------
   Utilities / Helferklassen
   --------------------------------------- */
.shadow-1 { box-shadow: var(--shadow-1) !important; }
.shadow-2 { box-shadow: var(--shadow-2) !important; }

.rounded-1 { border-radius: .25rem !important; }
.rounded-2 { border-radius: .5rem !important; }
.rounded-3 { border-radius: 1rem !important; }

.pad-0 { padding: 0 !important; }
.pad-1 { padding: var(--space-2) !important; }
.pad-2 { padding: var(--space-4) !important; }
.pad-3 { padding: var(--space-5) !important; }

.gap-1 { gap: var(--space-2) !important; }
.gap-2 { gap: var(--space-4) !important; }
.gap-3 { gap: var(--space-5) !important; }

.muted { color: var(--clr-muted) !important; }
.bg-soft { background: var(--clr-soft) !important; }
.border-soft { border: 1px solid var(--clr-border) !important; }

.w-100 { width: 100% !important; }
.max-w-1200 { max-width: 1200px; }

.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-start { text-align: left !important; }

/* ---------------------------------------
   Responsive Feinheiten
   --------------------------------------- */
@media (max-width: 992px) {
  .container,
  .container-fluid { padding-left: var(--space-3) !important; padding-right: var(--space-3) !important; }
}

@media (max-width: 576px) {
  .container,
  .container-fluid { padding-left: var(--space-2) !important; padding-right: var(--space-2) !important; }
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.55rem; }
  h3 { font-size: 1.3rem; }
}

/* ---------------------------------------
   Barrierefreiheit (Fokus)
   --------------------------------------- */
:focus-visible {
  outline: 2px solid var(--clr-secondary);
  outline-offset: 2px;
}
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: static; width: auto; height: auto;
  padding: .5rem 1rem; background: #000; color: #fff;
  border-radius: .25rem;
}