/* General form container */
.q-form {
  max-width: 100%;
  margin: 2rem auto;
  padding: 1.5rem 2rem 2rem;
  background: #f8faff;
  border-radius: 28px;
  box-shadow:inset 0 12px 30px rgb(48, 120, 0);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  transition: all 0.2s ease;
}

/* Question card – clean elevated panel */
.q-card {
  background: #ffffff;
  padding: 1.75rem 1.8rem 1.5rem;
  margin-bottom: 0.25rem;
  border-radius: 20px;
  box-shadow: inset 0 4px 16px #003057, inset 0 1px 5px rgba(0, 20, 40, 0.05);
  border: 1px solid #eef3fa;
  transition: 0.15s;
}

.q-card p {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 550;
  color: #0b2b44;
  line-height: 1.5;
}

/* Question text */
.q-card p b {
  font-weight: 650;
  color: #003057;
}

/* inline media (question image / video) */
.q-card img,
.q-card video {
  display: block;
  margin: 0.75rem 0 0.8rem 0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  max-width: 100%;
  height: auto;
}

.q-card video {
  border-radius: 14px;
  background: #000;
}

/* options – flexible row with spacing */
.option {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.8rem;
  padding: 0.6rem 0.8rem 0.6rem 0.6rem;
  margin: 0.4rem 0;
  background: #fbfdff;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.12s, border 0.1s, box-shadow 0.15s;
  cursor: pointer;
}

.option:hover {
  background: #f0f6fe;
  border-color: #b6d2ed;
  box-shadow: 0 0 0 1px #dce7f5;
}

/* radio button custom styling (aligned) */
.option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #b8c9dd;
  border-radius: 50%;
  margin: 0 6px 0 2px;
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.1s;
  flex-shrink: 0;
  cursor: pointer;
}

.option input[type="radio"]:checked {
  border-color: #0078d7;
  background: #0078d7;
  box-shadow: inset 0 0 0 4px white, 0 0 0 1px #0078d7;
}

/* option text (A., B., etc) */
.opt-box {
  font-weight: 500;
  color: #1f405e;
  letter-spacing: 0.01em;
  margin-right: 0.3rem;
  font-size: 0.98rem;
}

/* small media inside options */
.option img,
.option video {
  max-width: 100px;
  border-radius: 8px;
  margin-left: auto;
  object-fit: cover;
  border: 1px solid #e7edf5;
  background: #fafcff;
}

.option video {
  max-height: 70px;
}

/* navigation bar – inline back/next buttons */
.q-form > div:has(a) {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.8rem 0 1.2rem !important;
  gap: 12px;
}

/* back & next anchor styled as pills */
.q-form a[href="#"],
.q-form a[type="button"] {
  display: inline-block;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.6rem 1.4rem !important;
  border-radius: 40px !important;
  background: #ffffff !important;
  color: #0078d7 !important;
  border: 1px solid #cbdae9 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.15s !important;
  text-decoration: none !important;
  cursor: pointer;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.q-form a[href="#"]:hover,
.q-form a[type="button"]:hover {
  background: #eef4fd !important;
  border-color: #0078d7 !important;
  box-shadow: 0 4px 8px rgba(0, 90, 200, 0.08) !important;
  transform: scale(1.01);
}

.q-form a[href="#"]:active,
.q-form a[type="button"]:active {
  background: #dce8f9 !important;
}

/* submit button – full width, distinct */
.q-form button[type="submit"] {
  display: block;
  padding: 0.9rem 1.5rem;
  margin-top: 0.8rem;
  background: #2cb000;
  border: none;
  border-radius: 48px;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
  box-shadow: 0 6px 14px rgba(0, 88, 184, 0.25);
  transition: all 0.2s;
  cursor: pointer;
  border: 1px solid #d70000;
}

.q-form button[type="submit"]:hover {
  background: #b00041;
  transform: scale(1.01) translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 70, 150, 0.2);
}

.q-form button[type="submit"]:active {
  background: #004f8a;
  transform: scale(0.99);
}

/* hidden first card display (only one shown via js) */
.q-card[style*="display:none"] {
  display: none !important;
}

.q-card[style*="display:block"],
.q-card[style*="display: block"] {
  display: block !important;
}

/* responsive polish */
@media (max-width: 600px) {
  .q-form {
    padding: 1.2rem;
    margin: 1rem;
    border-radius: 24px;
  }
  .q-card {
    padding: 1.2rem 1rem;
  }

  .option {
    flex-wrap: wrap;
    padding: 0.5rem 1rem;
    border-radius: 10px;
  }

  .option img,
  .option video {
    max-width: 70px;
    max-height: 50px;
  }

  .q-form > div:has(a) {
    flex-wrap: wrap;
    justify-content: center;
  }

  .q-form a[href="#"],
  .q-form a[type="button"] {
    padding: 0.5rem 1.2rem !important;
    font-size: 0.9rem;
  }
}

/* extra: hidden input (assessment) */
input[type="hidden"] {
  display: none;
}

/* subtle focus for accessibility */
.option input[type="radio"]:focus-visible {
  outline: 2px solid #0078d7;
  outline-offset: 2px;
}

/* final adjust */
.q-form button[type="submit"] {
  margin-top: 1.2rem;
}

.circle-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.circle-card {
    flex: 1 1 120px; /* responsive base size */
    max-width: 150px;
    aspect-ratio: 1 / 1; /* keeps circle shape */
    border-radius: 50%;
    border: 4px solid #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
}

.circle-card b {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.q-box {
    display:inline-block;
    width:30px;
    height:30px;
    text-align:center;
    margin:2px;
    border:1px solid #0078d7;
    border-radius:4px;
    cursor:pointer;
}

.q-box.active {
    background:#0078d7;
    color:#fff;
    font-weight:bold;
}

.q-box.answered {
    background:#28a745;
    color:#fff;
}

/* Current question AND answered */
.q-box.active.answered {
    background:#155724;
    color:#fff;
    font-weight:bold;
    border:2px solid #28a745;
}

.bloom-summary {
    background-color: #f9f9f9;       /* Light background */
    border: 1px solid #ddd;          /* Subtle border */
    border-radius: 8px;              /* Rounded corners */
    padding: 20px;                   /* Inner spacing */
    margin-bottom: 20px;             /* Space below */
    font-family: Arial, sans-serif;  /* Clean font */
}

.bloom-summary h4 {
    margin-top: 0;
    color: #333;                     /* Darker heading */
    font-size: 18px;
    border-bottom: 2px solid #4CAF50; /* Accent underline */
    padding-bottom: 8px;
}

.bloom-summary div {
    list-style-type: none;           /* Remove default bullets */
    padding-left: 0;
    margin: 15px 0;
    border-bottom: 1px;
}

.bloom-summary span {
    padding: 10px;
    font-size: 15px;
    color: #555;
    box-shadow:inset 0 1px 5px #003057;
    margin: 0 6px;
    border-radius: 10px;
}

.bloom-summary span strong {
    color: #4CAF50;                  /* Highlight Bloom level */
}

.bloom-summary p {
    font-weight: bold;
    color: #222;
    margin-top: 15px;
}

.q-box {
    padding: 10px;
    border: 1px solid #ccc;
    cursor: pointer;
    flex: 0 0 40px;        /* fixed width but flexible wrapping */
    text-align: center;
    border-radius: 6px;
    background: #f9f9f9;
}

/* Tablet view */
@media (max-width: 768px) {
    .q-box {
        flex: 0 0 30px;
        padding: 8px;
    }
}

/* Mobile view */
@media (max-width: 480px) {
    #q-nav {
        justify-content: center; /* center buttons on small screens */
    }
    .q-box {
        flex: 0 0 25px;
        padding: 6px;
        font-size: 12px;
    }
}

