/* ── Mobile-First Optimierungen ── */

/* Navbar: Logo auf kleinen Screens verkleinern */
@media (max-width: 575.98px) {
  .navbar-brand img {
    height: 52px !important;
  }

  /* Hero-Bereich: kleinere Schrift & weniger Padding auf Mobilgeräten */
  .hero-section {
    padding: 1.5rem 1rem !important;
    margin-bottom: 1rem !important;
  }

  .hero-section h1 {
    font-size: clamp(1.4rem, 6vw, 2.5rem) !important;
    line-height: 1.2;
  }

  /* Seitenleiste unter den Inhalt schieben */
  .main-layout {
    flex-direction: column !important;
  }

  /* Footer: weniger Padding, kleinere Schrift */
  footer {
    font-size: 0.75rem;
    padding: 0.4rem 0 !important;
  }

  /* Mehr Platz für den Footer lassen */
  .main-wrapper {
    margin-bottom: 60px !important;
  }
}

/* Tablet (576 – 767 px) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-section h1 {
    font-size: clamp(1.8rem, 5vw, 3rem) !important;
  }

  .main-wrapper {
    margin-bottom: 65px !important;
  }
}

/* Dropdown-Menü: touch-freundlichere Tap-Targets */
.dropdown-item {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.nav-link {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

/* Verhindert, dass das geöffnete Mobile-Menü den Inhalt überdeckt */
.navbar-collapse.show ~ .hero-section,
.navbar-collapse.show ~ * {
  transition: margin-top 0.2s ease;
}

/* Lange Wörter in schmalen Containern umbrechen */
#content, #wkfolge {
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Tabellen responsiv scrollen */
#content table,
#wkfolge table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Bilder nie breiter als ihr Container */
#content img,
#wkfolge img {
  max-width: 100%;
  height: auto;
}

/* Footer immer lesbar, Text nie abgeschnitten */
footer .container {
  white-space: normal;
  line-height: 1.4;
}
