/* Articles Carousel Styles */
.articles-carousel-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 48px auto 0 auto;
  max-width: 1200px;
}

.articles-carousel {
  overflow-x: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 1000px;
  margin: 0 16px;
}

.carousel-track {
  display: flex;
  gap: 32px;
  padding: 10px 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item {
  align-items: flex-start;
  /* background: rgba(255, 255, 255, 0.04); */
  background: rgba(51, 96, 242, 0.25);
  background-clip: padding-box;
  border: 13px solid rgba(51, 96, 242, 0.25);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(13, 59, 122, 0.1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  flex: 0 0 280px;
  max-width: 280px;
  min-width: 280px;
  overflow: hidden;
  scroll-snap-align: start;
  transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item:hover {
  /* border-color: rgba(255, 255, 255, 0.25); */
  box-shadow: 0 2px 10px rgba(26, 95, 180, 0.3);
  transform: translateY(-8px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item-image {
  align-items: center;
  background: rgba(51, 96, 242, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  display: flex;
  height: 160px;
  justify-content: center;
  object-fit: cover;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.carousel-item-image img {
  height: 100%;
  object-fit: cover;
  /* width: 100%; */
}

.carousel-meta {
  padding: 20px 5px 24px 5px;
}
.carousel-topic {
  color: var(--primary-light-blue);
  display: inline-block;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.carousel-title,
.carousel-title a {
  color: rgb(255, 255, 255);
  font-family: Georgia, serif;
  font-size: 1.76rem;
  line-height: 1.3;
  margin-bottom: 8px;
  text-decoration: none;
}

.carousel-desc {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.36rem;
  line-height: 1.5;
  margin: 0px;
}

.carousel-arrow {
  align-items: center;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-size: 3.2rem;
  height: 48px;
  justify-content: center;
  min-width: 48px;
  position: relative;
  transition: all 0.2s;
  width: 48px;
  z-index: 2;
}
.carousel-arrow:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
}
.carousel-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.3;
  transform: none;
}

/* Desktop: 3 full + 1 partial */
@media (min-width: 1025px) {
  .articles-carousel {
    max-width: 1200px;
  }
  .carousel-track {
    gap: 32px;
  }
  .carousel-item {
    min-width: 280px;
    max-width: 280px;
    flex: 0 0 280px;
  }
}

/* Tablet: 2 full + 1 partial */
@media (max-width: 1024px) and (min-width: 769px) {
  .articles-carousel {
    max-width: 908px;
  }
  .carousel-item {
    min-width: 280px;
    max-width: 280px;
    flex: 0 0 280px;
  }
}

/* Mobile: 1 full + 1 partial */
@media (max-width: 768px) {
  .articles-carousel-wrapper {
    padding: 0 10px;
  }
  .articles-carousel {
    /* max-width: 340px; */
    /* margin: 0 4px; */
  }
  .carousel-item {
    min-width: 246px;
    max-width: 260px;
    flex: 0 0 246px;
  }
  .carousel-meta {
    padding: 14px 12px 18px 12px;
  }
}
