.bndes--carousel-container {
  position: relative;
  width: 100%;
  min-height: 600px;
  background: #fcfcfc;
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 20%, var(--primary-color) 20%);
  overflow: hidden;
}

/* Series carousel in tabs - transparent and full width */
.bndes--category-nav__tab-panel .bndes--carousel-container {
  min-height: 400px;
  background: transparent;
  margin: 20px 0;
  width: 100%;
  box-shadow: none;
}

.bndes--category-nav__tab-panel .bndes--carousel-slide {
  width: 1200px;
  aspect-ratio: 16 / 9;
}

@media (max-width: 1400px) {
  .bndes--category-nav__tab-panel .bndes--carousel-slide {
    width: 1000px;
  }
}

@media (max-width: 1200px) {
  .bndes--category-nav__tab-panel .bndes--carousel-slide {
    width: 800px;
  }
}

@media (max-width: 900px) {
  .bndes--category-nav__tab-panel .bndes--carousel-slide {
    width: 90vw;
  }
}

/* Series carousel controls styling for tab panels */
.bndes--category-nav__tab-panel .bndes--carousel-controls {
  padding: 15px 20px;
}

.bndes--category-nav__tab-panel .bndes--carousel-arrow {
  width: 45px;
  height: 45px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  font-size: 20px;
  box-shadow: 0 2px 8px rgba(0, 74, 143, 0.2);
  backdrop-filter: none;
}

.bndes--category-nav__tab-panel .bndes--carousel-arrow:hover {
  background-color: #357abd;
  transform: scale(1.05);
}

.bndes--category-nav__tab-panel .bndes--carousel-arrow.disabled {
  background-color: #ccc;
  color: #888;
  cursor: not-allowed;
}

.bndes--category-nav__tab-panel .bndes--carousel-dot {
  background: rgba(0, 74, 143, 0.3);
}

.bndes--category-nav__tab-panel .bndes--carousel-dot.active {
  background: var(--primary-color);
}

/* Series carousel wrapper with lateral navigation */
.bndes--series-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 20px;
}

.bndes--series-carousel-wrapper.bg {
  padding-top: 50px;
  background-size: contain;
  background-repeat: no-repeat;
}

/* Lateral navigation buttons */
.bndes--series-nav-btn {
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 74, 143, 0.2);
}

/* .bndes--series-nav-btn:hover {
  background-color: #357abd;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 74, 143, 0.3);
} */

.bndes--series-nav-btn:active {
  transform: scale(0.95);
}

/* Responsive adjustments for lateral navigation */
@media (max-width: 768px) {
  .bndes--series-carousel-wrapper {
    gap: 15px;
  }

  .bndes--series-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .bndes--series-carousel-wrapper {
    gap: 10px;
  }

  .bndes--series-nav-btn {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
}

/* Carousel wrapper */
.bndes--carousel-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 20px 0;
  overflow: hidden;
}

/* Container that holds and moves all slides */
.bndes--carousel-slides-container {
  display: flex;
  align-items: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
  width: max-content;
  position: relative;
  left: 0;
}

/* Individual slide */
.bndes--carousel-slide {
  flex-shrink: 0;
  width: 1440px;
  aspect-ratio: 159 / 70;
  margin: 0 5px;
  filter: grayscale(0.5) brightness(0.6);
  transform: translateZ(0);
  transition: opacity 0.6s ease, filter 0.6s ease, transform 0.6s ease;
  z-index: 1;
}

.bndes--carousel-slide.active {
  opacity: 1;
  filter: none;
  z-index: 3;
}

.bndes--carousel-slide.preview {
  filter: grayscale(0.3) brightness(0.8);
  z-index: 2;
  transform: scale(0.9);
}

/* Slide content */
.bndes--carousel-slide-content {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  display: flex;
  overflow: hidden;
}

/* Left text section */
.bndes--carousel-text-section {
  flex: 0 0 30%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  overflow: hidden;
}

.bndes--carousel-text-top {
  flex-shrink: 0;
  margin-bottom: 16px;
}

.bndes--carousel-text-middle {
  flex-grow: 1;
  flex-shrink: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  min-height: 0;
}

.bndes--carousel-text-bottom {
  flex-shrink: 0;
  margin-top: 20px;
  padding-top: 16px;
}
/* Category tags */
.bndes--carousel-tags {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
}
/* Article title */
.bndes--carousel-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: #333;
  margin-bottom: 16px;
}

/* Metadata */
.bndes--carousel-metadata {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.bndes--carousel-author {
  font-weight: 600;
}

/* Description */
.bndes--carousel-description {
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 0;
  flex-grow: 1;

  /* Truncate to 4 lines max on desktop */
  display: -webkit-box;
  -webkit-line-clamp: 10;
  line-clamp: 10;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Read more link */
.bndes--carousel-link {
  display: inline-flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.bndes--carousel-link:hover {
  color: #357abd;
  transform: translateX(5px);
}

.bndes--carousel-link::after {
  content: '→';
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.bndes--carousel-link:hover::after {
  transform: translateX(3px);
}

/* Right image section */
.bndes--carousel-image-section {
  flex: 0 0 70%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-color: var(--lighter-gray);
  min-height: 300px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bndes--carousel-image-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 74, 143, 0.1) 0%, rgba(0, 74, 143, 0.05) 100%);
  z-index: 1;
  pointer-events: none;
}

.bndes--carousel-image-section a {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Fallback for missing images */
.bndes--carousel-image-section:not([style*='background-image']),
.bndes--carousel-image-section[style*="background-image: url('')"] {
  background-image: none !important;
}

.bndes--carousel-image-section:not([style*='background-image'])::after,
.bndes--carousel-image-section[style*="background-image: url('')"]::after {
  content: '📷';
  font-size: 48px;
  color: var(--dark-gray);
  opacity: 0.3;
  z-index: 0;
}

/* Navigation controls */
.bndes--carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
}

/* Arrow buttons */
.bndes--carousel-arrow {
  width: 50px;
  height: 50px;
  color: white;
  border: none;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 25px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.bndes--carousel-arrow.disabled {
  cursor: not-allowed;
}

/* Dot indicators */
.bndes--carousel-dots {
  display: flex;
  gap: 12px;
}

.bndes--carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.bndes--carousel-dot.active {
  background: white;
  transform: scale(1.2);
}

.bndes--carousel-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.6);
}

/* Empty state */
.bndes--carousel-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: white;
  font-size: 18px;
}

/* Responsive design */
@media (max-width: 1600px) {
  .bndes--carousel-slide {
    width: 1200px;
    margin: 0 2px;
  }
}

@media (max-width: 1400px) {
  .bndes--carousel-slide {
    width: 1000px;
    margin: 0 2px;
  }
}

@media (max-width: 1200px) {
  .bndes--carousel-slide {
    width: 800px;
    margin: 0 2px;
  }

  .bndes--carousel-text-section {
    padding: 30px;
  }

  .bndes--carousel-title {
    font-size: 24px;
  }
}

@media (max-width: 1024px) {
  .bndes--carousel-container {
    min-height: 650px;
  }

  .bndes--carousel-slide {
    width: 90vw;
    height: 600px;
    margin: 0 20px;
  }

  .bndes--carousel-slide-content {
    flex-direction: column;
  }

  /* Image on top for mobile */
  .bndes--carousel-image-section {
    flex: 0 0 45%;
    order: 1;
    min-height: 220px;
  }

  .bndes--carousel-text-section {
    flex: 0 0 55%;
    order: 2;
    padding: 20px;
    height: auto;
    min-height: 0;
  }

  .bndes--carousel-text-top {
    margin-bottom: 12px;
  }

  .bndes--carousel-text-bottom {
    margin-top: 16px;
    padding-top: 12px;
  }

  .bndes--carousel-title {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .bndes--carousel-description {
    font-size: 14px;
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }

  .bndes--carousel-metadata {
    margin-bottom: 15px;
  }
}

@media (max-width: 768px) {
  .bndes--carousel-container {
    min-height: 600px;
  }

  .bndes--carousel-slide {
    width: 85vw;
    margin: 0 15px;
  }

  .bndes--carousel-image-section {
    flex: 0 0 50%;
    min-height: 200px;
  }

  .bndes--carousel-text-section {
    flex: 0 0 50%;
    padding: 16px;
    height: auto;
  }

  .bndes--carousel-text-top {
    margin-bottom: 10px;
  }

  .bndes--carousel-text-bottom {
    margin-top: 12px;
    padding-top: 8px;
  }

  .bndes--carousel-title {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .bndes--carousel-description {
    font-size: 13px;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

@media (max-width: 480px) {
  .bndes--carousel-container {
    min-height: 550px;
  }

  .bndes--carousel-slide {
    width: 90vw;
    margin: 0 10px;
  }

  .bndes--carousel-image-section {
    flex: 0 0 55%;
    min-height: 180px;
  }

  .bndes--carousel-text-section {
    flex: 0 0 45%;
    padding: 14px;
    height: auto;
  }

  .bndes--carousel-text-top {
    margin-bottom: 8px;
  }

  .bndes--carousel-text-bottom {
    margin-top: 10px;
    padding-top: 6px;
  }

  .bndes--carousel-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .bndes--carousel-description {
    font-size: 12px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-bottom: 15px;
  }

  .bndes--carousel-metadata {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .bndes--carousel-tags {
    margin-bottom: 12px;
  }

  .bndes--carousel-link {
    font-size: 14px;
  }
}

/* Touch/swipe optimization */
.bndes--carousel-wrapper {
  touch-action: pan-y;
}

/* Smooth transitions */
.bndes--carousel-slides-container.transitioning {
  pointer-events: none;
}
