/* ==========================================================================
   1. Minimaler Reset & Grundsetup
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #fcfcfc;
}

/* ==========================================================================
   2. Header & Footer Layout (Einheitlicher Grauton & Container)
   ========================================================================== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #f4f5f7;
  border-bottom: 1px solid #e2e8f0;
}

.logo-link img {
  height: 52px;
  width: auto;
  display: block;
}

.site-footer {
  background-color: #f4f5f7;
  border-top: 1px solid #e2e8f0;
  padding: 1.25rem 2rem;
  width: 100%;
}

/* Innerer Container richtet den Footer am Hauptinhalt aus */
.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-copyright {
  font-size: 0.8rem;
  color: #666;
  line-height: 1.4;
  flex: 1;
}

/* ==========================================================================
   3. Navigation (Haupt- & Footer-Nav)
   ========================================================================== */
.main-nav ul,
.footer-nav ul {
  display: flex;
  list-style: none;
  gap: 1.25rem;
}

.main-nav a,
.footer-nav a {
  text-decoration: none;
  color: #1a365d;
  font-weight: 500;
  font-size: 0.95rem;
}

.main-nav a:hover,
.footer-nav a:hover,
.main-nav a.active,
.footer-nav a.active {
  color: #c53030;
  text-decoration: underline;
}

/* ==========================================================================
   4. Hauptinhaltsbereich & Layout-Container
   ========================================================================== */
.content-container {
  flex: 1;
  max-width: 1000px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.content-container h1 {
  font-size: 1.75rem;
  color: #1a202c;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

/* ==========================================================================
   5. Hero-Section (Startseite / index.html)
   ========================================================================== */
.hero-section {
  margin-bottom: 2rem;
  width: 100%;
}

.hero-figure {
  margin: 0;
  padding: 0;
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

.image-caption {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.4rem;
  text-align: left;
}

/* Abstand zwischen Bildhinweis und "Praxiskommentar" */
.main-text {
  margin-top: 3.5rem;
}

/* ==========================================================================
   6. Logo-Leiste (Startseite)
   ========================================================================== */
.partner-logos-section {
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

.logo-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: nowrap;
}

.logo-item {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 60px;
}

.logo-item img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ==========================================================================
   7. PDF-Dokumentenlisten (Unterseiten BezVG, BezVEG, etc.)
   ========================================================================== */
.pdf-list {
  list-style: none;
}

.pdf-list li {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  background-color: #fff;
  border: 1px solid #edf2f7;
  border-radius: 4px;
}

.pdf-list a {
  color: #2b6cb0;
  text-decoration: none;
  font-weight: 500;
}

.pdf-list a:hover {
  text-decoration: underline;
  color: #c53030;
}

/* ==========================================================================
   7. PDF-Dokumentenlisten (Zweispaltig mit Vorbemerkungen)
   ========================================================================== */
.pdf-grid-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pdf-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  border: 1px solid #edf2f7;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  gap: 1.5rem;
}

.pdf-col-main {
  flex: 1;
}

.pdf-col-extra {
  width: 280px; /* Feste Spaltenbreite auf Desktop */
  text-align: left;
  display: flex;
  flex-direction: column; /* Stapelt mehrere Vorbemerkungen untereinander */
  gap: 0.3rem; /* Kleiner Abstand zwischen mehreren Links */
}

.pdf-grid-list a {
  color: #2b6cb0;
  text-decoration: none;
  font-weight: 500;
}

.pdf-grid-list a:hover {
  text-decoration: underline;
  color: #c53030;
}

/* Dezentes Styling für die Vorbemerkungs-Links */
.pdf-link-sub {
  color: #4a5568 !important;
  font-size: 0.9rem;
}

/* "PDF"-Zusatz dezent & kleiner gestalten */
.pdf-tag {
  font-size: 0.8em;
  font-weight: normal;
  color: #718096;
  margin-left: 0.3rem;
}

.pdf-link-sub:hover {
  color: #c53030 !important;
}

/* Responsive Umbruch für Mobilgeräte */
@media (max-width: 768px) {
  .pdf-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.75rem;
  }

  .pdf-col-extra {
    width: 100%;
    padding-left: 0.5rem; /* Leichter Einzug mobil für bessere Hierarchie */
  }

  /* Blendet leere Vorbemerkungs-Container auf Mobilgeräten komplett aus */
  .pdf-col-extra:empty {
    display: none;
  }
}



/* ==========================================================================
   8. Rechtstexte (Impressum & Datenschutz)
   ========================================================================== */
.legal-section {
  margin-bottom: 2.5rem;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-text h2 {
  font-size: 1.2rem;
  color: #1a202c;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-text h3 {
  font-size: 1rem;
  color: #2d3748;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

.legal-text p {
  margin-bottom: 1rem;
}

.legal-text ul {
  list-style-position: inside;
  padding-left: 0;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.legal-text li {
  margin-bottom: 0.35rem;
}

/* ==========================================================================
   9. Titel & Autoren (titel-autoren.html)
   ========================================================================== */
.book-header-box {
  background-color: #fff;
  border: 1px solid #e2e8f0;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  border-radius: 4px;
}

.book-header-box .author-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
}

.book-header-box .book-title {
  font-size: 2rem;
  color: #1a365d;
  margin: 1rem 0 0.25rem 0;
  border: none;
  padding: 0;
}

.book-header-box .book-subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  color: #c53030;
  margin-bottom: 0.5rem;
}

.book-header-box .book-for {
  font-style: italic;
  color: #718096;
}

.book-header-box .book-target {
  font-size: 1.1rem;
  font-weight: 500;
  color: #2d3748;
}

.publishers-section {
  margin-bottom: 2.5rem;
}

.publishers-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.publishers-list {
  list-style-type: disc;
  list-style-position: inside;
  padding-left: 0;
}

.publishers-list li {
  margin-bottom: 0.35rem;
}

.authors-detail-section {
  margin-bottom: 2.5rem;
}

.authors-detail-section h2 {
  font-size: 1.3rem;
  color: #1a202c;
  margin-bottom: 1rem;
}

.author-profile {
  margin-bottom: 1.5rem;
}

.author-profile h3 {
  font-size: 1.1rem;
  color: #2b6cb0;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   10. Anhang (anhang.html)
   ========================================================================== */
.anhang-section {
  margin-bottom: 2.5rem;
}

.anhang-section h2 {
  font-size: 1.25rem;
  color: #1a202c;
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid #e2e8f0;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.anhang-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  border: 1px solid #e2e8f0;
}

.anhang-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #edf2f7;
  font-size: 0.95rem;
  vertical-align: top;
}

.anhang-table tr:nth-child(even) {
  background-color: #fcfcfc;
}

.anhang-table tr td:first-child {
  width: 25%;
  white-space: nowrap;
  color: #1a365d;
}

.literature-list {
  list-style-type: none;
  padding-left: 0;
}

.literature-list li {
  margin-bottom: 0.6rem;
  padding-left: 1rem;
  text-indent: -1rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ==========================================================================
   11. Responsive Navigation / Burger-Menü & Breakpoints
   ========================================================================== */

/* Toggle Checkbox verstecken */
.nav-toggle {
  display: none;
}

/* Burger Icon verstecken (Desktop) */
.burger-menu {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
}

.burger-icon,
.burger-icon::before,
.burger-icon::after {
  display: block;
  width: 26px;
  height: 3px;
  background-color: #1a365d;
  border-radius: 2px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  position: relative;
}

.burger-icon::before,
.burger-icon::after {
  content: "";
  position: absolute;
}

.burger-icon::before { top: -8px; }
.burger-icon::after { top: 8px; }

/* Mobile Breakpoint (unter 900px) */
@media (max-width: 900px) {
  .site-header {
    flex-wrap: wrap;
    padding: 0.8rem 1.25rem;
    position: relative;
  }

  .burger-menu {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    background-color: #f4f5f7;
    border-top: 1px solid #e2e8f0;
    margin-top: 0.8rem;
    padding: 1rem 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
    padding-left: 0.5rem;
  }

  .main-nav a {
    display: block;
    width: 100%;
    padding: 0.4rem 0;
    font-size: 1rem;
  }

  .nav-toggle:checked ~ .main-nav {
    display: block;
  }

  .nav-toggle:checked ~ .burger-menu .burger-icon {
    background-color: transparent;
  }

  .nav-toggle:checked ~ .burger-menu .burger-icon::before {
    transform: rotate(45deg);
    top: 0;
  }

  .nav-toggle:checked ~ .burger-menu .burger-icon::after {
    transform: rotate(-45deg);
    top: 0;
  }

  /* Footer Anpassung Mobil */
  .footer-container {
    flex-direction: column-reverse;
    text-align: center;
    gap: 1rem;
  }

  .footer-nav ul {
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Partner Logo-Grid Mobil */
  .logo-grid {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }

  .logo-item {
    flex: 1 1 40%;
    height: 55px;
  }
}

@media (max-width: 600px) {
  .content-container {
    padding: 0 1rem;
    margin: 1.5rem auto;
  }

  .content-container h1 {
    font-size: 1.4rem;
  }

  .pdf-list li {
    padding: 0.6rem;
  }

  .pdf-list a {
    word-break: break-word;
  }

  .anhang-table tr td:first-child {
    width: 35%;
  }
}

@media (max-width: 480px) {
  .logo-item {
    flex: 1 1 100%;
    height: 50px;
  }

  .logo-link img {
    height: 40px;
  }
}