.article-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carousel-track {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-item {
  flex: 0 0 100%;
  background: var(--rsm-white);
  overflow: hidden;
  cursor: pointer;
}

.image-wrapper {
  overflow: hidden;
  width: 100%;
  height: 248px;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-prev span,
.carousel-next span {
  width: 100%;
  height: auto;
  filter: brightness(0) saturate(100%) invert(36%) sepia(100%) saturate(4500%) hue-rotate(190deg);
}

.article-card-link .image-wrapper img {
  transition: transform 0.5s ease;
}

.article-card-link .image-wrapper:hover img {
  transform: scale(1.1);
}

.article-card-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 149px;
}

.article-card-link h3 {
  font-size: 1.2rem;
  min-height: 66px;
  max-width: 371px;
}

.article-card-link h3:hover {
  color: var(--rsm-primary-green);
}

.article-card-link .date,
.article-card-link .author {
  font-size: var(--body-font-size-s);
  color: var(--text-grey);
}

.article-card-link .article-card-meta .author {
  margin-top: auto;
}

.article-card-link .article-card-meta .author:hover {
  color: var(--rsm-primary-green);
  text-decoration: underline;
}

.article-card-meta {
  display: inline-flex;
  gap: 2px;
}

/* Navigation Styling */
.carousel-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  
}

.carousel-nav button{
  background-color: transparent;
  border: none;
}

button.carousel-prev,
button.carousel-next {
  background: none;
  width: 30px;
  height: auto;
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-dots{
  align-self: center;
  display: inline-flex;
  gap: 10px;
}

.carousel-dot{
  padding: 8px;
  border-radius: 10px;
}

.carousel-dots .carousel-dot{
  background-color: white;
  border: 1px solid var(--rsm-blue);
}

.carousel-dots .carousel-dot.active{
  background-color: var(--rsm-blue);
  border: 1px solid var(--rsm-blue);
}

/* Tablet styles */
@media (min-width: 576px) {
  .carousel-track {
    display: flex;
    gap: 22px;
  }
  
  .carousel-item {
    flex: 0 0 calc(100% / 3 - 20px);
    max-width: calc(100% / 3 - 16px);
  }
}

/* Desktop styles */
@media (min-width: 1024px) {
  .carousel-track {
    display: flex;
    gap: 30px;
  }

  .carousel-item {
    flex: 0 0 calc(100% / 3 - 16px);
    max-width: calc(100% / 3 - 25px);
  }
}
