/* ===== GLOBAL ===== */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #f5f7fb;
}

/* ===== NAVBAR ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;

  background: linear-gradient(135deg, #0d6efd, #3b82f6);
  display: flex;
  align-items: center;

  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h5 {
  margin: 0;
  font-weight: 600;
  color: #fff;
}

.btn-back {
  background: #fff;
  color: #0d6efd;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
}



/* ===== PAGE OFFSET ===== */
.page {
  margin-top: 70px;
}

/* ===== SIDEBAR (LEFT) ===== */
.course-list {
  position: fixed;
  top: 70px;
  left: 0;

  width: 250px;
  height: calc(100vh - 70px);

  background: #ffffff;
  border-right: 1px solid #eee;

  padding: 15px;
  overflow-y: auto;
  z-index: 900;
}

/* Sidebar items */
.course-list li {
  list-style: none;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.course-list li:hover {
  background: #f1f5ff;
}

.course-list li.active {
  background: #0d6efd;
  color: #fff;
}

/* ===== WRAPPER ===== */
.wrapper {
  margin-left: 270px;
  margin-right: 300px;
  padding: 20px;
}

/* ===== MAIN ===== */
.main {
  max-width: 800px;
}

.box {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

/* ===== CHAPTERS ===== */
.chapter {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}

.chapter h6 {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.subtopics {
  display: none;
  padding-left: 15px;
  margin-top: 5px;
}

.subtopics li {
  font-size: 14px;
  padding: 4px 0;
}

/* ===== RIGHT SIDEBAR ===== */
.sidebar {
  position: fixed;
  right: 20px;
  top: 90px;
  width: 260px;
}

.price-box {
  text-align: center;
}

.price {
  font-size: 28px;
  font-weight: bold;
  color: #0d6efd;
}

.features {
  text-align: left;
  margin-top: 15px;
}

.features li {
  font-size: 14px;
  margin-bottom: 6px;
}

/* ===== TOGGLE SWITCH ===== */
.switch {
  position: relative;
  width: 50px;
  height: 25px;
}

.switch input {
  display: none;
}

.slider {
  position: absolute;
  background: #ccc;
  border-radius: 50px;
  width: 100%;
  height: 100%;
  cursor: pointer;
  transition: 0.3s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 19px;
  width: 19px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .slider {
  background: #0d6efd;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* ===== MOBILE ===== */
@media (max-width: 992px) {

  .course-list {
    left: -260px;
    transition: 0.3s;
  }

  .course-list.active {
    left: 0;
  }

  .wrapper {
    margin-left: 0;
    margin-right: 0;
  }

  .sidebar {
    position: static;
    width: 100%;
  }

}

/* ===== SIDEBAR HEADER ===== */
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* ===== OVERLAY ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);

  opacity: 0;
  visibility: hidden;
  transition: 0.3s;

  z-index: 800;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ===== MOBILE SIDEBAR FIX ===== */
@media (max-width: 992px) {

  .course-list {
    left: -260px;
    transition: 0.3s;
  }

  .course-list.active {
    left: 0;
  }

}

/* ===== MOBILE MENU BUTTON ===== */
.mobile-menu {
  position: fixed;
  top: 72px;
  left: 15px;

  display: flex;
  align-items: center;
  gap: 8px;

  background: #0d6efd;
  color: #ffffff;

  padding: 8px 14px;
  border-radius: 10px;

  font-weight: 600;
  font-size: 15px;

  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: pointer;

  z-index: 1100;

  transition: all 0.25s ease;
}

/* Icon styling */
.mobile-menu span {
  font-size: 14px;
}

/* Hover effect */
.mobile-menu:hover {
  background: #0d6efd;
  color: #fff;
  transform: translateY(-1px);
}

/* Click effect */
.mobile-menu:active {
  transform: scale(0.95);
}

/* Make it look like highlighted chip */
.mobile-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  padding: 1px;
  background: linear-gradient(135deg, #0d6efd, #3b82f6);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
}

/* Hide on desktop explicitly */
@media (min-width: 992px) {
  .mobile-menu {
    display: none;
  }
}

/* ===== TOGGLE ALL SWITCH ===== */
.toggle-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
}

/* Hide default checkbox */
.toggle-all input {
  display: none;
}

/* Slider background */
.slider-btn {
  width: 50px;
  height: 24px;
  background: #ccc;
  border-radius: 50px;
  position: relative;
  transition: 0.3s;
}

/* Circle */
.slider-btn::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: 0.3s;
}

/* Active state */
.toggle-all input:checked + .slider-btn {
  background: #0d6efd;
}

.toggle-all input:checked + .slider-btn::before {
  transform: translateX(26px);
}

/* Text */
.toggle-text {
  font-size: 14px;
  color: #333;
}

/* ===== ULTRA PREMIUM TOGGLE PILL ===== */
.toggle-pill {
  display: inline-block;
  cursor: pointer;
  user-select: none;
}

.toggle-pill input {
  display: none;
}

/* MAIN PILL */
.pill {
  position: relative;
  width: 100px;
  height: 42px;
  border-radius: 50px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;

  /* Glass + gradient */
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  backdrop-filter: blur(6px);

  box-shadow: 
    inset 0 2px 8px rgba(0,0,0,0.08),
    0 4px 14px rgba(0,0,0,0.08);

  overflow: hidden;

  transition: all 0.35s ease;
}

/* TEXT */
.pill span {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  z-index: 2;
  transition: all 0.35s ease;
}

/* OFF STATE */
.text-off {
  color: #0d6efd;
}

.text-on {
  color: #94a3b8;
}

/* SLIDER CIRCLE */
.circle {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;

  top: 3px;
  left: 3px;

  background: linear-gradient(145deg, #ffffff, #e6e6e6);

  box-shadow:
    0 6px 16px rgba(0,0,0,0.2),
    inset 0 1px 2px rgba(255,255,255,0.8);

  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ACTIVE STATE */
.toggle-pill input:checked + .pill {
  background: linear-gradient(135deg, #0d6efd, #3b82f6);
  box-shadow: 
    0 6px 20px rgba(13,110,253,0.35),
    inset 0 2px 8px rgba(255,255,255,0.15);
}

/* MOVE CIRCLE */
.toggle-pill input:checked + .pill .circle {
  transform: translateX(20px);
}

/* TEXT COLORS ACTIVE */
.toggle-pill input:checked + .pill .text-on {
  color: #ffffff;
}

.toggle-pill input:checked + .pill .text-off {
  color: rgba(255,255,255,0.55);
}

/* SUBTLE GLOW EFFECT */
.toggle-pill input:checked + .pill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;

  background: radial-gradient(circle at 70% 50%, rgba(255,255,255,0.25), transparent 60%);
  pointer-events: none;
}

/* HOVER (SOFT, NOT OVERDONE) */
.pill:hover {
  transform: translateY(-1px);
  box-shadow: 
    0 8px 22px rgba(0,0,0,0.12),
    inset 0 2px 8px rgba(0,0,0,0.05);
}

/* CLICK FEEDBACK */
.pill:active {
  transform: scale(0.97);
}

/* ===== MOBILE FIX: MOVE TOGGLE BELOW SEARCH ===== */
@media (max-width: 768px) {

  /* Parent container of search + toggle */
  .search-container {
    display: flex;
    flex-direction: column; /* stack items */
    gap: 10px;
  }

  /* Make toggle full width & aligned nicely */
  .toggle-pill {
    width: 100%;
  }

  .pill {
    width: 100%;
    justify-content: center;
  }
}

/* ===== SEARCH + TOGGLE RESPONSIVE FIX ===== */
.search-toggle {
  display: flex;
  flex-direction: column; /* mobile: stack */
  gap: 10px;
}

/* Desktop: side by side */
@media (min-width: 992px) {
  .search-toggle {
    flex-direction: row;
  }

  .search-toggle input {
    width: 70%;
  }

  .toggle-pill {
    width: auto;
  }
}

/* Optional: align toggle nicely on mobile */
@media (max-width: 991px) {
  .toggle-pill {
    align-self: flex-start;
  }
}