/* ==========================================
   PROGRAMS / QUIZ PAGE STYLES
   ========================================== */

/* ==========================================
   HERO
   ========================================== */

.quiz-hero {
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) 1.25rem 2rem;
  text-align: center;
}

.quiz-hero h1 {
  color: var(--primary-color);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.quiz-hero p {
  max-width: 700px;
  margin-inline: auto;
  color: #555;
  line-height: 1.7;
}

/* ==========================================
   STATISTICS
   ========================================== */

.stats {
  max-width: 900px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));

  gap: 1.25rem;
}

.stat-card {
  background: #fff;
  padding: 1.75rem;
  text-align: center;

  border-radius: 14px;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);

  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
}

.stat-card h2 {
  color: var(--primary-color);

  font-size: 2rem;

  margin-bottom: 0.5rem;
}

.stat-card p {
  color: #666;
}

/* ==========================================
   TIMELINE
   ========================================== */

.timeline {
  max-width: 1000px;

  margin: 4rem auto;

  padding: 0 1.25rem;
}

.timeline-track {
  position: relative;
}

.timeline-track::before {
  content: "";

  position: absolute;

  top: 0;
  bottom: 0;

  left: 50%;

  width: 3px;

  background: linear-gradient(to bottom, var(--primary-color), #0d5ea6);

  transform: translateX(-50%);
}

.timeline-item {
  position: relative;

  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;

  top: 20px;

  left: 50%;

  width: 16px;

  height: 16px;

  border-radius: 50%;

  background: var(--primary-color);

  border: 4px solid white;

  transform: translateX(-50%);

  box-shadow: 0 0 0 3px var(--primary-color);
}

/* ==========================================
   DETAILS / ACCORDION
   ========================================== */

.timeline details {
  width: 48%;

  background: white;

  border-radius: 15px;

  overflow: hidden;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.timeline-item:nth-child(odd) details {
  margin-right: auto;
}

.timeline-item:nth-child(even) details {
  margin-left: auto;
}

.timeline summary {
  position: relative;

  cursor: pointer;

  list-style: none;

  padding: 1.25rem 3rem 1.25rem 1.25rem;

  background: #f8f8f8;
}

.timeline summary::-webkit-details-marker {
  display: none;
}

.timeline summary::after {
  content: "";

  position: absolute;

  top: 50%;
  right: 1.5rem;

  width: 10px;
  height: 10px;

  border-right: 2px solid var(--primary-color);
  border-bottom: 2px solid var(--primary-color);

  transform: translateY(-70%) rotate(45deg);

  transition: transform 0.25s ease;
}

.timeline details[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.timeline summary:focus-visible {
  outline: 3px solid var(--primary-color);

  outline-offset: -3px;
}

.venue {
  font-size: 0.9rem;

  color: var(--muted-color, #666);

  font-weight: 600;

  margin: 0.15rem 0 0.35rem;
}

.summary {
  display: flex;

  align-items: center;

  gap: 1.25rem;
}

.year {
  display: inline-flex;

  justify-content: center;

  align-items: center;

  min-width: 90px;

  padding: 0.5rem 0.9rem;

  border-radius: 999px;

  background: var(--primary-color);

  color: white;

  font-weight: 700;
}

.details {
  padding: 1.25rem;

  animation: fade 0.25s ease;
}

.details p {
  line-height: 1.7;
}

@keyframes fade {
  from {
    opacity: 0;

    transform: translateY(-6px);
  }

  to {
    opacity: 1;

    transform: none;
  }
}

/* ==========================================
   TEAM CARDS
   ========================================== */

.team-grid {
  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

  gap: 1rem;

  margin-top: 1rem;
}

.team-card {
  background: #fafafa;

  padding: 1rem;

  border-radius: 10px;

  border-left: 5px solid var(--primary-color);
}

.team-card:hover {
  transform: translateY(-3px);
}

.team-card h4 {
  margin-bottom: 0.75rem;
}

.team-card ul {
  padding-left: 1.2rem;

  margin: 0;
}

.team-card li {
  margin: 0.35rem 0;
}

/* Rankings */

.gold {
  border-left-color: #d4af37;
  background: #fff9e6; /* Light Gold */
}

.silver {
  border-left-color: #aaa;
  background: #f5f5f5; /* Light Silver */
}

.bronze {
  border-left-color: #cd7f32;
  background: #fff3e6; /* Light Bronze */
}

.fourth {
  border-left-color: #4caf50;
  background: #eefaf1; /* Light Green */
}

.fifth {
  border-left-color: #2196f3;
  background: #eef7ff; /* Light Blue */
}

.sixth {
  border-left-color: #9c27b0;
  background: #f7f0ff; /* Light Purple */
}

/* ==========================================
   SPONSORS
   ========================================== */

.sponsor-card {
  margin-top: 1rem;

  padding: 1rem;

  background: #fffaf0;

  border-radius: 10px;

  border-left: 5px solid #f59e0b;
}

.sponsor-card p {
  margin: 0.6rem 0;
}

/* ==========================================
   COVID
   ========================================== */

.covid-card {
  width: 48%;

  margin: auto;

  padding: 2rem;

  text-align: center;

  background: #fafafa;

  border: 1px solid #ddd;

  border-radius: 15px;
}

.covid-card h2 {
  color: #666;
}

/* ==========================================
   END SECTION
   ========================================== */

.timeline-end {
  max-width: 600px;

  margin: 4rem auto;

  padding: 2.5rem 1.25rem;

  text-align: center;

  background: white;

  border-radius: 15px;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.timeline-end-icon {
  font-size: 2rem;

  margin-bottom: 1rem;
}

.timeline-end p {
  line-height: 1.7;
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

a:focus-visible {
  outline: 3px solid var(--primary-color);

  outline-offset: 4px;
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 768px) {
  .timeline-track::before {
    left: 20px;
  }

  .timeline-dot {
    left: 20px;
  }

  .timeline details {
    width: calc(100% - 45px);

    margin-left: 45px !important;
  }

  .covid-card {
    width: calc(100% - 45px);

    margin-left: 45px;
  }

  .summary {
    flex-direction: column;

    align-items: flex-start;
  }

  .year {
    width: 100%;
  }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;

    transition: none !important;
  }
}

/* ==========================================
   PRINT
   ========================================== */

@media print {
  .timeline-track::before,
  .timeline-dot {
    display: none;
  }

  .timeline details,
  .covid-card {
    width: 100%;

    box-shadow: none;

    border: 1px solid #ddd;
  }
}
