/* ==========================
   Base
========================== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Lexend", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1f2933;
  background: #f7f8f9;
  line-height: 1.6;
}

a {
  color: #5b2dbd;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========================
   Header
========================== */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-flag {
  width: 32px;
  height: auto;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-link:hover {
  text-decoration: underline;
}


.brand-name {
  font-weight: 600;
}

.brand-project {
  font-size: 0.85rem;
  color: #6b7280;
}

.main-nav a {
  margin-left: 24px;
  font-size: 0.95rem;
  color: #374151;
}



/* ==========================
   Main layout
========================== */

.home-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ==========================
   Hero
========================== */

.home-hero {
  margin-bottom: 56px;
}

.home-hero h1 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.home-hero-intro {
  max-width: 760px;
  font-size: 1.05rem;
  color: #374151;
}

.primary-btn {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 20px;
  background: #5b2dbd;
  color: #ffffff;
  border-radius: 6px;
  font-weight: 500;
}

.primary-btn:hover {
  text-decoration: none;
  background: #4a24a0;
}

/* ==========================
   Content blocks
========================== */

.home-block {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 32px;
  margin-bottom: 40px;
}

.home-block h2 {
  margin-top: 0;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.home-block p {
  max-width: 860px;
  color: #374151;
}

/* ==========================
   Use section
========================== */

.home-use-list {
  margin-top: 16px;
  padding-left: 20px;
}

.home-use-list li {
  margin-bottom: 8px;
}

/* ==========================
   Topics grid
========================== */

.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.topic-card {
  display: block;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.topic-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1f2933;
}

.topic-card p {
  margin: 0;
  font-size: 0.9rem;
  color: #4b5563;
}

.topic-card:hover {
  background: #ffffff;
  border-color: #d1d5db;
  text-decoration: none;
}

/* ==========================
   Languages
========================== */

.language-links {
  list-style: none;
  padding-left: 0;
  margin-top: 12px;
}

.language-links li {
  margin-bottom: 6px;
}

.language-links a {
  font-size: 0.95rem;
}

/* ==========================
   Footer
========================== */

.site-footer {
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.footer-disclaimer {
  font-size: 0.85rem;
  color: #6b7280;
  max-width: 760px;
}

/* ==========================
   Inline test – dynamic grid
========================== */

.inline-test-status {
  position: sticky;
  top: 16px;
  z-index: 5;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #4b5563;
  width: fit-content;
  margin-bottom: 20px;
}

.inline-test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Cards */

.inline-question-card {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.inline-question-card h3 {
  font-size: 1rem;
  margin-top: 12px;
  margin-bottom: 12px;
}

/* Topic badge */

.topic-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b2dbd;
  font-weight: 500;
}

/* Options */

.inline-option-btn {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  text-align: left;
  cursor: pointer;
}

.inline-option-btn:hover:not(:disabled) {
  background: #f3f4f6;
}

.inline-option-btn:disabled {
  opacity: 0.6;
}

/* End card */

.inline-end-card {
  grid-column: span 3;
  background: #f8f7ff;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
}

.inline-end-link {
  display: inline-block;
  margin-top: 12px;
  font-weight: 500;
}
/* Answer state colors (CivicLearn-like) */
.inline-option-btn.is-correct {
  border-color: #22c55e;
  background: #ecfdf5;
  color: #14532d;
  opacity: 1;
}

.inline-option-btn.is-wrong {
  border-color: #ef4444;
  background: #fef2f2;
  color: #7f1d1d;
  opacity: 1;
}

/* Disabled buttons should stay readable (no fade-out) */
.inline-option-btn:disabled {
  opacity: 1;
}

/* Non-selected disabled options: keep neutral */
.inline-option-btn:disabled:not(.is-correct):not(.is-wrong) {
  opacity: 0.55; /* if you want zero fade, set to 1 */
}

/* Feedback container */
.inline-feedback-wrap {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Correct feedback */
.inline-feedback-wrap .inline-correct {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #14532d;
}

/* Wrong feedback */
.inline-feedback-wrap .inline-wrong {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #7f1d1d;
}

/* Remove raw-text feel */
.inline-feedback {
  margin: 0;
}

/* Timeline block */
.home-timeline {
  background: #ffffff;
}

.timeline-intro {
  max-width: 720px;
  margin-bottom: 28px;
}

/* Timeline layout */
.timeline {
  position: relative;
  margin-left: 18px;
  padding-left: 24px;
  border-left: 2px solid #e5e7eb;
}

/* Timeline item */
.timeline-item {
  position: relative;
  margin-bottom: 36px;
}

/* Marker */
.timeline-marker {
  position: absolute;
  left: -33px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #9ca3af;
}

/* Completed vs upcoming */
.timeline-item.done .timeline-marker {
  border-color: #6366f1;
  background: #6366f1;
}

.timeline-item.upcoming .timeline-marker {
  border-style: dashed;
  background: #ffffff;
}

/* Content */
.timeline-content {
  max-width: 720px;
}

.timeline-date {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 4px;
}

.timeline-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.timeline-text {
  color: #374151;
  line-height: 1.5;
}

/* Footer note */
.timeline-note {
  margin-top: 24px;
  font-size: 0.85rem;
  color: #6b7280;
  max-width: 720px;
}


/* Responsive */

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

@media (max-width: 600px) {
  .inline-test-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================
   Responsive
========================== */

@media (max-width: 640px) {
  .home-hero h1 {
    font-size: 1.8rem;
  }

  .home-block {
    padding: 24px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .main-nav a {
    margin-left: 0;
    margin-right: 16px;
  }
}
