/* ===============================
==Last edited by Jose on 3/18/26==
==========  STYLE.CSS  ===========
=============================== */

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

html {
  font-size: 16px;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f172a;
  background-color: #ffffff;
  line-height: 1.6;
  display: flex; /* Enables flexbox layout TEST */
  flex-direction: column; /* Stacks children vertically TEST */
  min-height: 100vh; /* Ensures body takes at least the full viewport height TEST */
  margin: 0; /* Removes default margin TEST*/

}

/* =========================
   Color Tokens
   ========================= */
:root {
  --blue-primary: #1e4f91;
  --blue-dark: #143a6e;
  --blue-light: #e6eef8;

  --gray-100: #f8fafc;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;

  --success: #1f7a4f;
  --warning: #b45309;
  --danger: #b91c1c;
}

/* =========================
   Typography
   ========================= */
h1, h2, h3 {
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.25;
}

h1 {
  font-size: 2.6rem;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
}

p {
  font-size: 1rem;
  color: var(--gray-700);
}

/* =========================
   Layout Helpers
   ========================= */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section + .section {
  border-top: 1px solid var(--gray-200);
}

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-block;
  padding: 0.9rem 1.6rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary {
  background-color: var(--blue-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--blue-dark);
  transform: translateY(-1px);
}

.btn-large {
  font-size: 1.05rem;
  padding: 1.1rem 2.2rem;
}

/* =========================
   HERO
   ========================= */
.hero {
  background: linear-gradient(
    135deg,
    var(--blue-primary),
    var(--blue-dark)
  );
  color: #ffffff;
  padding: 5.5rem 1.5rem;
  text-align: center;
}

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

.hero h1 {
  color: #ffffff;
  margin-bottom: 1rem;
}

.hero .subtitle {
  font-size: 1.15rem;
  opacity: 0.99;
  margin-bottom: 2.2rem;
}

/* =========================
   ABOUT / FEATURES
   ========================= */
.about p {
  max-width: 700px;
  margin-bottom: 1.5rem;
}

.features {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.8rem;
}

.features li {
  background-color: var(--gray-100);
  padding: 0.9rem 1rem;
  border-radius: 6px;
  font-weight: 500;
}

/* =========================
   STEPS
   ========================= */
.steps {
  background-color: #ffffff;
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.step {
  text-align: center;
  padding: 1.5rem 1rem;
}

.step-number {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background-color: var(--blue-light);
  color: var(--blue-primary);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* =========================
   RULES
   ========================= */
.rules-box {
  background-color: var(--gray-100);
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 700px;
}

.rules-box ul {
  list-style: none;
}

.rules-box li {
  padding-left: 1.2rem;
  position: relative;
  margin-bottom: 0.6rem;
}

.rules-box li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--blue-primary);
  font-weight: bold;
}

/* =========================
   CTA
   ========================= */
.cta {
  text-align: center;
  background-color: var(--blue-light);
}

.cta h2 {
  margin-bottom: 1.5rem;
}

/* =========================
   FOOTER
   ========================= */
.footer {
  background-color: #0b1f3a;
  color: #c7d2fe;
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

.footer p {
  color: #c7d2fe;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 768px) {
  h1 {
    font-size: 2.1rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .hero {
    padding: 4rem 1.5rem;
  }
}

/* =========================
   TEST PAGE – LAYOUT
   ========================= */

.test-page {
  background-color: var(--gray-100);
}

/* ---------- Header ---------- */
.test-header {
  position: sticky; /* TEST */
  top: 0; /* TEST */
  display: grid;
  width: 100%; /* TEST */
  z-index: 1000; /* Ensures header sits on top TEST */
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.9rem 1.5rem;
  background-color: #0b1f3a;
  color: #ffffff;
  font-weight: 600;
}

.header-left .brand {
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.header-center {
  display: flex;/* Stacks items vertically TEST */
  text-align: center;
  flex-direction: column; /* Stacks items vertically TEST */
  align-items: center; /* Centers items horizontally along the cross-axis TEST */
  font-size: 0.95rem;
  opacity: 0.95;
}

.header-right {
  text-align: right;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- Progress Dots (This feature is currently under development) ---------- */
/* ----------.progress-wrapper is the footer class ---------- */
.progress-wrapper { 
  background-color: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  padding: 0.6rem 1rem;
/*  display: flex; /* Enables flexbox layout TEST*/
/*  flex-direction: column; /* Stacks children vertically TEST*/
  min-height: 5vh; /* Ensures the wrapper takes at least the full viewport height TEST*/
  margin-top: auto; /* Pushes the wrapper to the bottom of the page TEST*/
}

.progress-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--gray-200);
}

.progress-dot.current {
  background-color: var(--blue-primary);
}

.progress-dot.answered {
  background-color: var(--success);
}

/* =========================
   QUESTION CARD
   ========================= */

.test-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  flex: 1; /* Allows the container to grow and fill available space TEST */
}

.question-card {
  /* overflow: hidden; */
  background-color: #ffffff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.question-meta {
  margin-bottom: 0.6rem;
}

#question-category {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

#question-text {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

/* =========================
   ANSWERS
   ========================= */

.answers {
  display: grid;
  gap: 0.75rem;
}

.answer-btn {
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--gray-200);
  background-color: #ffffff;
  cursor: pointer;
  font-weight: 500;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.answer-btn:hover {
  border-color: var(--blue-primary);
  background-color: var(--blue-light);
}

.answer-btn.selected {
  border-color: var(--blue-primary);
  background-color: var(--blue-light);
  font-weight: 600;
}

/* =========================
   NAVIGATION
   ========================= */

.navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 1.8rem;
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--blue-primary);
  border: 1px solid var(--blue-primary);
}

.btn-secondary:hover {
  background-color: var(--blue-light);
}

/* ---------- Finish ---------- */
.finish-wrapper {
  margin-top: 2.5rem;
  text-align: center;
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #991b1b;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 640px) {
  .test-header {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    text-align: center;
  }

  .header-right {
    text-align: center;
  }

  .navigation {
    flex-direction: column;
    gap: 0.75rem;
  }
}
/* =========================
   RESULTS
   ========================= */

.pass {
  color: var(--success);
  font-weight: 700;
  margin: 1rem 0;
}

.fail {
  color: var(--danger);
  font-weight: 700;
  margin: 1rem 0;
}

.results-list {
  list-style: none;
  margin: 1rem 0 2rem;
}

.results-list li {
  padding: 0.4rem 0;
}
.answer-option.selected {
  border: 2px solid var(--accent);
  background-color: rgba(0, 120, 255, 0.1);
}
/* ================= ANSWER BUTTON STATES ================= */

.btn-answer {
  background: #ffffff;
  color: #1f2937;
  border: 2px solid #d1d5db;
  text-align: left;
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

/* Hover */
.btn-answer:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

/* Selected */
.btn-answer.selected {
  background: #2563eb;   /* FAA blue */
  color: #ffffff;
  border-color: #2563eb;
}

/* Prevent all answers looking selected */
.answers .btn-answer:not(.selected) {
  box-shadow: none;
}


.question-figure {
  margin-top: 16px;
  padding: 12px;
  background: #f5f7fa;
  border-left: 4px solid #2563eb;
  font-size: 0.95rem;
  color: #374151;
}

.figure-container {
  width: 100%;
  /* margin: 16px 0; */
  text-align: center;
  margin-top: 15px;
  /* overflow : hidden; */

}

.figure-label {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 8px;
}

.figure-image {
    max-width: 100%;     
    max-height: 400px;   
    width: auto;         
    height: auto;        
    display: block;
    margin: 10px auto;
    /* object-fit: contain; */
    /* cursor: zoom-in; */
}

.answer-btn {
  display: block;
  width: 100%;
  text-align: left;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: white;
  cursor: pointer;
  transition: 0.2s ease;
}

.answer-btn:hover {
  background-color: #f5f5f5;
}

.answer-btn.selected {
  border-color: #1976d2;
}

.answer-btn.correct {
  background-color: #2e7d32;
  color: white;
}

.answer-btn.incorrect {
  background-color: #c62828;
  color: white;
}
.figure-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.figure-image.loaded {
    opacity: 1;
}
