:root {
  --bg-color: #1e293b;
}

body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
  background-color: var(--bg-color);
  color: white;
}

h1 {
  font-size: 6rem;
  padding: 2rem 2rem 0 2rem;
  margin: 0;
}

.language-selector {
  margin-bottom: 2rem;
}

.container {
  max-width: 1400px;
  margin: auto;
  text-align: center;
  z-index: 0;
}

.card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  place-content: center;
  gap: 1rem; /* Optional: fügt Abstand zwischen den Karten hinzu */
  padding-inline: 3rem;
}
.card {
  opacity: 0;
  border-radius: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  width: 300px;
  cursor: pointer;
  animation: fadeIn .4s forwards;
  animation-delay: calc(var(--index) * 0.2s);
}

.card:hover {
  transform: scale(1.05) !important;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -20px;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: fill;
}

.card h2 {
  margin-bottom: 1rem;
}

.card p {
  font-size: 14px;
  margin: 20px;
}

#info-window-wrapper {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  background: rgba(0, 0, 0, 0.3);
  position: absolute;
  z-index: 10;
  position: fixed;
  display: none;
  justify-content: center;
  align-items: center;
}
#info-window {
  width: 40vw;
  min-width: 40vw;
  max-width: fit-content;
  height: 32vw;
  min-height: 32vw;
  max-height: auto;
  background-color: white;
  clip-path: polygon(23% 0%, 78% 0%, 100% 50%, 78% 100%, 23% 100%, 0% 50%);
  display: flex;
  justify-content: center;
  align-items: center;
}
#info-window-content {
  width: 20vw;
  min-width: 20vw;
  max-width: 20vw;
  height: 30vw;
  min-height: 30vw;
  max-height: auto;
}

#info-window-content img {
  width: 50%;
  margin: 0 auto;
  display: block;
}
#info-window-content table {
  width: 20vw;
  min-width: 20vw;
  max-width: 20vw;
  font-size: 1vw;
}
#info-window-content h1 {
  text-align: center;
}
#closing-button {
  float: right;
  background: transparent;
  border-color: transparent;
  font-size: 15px;
  cursor: pointer;
}
#info-window-content th {
  text-align: left;
}
#info-window-content td {
  padding: 5px 0;
}

@media (max-width: 1600px) {
  #info-window {
    width: 50vw;
    min-width: 50vw;
    max-width: fit-content;
    height: 40vw;
    min-height: 40vw;
    max-height: auto;
    background-color: white;
    clip-path: polygon(23% 0%, 78% 0%, 100% 50%, 78% 100%, 23% 100%, 0% 50%);
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #info-window-content {
    width: 25vw;
    min-width: 25vw;
    max-width: 25vw;
    height: 38vw;
    min-height: 38vw;
    max-height: auto;
  }
  #info-window-content table {
    width: 25vw;
    min-width: 25vw;
    max-width: 25vw;
    font-size: 1vw;
  }
}

@media (max-width: 768px) {
  .card {
    width: 100%;
    margin-right: 0;
  }
  #info-window {
    width: 70vw;
    min-width: 70vw;
    max-width: fit-content;
    height: 56vw;
    min-height: 56vw;
    max-height: auto;
    background-color: white;
    clip-path: polygon(23% 0%, 78% 0%, 100% 50%, 78% 100%, 23% 100%, 0% 50%);
    display: flex;
    justify-content: center;
    align-items: center;
  }
  #info-window-content {
    width: 35vw;
    min-width: 35vw;
    max-width: 35vw;
    height: 54vw;
    min-height: 54vw;
    max-height: auto;
  }
  #info-window-content table {
    width: 35vw;
    min-width: 35vw;
    max-width: 35vw;
    font-size: 1vw;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.2) translate3d(-100px, 0, 0);
  }
  to {
    opacity: 1;
    transform: scale(1) translate3d(0, 0, 0);
  }
}
