.cards-container {
  max-width: 100%;
  margin: 0 auto;
  display: grid;
  place-items: start;
  z-index: 1;
}

.cards {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: calc(var(--card-h) / 5);
  align-items: baseline;
  width: 100%;
}

.card {
  position: sticky;
  height: var(--card-h);

  border-radius: 25px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  overflow: hidden;

  font-size: 10rem;
  font-weight: bold;
  color: rgba(0, 0, 0, 0.7);
  box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.45);
  transition: transform 0.6s ease, box-shadow 0.6s ease;
  will-change: transform;
}

/* Title styling */
.card__title {
  font-family: "Manrope Medium";
  font-size: clamp(1rem, 1.4vw, 1.6875rem);
  font-weight: 500;
  color: white;
  text-transform: uppercase;
  margin: 0;
  padding: 7.5rem 5%;
}

/* subtitle styling */
.card__copy {
  position: absolute;
  left: 50%;
  transform: translate(0%);
  font-family: "Manrope Medium";
  font-size: clamp(0.875rem, 1vw, 1.125rem);
  font-weight: 500;
  color: white;
  line-height: 1.5;
  margin: 0;

  padding: 7rem 0;
}

.card:nth-child(1) {
  background-image: url("../resources/images/da_1.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  top: calc(5vh + 0 * var(--card-top-offset));
}

.card:nth-child(2) {
  background-image: url("../resources/images/da_2.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  top: calc(5vh + 1 * var(--card-top-offset));
}

.card:nth-child(3) {
  background-image: url("../resources/images/da_3.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  top: calc(5vh + 2 * var(--card-top-offset));
}

.card:nth-child(4) {
  background-image: url("../resources/images/da_4.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  top: calc(5vh + 3 * var(--card-top-offset));
}


@media screen and (min-resolution: 120dpi) and (max-width: 1600px) {
  .card {
    height: 31rem;
  }
}

@media (max-width: 600px) {
  .cards-container {
    max-width: 100vw;
    margin: 0 auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: transparent;
  }

  .cards {
    display: flex;
    flex-direction: column;
    gap: calc(var(--card-h) / 5);
    width: 100%;
    align-items: center;
    background: transparent;
  }

  .card {
    position: sticky !important;
    width: 100vw;
    max-width: 100vw;
    min-height: 320px;
    height: 65vw;
    border-radius: 25px;
    margin: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0;

    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.45);
    transition: transform 0.6s ease, box-shadow 0.6s ease;
    will-change: transform;
  }

  .card__title {
    position: relative;
    font-size: 1.125rem;
    color: #fff;
    font-family: "Manrope Medium";
    text-align: center;
    margin: 0;
    margin-top: -2.25rem;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  }

  .card__copy {
    position: static;
    width: 70%;
    font-size: 0.8rem;
    line-height: normal;
    color: #fff;
    text-align: center;
    padding: 0;
    font-family: "Manrope Medium";
    z-index: 2;
    margin-top: -5.95rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  }

  .card__copy br {
    display: none;
  }

  .card:nth-child(1)::after {
    background-image: none !important;
  }

  .card:nth-child(2)::after {
    background-image: none !important;
  }

  .card:nth-child(3)::after {
    background-image: none !important;
  }

  .card:nth-child(4)::after {
    background-image: none !important;
  }
}
