:root {
  --bg-color: rgba(20, 20, 20, 0.9);
  --card-color: rgba(35, 35, 35, 1);
  --text-color: rgba(230, 230, 230, 0.9);
}

body {
  align-items: center;
  background-color: var(--bg-color);
  display: flex;
  height: 100vh;
  justify-content: center;
  margin: 0px;
  overflow-y: auto;
  padding: 20px 0;
  color: var(--text-color);
}

#cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 940px;
  width: 100%;
  justify-content: center;
  /*width: calc(100% - 20px);'*/
  padding: 10px;
}

#cards:hover > a.card > .card-border {
  opacity: 1;
}

a.card {
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  color: inherit;
  cursor: pointer;
  display: block;
  height: 300px;
  overflow: hidden;
  position: relative;
  width: 300px;
  text-decoration: none;
}

a.card:hover::before {
  opacity: 1;
}

a.card::before,
a.card > .card-border {
  border-radius: inherit; /* Ecken der Karte abrunden */
  content: ""; /* Notwendig für Pseudo-Elemente */
  height: 100%; /* Höhe auf 100% setzen */
  left: 0px;
  opacity: 0;
  position: absolute;
  top: 0px;
  transition: opacity 700ms ease-in-out;
  width: 100%;
  z-index: 2;
}

a.card::before {
  background: radial-gradient(
    800px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.2),
    transparent 40%
  );
  z-index: 3;
}

a.card > .card-border {
  background: radial-gradient(
    400px circle at var(--mouse-x) var(--mouse-y),
    rgba(255, 255, 255, 0.6),
    transparent 40%
  );
  z-index: 1;
}

a.card > .card-content {
  align-items: center; /* Zentriert Elemente horizontal */
  background-color: var(--card-color);
  border-radius: inherit;
  box-sizing: border-box; /* Stellt sicher, dass Padding in Höhe/Breite eingerechnet wird */
  color: var(--text-color); /* Setzt die Textfarbe für den Inhalt */
  display: flex;
  flex-direction: column; /* Elemente untereinander anordnen */
  height: calc(100% - 4px);
  justify-content: center; /* Zentriert Elemente vertikal */
  margin: 2px;
  padding: 20px;
  position: relative;
  text-align: center;
  transition: background-color 300ms ease-in-out;
  width: calc(100% - 4px);
  z-index: 2;
}

.card-content img {
  max-width: 90%; /* Bild nicht breiter als X% der Karte machen */
  height: auto; /* Höhe automatisch anpassen, um Proportionen zu wahren */
  max-height: 160px; /* Maximale Höhe für das Bild festlegen */
  object-fit: contain; /* Stellt sicher, dass das ganze Bild sichtbar ist, ggf. Ränder */
  margin-bottom: 15px; /* Abstand unter dem Bild */
  border-radius: 10px; /* Optional: leicht abgerundete Ecken für das Bild */
}

.card-content h2 {
  font-family: Georgia, "Times New Roman", Times, serif; /* Schriftart für den Titel */
  font-size: 1.6em; /* Kleinere Schriftgröße für die Beschreibung */
  margin: 10px 0 0 0; /* Kein extra Abstand für den Absatz */
  line-height: 1.4; /* Etwas mehr Zeilenabstand für bessere Lesbarkeit */
}
