/* Hero */
.hero-section {
  background: linear-gradient(165deg, #ffffff 0%, #f6fbff 92%);
  padding: 56px 0 28px;
  border-radius: 32px;
}
.hero-title {
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #0f213a;
}
.hero-subtitle {
  margin-top: 10px;
  text-align: center;
  color: #5b6b7c;
}

/* Nav nhóm */
.course-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff;
  border-bottom: 1px solid #e7eef4;
}
.course-nav .container {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.nav-chip {
  padding: 8px 14px;
  border-radius: 999px;
  background: #f1f7fb;
  color: #0f213a;
  border: 1px solid #d9e7ef;
  text-decoration: none;
  font-weight: 600;
}
.nav-chip:hover {
  background: #e6f3f9;
}

/* Nhóm khóa học */
.courses-overview {
  padding: 0;
}
.course-group + .course-group {
  margin-top: 40px;
}
.group-header {
  margin: 0 0 18px;
  text-align: center;
} /* canh giữa tên nhóm */
.group-title {
  font-size: clamp(20px, 2.2vw, 26px); /* was: clamp(24px, 2.6vw, 30px) */
  font-weight: 800;
  color: #0f213a;
  margin: 0 0 6px;
}
.group-subtitle {
  color: #5b6b7c;
}

/* Lưới khóa học: mỗi card cao theo nội dung riêng để mô tả hiển thị hết */
.course-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch; /* was: start */
}
/* Nhóm có 2 khóa */
.course-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Card */
.course-card {
  background: #fff;
  border: 1px solid #e3edf2;
  border-radius: 18px;
  box-shadow: 0 6px 22px -8px rgba(15, 33, 58, 0.14),
    0 2px 6px rgba(15, 33, 58, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%; /* was: auto */
}
.course-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -12px rgba(15, 33, 58, 0.22),
    0 4px 10px rgba(15, 33, 58, 0.12);
}

/* Logo vuông (ảnh hoặc icon) */
.course-logo {
  width: 136px; /* was: 116px */
  aspect-ratio: 1 / 1;
  margin: 18px auto 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #0f213a 0%, #193a57 100%);
  overflow: hidden;
  border: 1px solid rgba(0, 159, 201, 0.15);
  box-shadow: 0 6px 16px rgba(15, 33, 58, 0.08) inset;
}
.course-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.course-logo i {
  font-size: 40px; /* was: 34px */
  opacity: 0.95;
}

/* Nội dung (trừ mô tả) canh giữa */
.course-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 2px; /* was: 8px → Tiêu đề phụ gần Tên hơn */
  flex: 1;
  text-align: center;
}

.course-title {
  margin: 6px 0 0;
  font-size: clamp(18px, 1.5vw, 20px); /* tăng kích thước tên */
  font-weight: 800;
  color: #0f213a;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.3em * 2);
}
.course-subtitle {
  margin: 0; /* was: 2px 0 0 */
  color: #5b6b7c;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: calc(1.35em * 2);
}

/* tạo khoảng cách rõ ràng từ Tiêu đề phụ xuống nội dung */
.course-desc {
  margin-top: 12px; /* was: 4px */
  color: #475569;
  line-height: 1.65;
  text-align: left;
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: unset;
  overflow: visible;
  min-height: 0;
  font-size: 0.95rem;
  flex: 1 1 auto;
}

/* Nút gọn gàng hơn */
.course-info .btn {
  align-self: center;
  margin-top: 16px; /* was: 22px (hoặc auto) → khoảng cách cố định */
  padding: 12px 20px; /* cân đối hơn */
  font-weight: 700;
  border-radius: 12px;
  letter-spacing: 0.01em;
  --c1: #009fc9;
  --c2: #3498db;
  color: var(--c1);
  background: #fff;
  border: 1.5px solid rgba(0, 159, 201, 0.35);
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease,
    transform 0.2s ease;
  position: relative;
}
.course-info .btn::after {
  content: "→";
  margin-left: 8px;
  transition: transform 0.2s ease;
}
.course-info .btn:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--c1), var(--c2));
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(0, 159, 201, 0.25);
  transform: translateY(-1px);
}
.course-info .btn:hover::after {
  transform: translateX(2px);
}

/* Group header accent nhẹ */
.group-header::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #009fc9, #3498db);
  margin: 10px auto 0;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .courses-overview {
    padding: 0 16px 20px;
  }
  .course-group + .course-group {
    margin-top: 28px;
  }
}
