/* Стили для сворачиваемых модулей курса */

/* Основной контейнер модуля */
.curriculum-section {
  margin-bottom: 16px;
  background: #FFFFFF;
  border: 1px solid #E8E8E8;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

/* Синяя полоса слева для всего модуля */
.curriculum-section::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 9px;
  height: 100%;
  background: #0D81FF;
  border-radius: 8px 0px 0px 8px;
  z-index: 1;
  transition: width 0.3s ease;
}

/* Утончение полосы при раскрытии */
.curriculum-section:not(.collapsed)::before {
  width: 6px;
}

/* Цвета полос для разных типов модулей */

/* Большинство модулей используют синий цвет */
.curriculum-section.module-type-learning::before,
.curriculum-section.module-type-entrance_exam::before,
.curriculum-section.module-type-midterm_exam::before,
.curriculum-section.module-type-practice::before,
.curriculum-section.module-type-survey::before {
  background: #0D81FF;
}

.curriculum-section.module-type-learning:not(.collapsed)::before,
.curriculum-section.module-type-entrance_exam:not(.collapsed)::before,
.curriculum-section.module-type-midterm_exam:not(.collapsed)::before,
.curriculum-section.module-type-practice:not(.collapsed)::before,
.curriculum-section.module-type-survey:not(.collapsed)::before {
  width: 6px;
  background: #0D81FF;
}

/* Final Exam использует красный цвет */
.curriculum-section.module-type-final_exam::before {
  background: #f34e4e;
}

.curriculum-section.module-type-final_exam:not(.collapsed)::before {
  width: 6px;
  background: #f34e4e;
}

/* Устаревший класс для совместимости */
.curriculum-section.exam-module::before {
  background: #E63946;
}

.curriculum-section.exam-module:not(.collapsed)::before {
  width: 6px;
  background: #E63946;
}

/* Заголовок модуля с новым дизайном */
.module-header-collapsible {
  box-sizing: border-box;
  width: 100%;
  min-height: 62px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 16px 0;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.module-header-collapsible:hover {
  background-color: #F8F8F8;
}

/* Контейнер содержимого модуля */
.module-content-wrapper {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 20px 0 66px;
  gap: 8px;
  position: relative;
  min-height: 30px;
  justify-content: center;
}

/* Верхняя строка с заголовком и кнопкой */
.module-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  gap: 16px;
}

/* Иконка статуса */
.module-status-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Все иконки модулей серые (нейтральные) */
.module-type-learning .module-status-icon,
.module-type-entrance_exam .module-status-icon,
.module-type-midterm_exam .module-status-icon,
.module-type-final_exam .module-status-icon,
.module-type-practice .module-status-icon,
.module-type-survey .module-status-icon {
  color: #888;
}

/* Цвета для разных состояний (приоритетные) */
.module-status-icon .text-muted {
  color: #888 !important;
}

.module-status-icon .text-success {
  color: #28a745 !important;
}

/* Кнопка сворачивания (стрелка) */
.collapse-toggle {
  flex-shrink: 0;
  background: #0D81FF;
  border: none;
  padding: 0;
  color: #FFFFFF;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

/* Стили для иконки кнопки сворачивания */
.frame-icon {
  width: 24px;
  position: relative;
  border-radius: 4px;
  max-width: 100%;
  overflow: hidden;
  height: 24px;
  background: #0D81FF;
}

.collapse-toggle:hover {
  background: #0B6ECC;
  color: #FFFFFF;
}

.collapse-toggle:focus {
  outline: none;
  box-shadow: none;
}

/* Иконка сворачивания */
.collapse-icon {
  font-size: 14px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

/* Поворот стрелки при раскрытии */
.curriculum-section:not(.collapsed) .collapse-icon {
  transform: rotate(180deg);
}

/* Заголовок модуля */
.module-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.3;
  color: #000000;
  margin: 0;
  word-wrap: break-word;
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Описание модуля в раскрытом состоянии */
.module-description-expanded {
  font-size: 14px;
  font-weight: 400;
  color: #666;
  margin: 0;
  line-height: 1.4;
  word-wrap: break-word;
  padding: 16px 66px 16px 80px;
  position: relative;
}

/* Разделитель под описанием модуля (начинается от позиции контента) */
.module-description-expanded::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 80px; /* Начинается от позиции текста */
  right: 66px; /* Заканчивается с отступом справа */
  height: 1px;
  background-color: #F0F0F0;
}

/* Мета-информация модуля */
.module-meta {
  font-size: 13px;
  font-weight: 400;
  color: #888;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Контент модуля */
.section-content {
  background: transparent;
  border: none;
  border-radius: 0;
  margin-top: 0;
  transition: all 0.3s ease;
  padding: 0;
  border-top: 1px solid #F0F0F0;
}

/* Убираем границу если модуль свернут */
.curriculum-section.collapsed .section-content {
  border-top: none;
}

/* Элементы учебной программы (уроки) */
.curriculum-item {
  background: transparent;
  border: none;
  margin-bottom: 0;
  transition: all 0.3s ease;
  position: relative;
  padding: 12px 20px 12px 80px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Разделитель между уроками (начинается от иконок) */
.curriculum-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 40px; /* Начинается от позиции иконок */
  right: 0;
  height: 1px;
  background-color: #F0F0F0;
}

.curriculum-item:last-child::after {
  display: none;
}

.curriculum-item:hover {
  background-color: #F8F8F8;
}

/* Иконка урока */
.lesson-icon {
  position: absolute;
  left: 40px;
  width: 22px;
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0D81FF;
  font-size: 16px;
}

/* Контент урока */
.lesson-content {
  flex: 1;
  min-width: 0;
}

/* Заголовок урока */
.lesson-title {
  font-size: 14px;
  color: #333;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Время урока */
.lesson-duration {
  font-size: 12px;
  color: #888;
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Кнопка "Развернуть все" */
.expand-all-btn {
  border-radius: 6px;
  background-color: #f5f5f7;
  border: 1px solid #e8e8e8;
  box-sizing: border-box;
  width: auto;
  height: 34px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 10px;
  gap: 10px;
  text-align: left;
  font-size: 14px;
  color: #000;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  transition: all 0.3s ease;
}

.expand-all-btn:hover {
  background-color: #ebebed;
  border-color: #d6d6d6;
  color: #000;
}

.expand-all-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(13, 129, 255, 0.2);
}

.expand-all-btn i {
  width: 8px;
  font-size: 12px;
  transition: transform 0.3s ease;
}

/* Заголовок урока */
.item-title {
  font-size: 15px;
  color: #333;
  font-weight: 400;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Длительность урока */
.item-duration {
  font-size: 13px;
  color: #888;
}

/* Стили для изображения в sidebar */
.sidebar-course-image {
  height: auto; /* Полноразмерно на десктопе */
  max-height: none;
}

/* Контейнер для изображения с кнопкой */
.course-image-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

/* Кнопка промо ролика */
.promo-video-btn {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.promo-video-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.promo-video-btn i {
  font-size: 14px;
}

.promo-video-btn span {
  font-size: 11px;
}

/* Стили для видео модального окна */
#videoModal .modal-content {
  background-color: #1a1a1a !important;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#videoModal .modal-header {
  background-color: transparent;
  border-bottom: none;
  padding: 1rem 1.5rem 0.5rem;
}

#videoModal .modal-body {
  padding: 0;
}

#videoModal .ratio {
  border-radius: 0;
}

#videoModal iframe {
  border-radius: 0;
  width: 100%;
  height: 100%;
}

/* Стили для секции Info в sidebar */
.course-info-container {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-content: center;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
}

.course-info-item {
  border-radius: 6px;
  background-color: #fff;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  box-sizing: border-box;
  text-align: left;
  font-size: 12px;
  color: #7d7d7d;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600;
  width: fit-content;
}

/* Header Typography Harmonization */

/* Стили для категории курса */
.course-category-badge {
  border-radius: 6px;
  background-color: #f5f5f7;
  border: 1px solid #e8e8e8;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  text-align: left;
  font-size: 13px;
  color: #333;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  width: fit-content;
}

/* Стили для сложности курса */
.course-difficulty-badge {
  border-radius: 6px;
  background-color: #fcd25c;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  box-sizing: border-box;
  text-align: left;
  font-size: 13px;
  color: #333;
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  position: relative;
  font-weight: 500;
  width: fit-content;
}

/* Цвета для разных уровней сложности */
.difficulty-beginner {
  background-color: #fcd25c;
}

.difficulty-intermediate {
  background-color: #0D6EFD;
  color: #fff;
}

.difficulty-advanced {
  background-color: #FFC107;
  color: #000;
}

.difficulty-expert {
  background-color: #DC3545;
  color: #fff;
}

/* Course Header Typography Harmonization */

/* Course Stats Typography */
.row.text-center .col-3 .text-muted.small:first-child {
  font-size: 14px;
  font-weight: 500;
  color: #666;
  line-height: 1.3;
}

.row.text-center .col-3 .text-muted.small:last-child {
  font-size: 12px;
  font-weight: 400;
  color: #888;
  margin-top: 2px;
}

/* Short Description Typography */
.mt-3 p.mb-0 {
  font-size: 15px;
  font-weight: 400;
  color: #555;
  line-height: 1.5;
}

/* Стили для Organizations Section */
.organizations-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.organization-item {
  width: 100%;
}

.organization-card {
  border: none;
  background: transparent;
}

.organization-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px;
}

.organization-logo {
  max-height: 64px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 8px;
}

.organization-placeholder {
  width: 48px;
  height: 48px;
  background: #e9ecef;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px auto;
}

.organization-placeholder i {
  font-size: 18px;
}

.organization-name {
  font-size: 0.7rem;
  line-height: 1.1;
  color: #333;
  font-weight: 500;
}

/* Адаптивность */
@media (min-width: 768px) {
  /* На планшетах и десктопе убираем дополнительные отступы */
  .col-12.col-md-9 {
    margin-bottom: 0;
  }
  
  .col-12.col-md-3 {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .sidebar-course-image {
    height: 200px; /* Фиксированная высота на мобильных */
    max-height: 200px;
  }
  
  /* Кнопка промо ролика на мобильных */
  .promo-video-btn {
    bottom: 16px;
    right: 16px;
    padding: 6px 10px;
    font-size: 11px;
  }
  
  .promo-video-btn i {
    font-size: 12px;
  }
  
  .promo-video-btn span {
    font-size: 10px;
  }
  
  /* Адаптивная высота модулей на мобильных */
  .module-header-collapsible {
    min-height: 56px;
    padding: 12px 0;
  }
  
  .module-title {
    font-size: 16px;
    line-height: 1.3;
  }
  
  .module-content-wrapper {
    padding: 0 16px 0 20px; /* Уменьшаем левый отступ, так как иконка скрыта */
    min-height: 32px;
  }
  
  .module-status-icon {
    display: none; /* Скрываем иконку статуса на мобильных */
  }
  
  /* Тоньше полоса на мобильных */
  .curriculum-section::before {
    width: 4px; /* Тоньше чем 9px на десктопе */
  }
  
  .curriculum-section:not(.collapsed)::before {
    width: 3px; /* Тоньше чем 6px на десктопе */
  }
  
  /* Уроки на мобильных */
  .curriculum-item {
    padding: 12px 16px 12px 60px; /* Согласуем с module-content-wrapper */
  }
  
  .lesson-icon {
    left: 30px; /* Ближе к полосе на мобильных */
  }
  
  .curriculum-item::after {
    left: 30px; /* Разделитель тоже ближе */
  }
  
  /* Organizations горизонтально на мобильных */
  .organizations-container {
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-bottom: 20px;
  }
  
  .organization-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 80px;
  }
  
  .organization-content {
    padding: 8px 6px;
  }
  
  .organization-logo {
    max-height: 48px;
    margin-bottom: 4px;
  }
  
  .organization-placeholder {
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
  }
  
  .organization-placeholder i {
    font-size: 16px;
  }
  
  .organization-name {
    font-size: 0.65rem;
    line-height: 1.1;
  }
}

/* Inline styles moved to CSS */

.sidebar-card {
  position: sticky;
  top: 20px;
  border-radius: 16px;
  background-color: #f5f5f7;
  border: 1px solid #f6f6f9;
  box-sizing: border-box;
}

.sidebar-course-image {
  object-fit: cover;
  border-radius: 8px;
  padding: 12px;
}

.course-preparation-icon {
  font-size: 3rem;
}

.video-frame-no-border {
  border-radius: 0;
}

.video-error-icon {
  font-size: 3rem;
}

.video-placeholder-container {
  height: 400px;
}

.video-placeholder-icon {
  font-size: 3rem;
}

/* Mobile styles continuation */
@media (max-width: 768px) {
  
  /* Header Typography на мобильных */
  .course-category-badge,
  .course-difficulty-badge {
    font-size: 12px;
    padding: 3px 6px;
  }
  
  .row.text-center .col-3 .text-muted.small:first-child {
    font-size: 13px;
  }
  
  .row.text-center .col-3 .text-muted.small:last-child {
    font-size: 11px;
  }
  
  .mt-3 p.mb-0 {
    font-size: 14px;
  }
  
  /* Отступы для мобильных */
  .col-lg-3 {
    margin-bottom: 24px;
  }
  
  .col-lg-9 {
    margin-top: 0;
  }
  
  /* Отступы внутри header на мобильных */
  .col-12.col-md-9 {
    margin-bottom: 16px;
  }
  
  .col-12.col-md-3 {
    margin-top: 0;
    margin-bottom: 20px;
  }
  
  .module-header-collapsible {
    height: auto;
    min-height: 62px;
  }
  
  .module-content-wrapper {
    padding: 0 16px;
    gap: 12px;
  }
  
  .module-title {
    font-size: 16px;
    line-height: 20px;
  }
  
  .module-status-icon {
    display: none; /* Скрываем иконку статуса на мобильных */
  }
  
  .collapse-toggle {
    width: 20px;
    height: 17px;
  }
  
  .collapse-icon {
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  
  /* Header Typography на очень маленьких экранах */
  .course-category-badge,
  .course-difficulty-badge {
    font-size: 11px;
    padding: 2px 5px;
  }
  
  .row.text-center .col-3 .text-muted.small:first-child {
    font-size: 12px;
  }
  
  .row.text-center .col-3 .text-muted.small:last-child {
    font-size: 10px;
  }
  
  .mt-3 p.mb-0 {
    font-size: 13px;
  }
  
  .module-content-wrapper {
    padding: 0 12px;
    gap: 10px;
  }
  
  /* Дополнительные отступы для очень маленьких экранов */
  .col-lg-3 {
    margin-bottom: 20px;
  }
  
  .col-12.col-md-9 {
    margin-bottom: 12px;
  }
  
  /* Уменьшаем отступы в header */
  .mb-4 {
    margin-bottom: 1.5rem !important;
  }
  
  /* Organizations на очень маленьких экранах - еще компактнее */
  .organizations-container {
    gap: 8px;
    margin-bottom: 16px;
  }
  
  .organization-item {
    min-width: 70px;
  }
  
  .organization-content {
    padding: 6px 4px;
  }
  
  .organization-logo {
    max-height: 40px;
  }
  
  .organization-placeholder {
    width: 36px;
    height: 36px;
  }
  
  .organization-placeholder i {
    font-size: 14px;
  }
  
  .organization-name {
    font-size: 0.6rem;
  }
  
  .module-title {
    font-size: 15px;
    line-height: 18px;
  }
  
  .module-status-icon {
    display: none; /* Скрываем иконку статуса на мобильных */
  }
  
  .collapse-toggle {
    width: 18px;
    height: 15px;
  }
  
  .collapse-icon {
    font-size: 14px;
  }
}

/* ============================================
   DARK THEME SUPPORT - Using data-bs-theme attribute
   ============================================ */

/* Основные элементы в темной теме */
[data-bs-theme="dark"] .curriculum-section {
  background: #1D3856;
  border: 1px solid rgba(255, 255, 255, 0.175);
  color: #FFFFFF;
}

[data-bs-theme="dark"] .module-header-collapsible {
  background: rgba(29, 56, 86, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.175);
  color: #FFFFFF;
}

[data-bs-theme="dark"] .module-header-collapsible:hover {
  background: rgba(29, 56, 86, 0.8);
}

[data-bs-theme="dark"] .module-title {
  color: #FFFFFF !important;
}

[data-bs-theme="dark"] .module-meta {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-bs-theme="dark"] .module-description-expanded {
  color: #FFFFFF;
  border-top-color: rgba(255, 255, 255, 0.175);
}

[data-bs-theme="dark"] .module-description-expanded::after {
  background-color: rgba(255, 255, 255, 0.175);
}

[data-bs-theme="dark"] .section-content {
  background: transparent;
  border-top-color: rgba(255, 255, 255, 0.175);
}

[data-bs-theme="dark"] .curriculum-item {
  background: rgba(29, 56, 86, 0.3);
  border-bottom-color: rgba(255, 255, 255, 0.175);
  color: #FFFFFF;
}

[data-bs-theme="dark"] .curriculum-item:hover {
  background: rgba(29, 56, 86, 0.5);
}

[data-bs-theme="dark"] .curriculum-item::after {
  background-color: rgba(255, 255, 255, 0.175);
}

[data-bs-theme="dark"] .lesson-title,
[data-bs-theme="dark"] .item-title {
  color: #FFFFFF !important;
}

[data-bs-theme="dark"] .lesson-duration,
[data-bs-theme="dark"] .item-duration {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-bs-theme="dark"] .lesson-icon {
  color: #0D81FF;
}

[data-bs-theme="dark"] .lesson-icon .bi-check-circle {
  color: #28a745 !important;
}

[data-bs-theme="dark"] .lesson-icon .bi-play-circle {
  color: #0D81FF !important;
}

[data-bs-theme="dark"] .lesson-icon .bi-lock {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-bs-theme="dark"] .lesson-icon .bi-upload {
  color: #0D81FF !important;
}

[data-bs-theme="dark"] .lesson-icon .bi-ui-checks-grid {
  color: #0D81FF !important;
}

[data-bs-theme="dark"] .lesson-icon .bi-clipboard-check {
  color: #dc3545 !important;
}

/* Кнопки в темной теме */
[data-bs-theme="dark"] .btn-success {
  background-color: #28a745;
  border-color: #28a745;
  color: #fff;
}

[data-bs-theme="dark"] .btn-primary {
  background-color: #0D81FF;
  border-color: #0D81FF;
  color: #fff;
}

[data-bs-theme="dark"] .btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

[data-bs-theme="dark"] .btn-warning {
  background-color: #ffc107;
  border-color: #ffc107;
  color: #000;
}

[data-bs-theme="dark"] .btn-outline-secondary {
  border-color: rgba(255, 255, 255, 0.175);
  color: rgba(255, 255, 255, 0.7);
  background-color: transparent;
}

[data-bs-theme="dark"] .btn-outline-secondary:disabled {
  border-color: rgba(255, 255, 255, 0.175);
  color: rgba(255, 255, 255, 0.7);
  background-color: transparent;
  opacity: 0.6;
}

/* Collapse Toggle в темной теме */
[data-bs-theme="dark"] .collapse-toggle {
  background: #0D81FF;
  color: #FFFFFF;
}

[data-bs-theme="dark"] .collapse-toggle:hover {
  background: #0056b3;
  color: #FFFFFF;
}

/* Module Status Icons в темной теме */
[data-bs-theme="dark"] .module-status-icon .bi-check-circle-fill {
  color: #28a745 !important;
}

[data-bs-theme="dark"] .module-status-icon .bi-play-circle {
  color: #0D81FF !important;
}

[data-bs-theme="dark"] .module-status-icon .bi-lock {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-bs-theme="dark"] .module-status-icon .bi-clock {
  color: #ffc107 !important;
}

/* Левая цветная полоса модулей в темной теме */
[data-bs-theme="dark"] .curriculum-section::before {
  background: #0D81FF;
}

[data-bs-theme="dark"] .curriculum-section.module-type-final_exam::before {
  background: #dc3545;
}

[data-bs-theme="dark"] .curriculum-section.module-type-exam::before {
  background: #E63946;
}

/* Expand All Button в темной теме */
[data-bs-theme="dark"] .expand-all-btn {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.175);
  color: #FFFFFF;
}

[data-bs-theme="dark"] .expand-all-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
}

/* Sidebar elements в темной теме */
[data-bs-theme="dark"] .sidebar-card {
  background-color: #1D3856;
  border-color: rgba(255, 255, 255, 0.175);
}

[data-bs-theme="dark"] .course-category-badge {
  background-color: rgba(255, 193, 7, 0.2);
  border-color: #ffc107;
  color: #ffc107;
}

[data-bs-theme="dark"] .course-difficulty-badge {
  background-color: #fcd25c;
  color: #000;
}

[data-bs-theme="dark"] .difficulty-beginner {
  background-color: #fcd25c;
}

[data-bs-theme="dark"] .difficulty-intermediate {
  background-color: #0D6EFD;
  color: #fff;
}

[data-bs-theme="dark"] .difficulty-advanced {
  background-color: #FFC107;
  color: #000;
}

[data-bs-theme="dark"] .difficulty-expert {
  background-color: #DC3545;
  color: #fff;
}

/* Promo video button в темной теме */
[data-bs-theme="dark"] .promo-video-btn {
  background: rgba(0, 0, 0, 0.8);
  color: white;
}

[data-bs-theme="dark"] .promo-video-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* Video modal в темной теме */
[data-bs-theme="dark"] #videoModal .modal-content {
  background-color: #1a1a1a !important;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] #videoModal .modal-header {
  background-color: transparent;
  border-bottom: none;
  color: #FFFFFF;
}

/* Course Info Items в темной теме */
[data-bs-theme="dark"] .course-info-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.175);
  color: rgba(255, 255, 255, 0.7);
}

/* Organizations в темной теме */
[data-bs-theme="dark"] .organization-item .organization-content {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
}

[data-bs-theme="dark"] .organization-name {
  color: #FFFFFF;
}

/* Course Stats Typography в темной теме */
[data-bs-theme="dark"] .row.text-center .col-3 .text-muted.small:first-child {
  color: #FFFFFF;
}

[data-bs-theme="dark"] .row.text-center .col-3 .text-muted.small:last-child {
  color: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="dark"] .mt-3 p.mb-0 {
  color: rgba(255, 255, 255, 0.8);
}

/* Анимация для плавного сворачивания */
.collapse {
  transition: height 0.35s ease;
}

.collapsing {
  height: 0;
  overflow: hidden;
  transition: height 0.35s ease;
}

/* ============================================
   DARK THEME SUPPORT - Using data-bs-theme attribute
   ============================================ */

/* Основные элементы в темной теме */
[data-bs-theme="dark"] .curriculum-section {
  background: #1D3856;
  border: 1px solid rgba(255, 255, 255, 0.175);
  color: #FFFFFF;
}

[data-bs-theme="dark"] .curriculum-section::before {
  background: #0D81FF;
}

[data-bs-theme="dark"] .curriculum-section.module-type-final_exam::before {
  background: #dc3545;
}

[data-bs-theme="dark"] .curriculum-section.module-type-exam::before {
  background: #E63946;
}

[data-bs-theme="dark"] .module-header-collapsible {
  background: rgba(29, 56, 86, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.175);
  color: #FFFFFF;
}

[data-bs-theme="dark"] .module-header-collapsible:hover {
  background: rgba(29, 56, 86, 0.8);
}

[data-bs-theme="dark"] .module-title {
  color: #FFFFFF !important;
}

[data-bs-theme="dark"] .module-meta {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-bs-theme="dark"] .module-description-expanded {
  color: #FFFFFF;
  border-top-color: rgba(255, 255, 255, 0.175);
}

[data-bs-theme="dark"] .module-description-expanded::after {
  background-color: rgba(255, 255, 255, 0.175);
}

[data-bs-theme="dark"] .section-content {
  background: transparent;
  border-top-color: rgba(255, 255, 255, 0.175);
}

[data-bs-theme="dark"] .curriculum-item {
  background: rgba(29, 56, 86, 0.3);
  border-bottom-color: rgba(255, 255, 255, 0.175);
  color: #FFFFFF;
}

[data-bs-theme="dark"] .curriculum-item:hover {
  background: rgba(29, 56, 86, 0.5);
}

[data-bs-theme="dark"] .curriculum-item::after {
  background-color: rgba(255, 255, 255, 0.175);
}

[data-bs-theme="dark"] .lesson-title,
[data-bs-theme="dark"] .item-title {
  color: #FFFFFF !important;
}

[data-bs-theme="dark"] .lesson-duration,
[data-bs-theme="dark"] .item-duration {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-bs-theme="dark"] .lesson-icon {
  color: #0D81FF;
}

[data-bs-theme="dark"] .lesson-icon .bi-check-circle {
  color: #28a745 !important;
}

[data-bs-theme="dark"] .lesson-icon .bi-play-circle {
  color: #0D81FF !important;
}

[data-bs-theme="dark"] .lesson-icon .bi-lock {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-bs-theme="dark"] .lesson-icon .bi-upload {
  color: #0D81FF !important;
}

[data-bs-theme="dark"] .lesson-icon .bi-ui-checks-grid {
  color: #0D81FF !important;
}

[data-bs-theme="dark"] .lesson-icon .bi-clipboard-check {
  color: #dc3545 !important;
}

/* Кнопки в темной теме */
[data-bs-theme="dark"] .btn-success {
  background-color: #28a745;
  border-color: #28a745;
  color: #fff;
}

[data-bs-theme="dark"] .btn-primary {
  background-color: #0D81FF;
  border-color: #0D81FF;
  color: #fff;
}

[data-bs-theme="dark"] .btn-danger {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}

[data-bs-theme="dark"] .btn-warning {
  background-color: #ffc107;
  border-color: #ffc107;
  color: #000;
}

[data-bs-theme="dark"] .btn-outline-secondary {
  border-color: rgba(255, 255, 255, 0.175);
  color: rgba(255, 255, 255, 0.7);
  background-color: transparent;
}

[data-bs-theme="dark"] .btn-outline-secondary:disabled {
  border-color: rgba(255, 255, 255, 0.175);
  color: rgba(255, 255, 255, 0.7);
  background-color: transparent;
  opacity: 0.6;
}

/* Collapse Toggle в темной теме */
[data-bs-theme="dark"] .collapse-toggle {
  background: #0D81FF;
  color: #FFFFFF;
}

[data-bs-theme="dark"] .collapse-toggle:hover {
  background: #0056b3;
  color: #FFFFFF;
}

/* Module Status Icons в темной теме */
[data-bs-theme="dark"] .module-status-icon .bi-check-circle-fill {
  color: #28a745 !important;
}

[data-bs-theme="dark"] .module-status-icon .bi-play-circle {
  color: #0D81FF !important;
}

[data-bs-theme="dark"] .module-status-icon .bi-lock {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-bs-theme="dark"] .module-status-icon .bi-clock {
  color: #ffc107 !important;
}

/* Expand All Button в темной теме */
[data-bs-theme="dark"] .expand-all-btn {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.175);
  color: #FFFFFF;
}

[data-bs-theme="dark"] .expand-all-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
}

/* Sidebar elements в темной теме */
[data-bs-theme="dark"] .sidebar-card {
  background-color: #1D3856;
  border-color: rgba(255, 255, 255, 0.175);
}

[data-bs-theme="dark"] .course-category-badge {
  background-color: rgba(255, 193, 7, 0.2);
  border-color: #ffc107;
  color: #ffc107;
}

[data-bs-theme="dark"] .course-difficulty-badge {
  background-color: #fcd25c;
  color: #000;
}

[data-bs-theme="dark"] .difficulty-beginner {
  background-color: #fcd25c;
}

[data-bs-theme="dark"] .difficulty-intermediate {
  background-color: #0D6EFD;
  color: #fff;
}

[data-bs-theme="dark"] .difficulty-advanced {
  background-color: #FFC107;
  color: #000;
}

[data-bs-theme="dark"] .difficulty-expert {
  background-color: #DC3545;
  color: #fff;
}

/* Promo video button в темной теме */
[data-bs-theme="dark"] .promo-video-btn {
  background: rgba(0, 0, 0, 0.8);
  color: white;
}

[data-bs-theme="dark"] .promo-video-btn:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* Video modal в темной теме */
[data-bs-theme="dark"] #videoModal .modal-content {
  background-color: #1a1a1a !important;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] #videoModal .modal-header {
  background-color: transparent;
  border-bottom: none;
  color: #FFFFFF;
}

/* Course Info Items в темной теме */
[data-bs-theme="dark"] .course-info-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.175);
  color: rgba(255, 255, 255, 0.7);
}

/* Organizations в темной теме */
[data-bs-theme="dark"] .organization-item .organization-content {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
}

[data-bs-theme="dark"] .organization-name {
  color: #FFFFFF;
}

/* Course Stats Typography в темной теме */
[data-bs-theme="dark"] .row.text-center .col-3 .text-muted.small:first-child {
  color: #FFFFFF;
}

[data-bs-theme="dark"] .row.text-center .col-3 .text-muted.small:last-child {
  color: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="dark"] .mt-3 p.mb-0 {
  color: rgba(255, 255, 255, 0.8);
}

/* Стили для состояний */
.curriculum-section.collapsed .module-header-collapsible {
  border-radius: 8px;
}

.curriculum-section:not(.collapsed) .module-header-collapsible {
  border-radius: 8px 8px 0 0;
}
