/* =====================================================================
   01) ROOT THEME VARIABLES (Light + Dark)
===================================================================== */
:root {
  /* base theme */
  --bg-color: #ffffff;
  --text-color: #111827;
  --nav-bg: #ffffff;
  --accent: #2563eb;

  /* compatibility variables (from last snippet) */
  --bg: var(--bg-color);
  --text: var(--text-color);

  /* fallback if your old code uses these */
  --primary: var(--nav-bg);
  --dark: #111827;
}

/* Dark mode (supports BOTH toggling methods) */
body.dark-mode,
html[data-theme="dark"] {
  --bg-color: #0f172a;
  --text-color: #e5e7eb;
  --nav-bg: #020617;
  --accent: #38bdf8;

  /* compatibility variables */
  --bg: var(--bg-color);
  --text: var(--text-color);
}

/* Optional: if you use body.light-mode somewhere */
body.light-mode {
  --bg: var(--bg-color);
  --text: var(--text-color);
}


/* =====================================================================
   02) GLOBAL
===================================================================== */
body {
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}


/* =====================================================================
   03) HEADER & NAVBAR
===================================================================== */
.site-header {
  background: var(--nav-bg);
  width: 100%;
  position: relative;
}

.navbar {
  max-width: 1200px;
  margin: auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Brand */
.brand a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
}


/* =====================================================================
   04) NAV MENU + LINKS
===================================================================== */
.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 25px;
  margin-left: auto;
  padding: 0;
}

.nav-menu a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
}

.nav-menu a:hover {
  color: var(--accent);
}

/* Dropdown trigger button (if you use a button) */
.dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0;
}

.dropdown-toggle:hover {
  color: var(--accent);
}


/* =====================================================================
   05) DROPDOWN MENU
===================================================================== */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;

  background: var(--nav-bg);
  min-width: 220px;
  list-style: none;
  padding: 10px 0;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  z-index: 1000;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--text-color);
  font-weight: 400;
  text-decoration: none;
}

.dropdown-menu a:hover {
  background: rgba(0,0,0,0.06);
}

/* Dark hover background for dropdown items */
body.dark-mode .dropdown-menu a:hover,
html[data-theme="dark"] .dropdown-menu a:hover {
  background: rgba(255,255,255,0.08);
}

/* Desktop hover to open */
@media (min-width: 768px) {
  .dropdown:hover .dropdown-menu {
    display: block;
  }
}


/* =====================================================================
   06) THEME TOGGLE (Sun/Moon)
===================================================================== */

/* Container (far right) */
.nav-theme-toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
}

/* Toggle button (icon-only) */
.theme-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.theme-toggle:hover {
  background: rgba(0,0,0,0.06);
  transform: rotate(15deg);
  opacity: 0.8;
}

body.dark-mode .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(255,255,255,0.08);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Icon base */
.theme-toggle .icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Display-based switching */
.icon-sun { display: none; }
.icon-moon { display: block; }

body.dark-mode .icon-sun,
html[data-theme="dark"] .icon-sun { display: block; }

body.dark-mode .icon-moon,
html[data-theme="dark"] .icon-moon { display: none; }

/* Animation-based switching */
body.light-mode .icon-sun {
  opacity: 0;
  transform: scale(0.5) rotate(-90deg);
  pointer-events: none;
}

body.dark-mode .icon-moon {
  opacity: 0;
  transform: scale(0.5) rotate(90deg);
  pointer-events: none;
}

body.light-mode .icon-moon,
body.dark-mode .icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}


/* =====================================================================
   07) HEADER MOBILE SAFETY
===================================================================== */
@media (max-width: 768px) {
  .navbar {
    flex-wrap: wrap;
  }

  .nav-menu {
    width: 100%;
    justify-content: space-between;
    margin-top: 1rem;
  }

  .nav-theme-toggle {
    margin-left: 0;
  }
}


/* =====================================================================
   08) COURSE HERO SECTION
===================================================================== */
.course-hero {
  background: #f6f7f8;
  padding: 34px 18px 60px;
}

.course-hero__container {
  max-width: 1200px;
  margin: 0 auto;
}

.course-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 26px;
}

.course-hero__back:hover {
  text-decoration: underline;
}

.back-icon {
  font-size: 18px;
  line-height: 1;
}

.course-hero__grid {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 34px;
  align-items: start;
}

/* LEFT */
.course-hero__header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.course-hero__badge {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  background: #e8edf1;
  display: grid;
  place-items: center;
  color: #0f3d56;
  flex: 0 0 58px;
}

.course-hero__title {
  font-size: 40px;
  line-height: 1.1;
  margin: 0 0 8px;
  font-weight: 800;
  color: #0f172a;
}

.course-hero__desc {
  margin: 0;
  max-width: 760px;
  color: #64748b;
  font-size: 15px;
  line-height: 1.6;
}

.course-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 22px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.meta-item svg {
  color: #0f3d56;
}

.meta-item--long {
  flex: 1 1 520px;
  font-weight: 600;
}

.meta-item--long span {
  color: #0f172a;
  font-weight: 600;
}

/* RIGHT CARD */
.course-hero__card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.price {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
}

.enroll-btn {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 12px 14px;
  background: #0f3d56;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.enroll-btn:hover {
  filter: brightness(0.95);
}

.includes {
  margin-top: 18px;
}

.includes-title {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.includes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: #334155;
  font-size: 14px;
}

.includes-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #0f3d56;
  color: #0f3d56;
  font-size: 12px;
  line-height: 1;
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .course-hero__grid {
    grid-template-columns: 1fr;
  }

  .course-hero__title {
    font-size: 34px;
  }
}

@media (max-width: 520px) {
  .course-hero__header {
    gap: 14px;
  }

  .course-hero__badge {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .course-hero__title {
    font-size: 30px;
  }
}


/* =====================================================================
   09) COURSE DETAILS SECTION
===================================================================== */
.course-details {
  background: #ffffff;
  padding: 34px 18px 70px;
}

.course-details__container {
  max-width: 1200px;
  margin: 0 auto;
}

.course-details__grid {
  display: grid;
  grid-template-columns: 1.55fr 0.75fr;
  gap: 44px;
  align-items: start;
}

/* LEFT */
.course-details__title {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 14px;
}

.course-details__text {
  color: #64748b;
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 36px;
  max-width: 820px;
}

.course-details__subtitle {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 18px;
}

.learn-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  max-width: 860px;
}

.learn-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: #334155;
  font-size: 15px;
  line-height: 1.7;
}

.learn-icon {
  color: #0f3d56;
  margin-top: 2px;
  flex: 0 0 auto;
}

/* RIGHT */
.course-details__right {
  display: grid;
  gap: 18px;
}

.info-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.info-card__title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.info-icon {
  color: #0f3d56;
  margin-top: 1px;
  flex: 0 0 auto;
}

.cert-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #475569;
  font-size: 14px;
}

.cert-icon {
  color: #0f3d56;
  flex: 0 0 auto;
}

/* CTA (dark blue panel) */
.cta-card {
  background: #0f3d56;
  border-radius: 10px;
  padding: 22px;
  color: #ffffff;
}

.cta-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
}

.cta-text {
  margin: 0 0 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.6;
}

.cta-btn {
  width: 100%;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #0f172a;
  border-radius: 8px;
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
}

.cta-btn:hover {
  filter: brightness(0.98);
}

/* RESPONSIVE */
@media (max-width: 980px) {
  .course-details__grid {
    grid-template-columns: 1fr;
  }
}


/* =====================================================================
   10) CURRICULUM SECTION
===================================================================== */
.curriculum {
  background: #ffffff;
  padding: 40px 10px 60px;
}

.curriculum__container {
  max-width: 1200px;
  margin: 0 auto;
}

.curriculum__title {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 18px;
}

.module-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 22px 22px 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  margin-bottom: 18px;
}

.module-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 16px;
}

.module-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.module-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.module-icon {
  color: #0f3d56;
  margin-top: 2px;
  flex: 0 0 auto;
}

/* Responsive */
@media (max-width: 680px) {
  .module-card {
    padding: 18px;
  }

  .curriculum__title {
    font-size: 24px;
  }
}


/* =====================================================================
   11) COURSE CARD AS LINK (Clickable grid card behavior)
===================================================================== */
.course-card {
  display: block;
  text-decoration: none;      /* remove underline */
  color: inherit;
}

.course-card * {
  text-decoration: none;      /* remove underline from inner text/links */
}

.course-card:hover {
  transform: translateY(-4px);
}

.enroll-btn {
  position: relative;
  z-index: 2;
}
/* =========================
   CHATBOT BUTTON
========================= */
.chatbot-btn {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 56px;
  height: 56px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  z-index: 999;
}

.chatbot-btn:hover {
  background: #083a56;
}