/* Allgemeines Layout */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f9f9;
  font-size: 16px; /* Basisgröße */
  line-height: 1.5;
}

/* Kopf- und Fußbereich */
header, footer {
  background: #333;
  color: white;
  padding: 1em;
  text-align: center;
}

/* Navigation */
nav a {
  color: white;
  margin: 0 0.5em;
  text-decoration: none;
}

/* Hauptbereich */
main {
  padding: 1.5em;
}

/* Tabellen (z. B. im Formular) */
table {
  width: 100%;
  max-width: 500px;
  margin: 1em auto;
  border-collapse: collapse;
}
td {
  padding: 0.5em;
}

/* Responsives Verhalten */
@media (max-width: 1000px) {
  body {
    font-size: 28px;
  }

  nav a {
    display: inline-block;
    margin: 0.5em 0.3em;
  }

  table, td {
    font-size: 1.1em;
  }
}

/* Mobiloptimierte Eingabefelder & Buttons */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
button {
  font-size: 1.2em;
  padding: 0.7em;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 500px;
  box-sizing: border-box;
}

/* Buttons extra touchfreundlich */
button {
  background-color: #333;
  color: white;
  border: none;
  margin-top: 1em;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background-color: #555;
}

/* Speziell für kleinere Displays */
@media (max-width: 600px) {
  input,
  textarea,
  button {
    font-size: 1.4em;
  }
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 3px solid white;
  border-top: 3px solid #999;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-left: 0.5em;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1em;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1em;
}

@media (min-width: 1000px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5em; /* Abstand zur nächsten Karte */
  border: 1px solid #ddd;
}

.card-image {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #eee;
  display: block;
  border-bottom: 1px solid #ddd;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  margin: 0 auto;
}

@media (max-width: 1000px) {
  .card-image {
    max-width: 80%;
  }
}

@media (min-width: 1000px) {
  .card-image {
    max-width: 100%;
  }
}


.card-image.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-style: italic;
}

.card-content {
  padding: 1em;
  flex-grow: 1;
  text-align: center;
}

.card-actions {
  padding: 0.5em 1em 1em;
  display: flex;
  gap: 0.5em;
  justify-content: center;
  flex-wrap: wrap;
  border-top: 1px solid #eee;
}
