.aag-layout .articles-slider {
  width: 100%;
  overflow-x: hidden;
}

.aag-layout .articles-slider__wrapper {
  width: 100%;
  overflow: hidden;
}

@media (max-width: 899px) {
  .aag-layout .articles-slider__wrapper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }
  .aag-layout .articles-slider-item {
    scroll-snap-align: start;
    width: calc(100% - 2.75rem);
    max-width: 22rem;
    flex-shrink: 0;
  }
}

@media (min-width: 900px) {
  .aag-layout .articles-slider__wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
  }
}

@media (min-width: 1200px) {
  .aag-layout .articles-slider__wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
}

.aag-layout .articles-slider-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 5;
  min-width: 0;
}

.aag-layout .articles-slider-item a {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.aag-layout .articles-slider-item__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  margin: 0;
  padding: 0;
}

.aag-layout .articles-slider-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease-in-out;
}

.aag-layout .articles-slider-item:hover .articles-slider-item__image img {
  transform: scale(1.05);
}

.aag-layout .articles-slider-item__image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.7) 30%,
    rgba(255, 255, 255, 0) 100%
  );
  z-index: 2;
  pointer-events: none;
}

.aag-layout .articles-slider-item__header {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box;
}

.aag-layout .articles-slider-item__header h3 {
  color: var(--black);
  font-size: 1.125rem;
  font-weight: 500;
  text-transform: uppercase;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

@media (min-width: 1200px) {
  .aag-layout .articles-slider-item__header h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 599px) {
  .aag-layout .articles-slider-item__header {
    padding: 1rem;
  }

  .aag-layout .articles-slider-item__header h3 {
    font-size: 1rem;
  }
}

.aag-layout .articles-slider-item .button--outline {
  border: 1px solid var(--black);
  background-color: transparent;
  color: var(--black);
  padding: 8px 24px;
  font-size: 14px;
  margin-top: 0;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.aag-layout .articles-slider-item .button--outline:hover {
  background-color: var(--black);
  color: var(--white);
}

@media (max-width: 599px) {
  .aag-layout .articles-slider-item .button--outline {
    padding: 6px 16px;
    font-size: 13px;
  }
}
