/* Red Seal Exam Prep — Shared Stylesheet v1.0 */

/* ── CSS VARIABLES ─────────────────────────────────────────────── */
:root {
  --hero-grad-from: #1e3a5f;
  --hero-grad-to: #2c5282;
  --hero-padding-mobile: 32px 24px;
  --hero-padding-desktop: 64px 32px;
  --nav-height: 64px;
  --trade-badge-bg: #f59e0b;
  /* Text contrast override — replaces per-page --muted: #7f8c8d (was 3.6:1, WCAG fail) */
  --muted: #4a5568 !important; /* #4a5568 on #fff: 7.0:1 (AAA) */
}

/* ── PAGE HERO ─────────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--hero-grad-from) 0%, var(--hero-grad-to) 100%);
  padding: var(--hero-padding-mobile);
  text-align: center;
  color: #fff;
}
.page-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.3;
}
.page-hero .subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  margin: 0 0 16px;
}
.page-hero .pill-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.page-hero .trade-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--trade-badge-bg);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  border: none;
}
@media (min-width: 768px) {
  .page-hero {
    padding: var(--hero-padding-desktop);
  }
  .page-hero h1 {
    font-size: 2.25rem;
  }
}

/* ── NAV DROPDOWN ──────────────────────────────────────────────── */
.nav-dropdown { position: relative; }

.nav-drop-btn {
  background: none;
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: .88rem;
  cursor: pointer;
  padding: 16px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.nav-drop-btn:hover { color: #f0a500; }

.nav-drop-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #1a3a5c;
  min-width: 230px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  border-radius: 0 0 8px 8px;
  border-top: 2px solid #f0a500;
  z-index: 200;
}
.nav-dropdown.open .nav-drop-menu { display: block; }

.nav-drop-menu a {
  display: block !important;
  padding: 10px 16px !important;
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
  font-size: .85rem !important;
  color: rgba(255,255,255,.88) !important;
  font-weight: 500;
  width: auto !important;
  text-decoration: none;
}
.nav-drop-menu a:last-child { border-bottom: none !important; }
.nav-drop-menu a:hover,
.nav-drop-menu a.active { color: #f0a500 !important; background: rgba(255,255,255,.05); }

/* ── TRADE BADGE ───────────────────────────────────────────────── */
.trade-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
  letter-spacing: 1px;
  border: 1px solid rgba(255,255,255,0.30);
  text-transform: uppercase;
}

/* ── MOBILE: DROPDOWN IN HAMBURGER MENU ────────────────────────── */
@media (max-width: 860px) {
  .nav-dropdown { width: 100%; }
  .nav-drop-btn {
    padding: 13px 20px !important;
    width: 100%;
    text-align: left;
    font-size: .9rem !important;
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: block;
    border-radius: 0;
  }
  .nav-drop-menu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    border-top: none;
    min-width: 0;
    border-left: 3px solid #f0a500;
    margin-left: 0;
  }
  .nav-drop-menu a { padding: 10px 20px 10px 28px !important; }
}
/* ── NAV DROPDOWN OVERFLOW FIX ─────────────────────────────────── */
.nav-links { overflow: visible !important; }

/* ── Quiz typography & UX improvements (2026-06-09) ── */
.q-text { font-size: 1.05rem !important; line-height: 1.75 !important; }
.explanation { color: #1a3a5c; }
.explanation.show { animation: explainSlide .2s ease; }
@keyframes explainSlide { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }
.key-concept {
  background: linear-gradient(135deg,#fffdf0,#fff8dc);
  border: 1px solid #e8c840;
  border-radius: 8px;
  padding: 11px 15px 11px 42px;
  margin-top: 12px;
  font-size: .84rem;
  position: relative;
}
.key-concept::before { content: '\1F4A1'; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 1rem; }
.key-concept strong { color: #7a5500; }
.option-btn:focus-visible { outline: 3px solid #f0a500; outline-offset: 2px; }
.option-btn { transition: all .15s, border-color .1s !important; }
.option-btn.correct { animation: correctPulse .25s ease; }
.option-btn.wrong   { animation: wrongShake .25s ease; }
@keyframes correctPulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.012)} }
@keyframes wrongShake   { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
