/* =============== BASIS =============== */
body {
  font-family: 'Nunito', sans-serif;
  background-color: #f4f4f4;
  color: #222;
  margin: 0;
  padding: 0;
}

header, footer {
  background-color: #ffffff;
  border-bottom: 1px solid #ddd;
}

.container, main {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Responsive Tabelle mit Card-Darstellung */
.responsive-table {
  width: 100%;
}

/* Standard-Tabelle sichtbar auf Desktop */
.responsive-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.responsive-table th,
.responsive-table td {
  padding: 0.75rem;
  border: 1px solid #ddd;
  text-align: left;
  white-space: nowrap;
}

.responsive-table thead {
  background-color: #0033a0;
  color: white;
}

/* =============== MOBILE ANPASSUNG =============== */
@media screen and (max-width: 768px) {

  /* Navigation & Footer */
  header nav,
  footer .container {
    flex-direction: column !important;
    align-items: flex-start;
    gap: 0.5rem;
  }

  header ul,
  footer ul {
    flex-direction: column !important;
    width: 100%;
  }

  header ul li,
  footer ul li {
    margin-left: 0 !important;
    width: 100%;
  }

  /* Formulare */
  form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  form input,
  form select,
  form button,
  form a {
    width: 100% !important;
    font-size: 1rem;
  }

  /* Tabellen-Kartenansicht */
  .responsive-table table,
  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tr {
    margin-bottom: 1rem;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    padding: 1rem;
  }

  .responsive-table td {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #555;
    margin-right: 1rem;
    flex-shrink: 0;
  }

  .responsive-table td:last-child {
    border-bottom: none;
  }

  /* Info-Karten */
  .space-y-5 {
    width: 100% !important;
    margin-top: 2rem;
  }

  .info-cards {
    margin-bottom: 1rem;
  }

  /* Footer padding */
  footer {
    padding: 1rem;
  }

  /* Kleinere Schrift in Überschriften */
  .text-3xl {
    font-size: 1.25rem !important;
  }

  /* Legende */
  .legende {
    font-size: 0.9rem;
    padding: 1rem;
  }

  /* Pagination Buttons */
  .pagination {
    flex-direction: column !important;
    gap: 0.5rem;
  }

  .pagination a,
  .pagination span {
    width: 100%;
    text-align: center;
  }
}
