.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 5rem;
  margin-top: 2rem;
  margin-left: 10%;
  margin-right: 10%;
  justify-items: center; /* Karten zentrieren */
}

.project-card {
  background: #fff;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 5px 10px rgba(0,0,0,0.5);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 300px;
  aspect-ratio: 4 / 5;

  display: flex;
  flex-direction: column;

  background-image: url("../img/polaroidBG.png");
  background-size: cover;
  background-repeat: no-repeat;

  text-decoration: none;
  color: inherit;
  z-index: 1001
}
@media (max-width: 900px) {
  .project-card {
    z-index: 1; /* oder 0, je nach Bedarf */
    position: relative;
  }
}

.project-card:hover {
  transform: rotate(0deg) translateY(-10px) !important;
  box-shadow: 0 12px 35px rgba(0,0,0,0.5);
}

.project-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.project-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);

  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
} 

.project-card-overlay:hover {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);

  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.project-card:hover .project-card-overlay {
  opacity: 1;
}

.project-card-overlay p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  margin: 0;
}


.project-card h3 {
  flex: 1; /* takes remaining space under the image */

  display: flex;
  align-items: center;
  justify-content: center;

  margin: 0;
  font-family: var(--font-accent);
  font-size: 1.5rem;
  font-weight: normal;
  text-align: center;

  text-decoration: none;
  color: inherit;
  cursor: default;
}

@media (max-width: 900px) {
  project-card {
    z-index: 100;
  }
   }