/* General styling for the inclusive web app */

/* Color palette representing diversity and inclusion */
:root {
  --color-primary: #0077b6;
  --color-secondary: #ef476f;
  --color-tertiary: #f78c6c;
  --color-accent1: #ffd166;
  --color-accent2: #06d6a0;
  --color-dark: #03256c;
  --color-light: #fdfdfd;
}

/* Reset some basic elements for consistency */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: var(--color-light);
  overflow-x: hidden;
}

/* Hero section with abstract header image */
.hero {
  /* Use an abstract header background combined with a colourful gradient to evoke diversity */
  background-image: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-tertiary), var(--color-accent1), var(--color-accent2)), url('../abstract_header.png');
  background-size: cover;
  background-position: center;
  min-height: 55vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
}

.hero-overlay {
  background: rgba(0, 0, 0, 0.55);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
}

/* Brand styling */
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

/* Styling for the school logo image */
.brand .logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  border: 2px solid #ffffff;
}

.logo-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-tertiary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 1px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.school-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
}

.program-title {
  font-size: 2rem;
  margin-bottom: 0.3rem;
  font-weight: 700;
  color: #ffffff;
}

.tagline {
  font-size: 1.1rem;
  max-width: 900px;
  margin: 0 auto;
  color: #e6ecf0;
}

.hero-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

/* Button styles */
.btn {
  border: none;
  border-radius: 25px;
  padding: 0.8rem 1.8rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  color: #fff;
}

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

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

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: scale(0.98);
  box-shadow: none;
}

/* Section styling */
.section {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  margin-top: 0;
  font-size: 1.8rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

.section p {
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* Card container for team */
.card-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Individual card styling */
/* Generic card styling */
.card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card h3 {
  margin-top: 0;
  color: var(--color-primary);
}

.card p {
  margin: 0.5rem 0 0;
}

/* Diagnoses container styling */
.diag-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Diagnose cards with alternating colors */
.diag-card {
  background-color: #ffffff;
  border-left-width: 6px;
  border-left-style: solid;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.diag-card:nth-child(5n+1) {
  border-left-color: var(--color-primary);
  background-color: #f0f8ff;
}
.diag-card:nth-child(5n+2) {
  border-left-color: var(--color-secondary);
  background-color: #fff5f8;
}
.diag-card:nth-child(5n+3) {
  border-left-color: var(--color-tertiary);
  background-color: #fff8f2;
}
.diag-card:nth-child(5n+4) {
  border-left-color: var(--color-accent1);
  background-color: #fffdf2;
}
.diag-card:nth-child(5n+5) {
  border-left-color: var(--color-accent2);
  background-color: #f3fff9;
}

.diag-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.diag-card h3 {
  margin-top: 0;
  color: var(--color-primary);
}

.diag-card p {
  margin: 0.5rem 0 0;
}

/* Hide citation markers used for referencing research sources */
.citation {
  display: none;
}

/* Hidden utility class for toggling sections */
.hidden {
  display: none;
}

/* Quiz specific styles */
.quiz-question {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-dark);
}

.quiz-choices {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quiz-choices li {
  margin: 0.5rem 0;
}

.quiz-choices button {
  width: 100%;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--color-accent2);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.quiz-choices button:hover {
  background: var(--color-accent1);
  transform: translateY(-2px);
}

.quiz-info {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--color-dark);
}

.quiz-info span {
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  background: #eef2f7;
}

#quiz-result h3 {
  color: var(--color-primary);
}

#quiz-score {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--color-dark);
}

/* Quiz feedback container and confetti styles */
#quiz-feedback {
  margin: 1rem 0;
  text-align: center;
  position: relative;
  min-height: 40px;
}

/* Confetti animation */
@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

.confetti {
  position: absolute;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-fall 3s linear forwards;
}

/* Emoji feedback styling */
.feedback-emoji {
  font-size: 2.5rem;
  margin: 0.2rem;
}

/* Footer styling */
.footer {
  background-color: #004c99;
  color: #ffffff;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 2rem;
}

.footer p {
  margin: 0;
  font-size: 1rem;
}

/* Responsive design */
@media (min-width: 600px) {
  .card-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .card {
    flex: 1 1 calc(48% - 1rem);
    margin-bottom: 1rem;
  }
  .diag-container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .diag-card {
    flex: 1 1 calc(48% - 1rem);
    margin-bottom: 1rem;
  }
}

@media (min-width: 900px) {
  .card {
    flex: 1 1 calc(30% - 1rem);
  }
  .diag-card {
    flex: 1 1 calc(30% - 1rem);
  }
}

/* Interaction toggles via script */
.collapsible {
  cursor: pointer;
  position: relative;
  padding-right: 1.5rem;
}
.collapsed + p {
  display: none;
}

/* Add arrow indicators to collapsible headers */
.collapsible::after {
  content: '\25BC'; /* down arrow */
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--color-primary);
}
.collapsible.collapsed::after {
  content: '\25B6'; /* right arrow */
}

/* Icon styling for card and diagnosis headers */
.icon-small {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Arrange header text and icon horizontally */
.card h3,
.diag-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Mobile adjustments for better responsiveness */
@media (max-width: 599px) {
  .hero-buttons {
    flex-direction: column;
    gap: 0.8rem;
  }
  .brand .logo {
    width: 52px;
    height: 52px;
  }
  .school-name {
    font-size: 1.3rem;
  }
  .program-title {
    font-size: 1.7rem;
  }
  .btn {
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
  }
  .section {
    padding: 1.5rem 0.8rem;
  }
  .card,
  .diag-card {
    padding: 1.2rem;
  }
  .quiz-question {
    font-size: 1.1rem;
  }
  .feedback-emoji {
    font-size: 2rem;
  }
}