/* ==========================================================
   Kebha Dreamhacker Hub — Course Details Page
   Shares the site's light-purple theme (see contact.css / courses.css)
   ========================================================== */

:root {
  --purple-50:  #f7f3fc;
  --purple-100: #efe6fa;
  --purple-200: #e0cdf5;
  --purple-300: #cba7ec;
  --purple-400: #ab7ce0;
  --purple-500: #8e5fd1;
  --purple-600: #7347b8;
  --purple-700: #5c3792;
  --text-dark:  #2e2340;
  --text-muted: #6b6079;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(142, 95, 209, 0.15);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--purple-50);
  color: var(--text-dark);
  line-height: 1.6;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

a { text-decoration: none; color: inherit; }

/* ---------- Header (shared look) ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--purple-100);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
}
.logo { font-weight: 700; font-size: 1.25rem; color: var(--purple-700); }
.logo span { color: var(--purple-400); font-weight: 400; }
.main-nav a { margin-left: 28px; color: var(--text-muted); font-weight: 500; transition: color 0.2s; }
.main-nav a:hover, .main-nav a.active { color: var(--purple-600); }

/* ---------- Hamburger toggle (mobile) ---------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 38px;
  background: var(--purple-50);
  border: 1.5px solid var(--purple-300);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--purple-600);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.menu-toggle:hover { border-color: var(--purple-500); }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  padding: 16px 0;
}
.breadcrumb a {
  font-size: 0.9rem;
  color: var(--purple-600);
  font-weight: 600;
}
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.detail-hero {
  color: var(--white);
  padding: 56px 0 44px;
}
.detail-hero-inner { text-align: left; }
.detail-category {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.detail-hero h1 {
  margin: 0 0 8px;
  font-size: 2.1rem;
  max-width: 720px;
}
.detail-instructor {
  margin: 0 0 16px;
  opacity: 0.9;
}
.detail-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  opacity: 0.95;
}

/* ---------- Body ---------- */
.detail-body { padding: 48px 0 72px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 36px;
  align-items: start;
}

.detail-main h2 {
  color: var(--purple-700);
  font-size: 1.3rem;
  margin: 0 0 14px;
}
.detail-main h2:not(:first-child) { margin-top: 36px; }

.detail-description {
  color: var(--text-muted);
  margin: 0;
}

.lesson-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lesson-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--purple-100);
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 0.95rem;
}
.lesson-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--purple-100);
  color: var(--purple-700);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ---------- Sidebar / price card ---------- */
.price-card {
  background: var(--white);
  border: 1px solid var(--purple-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  position: sticky;
  top: 90px;
}
.price-tag {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--purple-700);
  margin-bottom: 16px;
}
.btn-enroll {
  display: block;
  text-align: center;
  background: var(--purple-500);
  color: var(--white);
  font-weight: 700;
  padding: 12px;
  border-radius: 999px;
  margin-bottom: 10px;
  transition: background 0.2s;
}
.btn-enroll:hover { background: var(--purple-600); }
.btn-secondary {
  display: block;
  text-align: center;
  color: var(--purple-600);
  font-weight: 600;
  padding: 10px;
  font-size: 0.9rem;
  margin-bottom: 18px;
}
.btn-secondary:hover { text-decoration: underline; }

.price-includes {
  list-style: none;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--purple-100);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.price-includes li { margin-bottom: 8px; }

/* ---------- Footer (shared look) ---------- */
.site-footer { background: var(--text-dark); color: var(--purple-100); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-links a { margin-right: 20px; color: var(--purple-200); font-size: 0.88rem; }
.footer-links a:hover { color: var(--white); }
.copyright { font-size: 0.82rem; color: var(--purple-300); margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .detail-grid { grid-template-columns: 1fr; }
  .price-card { position: static; }

  .menu-toggle { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    border-bottom: 1px solid var(--purple-100);
    box-shadow: var(--shadow);
    padding: 12px 24px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    margin-left: 0;
    padding: 12px 4px;
    color: var(--purple-700);
    border-bottom: 1px solid var(--purple-100);
  }
  .main-nav a:last-child { border-bottom: none; }
  .main-nav a:hover,
  .main-nav a.active { color: var(--purple-500); }
}
