/* ============================================================
   CLEARCPC — QUIZ PAGE STYLES
   Add to: style.css (append to end) OR enqueue as quiz-page.css
   Applies to: page-quiz.php template
   ============================================================ */

/* ── QUIZ HERO ── */
.quiz-page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 100px 5% 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.quiz-page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(50% 60% at 50% 100%, rgba(13,122,107,.15) 0%, transparent 70%);
}
.quiz-hero-inner {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.quiz-page-hero .section-label {
  color: var(--amber);
}
.quiz-page-hero h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 1rem;
}
.quiz-page-hero p {
  color: rgba(255,255,255,.55);
  font-size: .95rem;
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto 2rem;
}
.quiz-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 20px 32px;
  max-width: 520px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.qhs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}
.qhs-item strong {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  color: var(--white);
  line-height: 1;
}
.qhs-item span {
  font-size: .7rem;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
  font-weight: 600;
}
.qhs-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.12);
  flex-shrink: 0;
}

/* ── QUIZ APP SECTION ── */
.quiz-app-section {
  background: var(--cream);
  padding: 48px 5% 64px;
}
.quiz-app-container {
  max-width: 760px;
  margin: 0 auto;
}

/* ── PROGRESS BAR ── */
.quiz-progress-wrap {
  margin-bottom: 28px;
}
.quiz-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.quiz-progress-bar {
  height: 8px;
  background: var(--warm-gray);
  border-radius: 25px;
  overflow: hidden;
}
.quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  border-radius: 25px;
  transition: width .4s ease;
}

/* ── QUESTION CARD ── */
.quiz-card-main {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.quiz-q-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.quiz-q-number {
  font-family: 'Fraunces', serif;
  font-size: .82rem;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 3px 10px;
  border-radius: 25px;
}
.quiz-q-topic {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--warm-gray);
  padding: 3px 10px;
  border-radius: 25px;
}
.quiz-question {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--navy);
  margin-bottom: 28px;
}

/* ── OPTION BUTTONS ── */
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quiz-option-btn {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  font-size: .88rem;
  color: var(--text);
  transition: all .18s;
  line-height: 1.5;
}
.quiz-option-btn:hover:not(:disabled) {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green-dark);
}
.quiz-option-btn:disabled {
  cursor: default;
}
.opt-label {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--warm-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  color: var(--text-muted);
  transition: all .18s;
}
.quiz-option-btn:hover:not(:disabled) .opt-label {
  background: var(--green);
  color: var(--white);
}

/* ── ANSWER STATE STYLES ── */
.quiz-option-btn.correct-highlight {
  border-color: #1A8C58;
  background: #E6F5EE;
}
.quiz-option-btn.correct-highlight .opt-label {
  background: #1A8C58;
  color: var(--white);
}
.quiz-option-btn.incorrect {
  border-color: #C0392B;
  background: #FDECEC;
  color: #8B1A1A;
}
.quiz-option-btn.incorrect .opt-label {
  background: #C0392B;
  color: var(--white);
}

/* ── EXPLANATION BOX ── */
.quiz-explanation {
  margin-top: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
}
.qe-header {
  padding: 10px 18px;
  font-size: .82rem;
  font-weight: 700;
}
.qe-header.correct {
  background: #E6F5EE;
  color: #1A8C58;
  border-bottom: 1px solid #C3E8D5;
}
.qe-header.incorrect {
  background: #FDECEC;
  color: #C0392B;
  border-bottom: 1px solid #F4CBCB;
}
.quiz-explanation p {
  padding: 14px 18px;
  font-size: .86rem;
  line-height: 1.7;
  color: var(--text-mid);
  background: var(--white);
  margin: 0;
}

/* ── NAVIGATION BUTTONS ── */
.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.btn-quiz-primary {
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  font-family: 'Montserrat', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: inline-block;
}
.btn-quiz-primary:hover:not(:disabled) {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-green);
}
.btn-quiz-primary:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
}
.btn-quiz-nav {
  background: var(--white);
  color: var(--navy);
  border: 2px solid var(--border);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: 'Montserrat', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  display: inline-block;
}
.btn-quiz-nav:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
}
.btn-quiz-nav:disabled {
  opacity: .35;
  cursor: not-allowed;
}

/* ── SCORE SCREEN ── */
.quiz-score-screen {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 36px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.score-icon {
  font-size: 3.5rem;
  margin-bottom: 12px;
}
.quiz-score-screen h2 {
  font-size: 1.9rem;
  color: var(--navy);
  margin-bottom: 16px;
}
.score-display {
  font-family: 'Fraunces', serif;
  margin-bottom: 12px;
}
.score-display span:first-child {
  font-size: 4rem;
  color: var(--green);
  line-height: 1;
}
.score-total {
  font-size: 2rem;
  color: var(--text-muted);
}
.score-message {
  max-width: 500px;
  margin: 0 auto 24px;
  font-size: .92rem;
  color: var(--text-mid);
  line-height: 1.7;
}
.score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 400px;
  margin: 0 auto 32px;
}
.score-bar-bg {
  flex: 1;
  height: 10px;
  background: var(--warm-gray);
  border-radius: 25px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--green-dark));
  border-radius: 25px;
  transition: width .8s ease;
}
#score-pct-label {
  font-size: .88rem;
  font-weight: 700;
  color: var(--green);
  min-width: 40px;
}

/* ── EMAIL CAPTURE (SCORE SCREEN) ── */
.score-email-capture {
  background: var(--navy-light);
  border: 1px solid rgba(26,61,92,.12);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
  text-align: left;
}
.sec-label {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
  font-size: .95rem;
}
.sec-sub {
  font-size: .84rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}
.score-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── RELATED ARTICLES SECTION ── */
.quiz-related-section {
  background: var(--white);
  padding: 56px 5% 72px;
  border-top: 1px solid var(--border);
}
.quiz-related-inner {
  max-width: 900px;
  margin: 0 auto;
}
.quiz-related-inner h2 {
  margin-bottom: 28px;
}
.quiz-related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.quiz-rel-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--warm-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
}
.quiz-rel-card:hover {
  border-color: var(--green);
  background: var(--green-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xs);
}
.qrc-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.quiz-rel-card strong {
  display: block;
  font-size: .9rem;
  color: var(--navy);
  margin-bottom: 4px;
}
.quiz-rel-card span {
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── AD SPOT (for future AdSense) ── */
.ad-spot-quiz {
  margin: 24px 0;
  text-align: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .quiz-card-main { padding: 24px 20px; }
  .quiz-score-screen { padding: 36px 20px; }
  .quiz-hero-stats { padding: 16px; gap: 0; }
  .qhs-item { padding: 0 14px; }
  .quiz-related-grid { grid-template-columns: 1fr; }
  .score-actions { flex-direction: column; }
  .score-actions a,
  .score-actions button { width: 100%; text-align: center; }
  .quiz-nav { flex-direction: column-reverse; }
  .quiz-nav button { width: 100%; text-align: center; }
}
