/* === FreePMPTests Design System === */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #e0e7ff;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --success: #10b981;
  --success-light: #d1fae5;
  --error: #ef4444;
  --error-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

/* === Header === */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.logo-text span { color: var(--primary); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--primary); }

/* === Hero === */
.hero {
  background: linear-gradient(135deg, #312e81, #4f46e5, #6366f1);
  color: white;
  text-align: center;
  padding: 4rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 60%);
  animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.hero h1 { font-size: 2.75rem; font-weight: 800; margin-bottom: 1rem; position: relative; }
.hero p { font-size: 1.15rem; opacity: 0.9; max-width: 650px; margin: 0 auto 2rem; position: relative; }
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: white;
  color: var(--primary);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-secondary {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-secondary:hover { background: rgba(255,255,255,0.25); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* === Trust Badges === */
.trust-badges {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 2rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 500;
}
.trust-badge-icon { font-size: 1.3rem; }

/* === Sections === */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}
.section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section > p {
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 650px;
}

/* === Cards Grid === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  display: flex;
  gap: 1rem;
}
.card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-content h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.card-content p { font-size: 0.85rem; color: var(--text-light); line-height: 1.5; }
.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  margin-top: 0.5rem;
  letter-spacing: 0.03em;
}

/* === Quiz / Practice Test === */
.quiz-container {
  max-width: 800px;
  margin: 0 auto;
}
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s;
}
.progress-text { font-size: 0.85rem; color: var(--text-light); font-weight: 500; }
.quiz-timer {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  background: var(--border-light);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
}
.quiz-timer.warning { color: var(--warning); background: var(--warning-light); }

.question-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1rem;
}
.question-number {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}
.options-list { list-style: none; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 0.95rem;
  line-height: 1.5;
}
.option:hover { border-color: var(--primary); background: var(--primary-light); }
.option.selected { border-color: var(--primary); background: var(--primary-light); }
.option.correct { border-color: var(--success); background: var(--success-light); }
.option.incorrect { border-color: var(--error); background: var(--error-light); }
.option-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.option.selected .option-letter { background: var(--primary); color: white; }
.option.correct .option-letter { background: var(--success); color: white; }
.option.incorrect .option-letter { background: var(--error); color: white; }

.explanation {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  display: none;
}
.explanation.visible { display: block; }
.explanation h4 { font-size: 0.85rem; text-transform: uppercase; color: var(--primary-dark); margin-bottom: 0.5rem; }

.quiz-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* === Results === */
.results-panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-top: 2rem;
}
.results-panel .score { font-size: 3rem; font-weight: 800; color: var(--primary); }
.results-panel .score-label { font-size: 1rem; color: var(--text-light); margin-bottom: 1.5rem; }
.domain-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.domain-score {
  background: var(--border-light);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.domain-score h4 { font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.5rem; }
.domain-score .value { font-size: 1.25rem; font-weight: 700; }
.domain-score.above .value { color: var(--success); }
.domain-score.target .value { color: var(--primary); }
.domain-score.below .value { color: var(--warning); }

/* === Flashcards === */
.flashcard-container {
  max-width: 600px;
  margin: 0 auto;
  perspective: 1000px;
}
.flashcard {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
  transition: transform 0.5s;
  transform-style: preserve-3d;
  position: relative;
  font-size: 1.1rem;
  line-height: 1.7;
  text-align: center;
}
.flashcard.flipped { transform: rotateY(180deg); }
.flashcard-front, .flashcard-back {
  position: absolute;
  width: calc(100% - 4rem);
  height: calc(100% - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  backface-visibility: hidden;
  padding: 1rem;
}
.flashcard-back { transform: rotateY(180deg); }
.flashcard-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* === FAQ === */
.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.faq-question {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-question::after { content: '+'; font-size: 1.25rem; color: var(--text-muted); }
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer {
  padding: 0 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s, padding 0.3s;
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}
.faq-item.open .faq-answer { max-height: 300px; padding: 0 1.25rem 1rem; }

/* === Breadcrumb === */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* === Article Content === */
.article-content {
  max-width: 720px;
  margin: 0 auto;
}
.article-content h1 { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; }
.article-content h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 0.75rem; color: var(--primary-dark); }
.article-content h3 { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.article-content p { margin-bottom: 1rem; line-height: 1.8; color: var(--text); }
.article-content ul, .article-content ol { margin: 0 0 1rem 1.5rem; }
.article-content li { margin-bottom: 0.5rem; line-height: 1.7; }
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.article-content th {
  background: var(--primary-light);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--primary);
}
.article-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.article-content tr:hover td { background: var(--border-light); }
.article-content .callout {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.article-content .callout-title { font-weight: 700; color: var(--primary-dark); margin-bottom: 0.25rem; }

/* === Ad Placeholder === */
.ad-placeholder {
  background: var(--border-light);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 2rem 0;
}

/* === Footer === */
.site-footer {
  background: #1e293b;
  color: #cbd5e1;
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 4rem;
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 { color: white; font-size: 0.9rem; margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col a { display: block; color: #94a3b8; text-decoration: none; font-size: 0.85rem; margin-bottom: 0.4rem; }
.footer-col a:hover { color: white; }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid #334155;
  font-size: 0.8rem;
  color: #64748b;
  text-align: center;
}

/* === Mobile (≤768px) === */
@media (max-width: 768px) {
  .hero h1 { font-size: 1.75rem; }
  .hero { padding: 3rem 1rem; }
  .card-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .section { padding: 2rem 1rem; }
  .question-card { padding: 1.25rem; }
  .quiz-actions { flex-direction: column; align-items: stretch; }
  .trust-badges { gap: 1rem; }
  .article-content h1 { font-size: 1.5rem; }
}
