@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@300;500;700&display=swap');

* {
  box-sizing: border-box;
}

body {
  font-family: 'Urbanist', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  background-color: #111;
}

.card-gallery {
  display: flex;
  width: 90vw;
  max-width: 1400px;
}

.card {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 80vh;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  flex: 0.5;
  margin: 10px;
  position: relative;
  transition: flex 0.7s ease-in-out, border-radius 0.4s;
  overflow: hidden;
}

.card:hover {
  transform: scale(1.02);
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.card--active {
  flex: 5;
}

.card__label {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 20px;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent 80%);
  border-radius: 0 0 20px 20px;
  pointer-events: none;
}

.card__label h3 {
  margin: 0;
  font-size: 24px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease-in 0.4s;
}

.card--active .card__label h3 {
  opacity: 1;
}

/* Background Images */

.card1 {
  background-image: url('images/img1.jpg');
}

.card2 {
  background-image: url('images/img2.jpg');
}

.card3 {
  background-image: url('images/img3.jpg');
}

.card4 {
  background-image: url('images/img4.jpg');
}

.card5 {
  background-image: url('images/img5.jpg');
}




@media (max-width: 480px) {
  body {
    height: auto;
    flex-direction: column;
    padding: 20px 0;
    overflow: auto;
  }

  .card-gallery {
    flex-direction: column;
    width: 100vw;
    height: auto;
    align-items: stretch;
  }

  .card {
    flex: none;
    height: 60vh;
    margin: 10px 20px;
    border-radius: 30px;
  }

  .card__label h3 {
    font-size: 20px;
  }
}
