/* ===================================================
   Anchor Care Consulting â QMAP Online Course
   Stylesheet
   =================================================== */

:root {
  --navy:    #1a3a5c;
  --navy-dk: #0f2440;
  --gold:    #c9a227;
  --gold-lt: #e8c75a;
  --white:   #ffffff;
  --off-white: #f5f7fa;
  --light-gray: #e8ecf0;
  --mid-gray: #9aa5b1;
  --text:    #2d3748;
  --success: #2e7d32;
  --error:   #c62828;
  --warning: #f57c00;
  --sidebar-w: 260px;
}

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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--off-white);
  color: var(--text);
  line-height: 1.7;
}

/* ââ Header ââââââââââââââââââââââââââââââââââââââââââ */
/* ââ Top Navigation Bar âââââââââââââââââââââââââââââââ */
.top-nav {
  background: #1a3a5c;
  border-bottom: 2px solid #c9a227;
  position: sticky;
  top: 64px;
  z-index: 99;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.top-nav-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 12px;
  white-space: nowrap;
  min-width: max-content;
}
.top-nav a {
  color: #adc4dc;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  padding: 9px 10px;
  display: inline-block;
  transition: color 0.15s, background 0.15s;
  border-radius: 4px;
}
.top-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.top-nav a.top-nav-active { color: #c9a227; background: rgba(201,162,39,.12); }
.top-nav-divider { color: rgba(255,255,255,.2); font-size: 14px; padding: 0 4px; }

.site-header {
  background: var(--navy-dk);
  color: var(--white);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.site-header .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}
.site-header .logo-icon {
  width: 40px; height: 40px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 18px; color: var(--navy-dk);
}
.site-header .org-name { font-size: 14px; line-height: 1.2; }
.site-header .org-name strong { display: block; font-size: 17px; }
.site-header .course-badge {
  background: var(--gold);
  color: var(--navy-dk);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
}

/* ââ Layout âââââââââââââââââââââââââââââââââââââââââââ */
.layout {
  display: flex;
  min-height: calc(100vh - 64px);
}

/* ââ Sidebar ââââââââââââââââââââââââââââââââââââââââââ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  color: var(--white);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.sidebar-section-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mid-gray);
  padding: 16px 20px 6px;
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: #c8d6e5;
  text-decoration: none;
  font-size: 13.5px;
  transition: background .15s;
  border-left: 3px solid transparent;
}
.sidebar a:hover { background: rgba(255,255,255,.07); color: var(--white); }
.sidebar a.active {
  background: rgba(201,162,39,.15);
  border-left-color: var(--gold);
  color: var(--white);
  font-weight: 600;
}
.sidebar a.completed::after {
  content: 'â';
  margin-left: auto;
  color: var(--gold);
  font-weight: 700;
}
.sidebar a.locked { color: #5a7a99; cursor: default; }
.sidebar a.locked:hover { background: none; }
.sidebar .module-num {
  display: inline-block;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  font-size: 11px;
  text-align: center;
  line-height: 22px;
  flex-shrink: 0;
}
.sidebar a.active .module-num { background: var(--gold); color: var(--navy-dk); }
.sidebar-divider { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 12px 0; }

/* ââ Main content âââââââââââââââââââââââââââââââââââââ */
.main-content {
  flex: 1;
  padding: 36px 48px;
  max-width: 900px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.page-subtitle {
  color: var(--mid-gray);
  font-size: 14px;
  margin-bottom: 28px;
}
.progress-bar-wrap {
  background: var(--light-gray);
  border-radius: 8px;
  height: 8px;
  margin-bottom: 32px;
}
.progress-bar-fill {
  background: linear-gradient(90deg, var(--navy), var(--gold));
  height: 100%;
  border-radius: 8px;
  transition: width .5s;
}

/* ââ Content cards ââââââââââââââââââââââââââââââââââââ */
.card {
  background: var(--white);
  border-radius: 10px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.card h2 {
  color: var(--navy);
  font-size: 19px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
}
.card h3 {
  color: var(--navy);
  font-size: 16px;
  margin: 18px 0 8px;
}
.card p { margin-bottom: 12px; }
.card ul, .card ol { padding-left: 22px; margin-bottom: 12px; }
 .card li { margin-bottom: 5px; }

.highlight-box {
  background: #eaf0f8;
  border-left: 4px solid var(--navy);
  border-radius: 4px;
  padding: 14px 18px;
  margin: 14px 0;
}
.warning-box {
  background: #fff8e1;
  border-left: 4px solid var(--warning);
  border-radius: 4px;
  padding: 14px 18px;
  margin: 14px 0;
}
.important-box {
  background: #ffebee;
  border-left: 4px solid var(--error);
  border-radius: 4px;
  padding: 14px 18px;
  margin: 14px 0;
}

/* ââ Two-column table âââââââââââââââââââââââââââââââââ */
.abbr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.abbr-table th {
  background: var(--navy);
  color: var(--white);
  padding: 8px 12px;
  text-align: left;
}
.abbr-table td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--light-gray);
}
.abbr-table tr:nth-child(even) td { background: var(--off-white); }

/* ââ Quiz section âââââââââââââââââââââââââââââââââââââ */
.quiz-section {
  background: var(--white);
  border-radius: 10px;
  padding: 28px 32px;
  margin-top: 32px;
  border: 2px solid var(--gold);
  box-shadow: 0 2px 10px rgba(201,162,39,.15);
}

.tuiz-section h2 {
  color: var(--navy);
  font-size: 20px;
  margin-bottom: 6px;
}
.quiz-section .quiz-intro {
  color: var(--mid-gray);
  font-size: 13px;
  margin-bottom: 22px;
}

.question-block {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--light-gray);
}

.question-block:last-of-type { border-bottom: none; }

.question-text {
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}
.question-num {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  width: 26px; height: 26px;
  text-align: center;
  line-height: 26px;
  font-size: 12px;
  margin-right: 8px;
  flex-shrink: 0;
}

.option-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 6px;
  border: 2px solid var(--light-gray);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 14px;
}
.option-label:hover { border-color: var(--navy); background: #f0f4f8; }
.option-label input[type="radio"] { margin-top: 2px; }
.option-label.correct { border-color: var(--success); background: #e8f5e9; }
.option-label.incorrect { border-color: var(--error); background: #ffebee; }

.quiz-feedback {
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 13.5px;
  margin-top: 8px;
  display: none;
}

.quiz-feedback.correct-msg { background: #e8f5e9; color: var(--success); }
.quiz-feedback.incorrect-msg { background: #ffebee; color: var(--error); }

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .2s, transform .1s;
  text-decoration: none;
}
.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--navy-dk); }
.btn-outline { background: transparent; border: 2px solid var(--navy); color: var(--navy); }
.btn-sm { padding: 8px 18px; font-size: 13px; }

.quiz-actions { margin-top: 20px; display: flex; gap: 12px; align-items: center; }

.score-display {
  display: none;
  background: var(--navy);
  color: var(--white);
  border-radius: 8px;
  padding: 20px 24px;
  text-align: center;
  margin-top: 20px;
}
.score-display .score-num { font-size: 40px; font-weight: 700; color: var(--gold); }
.score-display .score-label { font-size: 14px; opacity: .8; }
.score-display .pass { color: #81c784; font-size: 18px; font-weight: 700; margin-top: 6px; }
.score-display .fail { color: #ef9a9a; font-size: 18px; font-weight: 700; margin-top: 6px; }

/* ââ Nav buttons ââââââââââââââââââââââââââââââââââââââ */
.uodule-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--light-gray);
}

/* ââ Password gate ââââââââââââââââââââââââââââââââââââ */
.password-gate {
  max-width: 480px;
  margin: 80px auto;
  text-align: center;
  background: var(--white);
  border-radius: 12px;
  padding: 48px;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
}
.password-gate .lock-icon { font-size: 52px; margin-bottom: 16px; }
.password-gate h2 { color: var(--navy); margin-bottom: 8px; }
.password-gate p { color: var(--mid-gray); font-size: 14px; margin-bottom: 24px; }
.password-gate input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--light-gray);
  border-radius: 6px;
  font-size: 16px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color .2s;
}
.password-gate input:focus { border-color: var(--navy); }
.password-gate .error-msg { color: var(--error); font-size: 13px; margin-top: 8px; display: none; }

/* ââ Dashboard cards ââââââââââââââââââââââââââââââââââ */
.uodule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 24px;
}
.module-card {
  background: var(--white);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  text-decoration: none;
  color: var(--text);
  border: 2px solid transparent;
  transition: border-color .2s, transform .2s;
  display: block;
}
.module-card:hover { border-color: var(--navy); transform: translateY(-2px); }
.module-card.locked-card { opacity: .55; cursor: default; }
.module-card.locked-card:hover { border-color: transparent; transform: none; }
.module-card .card-icon { font-size: 28px; margin-bottom: 10px; }
.module-card .card-num { font-size: 11px; color: var(--mid-gray); text-transform: uppercase; letter-spacing: .8px; }
.module-card .card-title { font-size: 16px; font-weight: 700; color: var(--navy); margin: 4px 0 6px; }
.module-card .card-desc { font-size: 13px; color: #666; line-height: 1.5; }
.module-card .card-status {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-done { color: var(--success); }
.status-next { color: var(--navy); }
.status-lock { color: var(--mid-gray); }

/* ââ Welcome hero âââââââââââââââââââââââââââââââââââââ */
.hero {
  background: linear-gradient(135deg, var(--navy-dk) 0%, var(--navy) 100%);
  color: var(--white);
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: 'â';
  position: absolute;
  right: 32px; top: 50%;
  transform: translateY(-50%);
  font-size: 100px;
  opacity: .07;
}
.hero h1 { font-size: 26px; margin-bottom: 8px; }
.hero p { opacity: .85; max-width: 580px; }
.hero .instructor-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  background: rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
}

/* ââ Footer âââââââââââââââââââââââââââââââââââââââââââ */
.site-footer {
  background: var(--navy-dk);
  color: #7a95b0;
  text-align: center;
  padding: 20px;
  font-size: 12px;
  margin-top: 60px;
}
.site-footer a { color: var(--gold); text-decoration: none; }

/* ââ Responsive âââââââââââââââââââââââââââââââââââââââ */
@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .sidebar a { padding: 8px 12px; font-size: 12px; }
  .main-content { padding: 20px 18px; }
  .card { padding: 20px; }
}

/* ââ Print ââââââââââââââââââââââââââââââââââââââââââââ */
@media print {
  .sidebar, .site-header, .module-nav, .quiz-section, .btn { display: none !important; }
  .main-content { padding: 0; max-width: 100%; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
