/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* Cho phép xuống dòng khi không đủ chỗ */
  gap: 10px;
}

.tab {
  width: 100px;             /* Chiều ngang rộng hơn */
  height: 30px;             /* Chiều cao thấp (lùn) */
  line-height: 30px;        /* Canh nội dung theo chiều dọc */
  text-align: center;       /* Canh giữa nội dung theo chiều ngang */
  margin: 0 5px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  font-size: 14px;
  flex-shrink: 0;
}

.tab-1 { background-color: #10a0b6; }
.tab-2  { background-color: #ff940b; }
.tab-3   { background-color: #78c72f; }
.tab-4   { background-color: #c64123; }
.tab-5   { background-color: #b8c82c; }
.tab-6   { background-color: #9424b8; }
.tab-7   { background-color: #12a76d; }

/* Section title */
.section-title {
  text-align: center;
  color: white;
  padding: 20px 0;
  font-size: 24px;
  font-weight: bold;
    margin-top: 1px;
  margin-bottom: 0px !important;
}

/* Màu tương ứng tab */
.section-title-1 { background-color: #10a0b6; }
.section-title-2  { background-color: #ff940b; }
.section-title-3   { background-color: #78c72f; }
.section-title-4   { background-color: #c64123; }
.section-title-5   { background-color: #b8c82c; }
.section-title-6   { background-color: #9424b8; }
.section-title-7   { background-color: #12a76d; }


/* Content */
.tab-content .content .right p {
  color: #1a1a1a;

}
.content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  background-color: #fff;
  flex-wrap: wrap;
}

.content .left {
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  margin: 10px;
}
#tab-1 .content .left {
  background-color: #10a0b6;
}
#tab-2 .content .left {
  background-color: #ff940b;
}
#tab-3 .content .left {
  background-color: #78c72f;
}
#tab-4 .content .left {
  background-color: #c64123;
}
#tab-5 .content .left {
  background-color: #b8c82c;
}
#tab-6 .content .left {
  background-color: #9424b8;
}
#tab-7 .content .left {
  background-color: #12a76d;
}

.content .left img {
  max-width: 70%;
}

.content .right {
  max-width: 400px;
  margin: 10px;
}

.content .right p {
  font-size: 18px;
  margin: 10px 0;
}

.content .right p span {
  font-weight: bold;
  color: #1a1a1a;
}

.content .right p.status {
  color: #d32f2f;
  font-weight: bold;
}

.btn-register {
  display: inline-block;
  margin-top: 20px;
  background-color: #ff8a65;
  color: white;
  font-weight: bold;
  padding: 15px 25px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
}

/* Hover effect */
.btn-register:hover {
  background-color: #ff7043;
  color: white;
}

/* Breakpoint 1: <= 480px (Điện thoại nhỏ) */
@media (max-width: 480px) {
  .tab {
    width: 80px;
    height: 26px;
    font-size: 12px;
    line-height: 26px;
  }

  .section-title {
    font-size: 18px;
    padding: 12px 0;
  }

  .content {
    padding: 20px 8px;
  }

  .content .right p {
    font-size: 16px;
  }

  .btn-register {
    padding: 10px 15px;
    font-size: 14px;
  }
}

/* Breakpoint 2: 481px – 767px (Điện thoại lớn & tablet dọc) */
@media (min-width: 481px) and (max-width: 767px) {
  .tab {
    width: 90px;
    height: 28px;
    font-size: 13px;
    line-height: 28px;
  }

  .section-title {
    font-size: 20px;
  }

  .btn-register {
    font-size: 15px;
    padding: 12px 20px;
  }
}

/* Breakpoint 3: 768px – 1199px (Tablet ngang & desktop nhỏ) */
@media (min-width: 768px) and (max-width: 1199px) {
  .tab {
    width: 100px;
    font-size: 14px;
  }

  .section-title {
    font-size: 22px;
  }

  .content {
    padding: 30px;
  }

  .content .left {
    width: 280px;
    height: 280px;
  }

  .content .right p {
    font-size: 17px;
  }
}

/* Optional: >= 1200px (Màn hình lớn, desktop) */
/* Optional: ≥ 1200px (Màn hình lớn, desktop) */
@media (min-width: 1200px) {
  .content {
    padding: 60px 100px; /* Tăng padding để tạo không gian rộng rãi hơn */
    gap: 80px; /* Tăng khoảng cách giữa .left và .right */
    max-width: 1400px; /* Giới hạn chiều rộng tối đa để tránh quá dãn */
    margin: 0 auto; /* Căn giữa nội dung */
  }

  .content .left {
    width: 400px; /* Tăng kích thước khung hình ảnh */
    height: 400px;
    border-radius: 10px; /* Bo góc nhẹ hơn cho thẩm mỹ */
  }

  .content .left img {
    max-width: 80%; /* Tăng kích thước hình ảnh để lấp đầy khung */
  }

  .content .right {
    max-width: 600px; /* Tăng chiều rộng tối đa của phần văn bản */
  }

  .content .right p {
    font-size: 22px; /* Tăng kích thước chữ cho dễ đọc */
    margin: 15px 0; /* Tăng khoảng cách giữa các đoạn văn */
  }

  .content .right p.status {
    font-size: 24px; /* Tăng kích thước chữ cho trạng thái */
  }

  .btn-register {
    font-size: 18px; /* Tăng kích thước chữ nút */
    padding: 18px 32px; /* Tăng kích thước nút */
    border-radius: 6px; /* Bo góc nhẹ hơn */
  }

  .section-title {
    font-size: 28px; /* Tăng kích thước tiêu đề cho cân đối */
    padding: 25px 0; /* Tăng padding cho tiêu đề */
  }
}


/* Lưới bố cục 3 cột */
.box-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
}

/* Mỗi ô */
.box {
  border: 2px solid; /* Viền sẽ được đặt theo tab */
  border-radius: 10px;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Header, màu sẽ được đặt theo tab */
.box-header {
  color: white;
  padding: 10px 0;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
}

/* Body chữ nâu đậm */
.box-body {
  padding: 15px 10px;
  color: #5c4400;
  font-size: 18px;
  text-align: center;
  font-weight: 500;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Định nghĩa màu cho .box và .box-header theo từng tab-content */
#tab-1 .box {
  border-color: #10a0b6;
}
#tab-1 .box-header {
  background-color: #10a0b6;
}
#tab-2 .box {
  border-color: #ff940b;
}
#tab-2 .box-header {
  background-color: #ff940b;
}
#tab-3 .box {
  border-color: #78c72f;
}
#tab-3 .box-header {
  background-color: #78c72f;
}
#tab-4 .box {
  border-color: #c64123;
}
#tab-4 .box-header {
  background-color: #c64123;
}
#tab-5 .box {
  border-color: #b8c82c;
}
#tab-5 .box-header {
  background-color: #b8c82c;
}
#tab-6 .box {
  border-color: #9424b8;
}
#tab-6 .box-header {
  background-color: #9424b8;
}
#tab-7 .box {
  border-color: #12a76d;
}
#tab-7 .box-header {
  background-color: #12a76d;
}

/* Phân trang */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  gap: 10px;
}

.page {
  width: 30px;
  height: 30px;
  background-color: #f1c40f;
  color: black;
  border-radius: 50%;
  text-align: center;
  line-height: 30px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.page:hover {
  background-color: #e67e22;
  color: white;
}

.page.active {
  background-color: #e74c3c;
  color: white;
}
/* Gói toàn bộ content + phân trang */
.content-wrapper {
  padding: 40px 0; /* padding trên/dưới */
  width: 100%;
}
/* Breakpoint 3: Tablet ngang & desktop nhỏ (768px – 1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
  .box-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 30px;
    gap: 18px;
  }

  .box-header {
    font-size: 17px;
  }

  .box-body {
    font-size: 15px;
  }
}

/* Breakpoint 2: Tablet dọc & điện thoại lớn (481px – 767px) */
@media (min-width: 481px) and (max-width: 767px) {
  .box-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 15px;
    gap: 16px;
  }

  .box-header {
    font-size: 16px;
  }

  .box-body {
    font-size: 14px;
  }

  .page {
    width: 26px;
    height: 26px;
    font-size: 13px;
    line-height: 26px;
  }
}

/* Breakpoint 1: Điện thoại nhỏ (≤ 480px) */
@media (max-width: 480px) {
  .box-grid {
    grid-template-columns: 1fr;
    padding: 0 10px;
    gap: 14px;
  }

  .box-header {
    font-size: 15px;
    padding: 8px 0;
  }

  .box-body {
    font-size: 13px;
    padding: 12px 8px;
  }

  .page {
    width: 24px;
    height: 24px;
    font-size: 12px;
    line-height: 24px;
  }
}


/* detail */

/* Detail Section */
.main-content {
  display: flex;
  flex-direction: row;
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.book-list {
  background: #fff3bf;
  border-radius: 10px;
  padding: 15px;
  width: 300px; /* Default width for larger screens */
}

.book-list h3 {
  background: #f5c518;
  color: #000;
  font-weight: bold;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 18px;
  margin-bottom: 10px;
}

.book-list ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.book-list li a {
  text-decoration: none;
  color: #000;
  display: block;
  width: 100%;
  font-size: 15px;
}

.book-list li:hover {
  background-color: #f0e68c;
}

.book-list li {
  background-color: transparent;
  font-size: 14px;
  padding: 10px 8px;
  margin-bottom: 5px;
  border-radius: 6px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: default;
}

.book-list li.selected {
  background-color: #f0e68c;
}

.lesson-list {
  background: #fff3bf;
  border-radius: 10px;
  padding: 15px;
  width: 300px; /* Default width for larger screens */
}

.lesson-list h3 {
  background: #f5c518;
  color: #000;
  font-weight: bold;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 18px;
  margin-bottom: 10px;
}

.lesson-list ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.lesson-list li a {
  text-decoration: none;
  color: #000;
  display: block;
  width: 100%;
  font-size: 15px;
}

.lesson-list li:hover {
  background-color: #f0e68c;
}

.lesson-list li {
  background-color: transparent;
  font-size: 14px;
  padding: 10px 8px;
  margin-bottom: 5px;
  border-radius: 6px;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: default;
}

.lesson-list li.selected {
  background-color: #f0e68c;
}

.lesson-list li::after {
  content: "";
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 22.5px;
  height: 22.5px;
  background-color: white;
  border-radius: 50%;
  border: 1px solid black;
  margin-left: 8px;
  vertical-align: middle;
}

.lesson-list li.completed::after {
  content: "\2713";
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 22.5px;
  height: 22.5px;
  background-color: white;
  color: black !important;
  border-radius: 60%;
  font-size: 18px;
  border: 1px solid black;
  margin-left: 8px;
  vertical-align: middle;
}

.lesson-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

.lesson-title-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.countdown-timer {
  color: #c64123;
  font-weight: bold;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 16px;
}

.complete-btn {
  background-color: #ff8c69;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  margin-left: 8px;
}

.complete-btn:hover {
  background-color: #df7a5bff;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .lesson-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .lesson-title h2 {
    font-size: 16px;
  }
  .lesson-title-right {
    gap: 10px;
  }
  .countdown-timer {
    font-size: 13px;
    padding: 4px 10px;
  }
  .complete-btn {
    font-size: 13px;
    padding: 6px 12px;
  }
}

.lesson-content {
  flex: 1;
}

.breadcrumb {
  font-size: 15px;
  color: red;
  margin-bottom: 8px;
  background-color: #fff;
  padding-left: 0px !important;
  padding-top: 15px !important;
}

.breadcrumb a {
  color: red;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.lesson-content h2 {
  font-size: 20px;
  font-weight: bold;
  color: #000;
}

.video-placeholderr {
  height: 400px;
  background: #f5f5f5;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 40px;
  margin-bottom: 20px;
}

.buttons {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.prev-btn,
.next-btn {
  background-color: #ff8c69;
  color: white;
  border: none;
  padding: 10px 20px;
  font-weight: bold;
  border-radius: 999px 0px 0px 999px;
  cursor: pointer;
  width: 160px;
}

.next-btn {
  border-radius: 0px 999px 999px 0px;
}

.comments input[type="text"] {
  width: 100%;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid #ccc;
  margin-bottom: 12px;
}

.comment {
  margin-bottom: 10px;
  padding-left: 40px;
  position: relative;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 0;
  object-fit: cover;
}

.comment-content {
  flex: 1;
}

.comment strong {
  display: block;
  margin-bottom: 2px;
}

/* Breakpoint 1: Small phones (≤480px) */
@media (max-width: 480px) {
  .main-content {
    flex-direction: column;
    padding: 10px;
    gap: 15px;
  }

  .lesson-list {
    width: 100%;
    padding: 10px;
  }

  .lesson-list h3 {
    font-size: 16px;
    padding: 8px 10px;
  }

  .lesson-list li {
    font-size: 13px;
    padding: 8px 6px;
  }

  .lesson-list li a {
    font-size: 14px;
  }

  .lesson-list li::after,
  .lesson-list li.completed::after {
    width: 20px;
    height: 20px;
    font-size: 16px;
  }

  .lesson-content h2 {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .breadcrumb {
    font-size: 14px;
    padding-top: 10px !important;
  }

  .video-placeholderr {
    height: 200px;
    font-size: 24px;
    border-radius: 8px;
  }

  .buttons {
    flex-direction: column;
    gap: 10px;
  }

  .prev-btn,
  .next-btn {
    width: 100%;
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 999px;
  }

  .next-btn {
    border-radius: 999px;
  }

  .comments input[type="text"] {
    padding: 8px;
    font-size: 14px;
  }

  .comment {
    font-size: 13px;
    padding-left: 35px;
  }

  .avatar {
    width: 24px;
    height: 24px;
  }
}

/* Breakpoint 2: Large phones & vertical tablets (481px–767px) */
@media (min-width: 481px) and (max-width: 767px) {
  .main-content {
    flex-direction: column;
    padding: 15px;
    gap: 15px;
  }

  .lesson-list {
    width: 100%;
    padding: 12px;
  }

  .lesson-list h3 {
    font-size: 17px;
    padding: 9px 11px;
  }

  .lesson-list li {
    font-size: 14px;
    padding: 9px 7px;
  }

  .lesson-list li a {
    font-size: 14px;
  }

  .lesson-list li::after,
  .lesson-list li.completed::after {
    width: 21px;
    height: 21px;
    font-size: 17px;
  }

  .lesson-content h2 {
    font-size: 19px;
    margin-bottom: 12px;
  }

  .breadcrumb {
    font-size: 14px;
    padding-top: 12px !important;
  }

  .video-placeholderr {
    height: 300px;
    font-size: 30px;
    border-radius: 10px;
  }

  .buttons {
    flex-direction: row;
    gap: 10px;
  }

  .prev-btn,
  .next-btn {
    width: 140px;
    padding: 9px 18px;
    font-size: 15px;
  }

  .comments input[type="text"] {
    padding: 9px;
    font-size: 15px;
  }

  .comment {
    font-size: 14px;
    padding-left: 38px;
  }

  .avatar {
    width: 26px;
    height: 26px;
  }
}

/* Breakpoint 3: Tablets & small desktops (768px–1199px) */
@media (min-width: 768px) and (max-width: 1199px) {
  .main-content {
    flex-direction: row;
    padding: 15px;
    gap: 15px;
  }

  .lesson-list {
    width: 250px;
    padding: 12px;
  }

  .lesson-list h3 {
    font-size: 17px;
  }

  .lesson-list li {
    font-size: 14px;
  }

  .lesson-list li a {
    font-size: 14px;
  }

  .video-placeholderr {
    height: 350px;
    font-size: 35px;
  }

  .prev-btn,
  .next-btn {
    width: 150px;
    padding: 9px 18px;
    font-size: 15px;
  }

  .comments input[type="text"] {
    padding: 9px;
  }

  .comment {
    font-size: 14px;
  }
}

/* Breakpoint 4: Large desktops (≥1200px) */
@media (min-width: 1200px) {
  .main-content {
    padding: 30px;
    gap: 30px;
    max-width: 1400px;
  }

  .lesson-list {
    width: 350px;
    padding: 20px;
  }

  .lesson-list h3 {
    font-size: 20px;
    padding: 12px 15px;
  }

  .lesson-list li {
    font-size: 15px;
    padding: 12px 10px;
  }

  .lesson-list li a {
    font-size: 16px;
  }

  .lesson-list li::after,
  .lesson-list li.completed::after {
    width: 24px;
    height: 24px;
    font-size: 18px;
  }

  .lesson-content h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .breadcrumb {
    font-size: 16px;
    padding-top: 20px !important;
  }

  .video-placeholderr {
    height: 450px;
    font-size: 45px;
    border-radius: 14px;
  }

  .prev-btn,
  .next-btn {
    width: 180px;
    padding: 12px 25px;
    font-size: 16px;
  }

  .comments input[type="text"] {
    padding: 12px;
    font-size: 16px;
  }

  .comment {
    font-size: 15px;
    padding-left: 45px;
  }

  .avatar {
    width: 32px;
    height: 32px;
  }
}