body {
  font-family: system-ui, sans-serif;
  background: #f7f9fb;
  color: #222;
  max-width: 750px;
  margin: 2rem auto;
  padding: 0 1rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

h1 {
  color: #005ea5;
}

.question {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

button {
  background: #005ea5;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
}

button:hover {
  background: #0074c1;
}

#result-section {
  text-align: center;
  margin-top: 2rem;
}

.hidden {
  display: none;
}

.ad-slot {
  text-align: center;
  margin: 2rem 0;
}

.quiz-card {
  background: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  margin: 1rem 0;
}
.quiz-card a {
  color: #005ea5;
  font-weight: 600;
  text-decoration: none;
}
.quiz-card a:hover {
  text-decoration: underline;
}

.option {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: background 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.option:hover {
  background: #f0f7ff;
}

.option.correct {
  background: #d2f8d2;
  border-left: 4px solid #2e8b57;
  animation: pulseCorrect 0.4s ease;
}

.option.wrong {
  background: #ffd6d6;
  border-left: 4px solid #e63946;
  animation: shakeWrong 0.3s ease;
}

@keyframes pulseCorrect {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes shakeWrong {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.explanation {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  background: #f9fafb;
  border-left: 3px solid #0074c1;
  padding: 0.75rem;
  border-radius: 6px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.explanation.fade-in {
  opacity: 1;
}

.hidden {
  display: none;
}
/* Results Section */
.result-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 400px;
  margin: 3rem auto;
  animation: fadeUp 0.6s ease;
}

.result-card h2 {
  color: #222;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

#score-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0074c1;
  margin-bottom: 0.5rem;
}

#feedback-text {
  font-size: 1rem;
  color: #333;
  margin-bottom: 1.5rem;
}

.result-card button {
  background: #005ea5;
  border: none;
  color: #fff;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.result-card button:hover {
  background: #0074c1;
  transform: translateY(-2px);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}


/* === FOOTER === */
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: #555;
  margin-top: 3rem;
  border-top: 1px solid #eee;
}


footer {
  background-color: #f9fafb;
  padding: 40px 20px;
  text-align: center;
  border-top: 1px solid #e5e7eb;
  margin-top: 60px;
}

footer h2 {
  font-size: 1.4rem;
  color: #1e3a8a;
  margin-bottom: 20px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 15px;
  max-width: 900px;
  margin: 0 auto 25px;
}

.quiz-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 15px;
  text-decoration: none;
  color: #111827;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.quiz-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.footer-note {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 15px;
}


/* ==========================
   NAVIGATION MENU
   ========================== */
.main-nav {
  background: #0b355a;
  padding: 0.75rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 999;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 0.8;
}

/* Dropdowns */
.dropdown-content {
  display: none;
  position: absolute;
  top: 2rem;
  left: 0;
  background: #fefefe;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  border-radius: 6px;
  overflow: hidden;
  z-index: 999;
}

.dropdown-content li {
  display: block;
}

.dropdown-content a {
  color: #0b355a;
  display: block;
  padding: 0.7rem 1.2rem;
}

.dropdown-content a:hover {
  background: #eef4ff;
}

/* Show dropdown on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Mobile friendly */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }

  .dropdown-content {
    position: static;
    background: #fff;
    box-shadow: none;
    border: 1px solid #e0e6ed;
    width: 100%;
  }
}

/* --- NAV FIXES --- */

/* Ensure submenus sit above other content */
.dropdown {
  position: relative;
  z-index: 1000;
}

/* Make sure dropdown links stay clickable */
.dropdown-content {
  display: none;
  position: absolute;
  top: 100%; /* attach right below parent */
  left: 0;
  min-width: 200px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 6px;
  padding: 0;
  z-index: 1001; /* higher than everything else */
}

/* Show on hover */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Prevent parent UL from clipping submenu */
.nav-links {
  overflow: visible;
}
