:root {
  --primary-color: #007bff;
  --primary-hover: #0056b3;
  --primary-border-hover: #004085;
  --purple: #6a1b9a;
  --light-gray: #f4f4f4;
  --dark-gray: #333;
  --mid-gray: #555;
  --alert-bg: #f8d7da;
  --alert-text: #721c24;
}

/* Top Bereich */
.top {
  background-image: url('../img/feuer.png');
  background-size: cover;
  background-position: center;
  height: 400px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
  padding: 40px;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}

.top-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.top-subtitle {
  font-size: 1.2rem;
  font-weight: normal;
  margin: 0;
  max-width: 70%;
  text-align: center;
}

/* Hamburger */
.hamburger {
  position: fixed;
  top: 15px;
  right: 20px;
  width: 30px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  height: 4px;
  background: white;
  border-radius: 2px;
  width: 100%;
}

/* Seitenmenü */
.sidemenu {
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100%;
  background-color: white;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease;
  padding-top: 60px;
  z-index: 1000;
}

.sidemenu.open {
  right: 0;
}

.sidemenu a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  color: #000;
}

.sidemenu a:hover {
  background-color: #f0f0f0;
}

.sidemenu .fw-bold {
  background-color: #f8f9fa;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  z-index: 999;
}

.overlay.show {
  display: block;
}

.hover-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 12px;
}

.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Kompaktes Filterformular */
.input-group {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.input-group select,
.input-group input,
.input-group button {
  border-radius: 0;
}

.input-group select:first-child {
  border-top-left-radius: 0.5rem;
  border-bottom-left-radius: 0.5rem;
}

.input-group input {
  max-width: 100px;
}

.input-group button {
  border-top-right-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  transition: background-color 0.3s ease;
}

.input-group button:hover {
  background-color: #004080;
}

form .form-control:focus {
  box-shadow: none;
  border-color: #86b7fe;
}

label.form-label {
  margin-bottom: 4px;
}

/* Über uns Block */
.ueber-uns-block {
  background-color: var(--purple);
  color: white;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 800px;
  border-radius: 12px;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Buttons */
.btn-lg {
  padding: 15px 25px;
  font-size: 18px;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-border-hover);
}

.btn-close {
  color: var(--alert-text);
}

/* Alerts */
.alert-warning {
  background-color: var(--alert-bg);
  color: var(--alert-text);
}

/* Form Focus innerhalb Cards */
.card .form-control:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 0.2rem rgba(106, 27, 154, 0.25);
}

/* Popup */
.popup-message {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popup-message.show {
  display: block;
  opacity: 1;
}

.popup-content {
  text-align: center;
}

.popup-content button {
  margin-top: 10px;
}

/* Kontaktkarte */
.contact-card {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  /* position: absolute; */
  /* top: 500px; */
  /* left: 50%; */
  /* transform: translateX(-50%); */
}


.contact-card h4 {
  color: var(--purple);
  font-size: 1.75rem;
  margin-bottom: 20px;
  text-align: center;
}

.contact-info {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.contact-info i {
  color: var(--purple);
  font-size: 1.5rem;
  margin-right: 15px;
}

.contact-info strong {
  color: var(--dark-gray);
  margin-right: 5px;
}

.contact-info span {
  color: var(--mid-gray);
}

/* Seitenbalken */
.side-bar {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 80px;
  background-color: hsla(280, 70%, 36%, 0.8);
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  z-index: -1;
}

.side-bar.left {
  left: 0;
}

.side-bar.right {
  right: 0;
}

/* Impressum Styles */
body.impressum-page {
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  color: var(--dark-gray);
  line-height: 1.6;
}

.impressum-container {
  max-width: 800px;
  margin: 40px auto;
  background: white;
  padding: 30px 40px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.impressum-container h1 {
  color: var(--purple);
  margin-bottom: 20px;
}

.impressum-container h2 {
  color: #4b0e6f;
  margin-top: 30px;
  margin-bottom: 10px;
}

.impressum-container a {
  color: var(--purple);
  text-decoration: none;
}

.impressum-container a:hover {
  text-decoration: underline;
}

.impressum-container address {
  font-style: normal;
  margin-bottom: 20px;
}


/* --- LEITFADEN-RESOURCEN --- */
.leitfaden .explanation-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 120px;
  gap: 150px;
}

@media (min-width: 768px) {
  .leitfaden .explanation-item {
    flex-direction: row;
    justify-content: center;
  }

  .leitfaden .explanation-item:nth-child(even) {
    flex-direction: row-reverse;
  }
}

/* Sonderposition: Oberster-Zettel */
.leitfaden .device-item .custom-card {
  margin-right: 260px;
}
/* Karten */
.leitfaden .custom-card {
  background-color: white;
  max-width: 320px;
  min-height: 130px;
  height: auto;
  border: 1px solid #ddd;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease;
  margin: 0 auto;
  position: relative;
}

/* Design der Karten */
.leitfaden .custom-card p {
  position: relative;
  padding-left: 1rem;
}
.leitfaden .custom-card p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #ccc;
}


.leitfaden .custom-card > * {
  position: relative;
  z-index: 1;
}

.leitfaden .custom-card h5 {
  margin-bottom: 1.5rem;
}

/* Abgeknickte Ecke */
.leitfaden .custom-card::before {
  content: '';
  position: absolute;
  top: 0;
  width: 40px;
  height: 40px;
  background: white;
  border: 1px solid #ddd;
  box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.1);
  transform: rotate(45deg);
  z-index: 2;
}
.leitfaden .explanation-item:nth-child(odd) .custom-card::before {
  left: -20px;
}
.leitfaden .explanation-item:nth-child(even) .custom-card::before {
  right: -20px;
}

.leitfaden #explanationList {
  margin-top: 70px;
}

.leitfaden .image-wrapper {
  text-align: center;
}
/* Bilder */
.leitfaden .custom-image {
  width: 100%;
  height: auto;
  max-height: 120px;
  object-fit: contain;
  border: 1px solid #ddd;
  background-color: #f8f9fa;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 0.5rem;
}

.leitfaden .single-image .custom-image {
  max-height: 230px;
  transition: all 0.3s ease;
}

.leitfaden .example-box {
  padding: 0.5rem;
  margin-bottom: 0.75rem;
}
/* Suchleiste */
.leitfaden input[type="search"]:focus,
.leitfaden input[type="text"]:focus {
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 0.2rem rgba(168, 85, 247, 0.3) !important;
  outline: none;
}
/* Tooltip beim hovern */
.leitfaden .tooltip-text {
  visibility: hidden;
  opacity: 0;
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 0.75rem;
  text-align: center;
  border-radius: 4px;
  padding: 5px 8px;
  position: absolute;
  bottom: 105%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  white-space: nowrap;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.leitfaden .position-relative:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}
/* Strich*/
.leitfaden .blue-thread {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 12px;
  background-color: royalblue;
  transform: translateX(-50%);
  z-index: 0;
  border-radius: 4px;
  box-shadow: 0 0 12px rgba(65, 105, 225, 0.7);
  animation: pulseGlowBlue 3s infinite;
}
/* Kugeln */
.leitfaden .blue-knot {
  position: absolute;
  left: 50%;
  width: 40px;
  height: 40px;
  background-color: royalblue;
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 1;
  box-shadow: 0 3px 15px rgba(65, 105, 225, 0.8);
  animation: pulseGlowBlue 3s infinite;
}
/* Glow-Animation */
@keyframes pulseGlowBlue {
  0%, 100% {
    box-shadow: 0 0 12px rgba(65, 105, 225, 0.7);
  }
  50% {
    box-shadow: 0 0 25px rgba(65, 105, 225, 1);
  }
}

.leitfaden .device-item {
  transform: translateX(80px);
}

/* -- LEITFADEN_GERAET -- */

/* Zettel-Design */
.leitfaden_geraet .custom-card {
  background-color: white;
  width: 400px;
  min-height: 180px;
  border: 1px solid #ddd;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  padding-top: 2rem;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease;
}

/* Abgeknickte Ecke */
.leitfaden_geraet .custom-card::before {
  content: '';
  position: absolute;
  top: 0;
  width: 40px;
  height: 40px;
  background: white;
  border: 1px solid #ddd;
  box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.1);
  transform: rotate(45deg);
  z-index: 2;
}

.leitfaden_geraet .explanation-item:nth-child(odd) .custom-card::before {
  left: -20px;
}
.leitfaden_geraet .explanation-item:nth-child(even) .custom-card::before {
  right: -20px;
}

.leitfaden_geraet #explanationList {
  margin-top: 70px;
}

/* Design für die Karten */
.leitfaden_geraet .custom-card p {
  position: relative;
  padding-left: 1rem;
}
.leitfaden_geraet .custom-card p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: #ccc;
}

/* Strich */
.leitfaden_geraet .purple-thread {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 12px;
  background-color: hsla(280, 70%, 36%, 1);
  transform: translateX(-50%);
  z-index: 0;
  border-radius: 4px;
  box-shadow: 0 0 12px hsla(280, 70%, 36%, 0.6);
  animation: pulseGlow 3s infinite;
}

/* Kugeln */
.leitfaden_geraet .purple-knot {
  position: absolute;
  left: 50%;
  width: 40px;
  height: 40px;
  background-color: hsla(280, 70%, 36%, 1);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 20px hsla(280, 70%, 36%, 0.6);
  animation: pulseGlowLeitfaden 3s infinite;
}


/* Glow-Animation */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 12px hsla(280, 70%, 36%, 0.6);
  }
  50% {
    box-shadow: 0 0 25px hsla(280, 70%, 36%, 1);
  }
}

/* Layout für Geräte-Erklärungen */
.leitfaden_geraet .explanation-item {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 120px;
  gap: 60px;
  position: relative;
}

/* Abwechselnde Anordnung ab mittlerer Bildschirmgröße */
@media (min-width: 768px) {
  .leitfaden_geraet .explanation-item {
    flex-direction: row;
  }

  .leitfaden_geraet .explanation-item:nth-child(odd) .single-image {
    order: 1;
    margin-right: auto;
  }

  .leitfaden_geraet .explanation-item:nth-child(odd) .custom-card {
    order: 2;
    transform: translateX(70px);
  }

  .leitfaden_geraet .explanation-item:nth-child(even) .custom-card {
    order: 1;
    transform: translateX(70px);
  }

  .leitfaden_geraet .explanation-item:nth-child(even) .single-image {
    order: 2;
    margin-left: auto;
  }
}

/* Mobile: alles untereinander */
@media (max-width: 767px) {
  .leitfaden_geraet .explanation-item {
    flex-direction: column;
  }

  .leitfaden_geraet .explanation-item .custom-card,
  .leitfaden_geraet .explanation-item .single-image {
    order: unset;
    transform: none !important;
  }
}

/* Sonderposition: Oberster-Zettel */
.leitfaden_geraet .device-item .custom-card {
  margin-right: 100px;
}

/* Bild-Stil */
.leitfaden_geraet .custom-image {
  width: 450px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 767px) {
  .leitfaden_geraet .custom-image {
    width: 220px;
  }
}

/* Tooltip bei Hover */
.leitfaden_geraet .position-relative .tooltip-text {
  position: absolute;
  bottom: -2rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.leitfaden_geraet .position-relative:hover .tooltip-text {
  opacity: 1;
}

/* ==========================================
   RESPONSIVE ANPASSUNGEN FÜR HANDYS
   ========================================== */
   @media (max-width: 767px) {

    /* --- Top Bereich --- */
    .top {
      height: 250px;              /* weniger hoch */
      padding: 20px;              /* weniger Rand */
      text-align: center;         /* zentrieren auf Handy */
    }
  
    .top-title {
      font-size: 1.3rem;          /* kleinere Überschrift */
    }
  
    .top-subtitle {
      font-size: 0.8rem;
      max-width: 90%;
    }
  
    /* --- Buttons --- */
    .btn,
    button {
      width: 100%;
      margin-bottom: 10px;
    }
  
    /* --- Karten (Leitfaden) --- */
    .leitfaden .custom-card,
    .leitfaden_geraet .custom-card {
      max-width: 95%;
      width: 100%;
      margin: 1rem auto;
      padding: 1rem;
    }
  
    /* --- Bilder skalieren --- */
    .leitfaden .custom-image,
    .leitfaden_geraet .custom-image {
      max-width: 100%;
      height: auto;
    }
  
    /* --- Menü / Sidebar --- */
    .sidemenu {
      width: 220px; /* etwas schmaler auf Handy */
    }
  
    .sidemenu a {
      font-size: 14px;
      padding: 10px 12px;
    }
  
    /* --- Tabelle: Text kleiner --- */
    table {
      font-size: 14px;
    }
  
    /* Tabellencontainer für Scrollen auf kleinen Screens */
    .table-responsive {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
  
    .table-responsive table {
      min-width: 600px; /* erzwingt horizontales Scrollen */
    }
  
    /* --- Kontaktkarten etwas kompakter --- */
    .contact-card {
      width: 90%;
      top: auto;
      position: relative;
      left: auto;
      transform: none;
      margin: 20px auto;
    }
  }  

  .side-bar {
    display: none !important;
  }

  #galleryModal .btn-dark {
    padding: 6px 10px;
    font-size: 18px;
    opacity: 0.7;
  }

  #galleryModal .btn-dark i {
    font-size: 18px;
  }

/* Galerie-Pfeilbuttons auf Handy schmaler machen */
@media (max-width: 767px) {
  #galleryModal #prevImageBtn,
  #galleryModal #nextImageBtn {
    width: 40px;         /* feste Breite */
    height: 40px;        /* feste Höhe */
    padding: 0;
    border-radius: 50%;  /* rund */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }
}