.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.card {
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0;
  width: calc(33.333% - 32px);
  box-sizing: border-box;
  position: relative;
  cursor: pointer;
  width: 500px;
  height: auto;
  font-size: 18px;
}

.card img {
  position: static;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  user-select: none;
  margin: 0;
  padding: 0;
}

.card .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0;
  box-sizing: border-box;
  transition: background 0.3s ease;
}

.card:hover .overlay {
  background: rgba(0, 0, 0, 0.3);
}

.card h2,
.card h3,
.card h4,
.card h5 {
  position: absolute;
  left: 20px;
  bottom: 50px;
  font-size: 1.5em;
  color: #fff;
  margin: 0;
  padding: 0;
  font-style: italic;
}

.card p {
  position: absolute;
  left: 30px;
  bottom: 25px;
  font-size: 1em;
  color: #fff;
  margin: 0;
  padding: 0;
}
