/* ===== Khóa học (archive + single) ===== */
.phero {
  background: var(--paper-2);
  color: var(--ink);
  padding-block: clamp(56px, 8vw, 90px);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.phero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 340px;
  height: 340px;
  border: 60px solid var(--red);
  border-radius: 50%;
  opacity: 0.12;
  border-right-color: transparent;
  border-bottom-color: transparent;
}
.phero .crumb {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.phero .crumb a {
  color: var(--muted);
}
.phero .crumb a:hover {
  color: var(--red);
}
.phero h1 {
  color: var(--ink);
  font-size: clamp(38px, 6vw, 72px);
  letter-spacing: -0.04em;
}
.phero p {
  color: var(--muted);
  font-size: clamp(17px, 1.8vw, 20px);
  max-width: 60ch;
  margin-top: 20px;
}

.page-hero {
  padding: clamp(40px, 6vw, 72px) 0 clamp(20px, 3vw, 36px);
}
.page-hero .eyebrow {
  display: inline-block;
  margin-bottom: 14px;
}
.page-hero h1 {
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.page-hero p {
  color: var(--muted);
  max-width: 60ch;
  margin-top: 14px;
  font-size: 17px;
}

.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}
.courses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* archive: filters + cat grid */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 38px;
}
.filters button {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
  color: var(--ink-2);
}
.filters button.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
/* Đẩy giá + nút "Xem chi tiết" xuống đáy thẻ để các nút thẳng hàng dù nội dung dài ngắn khác nhau */
.cat-grid .course .price {
  margin-top: auto;
}
.course .meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}
.course .feat {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.course .feat li {
  display: flex;
  gap: 9px;
}
.course .feat li::before {
  content: "✓";
  color: var(--red);
  font-weight: 800;
}
.course.hide {
  display: none;
}

/* levels */
.levels {
  background: var(--paper-2);
}
.lv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.lv {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px 24px;
  position: relative;
}
.lv .tag {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 0.1em;
}
.lv h3 {
  font-size: 20px;
  margin: 12px 0 10px;
}
.lv p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}
.lv .arrow {
  position: absolute;
  right: -13px;
  top: 50%;
  color: var(--faint);
  font-size: 20px;
  z-index: 2;
}
.lv:last-child .arrow {
  display: none;
}

/* single course */
.course-single {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.course-single .cover {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
}
.course-single .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.course-single .prose {
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.course-single .prose p {
  margin-bottom: 16px;
}
.course-single .prose ul {
  margin: 0 0 16px 20px;
}
.course-box {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  padding: 28px;
  position: sticky;
  top: 90px;
}
.course-box .price {
  margin-bottom: 16px;
}
.course-box .price .now {
  font-size: 30px;
  font-weight: 800;
  color: var(--red);
}
.course-box .price .was {
  margin-left: 10px;
  color: var(--muted);
  text-decoration: line-through;
}
.course-box ul {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.course-box ul li {
  font-size: 14.5px;
  color: var(--ink-2);
}
.course-box ul li b {
  color: var(--ink);
}

@media (max-width: 1280px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1080px) {
  .courses-grid,
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lv-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lv .arrow {
    display: none;
  }
  .course-single {
    grid-template-columns: 1fr;
  }
  .course-box {
    position: static;
  }
}
@media (max-width: 680px) {
  .courses-grid,
  .cat-grid,
  .lv-grid {
    grid-template-columns: 1fr;
  }
}
