/* MedEQ Platform - Custom styles (extends Tailwind via CDN) */

:root {
  --navy: #112240; /* Slightly darker/more severe navy */
  --navy-light: #1e3a8a;
  /* Hero gradient: small navy block → smooth fade (multi-stop reduces banding) */
  --hero-offwhite: #f5f4f0;
  --hero-mid: #4a5f7a;
  --hero-mid-light: #8b95a8;
  --hero-fade-end: #d8d9dc;
  --gray-50: #fafafa;
  --gray-100: #f4f4f5;
  --gray-200: #e4e4e7;
  --gray-300: #d4d4d8;
  --gray-400: #a1a1aa;
  --gray-500: #71717a;
  --gray-600: #52525b;
  --gray-700: #3f3f46;
  --gray-800: #27272a;
  --gray-900: #18181b;

  --font-sans: 'Montserrat', sans-serif;
  --font-serif: 'Zalando Sans SemiExpanded', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: var(--font-serif);
  color: var(--gray-900);
  background-color: #f5f4f0;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

h1, h2, h3, h4, h5, h6, .site-nav, .btn, .badge, .logo-mark, .step-number {
  font-family: var(--font-sans);
}

.zalando-sans-semiexpanded {
  font-family: "Zalando Sans SemiExpanded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}

/* ========== LAYOUT ========== */
.container { max-width: 1360px; margin: 0 auto; padding: 0 1rem; }
.content-width { max-width: 900px; }

/* Page-level spacing & typography */
.page-section {
  padding: 6rem 0;
}

.page-section--tight {
  padding: 6rem 0 3rem;
}

.page-title {
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.page-lead {
  font-size: 1.15rem;
  font-family: var(--font-serif);
  color: var(--gray-700);
  line-height: 1.8;
}

@media (max-width: 768px) {
  .page-section,
  .page-section--tight {
    padding: 4rem 0 2.5rem;
  }

  .page-title {
    font-size: clamp(1.9rem, 6vw, 2.4rem);
  }

  .page-lead {
    font-size: 1.05rem;
  }
}

/* ========== HEADER ========== */
.site-header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.95);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px; /* Taller header */
}
.site-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--navy);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.site-logo .logo-mark {
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.site-nav { display: flex; gap: 2.5rem; align-items: center; }
.site-nav a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s;
}
.site-nav a:hover, .site-nav a.active { color: var(--navy); }

/* Mobile nav */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    padding: 0.75rem;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    gap: 1.5rem;
    box-shadow: none;
  }
  .site-nav.open { display: flex; }
}

/* ========== FOOTER ========== */
.site-footer {
  background-color: var(--navy);
  color: var(--gray-400);
  padding: 6rem 0 3rem;
  margin-top: 6rem;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
}
.footer-bg-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.footer-bg-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: fill;
  animation: none;
}
.footer-bg-wave path {
  vector-effect: non-scaling-stroke;
}
.site-footer a { color: var(--gray-300); text-decoration: none; transition: color 0.15s; }
.site-footer a:hover { color: white; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem; position: relative; z-index: 1; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  color: var(--gray-500);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 4rem 0 2.5rem;
    margin-top: 4rem;
  }
}

/* ========== HERO ========== */
/* Best practice: small solid block + multi-stop gradient for smooth fade, less banding */
.hero {
  background: linear-gradient(
    180deg,
    var(--navy) 0%,
    var(--navy) 8%,
    var(--hero-mid) 42%,
    var(--hero-mid-light) 68%,
    var(--hero-fade-end) 88%,
    var(--hero-offwhite) 100%
  );
  color: white;
  padding: 8rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-bg-container {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg-wave-inner {
  width: 200%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  animation: heroWaveFlow 28s linear infinite;
}

@keyframes heroWaveFlow {
  to { transform: translateX(-50%); }
}

.hero-bg-wave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.045;
}

.hero-bg-wave path {
  vector-effect: non-scaling-stroke;
}

.hero .container {
  position: relative;
  z-index: 1;
}

/* Editorial hero: display headline - bold, tight, high contrast */
.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.75rem;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: #ffffff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.22);
}

/* Hero lead/deck: distinct from body - larger, spaced, max visibility on gradient */
.hero p {
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 2.5rem;
  color: rgba(255, 255, 255, 0.97);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.06);
}

@media (max-width: 768px) {
  .hero { padding: 4.5rem 0; }
  .hero h1 { letter-spacing: -0.02em; }
  .hero p { font-size: 1.1rem; max-width: 100%; }
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 0; /* Boxy */
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  min-height: 48px; /* Touch target */
}
.btn-primary { background: white; color: var(--navy); }
.btn-primary:hover { 
  background: white; 
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.75);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn-secondary:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Inverted for light backgrounds */
.btn-outline-dark { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline-dark:hover { background: var(--navy); color: white; }
.btn-solid-dark { background: var(--navy); color: white; border-color: rgba(255, 255, 255, 0.4); }
.btn-solid-dark:hover { background: var(--navy-light); border-color: rgba(255, 255, 255, 0.4); }

.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.8rem; min-height: auto; }
.btn-lg { padding: 1.25rem 2.5rem; font-size: 1rem; }

/* ========== CARDS ========== */
.card {
  background: white;
  border-radius: 0;
  border: 1px solid var(--gray-200);
  padding: 2.5rem;
  margin-bottom: 2rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 12px rgba(17, 34, 64, 0.02);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(17, 34, 64, 0.08); }

/* Drug library card - Clean, elegant two-column layout */
.card--blujepa {
  position: relative;
  overflow: hidden;
  background-color: #ffffff;
}

/* Shared drug-library card treatment so future modules inherit instantly */
.drug-library-grid .card {
  position: relative;
  overflow: hidden;
  border-color: rgba(17, 34, 64, 0.14);
  box-shadow:
    0 2px 10px rgba(17, 34, 64, 0.03),
    inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  transition: border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease;
}

.drug-library-grid a.card {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Secondary hairline keeps borders crisp over textured/image backgrounds */
.drug-library-grid .card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(17, 34, 64, 0.08);
  opacity: 0.72;
  transition: border-color 0.24s ease, opacity 0.24s ease;
}

.drug-library-grid .card:hover,
.drug-library-grid .card:focus-visible {
  border-color: rgba(17, 34, 64, 0.24);
  box-shadow:
    0 14px 28px rgba(17, 34, 64, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.drug-library-grid .card:hover::after,
.drug-library-grid .card:focus-visible::after {
  border-color: rgba(17, 34, 64, 0.14);
  opacity: 1;
}

.drug-library-grid .card:focus-visible {
  outline: none;
}

/* Greyed-out "coming soon" cards keep the same border system without hover lift */
.drug-library-grid .card--muted {
  opacity: 0.62;
  cursor: default;
}

.drug-library-grid .card--muted:hover {
  transform: none;
  border-color: rgba(17, 34, 64, 0.14);
  box-shadow:
    0 2px 10px rgba(17, 34, 64, 0.03),
    inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

/* Prevent text from overlapping the image on desktop */
.card--blujepa > * {
  position: relative;
  z-index: 1;
}

/* Title row: pillbottle to the left of drug name + subtitle, centered between the two lines */
.card-blujepa-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0;
}

.card--blujepa .card-blujepa-pillbottle {
  flex-shrink: 0;
  height: 3.75rem; /* in scale with title + subtitle block */
  max-height: 3.75rem;
  opacity: 0.9;
  transform: translate3d(0, -6px, 0) scale(1);
  transform-origin: center left;
  transition: transform 200ms ease, opacity 200ms ease;
  pointer-events: none;
}

.card--blujepa .card-blujepa-pillbottle img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: left center;
}

.card--blujepa:hover .card-blujepa-pillbottle,
.card--blujepa:focus-visible .card-blujepa-pillbottle {
  transform: translate3d(0, -6px, 0) scale(1.05);
  opacity: 1;
}

@media (min-width: 768px) {
  .card--blujepa > * {
    max-width: 72%; /* Allow text to fill out much more space */
  }
}

@media (prefers-reduced-motion: reduce) {
  .card--blujepa .card-blujepa-pillbottle {
    transition: none;
  }

  .card--blujepa:hover .card-blujepa-pillbottle,
  .card--blujepa:focus-visible .card-blujepa-pillbottle {
    transform: translate3d(0, -6px, 0);
  }
}

/* Product image as a clean decorative accent on the right */
.card--blujepa::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  
  /* Much more transparent overall so it acts as a true, subtle background texture */
  opacity: 0.22;
  
  /* Multiplying the gradient into the image tints it beautifully instead of just covering it in a muddy haze */
  background-blend-mode: multiply;
  
  /* Solid navy gradient that seamlessly dyes the image blue as it goes right */
  background-image:
    linear-gradient(90deg, transparent 0%, transparent 30%, var(--navy) 100%),
    url(../images/blujepa-product.svg);
    
  /* Image sized up and shifted right to elegantly crop off the edge */
  background-size: cover, 70% auto;
  background-position: 0 0, 160% 50%;
  background-repeat: no-repeat, no-repeat;
  
  /* An ultra-long, smooth mask so the blend from the white card is completely imperceptible */
  mask-image: linear-gradient(90deg, transparent 0%, transparent 40%, black 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 40%, black 100%);
}

.card-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
@media (max-width: 768px) { .card-grid-3 { grid-template-columns: 1fr; gap: 2rem; } }

/* ========== DRUG PAGE ========== */
.drug-header {
  background-color: var(--navy);
  color: white;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.drug-header .container {
  position: relative;
  z-index: 2;
}
.drug-header-inner {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.drug-header-main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  column-gap: 3rem;
  row-gap: 2rem;
}
.drug-header-left {
  min-width: 0;
  flex: 1 1 0;
}
.drug-header-right {
  text-align: left;
  max-width: 320px;
  font-family: var(--font-sans);
  flex: 0 0 auto;
}
@keyframes waveFlowBg {
  to { background-position: -600px 0; }
}
.drug-header::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1000 300' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 C150,150 350,0 500,50 C650,100 850,0 1000,50' fill='none' stroke='%23ffffff' stroke-width='1.5'/%3E%3Cpath d='M0,120 C150,220 350,70 500,120 C650,170 850,70 1000,120' fill='none' stroke='%23ffffff' stroke-width='1.5'/%3E%3Cpath d='M0,200 C150,280 350,140 500,200 C650,250 850,140 1000,200' fill='none' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: 600px 100%;
  background-repeat: repeat-x;
  background-position: 0 0;
  animation: waveFlowBg 20s linear infinite;
  pointer-events: none;
}
.drug-header .badge {
  display: inline-block;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 0.3rem 0.8rem;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}
.drug-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.drug-header-title {
  margin-bottom: 0.5rem;
}
.drug-header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0;
  letter-spacing: -0.02em;
  color: #ffffff;
}
/* Background tabletsheet: above waves, below content */
.drug-header .drug-header-tabletsheet {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 40rem;
  max-width: 70vw;
  height: auto;
  aspect-ratio: 1;
  z-index: 1;
  opacity: 0.06;
  transform: translate(25%, 25%);
  pointer-events: none;
}
.drug-header .drug-header-tabletsheet img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.drug-header .generic {
  font-size: 1.25rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: rgba(255,255,255,0.8);
}
.drug-meta-grid {
  display: grid;
  row-gap: 0.5rem;
}
.drug-meta-item {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 1rem;
  align-items: baseline;
}
.drug-meta-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7);
  text-align: right;
}
.drug-meta-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}
.drug-header-disclaimer {
  margin-top: 3rem;
  max-width: 760px;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
}

.drug-content { padding: 5rem 0; }
.drug-layout { display: grid; grid-template-columns: 1fr 320px; gap: 5rem; }
@media (max-width: 1024px) { .drug-layout { grid-template-columns: 1fr; } }

@media (max-width: 768px) {
  .drug-header {
    padding: 3.5rem 0;
  }
  .drug-header-main {
    flex-direction: column;
    align-items: flex-start;
  }
  .drug-header-right {
    max-width: 100%;
    margin-top: 0.5rem;
  }
  .drug-header h1 {
    font-size: 2.4rem;
  }
  .drug-header .generic {
    font-size: 1.1rem;
  }
  .drug-header .drug-header-tabletsheet {
    width: 28rem;
    right: -20%;
    bottom: -22%;
    opacity: 0.05;
  }
}

.drug-article {
  background: white;
  padding: 4rem;
  border: 1px solid var(--gray-200);
  box-shadow: 0 4px 12px rgba(17, 34, 64, 0.02);
}
@media (max-width: 768px) {
  .drug-article { padding: 2rem 1.5rem; }
  .drug-article .cta-inline { padding: 2.5rem 1.5rem; }
}

.drug-article h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  margin: 4rem 0 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}
.drug-article h2:first-child { margin-top: 0; }
.drug-article h3 { font-size: 1.25rem; font-weight: 600; color: var(--gray-900); margin: 2.5rem 0 1rem; }
.drug-article p { margin-bottom: 1.5rem; color: var(--gray-800); }
.drug-article ul { margin: 1rem 0 1.5rem 1.5rem; color: var(--gray-800); }
.drug-article li { margin-bottom: 0.5rem; }
.drug-article ul li a { color: var(--navy); text-decoration: underline; }
.drug-article ul li a:hover { color: var(--navy-light); }

/* ========== SIDEBAR ========== */
.drug-sidebar { position: sticky; top: 120px; align-self: start; font-family: var(--font-sans); }
.sidebar-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-top: 4px solid var(--navy);
  border-radius: 0;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(17, 34, 64, 0.02);
}
.sidebar-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  margin-bottom: 1.5rem;
}
.sidebar-card .info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.85rem;
}
.sidebar-card .info-row:last-child { border-bottom: none; }
.sidebar-card .info-label { color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.75rem; font-weight: 600; }
.sidebar-card .info-value { font-weight: 600; color: var(--gray-900); text-align: right; max-width: 60%; }

.sidebar-product-image {
  border: none;
  border-top: none;
  padding: 0;
  margin-bottom: 2rem;
  text-align: center;
  background: transparent;
  box-shadow: none;
}
.sidebar-product-image img {
  width: 100%;
  max-width: 280px;
  height: auto;
}

/* ========== WARNING BOXES ========== */
.warning-box {
  padding: 2rem;
  border-radius: 0;
  border: 1px solid var(--gray-200);
  border-left: 4px solid var(--navy);
  margin: 2rem 0;
  background: white;
}
.warning-box h4 { font-weight: 700; margin-bottom: 0.75rem; font-size: 1rem; color: var(--navy); text-transform: uppercase; letter-spacing: 0.05em; }
.warning-box p { font-size: 1rem; margin: 0; color: var(--gray-800); }
/* Convert semantic colors to greyscale/navy */
.warning-box.danger { border-left-color: var(--gray-900); }
.warning-box.danger h4 { color: var(--gray-900); }
.warning-box.caution { border-left-color: var(--gray-600); }
.warning-box.caution h4 { color: var(--gray-600); }
.warning-box.info { border-left-color: var(--navy); }
.warning-box.info h4 { color: var(--navy); }
.warning-box.success { border-left-color: var(--navy-light); }

/* ========== DOSAGE TABLE ========== */
.dosage-table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.95rem; font-family: var(--font-sans); }
.dosage-table th {
  background: white;
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--gray-900);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--navy);
}
.dosage-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-800);
}
.dosage-table code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
}

/* Responsive table wrapper - prevents wide tables from causing page overflow */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
}
.table-responsive .dosage-table {
  margin: 0;
  min-width: 540px;
}

/* ========== PODCAST BANNER ========== */
.podcast-banner {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: white;
  margin: 0 0 3rem 0;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(17, 34, 64, 0.15);
  overflow: hidden;
  font-family: var(--font-sans);
}
.podcast-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1000 300' preserveAspectRatio='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,50 C150,150 350,0 500,50 C650,100 850,0 1000,50' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3Cpath d='M0,120 C150,220 350,70 500,120 C650,170 850,70 1000,120' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3Cpath d='M0,200 C150,280 350,140 500,200 C650,250 850,140 1000,200' fill='none' stroke='%23ffffff' stroke-width='2'/%3E%3C/svg%3E");
  background-size: 600px 100%;
  background-repeat: repeat-x;
  background-position: 0 0;
  animation: waveFlowBg 22s linear infinite;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg-wave-inner { animation: none; }
  .drug-header::before { animation: none; }
  .podcast-banner-bg { animation: none; }
  .title-accent-line { width: 120px; }
  .features .section-title { clip-path: none; }
  .features .subtitle { opacity: 1; transform: none; }
  .card-bg-svg { opacity: 0.08 !important; transform: translateY(-50%) !important; }
  .card-bg-svg-credit { transform: translate(-50%, -50%) !important; }
}
.podcast-banner-content {
  position: relative;
  z-index: 1;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .podcast-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem 1.5rem;
  }
}
.podcast-play-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: white;
  color: var(--navy);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}
.podcast-play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}
.podcast-play-btn:active {
  transform: scale(0.98);
}
.podcast-info {
  flex: 1;
  min-width: 250px;
}
.podcast-meta {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}
.podcast-banner .podcast-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin: 0 0 1.25rem 0;
  line-height: 1.3;
}
.podcast-player {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}
.audio-progress {
  flex: 1;
}
.audio-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.audio-progress-fill {
  height: 100%;
  background: white;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}
.audio-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
  font-weight: 600;
}
.podcast-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
  min-width: 150px;
}
@media (max-width: 768px) {
  .podcast-controls {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
}
.speed-controls {
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.25rem;
}
.speed-btn {
  background: transparent;
  border: none;
  padding: 0.3rem 0.6rem;
  border-radius: 16px;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.15s;
}
.speed-btn:hover {
  color: white;
}
.speed-btn.active {
  background: white;
  color: var(--navy);
}
.transcript-toggle {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.15s;
}
.transcript-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}
.transcript-content {
  display: none;
  background: white;
  color: var(--gray-800);
  padding: 2.5rem;
  font-size: 0.95rem;
  line-height: 1.8;
  border-top: 1px solid var(--gray-200);
  max-height: 400px;
  overflow-y: auto;
  font-family: var(--font-serif);
}
@media (max-width: 768px) {
  .transcript-content {
    padding: 1.5rem;
  }
}
.transcript-content.open { display: block; }

/* ========== DECISION TREE / ASSESSMENT ========== */
.assessment-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 4rem 0;
}
.assessment-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 3rem;
  font-size: 0.8rem;
  color: var(--gray-500);
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .assessment-container {
    padding: 3.5rem 0;
  }
}
.progress-bar-bg {
  flex: 1;
  height: 4px;
  background: var(--gray-200);
  border-radius: 0;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--navy);
  border-radius: 0;
  transition: width 0.4s ease;
}
.question-card {
  background: white;
  border-radius: 0;
  border: 1px solid var(--gray-200);
  padding: 2.25rem;
  box-shadow: none;
}
.question-card .scenario-context {
  background: white;
  padding: 2rem;
  border-radius: 0;
  margin-bottom: 2.5rem;
  font-size: 1rem;
  color: var(--gray-800);
  border-left: 4px solid var(--navy);
  border: 1px solid var(--gray-200);
}
.question-card h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 2rem; color: var(--gray-900); }
.option-list { display: flex; flex-direction: column; gap: 1rem; }
.intro-flow-icon {
  width: 64px;
  height: 64px;
  border: 1px solid var(--gray-300);
  border-radius: 0;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  color: var(--navy);
  box-shadow: 0 1px 2px rgba(17, 34, 64, 0.08);
}
.intro-flow-icon-svg {
  width: 32px;
  height: 32px;
}
.option-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 0;
  cursor: pointer;
  font-size: 1rem;
  color: var(--gray-800);
  transition: all 0.15s;
  line-height: 1.6;
  font-family: var(--font-serif);
}
.option-btn:hover { border-color: var(--navy); }
.option-btn.selected { border-color: var(--navy); border-width: 2px; padding: calc(1.5rem - 1px); font-weight: 700; }
.option-btn.correct { border-color: var(--gray-900); background: var(--gray-50); }
.option-btn.incorrect { border-color: var(--gray-400); background: var(--gray-50); opacity: 0.8; }
.option-btn.optimal { border-color: var(--navy); background: var(--gray-50); }

.feedback-box {
  margin-top: 2rem;
  padding: 2rem;
  border-radius: 0;
  font-size: 1rem;
  animation: fadeIn 0.3s ease;
}
.feedback-box.positive { background: var(--gray-50); color: var(--gray-900); border: 1px solid var(--gray-300); border-left: 4px solid var(--navy); }
.feedback-box.negative { background: var(--gray-50); color: var(--gray-900); border: 1px solid var(--gray-300); border-left: 4px solid var(--gray-600); }
.feedback-box.neutral { background: var(--gray-50); color: var(--gray-900); border: 1px solid var(--gray-300); border-left: 4px solid var(--gray-400); }

.assessment-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  gap: 1rem;
  border-top: 1px solid var(--gray-200);
  padding-top: 2rem;
}

.assessment-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .assessment-metrics-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ========== RESULTS SCREEN ========== */
.results-card {
  background: white;
  border-radius: 0;
  border: 1px solid var(--gray-200);
  padding: 4rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(17, 34, 64, 0.02);
}
@media (max-width: 768px) {
  .question-card { padding: 1.5rem 1.25rem; }
  .results-card { padding: 2rem 1.5rem; }
}
.results-icon {
  width: 80px;
  height: 80px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  font-size: 2.5rem;
}
.results-icon.pass { background: var(--navy); color: white; }
.results-icon.fail { background: var(--gray-800); color: white; }
.results-card h2 { font-size: 2rem; margin-bottom: 1rem; }
.results-score { font-size: 4rem; font-weight: 800; color: var(--navy); margin: 1.5rem 0; font-family: var(--font-sans); line-height: 1; }
.results-details {
  text-align: left;
  background: white;
  padding: 2.5rem;
  border: 1px solid var(--gray-200);
  border-radius: 0;
  margin: 3rem auto;
  max-width: 600px;
}
.results-details h4 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--navy); }
.results-details li { margin-bottom: 0.5rem; font-size: 1rem; color: var(--gray-700); }

/* ========== FEATURES GRID / PROFESSIONAL PRACTICES ========== */
.features {
  padding: 4rem 0 5rem 0;
  background-color: var(--hero-offwhite);
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.stats-section {
  position: relative;
  z-index: 2;
  margin-top: -1rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
  text-align: center;
  background-color: var(--hero-offwhite);
}
.stats-section::before,
.stats-section::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  height: 0;
  border-top: 1px solid var(--gray-200);
}
.stats-section::before {
  top: 0;
}
.stats-section::after {
  bottom: 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* --- Section Title: Left-Slide Reveal --- */
.section-title-reveal {
  position: relative;
  overflow: visible;
}
.title-accent-line {
  display: block;
  width: 0;
  height: 3px;
  background: var(--navy);
  margin-bottom: 1.5rem;
}
.features .section-title {
  text-align: left;
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1rem;
  clip-path: inset(0 100% 0 0);
}
.features .subtitle {
  text-align: left;
  color: var(--gray-600);
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0;
  line-height: 1.7;
}

/* --- Features Grid with Parallax --- */
.features-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "card-1 card-2"
    "card-3 card-2";
  row-gap: clamp(3rem, 5vh, 5.5rem);
  column-gap: clamp(3rem, 4vw, 5rem);
  margin-top: 3rem;
  margin-bottom: 1rem;
  align-items: start;
}

.features-grid .practice-card:nth-child(1) {
  grid-area: card-1;
  margin-right: 1rem;
}
.features-grid .practice-card:nth-child(2) {
  grid-area: card-2;
  align-self: start;
  margin-left: 1rem;
  margin-top: 3.5rem;
}
.features-grid .practice-card:nth-child(3) {
  grid-area: card-3;
  margin-left: 1.5rem;
  margin-top: 2.5rem;
}

/* Full-screen: balanced spacing and alignment */
@media (min-width: 1200px) {
  .features-grid {
    row-gap: clamp(4rem, 6vh, 6rem);
    column-gap: clamp(4rem, 5vw, 6rem);
    margin-top: 4rem;
  }
  .features-grid .practice-card:nth-child(1) { margin-right: 0; }
  .features-grid .practice-card:nth-child(2) { margin-left: 0; margin-top: 4rem; }
  .features-grid .practice-card:nth-child(3) { margin-left: 0.5rem; margin-top: 3rem; }
}

.practice-card {
  text-align: left;
  padding: 0;
  margin-bottom: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  transition: none;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: visible;
  min-height: 320px;
}
.practice-card:hover {
  transform: none;
  box-shadow: none;
}

/* Scroll target for "How It Works" button: first card lands just above viewport top */
#how-it-works-first-card {
  scroll-margin-top: 6rem;
  margin-top: -1.5rem;
}

.practice-card .card-content {
  position: relative;
  z-index: 1;
  max-width: 85%;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 16px rgba(17, 34, 64, 0.03);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 4px;
}

.features-grid .practice-card:nth-child(2) .card-content {
  margin-left: 0;
  max-width: 88%;
}

.features-grid .practice-card:nth-child(1) .card-content {
  max-width: 88%;
}

.features-grid .practice-card:nth-child(3) .card-content {
  max-width: 88%;
  margin-left: 14.286%; /* 1/7 screen to the right */
}

.practice-card .step-number {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-400);
  margin-bottom: 1rem;
}
.practice-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; color: var(--gray-900); }
.practice-card p { font-size: 1rem; color: var(--gray-600); line-height: 1.7; margin: 0; flex-grow: 1; }

/* --- Background SVG Layer (large illustrations behind cards) --- */
.card-bg-svg {
  position: absolute;
  width: 92%;
  height: auto;
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
}
.card-bg-svg svg {
  width: 100%;
  height: auto;
  display: block;
}
.card-bg-svg-audio {
  right: 2%;
  left: auto;
  top: 44%;
  width: 105%;
}
.card-bg-svg-nodes {
  right: 0;
  left: auto;
  top: 20%;
  width: 105%;
  opacity: 0.18;
  transform: none;
  transform-origin: center center;
}
.card-bg-svg-nodes .net-path {
  stroke: var(--gray-300);
  stroke-width: 1.5;
}
.card-bg-svg-nodes .net-node {
  fill: var(--gray-200);
  stroke: var(--gray-400);
  stroke-width: 1.5;
}
.card-bg-svg-nodes .net-dot {
  fill: var(--gray-400);
}
.card-bg-svg-credit {
  left: calc(5% + 35%); /* 2/8 + 1/10 further right */
  top: 15%;
  width: 85%;
}

/* --- SVG Draw-in setup --- */
.net-path {
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
}
.net-node, .net-dot {
  opacity: 0;
}

/* --- Mobile: Background SVGs --- */
@media (max-width: 768px) {
  .features .section-title { font-size: 1.75rem; }
  .features-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
    gap: 2rem;
  }
  .features-grid .practice-card:nth-child(1),
  .features-grid .practice-card:nth-child(2),
  .features-grid .practice-card:nth-child(3) {
    grid-area: auto;
    margin: 0;
  }
  .practice-card { min-height: 280px; }
  .practice-card .card-content { max-width: 100%; margin-left: 0; padding: 1.5rem; }
  .features-grid .practice-card:nth-child(1) .card-content,
  .features-grid .practice-card:nth-child(2) .card-content,
  .features-grid .practice-card:nth-child(3) .card-content {
    max-width: 100%;
    margin: 0;
  }
  .card-bg-svg-audio { right: -12%; left: auto; top: 5%; width: 108%; }
  .card-bg-svg-nodes { right: 0; top: 15%; width: 105%; opacity: 0.18; }
  .card-bg-svg-credit { left: calc(4% + 35%); top: 5%; width: 92%; }
}

/* ========== CTA ========== */
.cta {
  background-color: white;
  border: 1px solid var(--gray-200);
  color: var(--gray-900);
  padding: 5rem 4rem;
  text-align: center;
  border-radius: 0;
  margin: 6rem auto;
  max-width: 900px;
}
.cta h2 { font-size: 2rem; font-weight: 800; margin-bottom: 1rem; color: var(--navy); }
.cta p { color: var(--gray-600); margin-bottom: 2.5rem; font-size: 1.1rem; }

.cta-blujepa-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.cta-blujepa-line p {
  margin-bottom: 0;
}
.cta .cta-pillbottle {
  flex-shrink: 0;
  height: 1.75rem;
  width: auto;
  opacity: 0.9;
  pointer-events: none;
}
.cta .cta-pillbottle img {
  display: block;
  height: 100%;
  width: auto;
  object-fit: contain;
}

.cta-btn .btn-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.cta-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ========== FAQ ========== */
#faq-list {
  background: white;
  border: 1px solid var(--gray-200);
  padding: 2rem 4rem;
  box-shadow: 0 4px 12px rgba(17, 34, 64, 0.02);
}
@media (max-width: 768px) {
  #faq-list { padding: 1.5rem; }
}
.faq-item {
  border-bottom: 1px solid var(--gray-200);
  padding: 2rem 0;
}
.faq-item:first-child {
  padding-top: 0;
}
.faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--navy);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0;
  font-family: var(--font-sans);
}
.faq-question .arrow { transition: transform 0.2s; font-size: 1.25rem; color: var(--gray-400); }
.faq-item.open .arrow { transform: rotate(180deg); color: var(--navy); }
.faq-answer {
  display: none;
  padding-top: 1.5rem;
  color: var(--gray-700);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 800px;
}
.faq-item.open .faq-answer { display: block; }

/* ========== UTILITIES ========== */
.text-navy { color: var(--navy); }
.bg-navy { background: var(--navy); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.section-pad { padding: 6rem 0; }

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease; }

/* GSAP Utilities */
.gsap-reveal {
  opacity: 0;
  visibility: hidden;
}