/* =========================================================
   course.css — styles เฉพาะหน้าคอร์ส (load หลัง shared.css)
   ใช้กับ: az-900, az-104, az-305, ms-102, az-800, az-801,
          md-102, sc-100, sc-300 (และคอร์สอื่นที่ตามมา)
   ========================================================= */

/* WRAPPER OVERRIDE สำหรับหน้าคอร์ส (แคบกว่า index นิดหน่อย) */
.wrapper.course {
  max-width: 720px;
  padding-bottom: 80px;
}

/* BACK LINK */
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 400;
  color: #bbb;
  text-decoration: none;
  margin-top: 32px;
  margin-bottom: 32px;
}
.back:hover { color: #111; }

/* COURSE HEADER */
.course-header {
  padding: 32px 0 32px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 40px;
}
.course-code-badge {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 12px;
  font-weight: 500;
  color: #0078d4;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.course-header h1 {
  font-family: 'Sarabun', sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #111;
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: 'Sarabun', sans-serif;
  font-size: 14px;
  color: #888;
  font-weight: 400;
}

/* SECTIONS */
.section { margin-bottom: 40px; }

.section h2 {
  font-family: 'Sarabun', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #111;
  margin-bottom: 16px;
  letter-spacing: 0;
}

.section p {
  font-family: 'Sarabun', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #333;
  line-height: 1.7;
  margin-bottom: 10px;
}

/* SKILL WEIGHT (จาก template เดิม — เก็บไว้เผื่อใช้) */
.skill-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Sarabun', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #222;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
}
.skill-item:last-child { border-bottom: none; }
.skill-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #0078d4;
  font-weight: 500;
  white-space: nowrap;
}

/* MODULES */
.module {
  border-bottom: 1px solid #f0f0f0;
  padding: 20px 0;
}
.module:first-child { padding-top: 0; }
.module:last-child { border-bottom: none; padding-bottom: 0; }

.module-title {
  font-family: 'Sarabun', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #111;
  margin-bottom: 8px;
  line-height: 1.5;
}
.module-desc {
  font-family: 'Sarabun', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #333;
  line-height: 1.7;
  margin-bottom: 10px;
}

/* TOPIC LIST (bullets ใต้ module) */
.topic-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 0;
  list-style: none;
}
.topic-list li {
  font-family: 'Sarabun', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #555;
  padding-left: 14px;
  position: relative;
  line-height: 1.6;
}
.topic-list li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: #ccc;
}

/* DIVIDER */
hr.course-hr {
  border: none;
  border-top: 1px solid #f0f0f0;
  margin: 32px 0;
}

/* SCHEDULE */
.schedule-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f5f5f5;
}
.schedule-row:last-child { border-bottom: none; }
.schedule-date {
  font-family: 'Sarabun', sans-serif;
  font-weight: 500;
  color: #111;
  min-width: 120px;
  font-size: 15px;
}
.schedule-type {
  font-family: 'Sarabun', sans-serif;
  font-weight: 400;
  color: #888;
  font-size: 15px;
}

/* PRICE */
.price-tag {
  font-family: 'Sarabun', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #111;
}
.price-tag .price-unit {
  font-weight: 400;
  color: #888;
  font-size: 16px;
}
.price-tag.free { color: #2e7d32; }

/* CTA */
.course-cta {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-primary {
  background: #0078d4;
  color: #fff;
  font-family: 'Sarabun', sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s;
}
.btn-primary:hover { background: #005ea2; }
.btn-line-text {
  font-family: 'Sarabun', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #555;
  text-decoration: none;
}
.btn-line-text:hover { color: #111; }

/* COURSE PAGE MOBILE */
@media (max-width: 720px) {
  .course-header { padding: 24px 0 28px; }
  .course-header h1 { font-size: 22px; }
  .meta-row { font-size: 13px; gap: 8px; }
  .section h2 { font-size: 17px; }
  .section p { font-size: 15px; }
  .module-title { font-size: 15px; }
  .topic-list li { font-size: 15px; }
  .schedule-date { min-width: auto; font-size: 14px; }
  .schedule-type { font-size: 14px; }
  .price-tag { font-size: 16px; }
  .btn-primary, .btn-line-text { font-size: 14px; }
}
