/* ===================================================================
   Carousel Components
   Reusable carousel styles for courses, articles, and other content
   =================================================================== */

/* ===== BASE CAROUSEL STYLES ===== */
.carousel-wrapper {
  position: relative;
  margin: 0 -var(--space-md);
}

.carousel-container {
  overflow: hidden;
  padding: 0 var(--space-md);
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  gap: var(--space-lg);
}

.carousel-item {
  flex: 0 0 auto;
  width: 100%;
}

/* ===== CAROUSEL ARROWS ===== */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  z-index: 3;
  box-shadow: var(--shadow-sm);
}

.carousel-arrow:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
  color: #495057;
  transform: translateY(-50%);
  box-shadow: var(--shadow-sm);
}

.carousel-arrow:disabled,
.carousel-arrow.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.carousel-arrow i {
  font-size: var(--font-size-lg);
  transition: color var(--transition-fast);
}

.carousel-prev {
  left: var(--space-md);
}

.carousel-next {
  right: var(--space-md);
}

/* ===== CAROUSEL INDICATORS ===== */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  padding: 0;
}

.carousel-indicator.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

.carousel-indicator:hover {
  background: var(--secondary-color);
}

/* ===== COURSES CAROUSEL ===== */
.courses-carousel-wrapper {
  position: relative;
  margin: 0 -var(--space-md);
}

.courses-carousel-container {
  overflow: hidden;
  padding: 0 var(--space-md);
}

.courses-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  gap: var(--space-lg);
}

.courses-carousel-item {
  flex: 0 0 auto;
  width: calc(33.333% - var(--space-lg));
  min-width: 300px;
}

.courses-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  z-index: 3;
  box-shadow: var(--shadow-sm);
}

.courses-carousel-arrow:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
  color: #495057;
  transform: translateY(-50%);
  box-shadow: var(--shadow-sm);
}

.courses-carousel-prev {
  left: var(--space-md);
}

.courses-carousel-next {
  right: var(--space-md);
}

/* ===== ARTICLES CAROUSEL ===== */
.articles-carousel-wrapper {
  position: relative;
  margin: 0 -var(--space-md);
}

.articles-carousel-container {
  overflow: hidden;
  padding: 0 var(--space-md);
}

.articles-carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  gap: var(--space-lg);
}

.articles-carousel-item {
  flex: 0 0 auto;
  width: calc(33.333% - var(--space-lg));
  min-width: 280px;
}

.articles-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  z-index: 3;
  box-shadow: var(--shadow-sm);
}

.articles-carousel-arrow:hover {
  background: #f8f9fa;
  border-color: #dee2e6;
  color: #495057;
  transform: translateY(-50%);
  box-shadow: var(--shadow-sm);
}

.articles-carousel-prev {
  left: var(--space-md);
}

.articles-carousel-next {
  right: var(--space-md);
}

.articles-carousel-indicators {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.articles-indicator {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  padding: 0;
}

.articles-indicator.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

.articles-indicator:hover {
  background: var(--secondary-color);
}

/* ===== CAROUSEL ARTICLE CARD ===== */
.carousel-article-card {
  background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
  border-radius: 16px;
  padding: var(--space-xl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  height: 320px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}


.carousel-article-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-category-simple {
  margin-bottom: var(--space-sm);
}

.article-category-simple span {
  background: var(--bg-light);
  color: var(--text-muted);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid var(--border-light);
}

.carousel-article-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-normal);
  color: var(--text-color);
  margin-bottom: auto;
  line-height: var(--line-height-tight);
  flex-grow: 1;
  display: flex;
  align-items: center;
}

.carousel-article-title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.carousel-article-title a:hover {
  color: var(--primary-color);
}

.carousel-article-excerpt {
  color: var(--text-secondary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

.carousel-article-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border-light);
  font-size: 11px;
  margin-top: auto;
  line-height: 1.2;
}

.carousel-author-info {
  display: flex;
  align-items: center;
}

.carousel-author-name {
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
  font-size: 11px;
  line-height: 1.2;
}

.carousel-article-date {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.2;
}

.carousel-read-more {
  color: var(--text-muted);
  font-weight: var(--font-weight-medium);
  font-size: 11px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
}

/* ===== RESPONSIVE CAROUSEL STYLES ===== */
@media (max-width: 992px) {
  .courses-carousel-item {
    width: calc(50% - var(--space-lg));
    min-width: 250px;
  }
  
  .articles-carousel-item {
    width: calc(50% - var(--space-lg));
    min-width: 240px;
  }
}

@media (max-width: 768px) {
  .carousel-wrapper,
  .courses-carousel-wrapper,
  .articles-carousel-wrapper {
    margin: 0;
  }
  
  .carousel-container,
  .courses-carousel-container,
  .articles-carousel-container {
    padding: 0 var(--space-lg);
  }
  
  .courses-carousel-item,
  .articles-carousel-item {
    width: 100%;
    min-width: auto;
  }
  
  .carousel-arrow,
  .courses-carousel-arrow,
  .articles-carousel-arrow {
    width: 40px;
    height: 40px;
  }
  
  .carousel-prev,
  .courses-carousel-prev,
  .articles-carousel-prev {
    left: var(--space-sm);
  }
  
  .carousel-next,
  .courses-carousel-next,
  .articles-carousel-next {
    right: var(--space-sm);
  }
  
  .carousel-article-card {
    padding: var(--space-lg);
    height: 300px;
  }
  
  .carousel-article-title {
    font-size: var(--font-size-3xl);
  }
}