* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f9f9f9;
}

.container {
  display: flex;
  min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.sidebar {
  width: 280px;
  background-color: #fff;
  border-right: 1px solid #ddd;
  padding: 20px;
  overflow-y: auto;
}

.sidebar-header h2 {
  font-size: 20px;
  color: #02055A;
  font-weight: 700;
}

.sidebar-header p {
  font-size: 14px;
  color: #000137;
  margin-top: 5px;
}

.unit-static h3 {
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 16px;
  color: #02198B;
  font-weight: 500;
}

.lesson-list {
  padding-left: 12px;
  border-left: 2px solid #02198B;
  margin-top: 10px;
}

.lesson-list a {
  display: block;
  padding: 12px 14px;
  font-size: 14px;
  color: #2533A1;
  text-decoration: none;
  border-radius: 10px;
  margin-bottom: 6px;
  transition: background 0.2s;
}

.lesson-list a:hover {
  background-color: #f0f4ff;
}

.lesson-list a.active-lesson {
  background-color: #e9f0ff;
  font-weight: 500;
  color: #02198B;
}

/* ============ QUIZ ============ */
.quiz {
  flex: 1;
  padding: 40px;
}

.quiz h2 {
  font-size: 22px;
  margin-bottom: 20px;
  font-weight: normal;
}

.image img {
  max-width: 100%;
  height: auto;
  display: block;
}

.image p {
  font-size: 14px;
  color: #666;
  margin-top: 5px;
}

.options p {
  margin: 20px 0 10px;
  font-weight: bold;
}

/* ============ MULTIPLE CHOICE ============ */
.choice-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #ddd;
  transition: background 0.2s ease, border 0.2s ease;
  cursor: pointer;
  position: relative;
}

/* Hide radio but keep accessibility */
.choice input[type="radio"] {
  position: absolute;
  opacity: 0;
}

/* Circle with letter */
.choice-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  color: #444;
  flex-shrink: 0;
  transition: border-color 0.2s, background-color 0.2s;
}

/* Text */
.choice-text {
  font-size: 16px;
  color: #2c2c2c;
}

/* Hover and focus styles */
.choice:hover {
  background-color: #f9fbff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.choice input[type="radio"]:checked ~ .choice-circle {
  background-color: #2533A1;
  color: #fff;
  border-color: #000137;
}

.choice input[type="radio"]:checked ~ .choice-text {
  font-weight: 500;
  color: #000137;
}

/* ============ IMAGE ============ */
.question-image {
  width: 100%;
  max-width: 300px;
  margin: 1rem auto;
  display: block;
}

/* ============ FEEDBACK ============ */
#feedback {
  margin-top: 1rem;
  font-weight: 500;
  font-size: 16px;
}

#hint {
  color: #FF6B6B;
  margin-top: 0.5rem;
  font-style: italic;
}

#correct {
    color: #729468;
  margin-top: 0.5rem;
  font-style: italic;
}

/* ============ FOOTER BUTTONS ============ */
.footer,
.buttons {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

button,
.footer button {
  padding: 0.6rem 1.2rem;
  font-size: 15px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

button.skip,
.footer .skip {
  background: none;
  color: #02055A;
}

button.check,
.footer .check {
  background-color: #02055A;
  color: #fff;
}

button.check:hover {
  background-color: #2533A1;
}

#nextBtn {
  display: none;
  background-color: #02198B;
  color: white;
}

#nextBtn:hover {
  background-color: #bfd4db;
}

/*-------- drop-down -----------*/
.lesson-dropdown {
  margin-bottom: 10px;
}

.lesson-btn {
  width: 100%;
  background-color: #f0f4ff;
  border: none;
  padding: 10px;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  display: block;
}

.lesson-btn:hover {
  background-color: #f0f4ff;
}

/* Make the dropdown visible on load */
.subtopic-list {
  display: block; /* expanded by default */
  padding-left: 20px;
}

.subtopic-list a {
  display: block;
  padding: 6px 0;
  color: #02055A;
  text-decoration: none;
}

.subtopic-list a:hover {
  background-color: #f0f4ff;
}

.lesson-btn.active-dropdown {
  background-color: #f0f4ff; /* light blue background */
  color: #000137;            /* deep blue text */
  font-weight: 600;
  border-radius: 10px;
}

/* Keep hover consistent */
.lesson-btn.active-dropdown:hover {
  background-color: #d6e7ff;
}

.unit-list {
  margin-top: 1rem;
}

.unit-link {
  display: block;
  padding: 12px 16px;
  margin-bottom: 8px;
  color: #02055A;
  text-decoration: none;
  font-weight: 500;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.unit-link:hover {
  background-color: #f0f4ff; /* light hover background */
}

.bullet-list {
  margin-left: 24px;
  margin-bottom: 12px;
  padding-left: 20px;
  list-style-type: disc;
}

.bullet-list li {
  margin-bottom: 6px;
  font-size: 16px;
  line-height: 1.5;
}

.quiz h2 p {
  margin: 10px 0;
  font-size: 16px;
  line-height: 1.6;
}

.question-image {
  display: block;
  margin: 1rem auto;
  max-width: 100%;
  width: 600px; /* Increase size here */
  border-radius: 8px;
}
  .question-dropdown {
      position: relative;
      text-align: center;
      margin-top: 30px;
    }

    .dropdown-toggle {
      padding: 10px 20px;
      font-size: 16px;
      background-color: black;
      color: white;
      border: none;
      border-radius: 8px;
      cursor: pointer;
    }

    .dropdown-menu {
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
      top: 100%;
      background: white;
      border: 1px solid #ccc;
      border-radius: 8px;
      padding: 12px;
      margin-top: 10px;
      z-index: 100;
      width: fit-content;
      box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }

    .hidden {
      display: none;
    }

    .dropdown-grid {
    display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
    }

    .dropdown-grid button {
      width: 36px;
      height: 36px;
      font-size: 16px;
      border: 1px solid#888;
      border-radius: 4px;
      background: white;
      cursor: pointer;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .dropdown-grid button.active {
      background-color:#f0f4ff;
      color: black;
      border: 1px dashed #000137;
    }

/* ===== HEADER STYLING ===== */
.sub-header {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 8px 40px;   /* keeps header thin */
}

.sub-header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;    /* allows items to wrap instead of being cut off */
  width: 100%;
  box-sizing: border-box;
}

/* LOGO FIX */
.logo {
  height: 45px;      /* force shrink */
  width: auto;       /* keep aspect ratio */
  display: inline-block;
}

/* NAV LINKS */
.navlinks {
  margin-right: 30px; /* decrease space from the right edge */
}

.navlinks ul {
  list-style: none;
  display: flex;
  gap: 25px;
}

.navlinks ul li a {
  text-decoration: none;
  color: #0a1d44;
  font-weight: 310;
  font-size: 13px;
}

.navlinks ul li a:hover {
  color: #99AFD7;
}

/* HIDE mobile menu icons by default */
.fa-bars, .fa-times {
  display: none;
}



/* Prevent horizontal scroll */
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;  /* hides accidental overflow */
}

/* Make sure dashboard layout doesn't push wider */
.dashboard {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}


/* Sidebar base */
.sidebar {
  width: 280px;
  background-color: #fff;
  border-right: 1px solid #ddd;
  padding: 20px;
  overflow-y: auto;
  transition: transform 0.3s ease; /* smooth slide */
}

/* Phones: sidebar starts hidden */
@media (max-width: 700px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%); /* off-screen */
    z-index: 2000;
  }

  .sidebar.open {
    transform: translateX(0); /* slide back in */
  }

  /* Show hamburger */
  .sidebar-toggle {
    display: block;
    font-size: 22px;
    color: #02198B;
    cursor: pointer;
    margin-left: 20px;
    z-index: 2100;
  }
}
/* Sidebar base */
.sidebar {
  width: 280px;
  background-color: #fff;
  border-right: 1px solid #ddd;
  padding: 20px;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

/* Mobile: hide sidebar and show pull tab */
@media (max-width: 700px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%); /* hidden */
    z-index: 2000;
  }

  .sidebar.open {
    transform: translateX(0); /* slide in */
  }

  /* Pull tab */
  .pull-tab {
    position: fixed;
    top: 30%;
    left: 0;
    transform: translateY(-50%);
    background: #001540;
    color: #fff;
    padding: 4px 8px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2100;
    border-radius: 0 6px 6px 0;
    box-shadow: 2px 0 6px rgba(0,0,0,0.2);
width: 24px;
height: 70px;

  }

  /* Close button inside sidebar */
  .close-sidebar {
    display: block;
    background: none;
    border: none;
    font-size: 26px;
    color: #02198B;
    cursor: pointer;
    margin-bottom: 20px;
  }
}

/* Desktop: sidebar always visible, hide pull tab + close */
@media (min-width: 701px) {
  .pull-tab,
  .close-sidebar {
    display: none;
  }
}


@media (max-width: 700px) {
  .quiz {
    padding: 15px;             /* smaller padding */
    width: 100%;               /* take full screen width */
    max-width: 100%;           /* don’t restrict */
    box-sizing: border-box;    /* ensure padding stays inside */
    overflow-x: hidden;        /* prevent sideways scroll */
  }

  .choice-group {
    width: 100%;               /* let choices expand fully */
  }

  .choice {
    flex-wrap: wrap;           /* wrap long answer text */
    justify-content: flex-start;
  }

  .choice-text {
    flex: 1;                   /* let text take remaining space */
    min-width: 0;              /* allows wrapping instead of overflow */
    font-size: 15px;           /* slightly smaller on mobile */
    line-height: 1.4;
  }

  img, .question-image {
    max-width: 100%;           /* images shrink to screen */
    height: auto;
  }
}
