/*
  Courses Section CSS
  Dựa trên thiết kế Figma node 4:168.
  Card hiển thị thông tin khóa học IELTS + thanh danh mục khoá học phía dưới.
*/

/* ========================================
   COURSES SECTION - Khu vực chương trình học
   ======================================== */

.courses-section {
  padding: 60px 0 0;
}

/* Card chính: nền trắng, bo góc 25px, shadow nhẹ, chứa toàn bộ nội dung khoá học */
.course-card {
  background-color: var(--white, #ffffff);
  border-radius: 25px;
  box-shadow: 0px 0px 8px 0px rgba(12, 29, 50, 0.12);
  position: relative;
  overflow: hidden;
  max-width: 1280px;
  margin: 0 auto;
}

/* Chia card thành 2 phần: nội dung bên trái + hình ảnh bên phải */
.course-card-inner {
  display: flex;
  align-items: stretch;
  min-height: 570px;
}

/* ========================================
   PHẦN NỘI DUNG BÊN TRÁI
   ======================================== */

.course-info {
  flex: 1;
  padding: 68px 40px 40px 54px;
  position: relative;
  z-index: 2;
}

/* Label nhỏ phía trên tiêu đề: "Chương trình học" */
.course-label {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 24px;
  font-weight: 500;
  color: rgba(39, 39, 39, 0.94);
  margin-bottom: 20px;
}

/* Tiêu đề chính: "Luyện thi IELTS" - font lớn 55px */
.course-title {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 55px;
  font-weight: 500;
  color: #303030;
  margin-bottom: 40px;
  line-height: 1.2;
}

/* ========================================
   THÔNG TIN ĐẦU VÀO / ĐẦU RA
   ======================================== */

/* Nhóm hiển thị "Đầu vào" và "Đầu ra" nằm ngang */
.course-level-group {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 32px;
}

/* Mỗi mục level: icon + text nằm ngang */
.course-level-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Icon đầu vào/ra: kích thước 30x30 */
.course-level-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  object-fit: contain;
}

/* Text thông tin level: font 26px medium */
.course-level-text {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 26px;
  font-weight: 500;
  color: rgba(39, 39, 39, 0.94);
  white-space: nowrap;
}

/* ========================================
   ĐƯỜNG PHÂN CÁCH NGANG
   ======================================== */

/* Đường kẻ ngang ngăn cách giữa level info và features */
.course-divider {
  width: 100%;
  max-width: 518px;
  height: 1px;
  background-color: #d9d9d9;
  margin-bottom: 32px;
}

/* ========================================
   FEATURES - 3 điểm nổi bật của khoá học
   ======================================== */

/* 3 features nằm ngang, khoảng cách đều */
.course-features {
  display: flex;
  gap: 48px;
  margin-bottom: 40px;
}

/* Mỗi feature: icon phía trên + text phía dưới, bố cục dọc */
.course-feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  max-width: 180px;
}

/* Icon feature: 45x45 */
.course-feature-icon {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

/* Mô tả feature: font 18px, line-height thoáng */
.course-feature-text {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 18px;
  font-weight: 400;
  line-height: 26px;
  color: rgba(37, 37, 37, 0.91);
}

/* ========================================
   NÚT CTA TRONG CARD
   ======================================== */

.course-cta-group {
  display: flex;
  gap: 28px;
  align-items: center;
  flex-wrap: wrap;
}

/* Kiểu chung cho 2 nút CTA */
.btn-course-outline,
.btn-course-filled {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border-radius: 15px;
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 44px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

/* Nút viền navy: viền 2px, chữ navy */
.btn-course-outline {
  width: 203px;
  border: 2px solid var(--primary-color, #013475);
  background-color: transparent;
  color: var(--primary-color, #013475);
}

.btn-course-outline:hover {
  background-color: var(--primary-color, #013475);
  color: var(--white, #ffffff);
}

/* Nút nền navy: nền xanh đậm, chữ trắng */
.btn-course-filled {
  width: 219px;
  border: none;
  background-color: var(--primary-color, #013475);
  color: var(--white, #ffffff);
}

.btn-course-filled:hover {
  background-color: var(--secondary-color, #005ed6);
  color: var(--white, #ffffff);
}

/* ========================================
   PHẦN HÌNH ẢNH BÊN PHẢI
   ======================================== */

/* Cột phải chứa hình ảnh giáo viên + vòng tròn trang trí */
.course-visual {
  position: relative;
  width: 450px;
  flex-shrink: 0;
}

/* Vòng tròn xanh nhạt trang trí phía sau ảnh giáo viên */
.course-visual-circle {
  position: absolute;
  width: 401px;
  height: 401px;
  border-radius: 30px;
  background-color: #ebf8ff;
  right: 48px;
  top: 172px;
}

/* Ảnh giáo viên: kích thước lớn, cắt vừa khung */
.course-teacher-img {
  position: absolute;
  width: 357px;
  height: 516px;
  right: 70px;
  top: 6px;
  object-fit: cover;
  z-index: 1;
  scale: 1.2;
}

/* Badge điểm: hình chữ nhật navy bo góc ở góc trên phải */
.course-score-badge {
  position: absolute;
  right: 31px;
  top: 27px;
  width: 117px;
  height: 85px;
  background-color: var(--primary-color, #013475);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  overflow: hidden;
}

/* Số điểm lớn trong badge */
.course-score-number {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 35px;
  font-weight: 600;
  color: var(--white, #ffffff);
  line-height: 1;
}

/* Label "overall" nhỏ dưới số điểm */
.course-score-label {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--white, #ffffff);
  margin-top: 4px;
}

/* Tên giáo viên phía dưới ảnh */
.course-teacher-name {
  position: absolute;
  right: 150px;
  bottom: -10px;
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 20px;
  font-weight: 600;
  color: #000000;
  line-height: 30px;
  z-index: 2;
  white-space: nowrap;
}

/* ========================================
   THANH DANH MỤC KHOÁ HỌC PHÍA DƯỚI CARD
   ======================================== */

/*
  Thanh navy full-width chứa danh sách các khoá học.
  Bo góc dưới card theo thiết kế.
*/
.course-programs-bar {
  background-color: var(--primary-color, #013475);
  padding: 27px 0;
  border-radius: 0 0 25px 25px;
}

/* Flex ngang: 4 mục khoá học, canh giữa */
.course-programs-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Mỗi mục khoá học */
.course-program-item {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--white, #ffffff);
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 11px 24px;
  border-radius: 10px;
}

.course-program-item:not(.active):hover {
  opacity: 0.9;
  background-color: rgba(255, 255, 255, 0.08);
}

/*
  Mục khoá học đầu tiên (active): nền trắng, bo góc, chữ navy.
  Nổi bật so với các mục còn lại.
*/
.course-program-item.active {
  background-color: var(--white, #ffffff);
  color: var(--primary-color, #013475);
}

/* Icon puzzle/khoá học */
.course-program-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Nhóm text bên phải icon */
.course-program-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Tên khoá học: font 18px medium */
.course-program-name {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 22px;
}

/* Hình thức học: font 14px nhỏ */
.course-program-mode {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 400;
  line-height: 16px;
  opacity: 0.85;
}

/* Đường phân tách dọc giữa các mục trong thanh danh mục */
.course-program-divider {
  width: 1px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

/* ========================================
   RESPONSIVE - Tablet (≤991px)
   ======================================== */

@media (max-width: 991px) {
  .courses-section {
    padding: 50px 0 0;
  }

  .course-card-inner {
    flex-direction: column;
    min-height: auto;
  }

  .course-info {
    padding: 40px 32px;
  }

  .course-title {
    font-size: 40px;
  }

  .course-level-text {
    font-size: 22px;
  }

  .course-features {
    gap: 28px;
  }

  /* Ẩn phần visual (ảnh giáo viên) trên tablet để tránh bố cục bị vỡ */
  .course-visual {
    display: none;
  }

  /* Thanh khoá học cuộn ngang trên tablet nếu thiếu chỗ */
  .course-programs-list {
    overflow-x: auto;
    justify-content: flex-start;
    padding: 0 20px;
    -webkit-overflow-scrolling: touch;
  }

  .course-programs-bar {
    border-radius: 0 0 25px 25px;
  }
}

/* ========================================
   RESPONSIVE - Mobile (≤767px)
   ======================================== */

@media (max-width: 767px) {
  .courses-section {
    padding: 35px 0 0;
  }

  .course-info {
    padding: 28px 20px;
  }

  .course-label {
    font-size: 18px;
  }

  .course-title {
    font-size: 30px;
    margin-bottom: 24px;
  }

  .course-level-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
  }

  .course-level-text {
    font-size: 20px;
  }

  /* Features xếp dọc trên mobile */
  .course-features {
    flex-direction: column;
    gap: 20px;
    margin-bottom: 28px;
  }

  .course-feature-item {
    max-width: none;
  }

  .course-cta-group {
    gap: 16px;
  }

  .btn-course-outline,
  .btn-course-filled {
    width: auto;
    padding: 0 24px;
    font-size: 17px;
    height: 44px;
  }

  /* Thanh khoá học: xếp dọc trên mobile */
  .course-programs-list {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 0 20px;
  }

  .course-program-divider {
    display: none;
  }

  .course-program-item {
    justify-content: center;
  }
}

/* ========================================
