/**
 * @file
 * Styles for the course page (group bundle lms_course).
 */

/* Course page container */
.course-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Hero section */
.course-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  align-items: center;
}

.course-hero__image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.course-hero__image img {
  width: 100%;
  height: auto;
  display: block;
}

.course-hero__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.course-hero__title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.2;
}

/* Progress bar */
.course-progress {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid #0d75a3;
}

.course-progress__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.course-progress__label {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

.course-progress__percentage {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #0d75a3;
  font-size: 1.25rem;
}

.course-progress__bar-wrapper {
  width: 100%;
  height: 12px;
  background-color: #e9ecef;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.course-progress__bar {
  height: 100%;
  background: linear-gradient(90deg, #0d75a3 0%, #0a8ec4 100%);
  border-radius: 6px;
  transition: width 0.5s ease;
  min-width: 2%;
}

.course-progress__text {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

/* Action button */
.course-hero__action {
  margin-top: 1rem;
}

.course-hero__action a,
.course-hero__action .mt-button {
  display: inline-block;
  padding: 1rem 3rem;
  background-color: #0d75a3;
  color: #ffffff;
  text-decoration: none;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(13, 117, 163, 0.3);
}

.course-hero__action a:hover,
.course-hero__action .mt-button:hover {
  background-color: #095a7e;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 117, 163, 0.4);
}

/* Description section */
.course-description {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 3rem;
}

.course-description h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: #333;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #0d75a3;
}

.course-description p {
  line-height: 1.8;
  color: #555;
  font-size: 1rem;
}

/* Lessons section */
.course-lessons {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.course-lessons h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: #333;
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid #0d75a3;
}

.course-lessons__notice {
  background: #fff3cd;
  color: #856404;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #ffc107;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.course-lessons__notice::before {
  content: "\f06a";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1.25rem;
}

.course-lessons__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}

/* Restricted course styling */
.course-lessons--restricted .course-lessons__list {
  position: relative;
}

.course-lessons--restricted .course-lessons__list::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 1) 100%);
  pointer-events: none;
}

/* Individual lesson item */
.course-lesson-item {
  background: #f8f9fa;
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #0d75a3;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.course-lesson-item:hover {
  background: #e9ecef;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.course-lesson-item__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  color: #0d75a3;
  width: 24px;
  text-align: center;
}

.course-lesson-item__title {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  flex: 1;
}

.course-lesson-item__badge {
  background: #28a745;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.course-lesson-item__lock {
  color: #999;
  font-size: 1rem;
}

/* Blurred lesson items */
.course-lesson-item--blurred {
  filter: blur(3px);
  opacity: 0.6;
  pointer-events: none;
  user-select: none;
}

.course-lesson-item--blurred .course-lesson-item__title {
  color: #999;
}

.course-lesson-item--blurred .course-lesson-item__icon {
  color: #999;
}

/* Responsive */
@media (max-width: 768px) {
  .course-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .course-hero__title {
    font-size: 2rem;
  }
  
  .course-description,
  .course-lessons {
    padding: 1.5rem;
  }
  
  .course-description h2,
  .course-lessons h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .course-hero__action a,
  .course-hero__action .mt-button {
    width: 100%;
    text-align: center;
  }
}
