/* Theme-aware custom styles (adapt automatically in light/dark mode) */

/* ---- Welcome hero (index) ---- */
.welcome {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem 1rem 1rem 1rem;
}
.welcome h1 {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}
.welcome p {
  font-size: 1.05rem;
  color: var(--bs-secondary-color, #555);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

/* ---- Nav cards (index) ---- */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 3rem auto;
}
.nav-card {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color, #e9ecef);
  border-radius: 12px;
  padding: 1.8rem 1.2rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.nav-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
  border-color: var(--bs-primary, #c0392b);
  color: inherit;
}
.nav-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.15rem;
}
.nav-card p {
  font-size: 0.9rem;
  color: var(--bs-secondary-color, #777);
  margin: 0;
}

/* ---- Figure / preview captions ---- */
.preview-caption {
  font-size: 0.9rem;
  color: var(--bs-secondary-color, #888);
  margin-top: 0.5rem;
}
.source-note {
  max-width: 600px;
  margin: 2rem auto;
  text-align: center;
  font-size: 0.95rem;
  color: var(--bs-secondary-color, #888);
  line-height: 1.7;
}
.section-label {
  max-width: 700px;
  margin: 2rem auto;
  text-align: center;
}

/* ---- Story page ---- */
.story-hook {
  text-align: center;
  padding: 4rem 1rem 2rem 1rem;
  max-width: 750px;
  margin: 0 auto;
}
.story-hook h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}
.story-hook p {
  font-size: 1.1rem;
  color: var(--bs-secondary-color, #555);
}
.story-hook .kicker {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--bs-secondary-color, #aaa);
}
.story-section {
  max-width: 700px;
  margin: 0 auto 2.5rem auto;
  font-size: 1.05rem;
  line-height: 1.75;
}
.story-section h2 {
  margin-top: 2.5rem;
}

/* ---- Story figure (pandemic) ---- */
.story-figure {
  max-width: 750px;
  margin: 0 auto 2.5rem auto;
}
.story-figure img {
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--bs-border-color, #e9ecef);
  border-radius: 10px;
}
.story-figure .preview-caption {
  margin-top: 0.6rem;
}

/* ---- Stat boxes (story) ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 600px;
  margin: 2.5rem auto;
  text-align: center;
}
.stat-box {
  background: var(--bs-body-bg);
  border-radius: 10px;
  padding: 1.2rem 0.8rem;
  border: 1px solid var(--bs-border-color, #e9ecef);
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.stat-box .number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--bs-primary, #2c3e50);
}
.stat-box .label {
  font-size: 0.85rem;
  color: var(--bs-secondary-color, #777);
  margin-top: 0.3rem;
}

/* ---- CTA box (story) ---- */
.cta-box {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 2rem;
}
.cta-box h3 {
  margin-bottom: 0.5rem;
}

/* ---- Contact list (about) ---- */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0 0;
  font-size: 1.05rem;
}
.contact-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--bs-border-color, #e9ecef);
}
.contact-list li:last-child {
  border-bottom: none;
}
.contact-list a {
  font-weight: 600;
}

/* ---- Polish ---- */
html {
  scroll-behavior: smooth;
}

/* Quarto injects an empty title-block header when a page has no title */
#title-block-header:empty {
  display: none;
}
