.offers {
  padding: var(--section-space) 0;
  overflow: hidden;
}

.offers__inner {
  padding: 0 17.8rem 0 19.9rem;
}

.offers__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.offers__nav {
  display: flex;
  flex-shrink: 0;
  gap: 1.2rem;
}

.offers__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: max(4.8rem, 36px);
  height: max(4.8rem, 36px);
  color: var(--color-dark);
  border: 2px solid currentColor;
  border-radius: 50%;
  transition: color var(--transition), background-color var(--transition), border-color var(--transition);
}

.offers__arrow::before {
  content: "";
  width: max(1.6rem, 12px);
  height: max(1.07rem, 8px);
  background-color: currentColor;
  -webkit-mask: url("../../img/icons/arrow-short-dark.svg") center / 100% 100% no-repeat;
  mask: url("../../img/icons/arrow-short-dark.svg") center / 100% 100% no-repeat;
}

.offers__arrow--prev::before {
  transform: scaleX(-1);
}

.offers__arrow:hover {
  color: var(--color-white);
  background-color: var(--color-dark);
}

.offers__arrow.is-disabled {
  display: none;
}

.offers__carousel {
  margin-top: 4.8rem;
}

/* A native horizontally-scrolling, snapping track: no slider library, momentum
   scrolling on touch comes free from the browser. Cards per view are set by
   grid-auto-columns, same breakpoints the old Swiper config used. */
.offers__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * 4.8rem) / 3);
  gap: 4.8rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.offers__list::-webkit-scrollbar {
  display: none;
}

.offers__item {
  scroll-snap-align: start;
}

.offer-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  text-align: left;
  background-color: var(--color-beige);
  border-radius: 2rem;
  overflow: hidden;
}

.offer-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
}

.offer-card__image {
  position: absolute;
  inset: 0;
  background-position: top;
  background-repeat: no-repeat;
  background-size: cover;
}

.offer-card__badge {
  position: absolute;
  top: 1.6rem;
  left: 1.6rem;
  z-index: 1;
  padding: 0.6rem 1.4rem;
  font-size: max(1.4rem, 12px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-dark);
  background-color: var(--color-sand);
  border-radius: 1em;
}

.offer-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-grow: 1;
  padding: 2.8rem 2.8rem 3.2rem;
}

.offer-card__title {
  font-size: max(2.2rem, 16px);
  font-weight: 600;
  line-height: 1.2;
}

.offer-card__text {
  margin-top: 1.2rem;
  font-size: max(1.6rem, 14px);
  font-weight: 300;
  line-height: 1.35;
}

.offer-card__link {
  margin-top: auto;
  padding-top: 2.4rem;
}

/* Modal with the full text
   ========================================================================== */

.offers-modal__dialog {
  width: 72rem;
  max-width: 100%;
  padding: 3.2rem 4rem 4.8rem;
}

.offers-modal__media {
  margin-top: 1.6rem;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 1.6rem;
}

.offers-modal__media[hidden] {
  display: none;
}

.offers-modal__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.offers-modal__title {
  margin-top: 1.6rem;
  font-size: max(3.2rem, 20px);
  font-weight: 600;
  line-height: 1.2;
}

.offers-modal__text {
  margin-top: 2.4rem;
  font-size: max(2rem, 14px);
  line-height: 1.35;
  white-space: pre-line;
}

/* Tablet & mobile
   ========================================================================== */

@media (max-width: 1279.98px) {
  .offers__inner {
    padding-inline: var(--gutter);
  }

  .offers__carousel {
    margin-top: 3.2rem;
  }

  .offers__list {
    grid-auto-columns: calc((100% - 3.2rem) / 2);
    gap: 3.2rem;
  }

  .offer-card__body {
    padding: 2.4rem 2.4rem 2.8rem;
  }

  .offer-card__title {
    font-size: 1.8rem;
  }

  .offer-card__text {
    font-size: 1.5rem;
  }

  .offers-modal__dialog {
    padding: 2.4rem var(--gutter) 3.2rem;
  }
}

@media (max-width: 767.98px) {
  .offers__arrow {
    width: 4rem;
    height: 4rem;
  }

  .offers__list {
    grid-auto-columns: 85%;
    gap: 1.2rem;
  }

  .offer-card__title {
    font-size: 1.6rem;
  }

  .offer-card__text {
    font-size: 1.4rem;
  }

  .offers-modal__title {
    font-size: 2rem;
  }

  .offers-modal__text {
    font-size: 1.4rem;
  }
}
