/* Course Page Specific Styles */
:root {
  --primary-color: #29786E;
  --primary-dark: #0f4b43;
  --primary-light: #91c9c1;
  --secondary-color: #1e1e1c;
  --light-color: #f8fafc;
  --dark-color: #1e293b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  --gray-100: #f7f9fa;
  --gray-200: #f0f2f3;
  --gray-300: #d1d7dc;
  --gray-400: #94a3b8;
  --gray-500: #6a6f73;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1c1d1f;
  --gray-900: #0f172a;
  --border-radius: 4px;
  --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Course Header */
.course-header {
  background-color: var(--dark-color);
  color: white;
  padding: 3rem 0;
}

.course-header-content {
  position: relative;
  z-index: 1;
}

.course-header-info {
  max-width: 800px;
}

.course-categories {
  margin-bottom: 1rem;
}

.course-category {
  color: var(--primary-light);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.course-category:hover {
  color: white;
  text-decoration: underline;
}

.course-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: white; /* Explicitly set to white for better visibility */
}

.course-subtitle {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  color: white; /* Explicitly set to white for better visibility */
}

.course-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: white;
}

.course-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.rating-score {
  font-weight: 700;
}

.rating-stars {
  color: var(--warning-color);
}

.course-students {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: white;
}

.course-author {
  margin-bottom: 1rem;
  color: white;
}

.author-link {
  color: var(--primary-light);
  text-decoration: none;
}

.author-link:hover {
  text-decoration: underline;
  color: white;
}

.course-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: white;
}

.course-detail-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: white;
}

/* Course Container */
.course-container {
  padding: 2rem 0;
}

.course-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

/* Course Main Content */
.course-main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.course-section {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: var(--box-shadow);
  padding: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--gray-900);
}

/* What You'll Learn */
.what-youll-learn {
  padding: 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.learn-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.learn-item i {
  color: var(--success-color);
  margin-top: 0.25rem;
}

/* Course Content */
.course-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.content-stats {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.btn-outline-sm {
  background: none;
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  color: var(--primary-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline-sm:hover {
  background-color: var(--gray-100);
}

.curriculum-section {
  margin-bottom: 1rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: var(--gray-100);
  cursor: pointer;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-icon {
  transition: transform 0.3s ease;
}

.section-header[aria-expanded="true"] .section-icon {
  transform: rotate(180deg);
}

.section-name {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.section-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.section-content {
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.section-content.show {
  max-height: 1000px;
  transition: max-height 0.5s ease;
}

.lectures-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.lecture-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--gray-200);
}

.lecture-icon {
  margin-right: 0.75rem;
  color: var(--gray-600);
}

.lecture-details {
  flex: 1;
}

.lecture-name {
  font-size: 0.875rem;
}

.lecture-preview {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 500;
}

.lecture-meta {
  font-size: 0.75rem;
  color: var(--gray-600);
}

/* Requirements */
.requirements-list {
  padding-left: 1.5rem;
  margin-bottom: 0;
}

.requirements-list li {
  margin-bottom: 0.75rem;
}

.requirements-list li:last-child {
  margin-bottom: 0;
}

/* Description */
.course-description {
  color: var(--gray-700);
}

.description-content {
  max-height: 300px;
  overflow: hidden;
  position: relative;
}

.description-content.expanded {
  max-height: none;
}

.description-content p {
  margin-bottom: 1rem;
}

.show-more-container {
  position: relative;
  text-align: center;
  margin-top: 1rem;
  padding-top: 2rem;
}

.description-content:not(.expanded)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
}

.btn-show-more {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Instructor */
.instructor-profile {
  display: flex;
  gap: 1.5rem;
}

.instructor-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.instructor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.instructor-info {
  flex: 1;
}

.instructor-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.instructor-title {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
}

.instructor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.instructor-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.instructor-bio {
  font-size: 0.875rem;
  color: var(--gray-700);
}

.instructor-bio p {
  margin-bottom: 1rem;
}

/* Student Feedback */
.student-feedback {
  display: flex;
  gap: 2rem;
}

.feedback-summary {
  display: flex;
  gap: 2rem;
  width: 100%;
}

.feedback-rating {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 150px;
}

.rating-number {
  font-size: 4rem;
  font-weight: 700;
  color: var(--warning-color);
  line-height: 1;
}

.feedback-rating .rating-stars {
  font-size: 1.5rem;
  margin: 0.5rem 0;
}

.rating-text {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.feedback-bars {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}

.feedback-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bar-label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: 40px;
  color: var(--gray-700);
}

.bar-container {
  flex: 1;
  height: 8px;
  background-color: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background-color: var(--warning-color);
  border-radius: 4px;
}

.bar-percentage {
  width: 40px;
  text-align: right;
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* Reviews */
.reviews-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.review-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.review-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

.review-content {
  flex: 1;
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.review-name {
  font-weight: 600;
}

.review-date {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.review-rating {
  margin-bottom: 0.75rem;
  color: var(--gray-300);
}

.review-rating .fas.filled {
  color: var(--warning-color);
}

.review-text {
  font-size: 0.875rem;
  color: var(--gray-700);
}

.btn-outline-md {
  background: none;
  border: 1px solid var(--gray-300);
  border-radius: 0.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--gray-800);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-outline-md:hover {
  background-color: var(--gray-100);
}

.btn-show-more-reviews {
  margin-top: 1rem;
}

/* Course Sidebar */
.course-sidebar {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

.sidebar-card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

.course-preview {
  position: relative;
}

.preview-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preview-button:hover {
  transform: scale(1.1);
}

.preview-button i {
  font-size: 1.5rem;
  color: var(--gray-900);
}

.preview-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.75rem;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  font-weight: 500;
}

.sidebar-content {
  padding: 1.5rem;
}

.course-pricing {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.current-price {
  font-size: 2rem;
  font-weight: 700;
}

.original-price {
  font-size: 1.25rem;
  text-decoration: line-through;
  color: var(--gray-500);
}

.discount-badge {
  background-color: var(--danger-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.sale-ends {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--danger-color);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-outline {
  background: none;
  border: 1px solid var(--gray-800);
  color: var(--gray-800);
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-outline:hover {
  background-color: var(--gray-100);
}

.btn-block {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
}

.money-back {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

.includes-heading {
  font-weight: 600;
  margin-bottom: 1rem;
}

.includes-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.includes-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.includes-item i {
  color: var(--gray-600);
}

.course-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-action {
  background: none;
  border: none;
  color: var(--gray-600);
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.btn-action:hover {
  color: var(--primary-color);
}

/* Breadcrumb */
.breadcrumb-container {
  background-color: white;
  border-bottom: 1px solid var(--gray-300);
  padding: 0.75rem 0;
}

.breadcrumb {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb-item {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  padding: 0 0.5rem;
  color: var(--gray-400);
}

.breadcrumb-item a {
  color: var(--gray-600);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: var(--gray-800);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 991.98px) {
  .course-layout {
    grid-template-columns: 1fr;
  }

  .course-sidebar {
    position: static;
    margin-top: 2rem;
  }

  .student-feedback {
    flex-direction: column;
  }

  .feedback-summary {
    flex-direction: column;
    gap: 1.5rem;
  }

  .feedback-rating {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .course-header {
    padding: 2rem 0;
  }

  .course-title {
    font-size: 2rem;
  }

  .learn-grid {
    grid-template-columns: 1fr;
  }

  .instructor-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .instructor-meta {
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .course-title {
    font-size: 1.75rem;
  }

  .course-meta,
  .course-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .review-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .review-header {
    flex-direction: column;
    gap: 0.25rem;
  }
}
