/* Article Image Carousel Styles */
.article-images-carousel {
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 350px;
  max-width: 40%;
}

.article-images-carousel #articleImageCarousel {
  position: relative;
  padding-bottom: 5.25rem;
}

/* RunAut detail uses larger visual thumbnail cards; keep strip close to image area. */
.runaut-images-carousel #articleImageCarousel {
  padding-bottom: 5.25rem;
}

.runaut-images-carousel .carousel-inner {
  aspect-ratio: 1 / 1;
}

.runaut-images-carousel .carousel-item {
  height: 100%;
}

.runaut-images-carousel .article-carousel-image {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.runaut-images-carousel .carousel-thumbnails {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.article-carousel-image {
  height: 250px;
  object-fit: cover;
  object-position: center;
  background: #fff;
  border-radius: 10px;
}

/* Ensure all carousel images in article detail have rounded corners */
.article-images-carousel .carousel-item img,
.article-images-carousel img {
  border-radius: 10px;
}

/* Thumbnail-based carousel indicators */
.carousel-thumbnails {
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-bottom: 0;
  justify-content: flex-start;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem;
  background: rgba(248, 249, 250, 0.95);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  scrollbar-color: #312783 transparent;
  scroll-behavior: smooth;
}

/* Webkit scrollbar styling for thumbnails */
.carousel-thumbnails::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.carousel-thumbnails::-webkit-scrollbar-thumb {
  background: #312783;
  border-radius: 3px;
}

.carousel-thumbnails::-webkit-scrollbar-thumb:hover {
  background: #211773;
}

.carousel-thumbnails .thumbnail-indicator {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: none;
  padding: 0;
  opacity: 0.7;
  transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  position: relative;
  flex: 0 0 auto;
  min-width: 60px;
}

.carousel-thumbnails .thumbnail-indicator:hover {
  opacity: 0.9;
  border-color: rgba(255, 255, 255, 0.9);
}

.carousel-thumbnails .thumbnail-indicator.active {
  opacity: 1;
  border-color: #2563eb;
  border-width: 3px;
  transform: scale(1.18);
  z-index: 1;
}

.carousel-thumbnails .thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Responsive thumbnail sizing */
@media (min-width: 1200px) {
  .carousel-thumbnails .thumbnail-indicator {
    width: 70px;
    height: 70px;
    min-width: 70px;
  }

  .article-images-carousel {
    width: 400px;
    max-width: 35%;
  }

  .article-carousel-image {
    height: 300px;
  }
}

@media (max-width: 1199.98px) and (min-width: 992px) {
  .carousel-thumbnails .thumbnail-indicator {
    width: 55px;
    height: 55px;
    min-width: 55px;
  }

  .article-images-carousel {
    width: 320px;
    max-width: 45%;
  }

  .article-carousel-image {
    height: 220px;
  }
}

/* Fallback for old-style indicators (if needed) */
.carousel-indicators:not(.carousel-thumbnails) [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.carousel-indicators:not(.carousel-thumbnails) .active {
  background-color: #2563eb;
}

.carousel-caption {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  border-radius: 0 0 12px 12px;
  padding: 1rem;
  margin-bottom: 0;
}

.carousel-caption p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.article-detail .article-description-intro--team {
  font-size: 1.28rem;
  line-height: 1.75;
  color: #334155;
}

.article-detail .article-description-intro--team p,
.article-detail .article-description-intro--team li {
  font-size: inherit;
  line-height: inherit;
}

.article-detail .article-date {
  font-size: 1.28rem;
  line-height: 1.75;
  color: #334155 !important;
}

.no-images {
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  background: #f8f9fa;
}

.no-images i {
  color: #adb5bd;
  margin-bottom: 0.5rem;
}

/* RunAut detail spacing between article text and logo blocks. */
.runaut-logo-group {
  padding-top: 1.25rem !important;
  padding-bottom: 1.25rem !important;
}

.runaut-logo-group-general {
  margin-top: 2rem;
}

.runaut-logo-group-partners {
  margin-top: 1.5rem;
}

@media (max-width: 767.98px) {
  .runaut-logo-group-general {
    margin-top: 1.25rem;
  }

  .runaut-logo-group-partners {
    margin-top: 1rem;
  }
}
