/* ============================================
   Middle School Knowledge Test Website
   Comprehensive Stylesheet
   ============================================ */

/* CSS Variables */
:root {
  --primary: #1E40AF;
  --secondary: #3B82F6;
  --accent: #059669;
  --bg: #DBEAFE;
  --card: #FFFFFF;
  --text: #1E293B;
  --muted: #64748B;
  --border: #E2E8F0;
  --warm: #FFFBF5;
  --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: 8px;
  --radius-lg: 12px;
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-primary);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--secondary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 1rem 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    display: none;
  }
  
  .nav-links.active {
    display: flex;
  }
}

/* ============================================
   HERO SECTIONS
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 5rem 0;
  text-align: center;
}

.hero h1 {
  color: white;
  margin-bottom: 1rem;
  font-size: 3rem;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 0;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

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

.btn-primary:hover {
  background: #047857;
  color: white;
  transform: translateY(-2px);
}

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

.btn-secondary:hover {
  background: var(--warm);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}

.btn-outline:hover {
  background: white;
  color: var(--primary);
}

/* Stats Bar */
.stats-bar {
  background: var(--card);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.stats-bar .container {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  margin-bottom: 0.5rem;
}

.section-title p {
  color: var(--muted);
}

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 992px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

.category-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
}

.category-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
}

.category-count {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Category Colors */
.cat-math .category-icon { background: #DBEAFE; color: #1E40AF; }
.cat-science .category-icon { background: #D1FAE5; color: #059669; }
.cat-english .category-icon { background: #FEF3C7; color: #D97706; }
.cat-history .category-icon { background: #FEE2E2; color: #991B1B; }
.cat-geography .category-icon { background: #CCFBF1; color: #0D9488; }
.cat-biology .category-icon { background: #A7F3D0; color: #047857; }
.cat-physics .category-icon { background: #E9D5FF; color: #7C3AED; }
.cat-chemistry .category-icon { background: #FFE4E6; color: #E11D48; }

/* ============================================
   CARDS GRID
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 992px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Test Card */
.test-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.test-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.test-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.subject-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tag-math { background: #DBEAFE; color: #1E40AF; }
.tag-science { background: #D1FAE5; color: #059669; }
.tag-english { background: #FEF3C7; color: #D97706; }
.tag-history { background: #FEE2E2; color: #991B1B; }
.tag-geography { background: #CCFBF1; color: #0D9488; }
.tag-biology { background: #A7F3D0; color: #047857; }
.tag-physics { background: #E9D5FF; color: #7C3AED; }
.tag-chemistry { background: #FFE4E6; color: #E11D48; }

.test-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.test-card p {
  color: var(--muted);
  font-size: 0.875rem;
  flex-grow: 1;
}

.test-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Quiz page - question blocks */
.question {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.question p {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.875rem;
  line-height: 1.5;
}
.question label {
  display: flex !important;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem !important;
  cursor: pointer;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  font-size: 0.925rem;
  line-height: 1.5;
  margin-bottom: 0.25rem;
  background: #fff;
  transition: all 0.15s;
}
.question label:hover {
  border-color: #3b82f6;
  background: #eff6ff;
}
.question label input[type="radio"] {
  margin-top: 0.2rem;
  accent-color: #1e40af;
  flex-shrink: 0;
}

.question-count {
  font-size: 0.875rem;
  color: var(--muted);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Article Card */
.article-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.article-card-content {
  padding: 1.25rem;
}

.article-card .subject-tag {
  margin-bottom: 0.75rem;
}

.article-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article-card p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary);
  font-size: 0.875rem;
}

.read-more:hover {
  color: var(--secondary);
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 4rem 0;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-content h2 {
  color: white;
  margin-bottom: 1rem;
}

.newsletter-content p {
  opacity: 0.9;
  margin-bottom: 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.875rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
}

.newsletter-form input:focus {
  outline: 3px solid rgba(255,255,255,0.3);
}

.newsletter-form .btn {
  background: var(--accent);
  color: white;
  border: none;
}

.newsletter-form .btn:hover {
  background: #047857;
}

@media (max-width: 576px) {
  .newsletter-form {
    flex-direction: column;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--text);
  color: white;
  padding: 3rem 0 1.5rem;
}

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

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand .logo {
  color: white;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

.footer h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: rgba(255,255,255,0.5);
  font-size: 0.875rem;
}

/* ============================================
   SEARCH & FILTER
   ============================================ */
.search-section {
  padding: 2rem 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.search-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,64,175,0.1);
}

.search-box::before {
  content: '🔍';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ============================================
   QUIZ PAGE STYLES
   ============================================ */
.quiz-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.quiz-header {
  text-align: center;
  margin-bottom: 2rem;
}

.quiz-header h1 {
  margin-bottom: 0.5rem;
}

.quiz-header p {
  color: var(--muted);
}

.quiz-progress {
  background: var(--border);
  height: 8px;
  border-radius: 4px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.quiz-progress-bar {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 4px;
}

.question-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.question-number {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.question-text {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.answer-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.answer-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.answer-option:hover {
  border-color: var(--primary);
  background: rgba(30,64,175,0.02);
}

.answer-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.answer-option.correct {
  border-color: var(--accent);
  background: rgba(5,150,105,0.1);
}

.answer-option.incorrect {
  border-color: #EF4444;
  background: rgba(239,68,68,0.1);
}

.quiz-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}

/* Result Box */
.result-box {
  text-align: center;
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  margin-top: 2rem;
}

.result-box.good {
  background: linear-gradient(135deg, #059669, #10B981);
  color: white;
}

.result-box.fair {
  background: linear-gradient(135deg, #D97706, #F59E0B);
  color: white;
}

.result-box.poor {
  background: linear-gradient(135deg, #DC2626, #EF4444);
  color: white;
}

.result-score {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.result-message {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.result-details {
  opacity: 0.9;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-section {
  padding: 4rem 0;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-primary);
}

.faq-question:hover {
  background: var(--warm);
}

.faq-icon {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-content {
  padding: 0 1.25rem 1.25rem;
  color: var(--muted);
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* ============================================
   ARTICLE PAGE
   ============================================ */
.article-page {
  padding: 3rem 0;
}

.article-header {
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center;
}

.article-header h1 {
  margin-bottom: 1rem;
}

.article-meta {
  color: var(--muted);
  font-size: 0.875rem;
}

.article-hero-image {
  max-width: 800px;
  margin: 0 auto 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.article-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.article-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* Related Section */
.related-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
}

.related-section h3 {
  margin-bottom: 1rem;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.related-link {
  padding: 0.5rem 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--primary);
}

.related-link:hover {
  background: var(--primary);
  color: white;
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

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

.feature-card {
  text-align: center;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

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

.step-card {
  text-align: center;
  position: relative;
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

@media (max-width: 992px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

.team-card {
  text-align: center;
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.team-avatar {
  width: 100px;
  height: 100px;
  background: var(--bg);
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 3rem 0;
}

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

.contact-form {
  background: var(--card);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,64,175,0.1);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-info {
  background: var(--primary);
  color: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.contact-info h3 {
  color: white;
  margin-bottom: 1.5rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-info-item .icon {
  font-size: 1.25rem;
}

.contact-info h4 {
  color: white;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.contact-info p {
  opacity: 0.9;
  font-size: 0.875rem;
}

/* ============================================
   POLICY PAGES
   ============================================ */
.policy-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.policy-content h1 {
  margin-bottom: 0.5rem;
}

.policy-content .last-updated {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.policy-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.policy-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

.policy-content ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.policy-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* ============================================
   404 PAGE
   ============================================ */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.error-content h1 {
  font-size: 8rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.error-content h2 {
  margin-bottom: 1rem;
}

.error-content p {
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

/* ============================================
   POLICY / CONTENT PAGES
   ============================================ */
.small-hero { padding: 2.5rem 1.5rem !important; font-size: 1.5rem !important; }
.page-content { padding: 3rem 1.5rem; max-width: 900px; margin: 0 auto; }
.page-content.test-page { max-width: 1100px; }
@media (max-width: 768px) {
  .page-content.test-page { max-width: 100%; }
}
.policy-body { line-height: 1.8; }
.policy-body h2 { margin-top: 2rem; margin-bottom: 1rem; }
.policy-body p { margin-bottom: 1rem; }
.policy-body ul { margin-bottom: 1rem; padding-left: 1.5rem; }
.policy-body li { margin-bottom: 0.5rem; }
.policy-updated { color: var(--muted); font-size: 0.875rem; margin-bottom: 2rem; padding: 0.75rem 1rem; background: var(--bg); border-radius: 0.5rem; }

/*** Quiz Page Styles ***/
.quiz-questions {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.question-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.question-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #1F2937;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.question-card label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  border: 1px solid transparent;
  font-size: 0.925rem;
  color: #374151;
  line-height: 1.5;
}

.question-card label:hover {
  background: #F3F4F6;
  border-color: #D1D5DB;
}

.question-card label input[type="radio"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: #1E40AF;
  width: 1rem;
  height: 1rem;
}

.question-card label.correct {
  background: #D1FAE5 !important;
  border-color: #10B981 !important;
  color: #065F46;
}

.question-card label.incorrect {
  background: #FEE2E2 !important;
  border-color: #EF4444 !important;
  color: #991B1B;
}

.submit-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1E40AF, #3B82F6);
  color: #fff;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.submit-btn:hover {
  background: linear-gradient(135deg, #1E3A8A, #1E40AF);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.submit-btn:active {
  transform: translateY(0);
}

.score-box {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
}

.score-box.good {
  background: linear-gradient(135deg, #059669, #10B981);
  color: #fff;
}

.score-box.fair {
  background: linear-gradient(135deg, #D97706, #F59E0B);
  color: #fff;
}

.score-box .score-number {
  font-size: 3rem;
  font-weight: 800;
  display: block;
}

.score-box .score-label {
  font-size: 1.1rem;
  margin-top: 0.25rem;
  display: block;
}

.sidebar-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-card li {
  margin-bottom: 0.5rem;
}

.sidebar-card a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #1E40AF;
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.375rem 0;
  transition: color 0.15s;
}

.sidebar-card a:hover {
  color: #1E3A8A;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .quiz-layout {
    grid-template-columns: 1fr !important;
  }
  .sidebar-card {
    order: -1;
  }
}
