/* =============================================================================
   CADI Website Styles
   Inspired by Laura's template (Nunito Sans, hero sections, scroll navbar)
   ============================================================================= */

/* ---------- Base & Typography ---------- */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@200;300;400;600;700;800&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito Sans', Arial, sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.75;
  color: #333;
  background: #fff;
  margin: 0;
  padding: 0;
  text-align: justify;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Nunito Sans', Arial, sans-serif;
  font-weight: 700;
  color: #2c3e50;
  line-height: 1.3;
  text-align: left;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.8rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1.1em;
}

a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s;
}
a:hover {
  color: #2980b9;
  text-decoration: underline;
}

strong {
  font-weight: 700;
}

ul, ol {
  padding-left: 1.5em;
}
li {
  margin-bottom: 0.4em;
}

/* ---------- Navbar ---------- */
.cadi-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: background 0.3s, box-shadow 0.3s;
  font-family: 'Nunito Sans', Arial, sans-serif;
}

.cadi-navbar .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
}

.cadi-navbar .nav-brand {
  font-size: 1.2rem;
  font-weight: 800;
  color: #2c3e50;
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.cadi-navbar .nav-brand:hover {
  color: #3498db;
  text-decoration: none;
}

.cadi-navbar .nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
}

.cadi-navbar .nav-links li a {
  font-size: 0.92rem;
  font-weight: 600;
  color: #555;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 14px;
  border-radius: 4px;
  transition: color 0.3s, background 0.3s;
}

.cadi-navbar .nav-links li a:hover,
.cadi-navbar .nav-links li a.active {
  color: #3498db;
  background: rgba(52, 152, 219, 0.06);
  text-decoration: none;
}

/* Mobile hamburger */
.cadi-navbar .nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.cadi-navbar .nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #2c3e50;
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .cadi-navbar .nav-toggle {
    display: block;
  }
  .cadi-navbar .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
  }
  .cadi-navbar .nav-links.open {
    display: flex;
  }
  .cadi-navbar .nav-links li a {
    padding: 12px 24px;
    font-size: 0.9rem;
  }
}

/* ---------- Hero Section (Landing page) ---------- */
.cadi-hero {
  position: relative;
  width: 100%;
  min-height: 90vh;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cadi-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.cadi-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  max-width: 820px;
  padding: 100px 30px 60px;
}

.cadi-hero-content .hero-abbrev {
  font-size: 4.5rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  margin-bottom: 0.2em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.cadi-hero-content .hero-title {
  font-size: 1.5rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.cadi-hero-content .hero-subtitle {
  font-size: 1.15rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
}

@media (max-width: 600px) {
  .cadi-hero-content .hero-abbrev {
    font-size: 2.8rem;
  }
  .cadi-hero-content .hero-title {
    font-size: 1.15rem;
  }
}

/* ---------- Mobile: scale down large fonts ---------- */
@media (max-width: 768px) {
  /* Override inline font-size on home page cadi-section */
  .cadi-section {
    font-size: 17px !important;
    line-height: 1.65 !important;
  }

  .cadi-hero-content .hero-abbrev {
    font-size: 2.8rem !important;
  }
  .cadi-hero-content .hero-title,
  .cadi-hero-content .hero-title span {
    font-size: 1.2rem !important;
  }
  .cadi-hero-content .hero-subtitle,
  .cadi-hero-content .hero-subtitle span {
    font-size: 0.95rem !important;
  }

  .baseline-box {
    font-size: 15px !important;
    padding: 18px 20px;
  }
  .baseline-box h3 {
    font-size: 1.25em !important;
  }
  .baseline-timeline {
    font-size: 13px !important;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }
  .timeline-block {
    min-width: 90px;
    padding: 8px 10px;
  }
  .timeline-arrow {
    transform: rotate(90deg);
    padding: 2px 0;
  }

  .finding-card .finding-number {
    font-size: 1.3rem;
  }
  .finding-card .finding-text {
    font-size: 0.9em;
  }

  .section-heading h2 {
    font-size: 1.3rem;
  }

  .findings-grid {
    gap: 16px;
  }
  .finding-card {
    padding: 18px 20px;
  }
}

/* ---------- Content Sections ---------- */
.cadi-section {
  max-width: 950px;
  margin: 0 auto;
  padding: 60px 30px;
}

.cadi-section-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 30px;
}

.section-heading {
  text-align: center;
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  text-align: center;
}

.section-heading h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #3498db;
  margin: 12px auto 0;
  border-radius: 2px;
}

/* ---------- Headline Findings ---------- */
.findings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 30px 0;
}

@media (max-width: 700px) {
  .findings-grid {
    grid-template-columns: 1fr;
  }
}

.finding-card {
  background: #f8f9fa;
  border-left: 4px solid #c0392b;
  padding: 24px 28px;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.finding-card .finding-number {
  font-size: 2rem;
  font-weight: 800;
  color: #c0392b;
  line-height: 1;
  margin-bottom: 8px;
}

.finding-card .finding-text {
  font-size: 0.8em;
  color: #444;
  line-height: 1.6;
  text-align: left;
}

/* ---------- Baseline Definition Box ---------- */
.baseline-box {
  background: #eef6fb;
  border: 1px solid #bee0f5;
  border-radius: 8px;
  padding: 28px 32px;
  margin: 30px 0;
}

.baseline-box h3 {
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.6em;
}

.baseline-box p {
  margin-bottom: 0.6em;
  font-size: inherit;
}

.baseline-timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 20px 0 10px;
  flex-wrap: wrap;
}

.timeline-block {
  text-align: center;
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 600;
  min-width: 140px;
}

.timeline-block.past {
  background: #d5e8d4;
  color: #2d6a2e;
}

.timeline-block.baseline {
  background: #dae8fc;
  color: #1a5276;
}

.timeline-block.future {
  background: #f8cecc;
  color: #922b21;
}

.timeline-arrow {
  font-size: 1.5rem;
  color: #999;
  padding: 0 8px;
}

/* ---------- Concepts Page ---------- */
.concept-term {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 24px;
  border-left: 4px solid #3498db;
}

.concept-term h3 {
  margin-top: 0;
  color: #2c3e50;
}

.concept-term .disclaimer {
  background: #fff8e1;
  border: 1px solid #ffecb3;
  border-radius: 6px;
  padding: 14px 18px;
  margin-top: 12px;
  font-size: 0.95rem;
  color: #7d6608;
}

/* ---------- SSP Tooltip ---------- */
.ssp-tooltip {
  position: relative;
  display: inline;
  border-bottom: 1px dashed #3498db;
  cursor: help;
  color: #3498db;
}

.ssp-tooltip .ssp-tooltip-text {
  visibility: hidden;
  width: 340px;
  background-color: #2c3e50;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 12px 16px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.85rem;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  pointer-events: none;
}

.ssp-tooltip .ssp-tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #2c3e50 transparent transparent transparent;
}

.ssp-tooltip:hover .ssp-tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* ---------- Footer ---------- */
.cadi-footer {
  background: #2c3e50;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
  padding: 30px 20px;
  font-size: 0.9rem;
}

.cadi-footer a {
  color: rgba(255, 255, 255, 0.8);
}

/* ---------- Team Page ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin: 30px 0;
}

.team-card {
  text-align: center;
  padding: 24px;
}

.team-card img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.team-card h4 {
  margin-bottom: 4px;
}

.team-card .role {
  color: #777;
  font-size: 0.95rem;
}

/* ---------- Partners Page ---------- */
.partner-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
  margin: 30px 0;
}

.partner-logos img {
  max-height: 80px;
  max-width: 200px;
  filter: grayscale(30%);
  transition: filter 0.3s;
}

.partner-logos img:hover {
  filter: grayscale(0%);
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 20px; }
.mt-4 { margin-top: 40px; }
.mb-2 { margin-bottom: 20px; }
.mb-4 { margin-bottom: 40px; }

/* Body offset for fixed navbar */
body.has-navbar {
  padding-top: 56px;
}

/* MathJax styling override */
.MathJax_Display {
  overflow-x: auto;
  overflow-y: hidden;
}
