/* ===================================================================
   🇯🇲 DRIVE SAFE JAMAICA — UNIFIED FAQ + TEST STYLESHEET
   Single source of truth for FAQ page and Online Test components.
   =================================================================== */

/* ===================================================================
   🎨 1. ROOT VARIABLES (JAMAICA THEME — LIGHT ONLY)
   =================================================================== */

:root {
  --ja-green: #009B3A;
  --ja-green-dark: #007a2e;
  --ja-green-light: #e8f5e9;
  --ja-gold: #FED100;
  --ja-gold-soft: #fff9d6;
  --ja-black: #1a1a1a;
  --bg-primary: #ffffff;
  --bg-secondary: #f0fdf4;
  --bg-tertiary: #f8faf9;
  --card-bg: #ffffff;
  --card-border: #d4edda;
  --card-shadow: 0 2px 8px rgba(0, 155, 58, 0.08);
  --card-shadow-hover: 0 12px 32px rgba(0, 155, 58, 0.15);
  --text-primary: #1a2e1a;
  --text-secondary: #2d4a2d;
  --text-muted: #5a7a5a;
  --section-title: #0a3d1a;
  --grad-jamaica: linear-gradient(135deg, #009B3A 0%, #FED100 50%, #009B3A 100%);
  --grad-hero: linear-gradient(135deg, #009B3A 0%, #FED100 100%);
  --hero-bg: linear-gradient(135deg, #d4f1e0 0%, #fff9d6 50%, #d4f1e0 100%);
  --color-correct: #009B3A;
  --color-correct-bg: #d1fae5;
  --color-wrong: #ef4444;
  --color-wrong-bg: #fee2e2;
  --highlight-bg: #fff9d6;
  --icon-bg: #e8f5e9;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===================================================================
   🌍 2. GLOBAL RESET & BASE
   =================================================================== */

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

body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===================================================================
   🇯🇲 3. FAQ HERO SECTION
   =================================================================== */

.faq-hero-section {
  position: relative;
  padding: 120px 0 80px;
  background: var(--hero-bg);
  overflow: hidden;
}

.faq-hero-pattern {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 60px, rgba(254, 209, 0, 0.03) 60px, rgba(254, 209, 0, 0.03) 62px), repeating-linear-gradient(-45deg, transparent, transparent 60px, rgba(0, 155, 58, 0.03) 60px, rgba(0, 155, 58, 0.03) 62px);
  pointer-events: none;
  z-index: 0;
}

.faq-hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s var(--ease) both;
}

.faq-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  background: var(--card-bg);
  border: 2px solid var(--ja-green);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ja-green);
  margin-bottom: 28px;
  box-shadow: var(--card-shadow);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.faq-hero-badge i {
  font-size: 1.4rem;
}

.faq-hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.15;
  color: var(--section-title);
  margin-bottom: 24px;
}

.faq-hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 56px;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.faq-hero-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}

.faq-stat-item {
  text-align: center;
  padding: 16px 24px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  transition: all 0.3s var(--ease);
  min-width: 140px;
}

.faq-stat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--ja-gold);
}

.faq-stat-number {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.faq-stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.faq-stat-divider {
  width: 1px;
  height: 60px;
  background: var(--card-border);
  margin: 0 28px;
}

/* Decorative Circles */

.faq-hero-decoration {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.faq-hero-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 155, 58, 0.05);
  filter: blur(40px);
}

.circle-1 {
  top: 10%;
  left: 10%;
  width: 200px;
  height: 200px;
}

.circle-2 {
  bottom: 15%;
  right: 15%;
  width: 180px;
  height: 180px;
  background: rgba(254, 209, 0, 0.05);
}

.circle-3 {
  top: 50%;
  right: 5%;
  width: 120px;
  height: 120px;
  background: rgba(0, 155, 58, 0.08);
}

/* ===================================================================
   📋 4. FAQ MAIN CONTENT
   =================================================================== */

.faq-title-section {
  padding: 80px 0;
  background: var(--bg-primary);
}

.faq-title-content {
  max-width: 850px;
  margin: 0 auto;
  text-align: center;
}

.faq-main-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--section-title);
  margin-bottom: 16px;
}

.faq-main-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-container {
  max-width: 1000px !important;
  margin: 0 auto !important;
  padding: 40px 24px !important;
  position: relative !important;
  z-index: 1 !important;
}

.faq-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--card-shadow);
  transition: all 0.3s var(--ease);
}

.faq-section:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--ja-green);
}

.faq-section h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--section-title);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.faq-section h2 i {
  color: var(--ja-green);
  font-size: 1.4rem;
}

.faq-intro {
  margin-bottom: 28px;
  padding: 0 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-intro strong {
  color: var(--ja-green);
}

/* FAQ Accordion Items */

.faq-item {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 20px;
}

.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.faq-item summary {
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0;
  transition: color 0.3s ease;
}

.faq-item summary:hover {
  color: var(--ja-green);
}

.faq-q {
  flex: 1;
}

.faq-item summary i {
  font-size: 1rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.faq-item[open] summary i {
  transform: rotate(180deg);
}

.faq-a {
  margin-top: 16px;
  padding-left: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-a p, .faq-a li {
  margin-bottom: 12px;
}

.faq-a ol, .faq-a ul {
  padding-left: 24px;
}

.faq-a li {
  list-style-type: disc;
}

.faq-a ol li {
  list-style-type: decimal;
}

.faq-a a {
  color: var(--ja-green);
  text-decoration: underline;
  font-weight: 600;
}

.faq-a a:hover {
  color: var(--ja-gold);
}

.note {
  background: var(--highlight-bg);
  padding: 12px 16px;
  border-left: 4px solid var(--ja-green);
  font-size: 0.95rem;
  margin-top: 16px;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ===================================================================
   📝 5. TEST PAGE — HEADER
   =================================================================== */

.page-header {
  text-align: center;
  margin-bottom: 4rem;
  padding-top: 3rem;
}

.page-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--section-title);
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===================================================================
   🃏 6. TEST PAGE — CARDS GRID
   =================================================================== */

.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
  padding: 0 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.test-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.3s var(--ease);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.test-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--ja-green);
}

.test-card-header {
  padding: 2rem;
  display: flex;
  align-items: flex-start;
  flex-grow: 1;
}

.test-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--ja-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.test-meta h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--section-title);
}

.test-meta p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.test-footer {
  padding: 1.5rem 2rem;
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  background: var(--bg-tertiary);
}

.btn-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--ja-green);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s var(--ease);
  width: 100%;
  text-align: center;
}

.btn-preview:hover {
  background: var(--ja-green-dark);
  transform: translateY(-1px);
}

/* ===================================================================
   🎯 7. TEST PAGE — QUIZ OVERLAY
   =================================================================== */

#quizOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1rem;
}

.quiz-container {
  background: var(--card-bg);
  border-radius: 20px;
  width: 100%;
  max-width: 800px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 155, 58, 0.25);
  display: flex;
  flex-direction: column;
  min-height: 600px;
  max-height: 90vh;
  border: 1px solid var(--card-border);
}

/* Progress Bar */

.quiz-progress-header {
  height: 6px;
  background: var(--card-border);
  width: 100%;
  flex-shrink: 0;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--grad-hero);
  width: 0%;
  transition: width 0.4s var(--ease);
}

/* Quiz Body */

.quiz-body {
  padding: 3rem 2rem;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.question-wrapper {
  margin-bottom: 2.5rem;
}

#signContainer {
  width: 180px;
  height: 180px;
  margin: 0 auto 2rem;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

#signContainer img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.question-text {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--section-title);
  margin: 0;
  line-height: 1.4;
}

/* Quiz Options */

.options-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.option-item {
  padding: 1.25rem 1.5rem;
  border: 2px solid var(--card-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 1.05rem;
  display: flex;
  align-items: center;
}

.option-item:hover {
  border-color: var(--ja-green);
  background: var(--bg-secondary);
}

.option-item.selected {
  border-color: var(--ja-green);
  background: var(--bg-secondary);
  font-weight: 600;
}

.option-item.correct {
  border-color: var(--color-correct);
  background: var(--color-correct-bg);
  color: var(--ja-green-dark);
}

.option-item.wrong {
  border-color: var(--color-wrong);
  background: var(--color-wrong-bg);
  color: #991b1b;
}

.option-label {
  font-weight: 700;
  margin-right: 1rem;
  color: var(--text-muted);
  min-width: 24px;
}

/* Quiz Footer */

.quiz-footer {
  display: flex;
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--card-border);
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.btn-action {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  border-color: var(--ja-green);
}

.btn-primary {
  background: var(--ja-green);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--ja-green-dark);
}

.btn-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===================================================================
   📊 8. TEST PAGE — RESULTS & DASHBOARD
   =================================================================== */

#resultsPromo {
  display: none;
  padding: 4rem 2rem;
  background: var(--bg-secondary);
}

.results-promo-container {
  display: flex;
  gap: 2rem;
  margin: 0 auto;
  max-width: 1100px;
  justify-content: center;
}

.results-panel, .promo-panel {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  width: 100%;
}

.results-panel {
  flex: 1.5;
}

.promo-panel {
  flex: 1;
}

.score-display {
  font-family: 'Montserrat', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin: 1rem 0;
}

/* Dashboard */

.dashboard-header {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--section-title);
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 1rem;
}

.strength-weakness-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 16px;
  text-align: center;
  border: 1px solid var(--card-border);
}

.stat-value {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  display: block;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-strength .stat-value {
  color: var(--ja-green);
}

.stat-weakness .stat-value {
  color: var(--ja-gold);
}

/* Analysis Items */

.analysis-list {
  margin-top: 2rem;
}

.analysis-item {
  padding: 1.25rem;
  background: var(--bg-secondary);
  border-left: 4px solid var(--ja-green);
  border-radius: 0 12px 12px 0;
  margin-bottom: 1rem;
}

.analysis-item.wrong {
  border-left-color: var(--color-wrong);
}

/* Promo Panel */

.promo-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--section-title);
  margin: 0 0 1rem;
}

.price-original {
  display: inline-block;
  background: linear-gradient(135deg, var(--ja-gold), #ffe066, var(--ja-gold));
  color: var(--ja-black);
  padding: 0.75rem 2rem;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(254, 209, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.4);
  margin: 1rem 0;
}

.promo-cta {
  display: block;
  width: 100%;
  background: var(--bs-danger);
  color: white;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  margin: 1.5rem 0;
  transition: all 0.3s var(--ease);
}

.promo-cta:hover {
  background: var(--ja-green);
}

.back-to-categories {
  display: block;
  width: 100%;
  text-align: center;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--card-border);
  padding: 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  margin-top: 1.5rem;
  transition: all 0.3s var(--ease);
}

.back-to-categories:hover {
  border-color: var(--ja-green);
  color: var(--ja-green);
}

/* ===================================================================
   📱 9. RESPONSIVE — ALL COMPONENTS
   =================================================================== */

@media (max-width: 900px) {
  .results-promo-container {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .faq-hero-section {
    padding: 80px 0 60px;
  }
}

@media (max-width: 768px) {
  .faq-hero-stats {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .faq-stat-item {
    min-width: 120px;
    padding: 12px 16px;
  }
}

@media (max-width: 768px) {
  .faq-section {
    padding: 24px 16px;
  }
}

@media (max-width: 768px) {
  .faq-intro {
    padding: 0;
  }
}

@media (max-width: 768px) {
  .faq-item {
    margin-bottom: 16px;
  }
}

@media (max-width: 768px) {
  .faq-a {
    padding-left: 0;
  }
}

@media (max-width: 768px) {
  .page-title {
    font-size: 2.25rem;
  }
}

@media (max-width: 768px) {
  .test-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .quiz-body {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 768px) {
  .strength-weakness-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .quiz-footer {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .circle-1 {
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 576px) {
  .circle-2 {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 576px) {
  .circle-3 {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 576px) {
  .faq-hero-title {
    font-size: clamp(2.2rem, 6vw, 3.6rem);
  }
}

@media (max-width: 576px) {
  .faq-main-title {
    font-size: clamp(1.8rem, 5vw, 2.8rem);
  }
}

/* ===================================================================
   🎬 10. ANIMATIONS
   =================================================================== */

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

