/* ==============================
   GLOBAL SETTINGS & VARIABLES
============================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --darker: #213f51;
  --dark: #427589;
  --mid: #afcee0;
  --light: #f4efeb;
  --lighter: #f9f9f9;
  --font-main: 'Inter', sans-serif;
}

/* ==============================
   BASE STYLES
============================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--mid);
  color: var(--darker);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--mid);
  z-index: -1;
}

/* Example of page-specific background override */
/* body.team-page {
  background-color: var(--darker);
}

body.team-page::before {
  background: var(--darker);
  transform: none;
} */

/* ==============================
   NAVBAR
============================== */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--light);
  color: var(--lighter);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 999;
}

.topbar .logo {
  height: 70px;
  width: auto;
}

.topbar nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.topbar nav a {
  color: var(--darker);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.topbar nav a:hover {
  opacity: 0.8;
}

/* ==============================
   SECTION BASE
============================== */

.section {
  padding: 3rem 1rem;
  min-height: 80vh; /* smaller than 100vh */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  scroll-margin-top: 80px;
  text-align: center;
}

/* Variants */
.bg-light1 { background-color: var(--lighter); color: var(--darker); }
.bg-light2 { background-color: var(--light); color: var(--darker); }
.bg-accent { background-color: var(--mid); color: var(--darker); }
.bg-dark-accent { background-color: var(--dark); color: var(--lighter); }

/* ==============================
   HERO SECTION
============================== */

.hero {
  background: transparent;
  color: var(--lighter);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.cta-button {
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
  display: inline-block;
  width: 200px;
  text-align: center;
}

.cta-button:hover { opacity: 0.9; }

/* Button Color Variants */
.bg-dark-accent .cta-button { background: var(--light); color: var(--darker); }
.bg-accent .cta-button,
.bg-light1 .cta-button,
.bg-light2 .cta-button { background: var(--dark); color: var(--light); }

/* ==============================
   SPLIT SECTIONS (text + image)
============================== */

.split {
  display: flex;
  align-items: stretch;
  height: 65vh; /* reduced height */
  overflow: hidden;
}

.split .text-side,
.split .image-side {
  flex: 1 1 50%;
  position: relative;
}

.text-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.inner-text {
  max-width: 500px;
  text-align: left;
}

.image-side {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.left-img .text-side { order: 1; }
.left-img .image-side { order: 2; }
.right-img .image-side { order: 1; }
.right-img .text-side { order: 2; }

@media (max-width: 900px) {
  .split {
    flex-direction: column;
    height: auto;
  }
  .text-side,
  .image-side {
    width: 100%;
    min-height: 300px;
  }
  .inner-text {
    text-align: center;
    padding: 2rem 1rem;
  }
}

/* ==============================
   CHALLENGE SECTION (Stats + Citations)
============================== */

#challenge {
  padding: 2rem 1rem;
  background-color: var(--light);
  color: var(--darker);
}

#challenge h2 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

#challenge p {
  max-width: 700px;
  margin: 0 auto 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
}

#challenge .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

#challenge .stat-box {
  background: var(--lighter);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

#challenge .stat-box h3 {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

#challenge .stat-box p {
  color: var(--dark);
  font-size: 0.9rem;
}

/* Citations */
#challenge .sup-ref {
  text-decoration: none;
  color: var(--dark);
  font-family: inherit;
  font-weight: 500;
  font-size: 0.8em;
  vertical-align: super;
  position: relative;
  top: -0.2em;
}

#challenge .sup-ref:hover {
  color: var(--darker);
  text-decoration: underline;
}

#challenge .biblio {
  list-style: decimal;
  padding-left: 0.5rem;
  margin-top: 0.1rem;
  font-size: 0.8rem;
  color: var(--darker);
  line-height: 1;
}

#challenge .biblio li { margin-bottom: 0.3rem; }

#challenge .citations p {
  margin-bottom: 0;
}

.services-buttons {
  display: flex;
  justify-content: center;  /* center horizontally */
  flex-wrap: wrap;          /* wrap on small screens */
  gap: 1rem;                /* space between buttons */
  margin-top: 1.5rem;       /* optional spacing from paragraph above */
}

.services-buttons .cta-button {
  min-width: 180px;         /* keep all buttons same width */
  text-align: center;
}


/* ==============================
   TEAM & ADVISORY
============================== */

.team-intro {
  max-width: 700px;
  margin: 1rem auto 3rem;
  font-size: 1.1rem;
  color: var(--lighter);
}

.advisory-section {
  margin-top: 4rem;
  text-align: center;
  width: 100%;
}

.advisory-section h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: var(--darker);
}

main.section.content > h1 {
  margin-bottom: 2rem;
}

.team-grid,
.advisory-grid {
  display: grid;
  gap: 2.5rem;
  width: 100%;
  padding: 0 2rem;
  margin: 0 auto;
}

.team-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.advisory-grid { 
  grid-template-columns: repeat(4, 1fr); 
}

.team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--dark);
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  padding: 20px;
  transition: transform 0.3s ease;
  width: 100%;
}

.team-member:hover,
.advisor:hover { transform: translateY(-5px); }

.member-left {
  width: 100%;
  text-align: center;
  margin-bottom: 15px;
}

.member-right {
  width: 100%;
}

.advisor {
  background: var(--dark);
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  padding: 30px 20px;
  transition: transform 0.3s ease;
}

.team-member img,
.advisor img {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  object-fit: cover;
  object-position: center 25%; /* position crop toward top of image */
  margin-bottom: 15px;
}

.team-member h3,
.advisor h3 {
  font-size: 1.1rem;
  color: var(--mid);
}

.role {
  font-size: 0.95rem;
  color: var(--light);
  font-weight: 600;
  text-align: center;
}

.bio{
  font-size: 0.95rem;
  color: var(--lighter);
  font-weight: 600;
  text-align: left;
}

/* ==============================
   PARTNERS SECTION
============================== */
#partners {
  padding: 2rem 1rem; /* reduce vertical padding */
  text-align: center
}

.partners-grid {
  display: flex;
  flex-wrap: nowrap;       /* all logos on one line */
  justify-content: center; /* center horizontally */
  align-items: center;
  gap: 1.5rem;               /* spacing between logos */
  overflow-x: auto;        /* add horizontal scroll if screen is too small */
  max-width: 100%;         
  margin: 2rem auto 0;
  margin-top: 1rem;
}

.partners-grid img {
  max-height: 60px;
  width: auto;
  transition: transform 0.3s ease;
}

.partners-grid img:hover {
  transform: scale(1.05);
}

/* Optional: hide scrollbar but keep scrollable */
.partners-grid::-webkit-scrollbar {
  display: none;
}

/* ==============================
   FOOTER
============================== */

footer {
  padding: 2rem;
  background: var(--mid);
  color: var(--darker);
  text-align: center;
}

footer a {
  color: var(--darker);
  text-decoration: none;
}

footer a:hover { opacity: 0.8; }

footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

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

@media (max-width: 768px) {
  .section { padding: 2.5rem 1rem; min-height: auto; }
  .hero h1 { font-size: 2rem; }
  #challenge h2 { font-size: 1.6rem; }
  .team-grid, .advisory-grid { gap: 1.5rem; }
}

/* Generic step styles (not for pipeline) */
.step:not(.pipeline-steps .step) {
  background: var(--darker);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* number and the circle it's in */
.step-number {
  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--mid);
  color: var(--darker);
  font-weight: 700;

  width: 32px;
  height: 32px;
  border-radius: 50%;
}


.step:not(.pipeline-steps .step) h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.step:not(.pipeline-steps .step) p {
  font-size: 0.9rem;
  opacity: 0.9;
}

.arrow {
  font-size: 1.5rem;
  opacity: 0.6;
}

/* ==============================
   SERVICES PATIENTS LAYOUT
============================== */

.services-layout {
  display: grid;
  grid-template-columns: 1.5fr 1.25fr; /* pipeline wider */
  gap: 3.5rem;
  max-width: 1300px;
  margin: 0 auto;
  padding: 3rem 2.5rem;
  align-items: start; /* move pipeline higher */
  flex: 1; /* allow main content to grow */
}

.services.full-width-heading {
  grid-column: 1 / -1; /* span both columns */
  margin-bottom: 0.5rem;
  text-align: center;
  color: var(--darker);
}

.services-left {
  text-align: left;
  margin-left: -2rem; /* shift text left */
}

.services-left h1 {
  margin-bottom: 1.5rem;
}

.services-text p {
  margin-bottom: 1.2rem;
  max-width: 550px;
}
.services-right {
  display: flex;
  justify-content: center;   /* center pipeline horizontally */
  align-items: flex-start;   /* keep it high */
}

/* global page background override */
html,
body.services-page {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* ==============================
   PIPELINE – PATIENTS (UNIFORM)
============================== */

.pipeline {
  width: 100%;
  max-width: none;  
}

.pipeline h2 {
  margin-bottom: 2.5rem;
  font-weight: 700;
}

.pipeline-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* vertical stack */
.pipeline-steps.vertical {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: stretch;
  max-width: 720px;   /* nice readable width */
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

/* uniform boxes */
.pipeline-steps.vertical .step {
  display: grid;
  grid-template-columns: 1fr 180px;
  align-items: center;

  min-height: 70px;              
  padding: 1rem 1.5rem !important; /* override generic .step padding */
  border-radius: 12px;

  background: var(--light);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  width: 100%;

  max-width: none;
  position: relative; /* for arrows */
}
/* text side */
.pipeline-steps.vertical .step-content {
  text-align: left;
}

/* number + title row */
.pipeline-steps.vertical .step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.pipeline-steps.vertical h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--darker);
}

/* description */
.pipeline-steps.vertical p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0;
  color: var(--dark);
}

/* image placeholder */
.pipeline-steps.vertical .step-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* image sizing */
.pipeline-steps.vertical .step-image img {
  width: auto;
  height: 120px;
}


/* Responsive */
@media (max-width: 900px) {
  .pipeline {
    max-width: none;
  }

  .pipeline-steps.vertical .step {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .step-image {
    justify-content: flex-start;
  }
}

.step:not(.pipeline-steps .step) .step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.step-body img {
  width: 40px;
  height: auto;
  opacity: 0.85;
}

/* ==============================
   PIPELINE-CONNECTING ARROWS
============================== */
/* line */
.pipeline-steps.vertical .step:not(:last-child)::after {
  content: "";
  position: absolute;

  left: 50%;
  bottom: -14px;

  width: 2px;
  height: 14px;

  background: var(--darker);
  transform: translateX(-50%);
  /*opacity: 0.6;*/
}

/* arrow head */
.pipeline-steps.vertical .step:not(:last-child)::before {
  content: "";
  position: absolute;

  left: 50%;
  bottom: -18px;

  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--darker);

  transform: translateX(-50%);
  /*opacity: 0.6;*/
}

@media (max-width: 900px) {
  .pipeline-steps.vertical .step::before,
  .pipeline-steps.vertical .step::after {
    display: none;
  }
}

/* ==============================
   PIPELINE STEP OVERRIDES (MUST BE LAST)
   Force compact card sizing
============================== */
.pipeline-steps.vertical .step {
  min-height: 60px !important;
  height: auto;
  padding: 0.5rem 1.5rem !important;
  box-sizing: border-box !important;
  align-items: center !important;
  display: grid !important;
}

.pipeline-steps.vertical .step-content,
.pipeline-steps.vertical .step-header,
.pipeline-steps.vertical .step h3,
.pipeline-steps.vertical .step p {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.2 !important;
}

.pipeline-steps.vertical .step-header {
  margin-bottom: 0.2rem !important;
}