/* ============================================
   MPN Clinical Trials — Global Styles
   Subtly connected to PV Reporter brand
   ============================================ */

/* --- Google Fonts loaded via HTML <link> --- */

:root {
  /* Brand Colors — matched to MPN Clinical Trials logo */
  --navy: #0B1D3A;
  --navy-light: #132D54;
  --teal: #C22032;        /* Crimson red from ribbon logo */
  --teal-dark: #A31B2C;   /* Darker crimson for hover states */
  --teal-light: #E8384F;  /* Lighter red for highlights */
  --teal-muted: #FDE8EB;  /* Soft pink-red background tint */
  --amber: #F59E0B;
  --amber-dark: #D97706;
  --amber-light: #FEF3C7;

  /* Neutrals */
  --white: #FFFFFF;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;

  /* Status */
  --green: #10B981;
  --green-light: #D1FAE5;
  --red: #EF4444;
  --red-light: #FEE2E2;

  /* Layout */
  --max-width: 1200px;
  --header-height: 72px;
  --radius: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(11,29,58,0.06);
  --shadow-md: 0 4px 12px rgba(11,29,58,0.08);
  --shadow-lg: 0 8px 30px rgba(11,29,58,0.12);
  --shadow-xl: 0 20px 60px rgba(11,29,58,0.15);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--gray-700);
  background: var(--white);
}

h1, h2, h3, h4, h5 {
  font-family: 'Outfit', 'Segoe UI', sans-serif;
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--teal-dark);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--teal); }

img { max-width: 100%; height: auto; display: block; }

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 14px;
  font-family: 'Outfit', sans-serif;
}

.logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}
.logo-text span {
  color: var(--teal);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s;
  text-decoration: none;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--teal-dark);
  background: var(--teal-muted);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--navy);
}
.menu-toggle svg { width: 24px; height: 24px; }

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 16px; width: 100%; }
}

/* --- Hero Sections --- */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 60%, var(--teal-dark) 100%);
  color: var(--white);
  padding: 80px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(8,145,178,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
  color: var(--white);
  margin-bottom: 20px;
  max-width: 700px;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin-bottom: 28px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: var(--teal-light);
  margin-bottom: 20px;
  font-weight: 500;
}

.hero-small {
  padding: 50px 0 40px;
}
.hero-small h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-primary {
  background: var(--amber);
  color: var(--navy);
}
.btn-primary:hover {
  background: var(--amber-dark);
  color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245,158,11,0.35);
}

.btn-secondary {
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--teal-dark);
  border: 2px solid var(--teal);
}
.btn-outline:hover {
  background: var(--teal);
  color: var(--white);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Sections --- */
.section {
  padding: 70px 0;
}
.section-alt {
  background: var(--gray-50);
}
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}
.section-header p {
  color: var(--gray-500);
  font-size: 1.1rem;
  margin-top: 12px;
}
.section-label {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--teal);
  margin-bottom: 10px;
}

/* --- Cards --- */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-300);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--teal-muted);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
}

.card h3 { margin-bottom: 10px; }
.card p { color: var(--gray-500); font-size: 0.95rem; }

/* --- Trial Finder Embed --- */
.finder-wrapper {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.finder-wrapper iframe {
  width: 100%;
  min-height: 700px;
  border: none;
  display: block;
}

/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  padding: 40px 0;
}
.stat-item {
  text-align: center;
}
.stat-number {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}
.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin-top: 6px;
}

/* --- FAQ / Accordion --- */
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  background: var(--white);
  border: none;
  padding: 20px 24px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.faq-question:hover { background: var(--gray-50); }
.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--teal);
  transition: transform 0.3s;
}
.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 24px;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 24px 20px;
}

/* --- Two Column Layout --- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}

/* --- Content Styles (Education page) --- */
.content-body {
  max-width: 800px;
  margin: 0 auto;
}
.content-body h2 {
  margin-top: 48px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}
.content-body h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.content-body h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}
.content-body ul, .content-body ol {
  margin: 0 0 20px 24px;
}
.content-body li {
  margin-bottom: 8px;
}

.callout-box {
  background: var(--teal-muted);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 28px;
  margin: 28px 0;
}
.callout-box h4 {
  color: var(--teal-dark);
  margin-bottom: 8px;
}
.callout-box p { margin-bottom: 0; }

.warning-box {
  background: var(--amber-light);
  border-left: 4px solid var(--amber);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 24px 28px;
  margin: 28px 0;
}

/* Table of contents sidebar */
.content-with-toc {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 60px;
  align-items: start;
}
.toc-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
}
.toc-sidebar h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gray-400);
  margin-bottom: 12px;
}
.toc-sidebar a {
  display: block;
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--gray-500);
  border-left: 2px solid var(--gray-200);
  padding-left: 16px;
  transition: all 0.2s;
}
.toc-sidebar a:hover,
.toc-sidebar a.active {
  color: var(--teal-dark);
  border-left-color: var(--teal);
}

@media (max-width: 960px) {
  .content-with-toc { grid-template-columns: 1fr; }
  .toc-sidebar { display: none; }
}

/* --- Footer --- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
  margin-top: 12px;
}

.footer-col h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.8);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--teal-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.83rem;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a {
  color: rgba(255,255,255,0.35);
}
.footer-bottom a:hover { color: var(--teal-light); }

/* --- Utility --- */
.text-center { text-align: center; }
.text-teal { color: var(--teal); }
.text-navy { color: var(--navy); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* --- Print Styles --- */
@media print {
  .site-header, .site-footer, .btn, .menu-toggle { display: none; }
  .hero { background: none; color: var(--navy); padding: 20px 0; }
  .hero h1, .hero p { color: var(--navy); }
  body { font-size: 12pt; }
}