/* Carousel Thumbnails CSS */

.carousel-thumbnails {
  display: flex;
  flex-wrap: nowrap; /* Prevent wrapping to new line */
  overflow-x: auto; /* Allow horizontal scrolling if needed */
  scrollbar-width: thin; /* For Firefox */
  -ms-overflow-style: none; /* For Internet Explorer and Edge */
  gap: 4px;
  padding-bottom: 8px;
  margin-top: 10px;
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.carousel-thumbnails::-webkit-scrollbar {
  height: 4px;
}

.carousel-thumbnails::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

/* Target Drupal-specific classes */
.carousel-thumbnails .thumbnail,
.carousel-thumbnail {
  flex: 0 0 auto; /* Don't allow items to grow or shrink */
  width: 60px; /* Smaller width to fit more in a row */
  height: 40px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  min-width: 60px; /* Prevent shrinking */
  max-width: 60px;
}

/* Target both active classes for compatibility */
.carousel-thumbnails .thumbnail.active,
.carousel-thumbnail.active {
  border-color: #3b82f6; /* Blue border for active thumbnail */
}

.carousel-thumbnails .thumbnail-img,
.carousel-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
}

/* Adjust main container to handle the right sidebar */
.featured-posts-carousel .container {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .carousel-thumbnails .thumbnail,
  .carousel-thumbnail {
    width: 55px;
    height: 35px;
    min-width: 55px;
    max-width: 55px;
  }
}

@media (max-width: 768px) {
  .carousel-thumbnails .thumbnail,
  .carousel-thumbnail {
    width: 50px;
    height: 32px;
    min-width: 50px;
    max-width: 50px;
  }
}

@media (max-width: 480px) {
  .carousel-thumbnails .thumbnail,
  .carousel-thumbnail {
    width: 45px;
    height: 30px;
    min-width: 45px;
    max-width: 45px;
  }
}
