/* ============================================================
   ClearedRx — Main Design System
   Brand: Menopause HRT Telehealth
   Palette: Warm Cream + Dusty Rose + Sage Green + Charcoal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
  /* Colors */
  --cream:        #FAF7F2;
  --cream-dark:   #F5F0E8;
  --taupe:        #E0D8CF;
  --charcoal:     #1A1A1A;
  --charcoal-mid: #3D3D3D;
  --charcoal-light: #6B6B6B;
  --rose:         #C4826A;
  --rose-dark:    #A86B55;
  --rose-light:   #E8C4B4;
  --sage:         #7A9E7E;
  --sage-light:   #B5CCBA;
  --sage-dark:    #5A7E5E;
  --forest:       #2C3E2D;
  --white:        #FFFFFF;

  /* Typography */
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-sans:    'DM Sans', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --space-xs:     8px;
  --space-sm:     16px;
  --space-md:     24px;
  --space-lg:     40px;
  --space-xl:     64px;
  --space-2xl:    96px;
  --space-3xl:    128px;

  /* Layout */
  --max-width:    1200px;
  --max-width-narrow: 800px;
  --border-radius: 10px;
  --border-radius-sm: 6px;

  /* Shadows */
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.10);

  /* Transitions */
  --transition:   all 0.22s ease;
}

/* ============================================================
   Reset & Base
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--cream);
  color: var(--charcoal);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ============================================================
   Typography Scale
   ============================================================ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.05rem; }

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--charcoal-mid);
}

.lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: var(--charcoal-mid);
}

.caption {
  font-size: 0.825rem;
  color: var(--charcoal-light);
  letter-spacing: 0.02em;
}

.overline {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rose);
}

/* ============================================================
   Layout Utilities
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

.section-sm {
  padding: var(--space-xl) 0;
}

.section-lg {
  padding: var(--space-3xl) 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: var(--border-radius-sm);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--rose);
  color: var(--white);
  border: 2px solid var(--rose);
}

.btn-primary:hover {
  background-color: var(--rose-dark);
  border-color: var(--rose-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(196, 130, 106, 0.35);
}

.btn-secondary {
  background-color: transparent;
  color: var(--rose);
  border: 2px solid var(--rose);
}

.btn-secondary:hover {
  background-color: var(--rose);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-dark {
  background-color: var(--charcoal);
  color: var(--white);
  border: 2px solid var(--charcoal);
}

.btn-dark:hover {
  background-color: var(--charcoal-mid);
  border-color: var(--charcoal-mid);
  transform: translateY(-1px);
}

.btn-lg {
  font-size: 1.05rem;
  padding: 18px 52px;
  letter-spacing: 0.04em;
}

.btn-sm {
  font-size: 0.8rem;
  padding: 10px 22px;
}

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--taupe);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.logo span {
  color: var(--rose);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--charcoal-mid);
  letter-spacing: 0.01em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--rose);
  transition: width 0.2s ease;
}

.nav-links a:hover {
  color: var(--charcoal);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--charcoal);
}

.nav-links a.active::after {
  width: 100%;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--charcoal);
  transition: var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav */
.mobile-nav {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: var(--cream);
  z-index: 999;
  padding: 80px var(--space-md) var(--space-xl);
  gap: 0;
  overflow-y: auto;
  /* Hidden by default via transform */
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.mobile-nav.open {
  transform: translateX(0);
  pointer-events: auto;
}

.mobile-nav a:not(.btn) {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 400;
  color: var(--charcoal);
  padding: 13px 0;
  border-bottom: 1px solid var(--taupe);
  transition: color 0.2s, padding-left 0.2s;
  display: block;
}

.mobile-nav a:not(.btn):first-of-type {
  border-top: 1px solid var(--taupe);
}

.mobile-nav a:not(.btn):hover,
.mobile-nav a:not(.btn):active {
  color: var(--rose);
  padding-left: 6px;
}

/* Mobile nav footer: login + CTA buttons */
.mobile-nav-footer {
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mobile-nav-footer .btn {
  width: 100%;
  justify-content: center;
  font-size: 0.95rem;
  padding: 15px;
  text-align: center;
}

.mobile-nav-login-btn {
  border: 1.5px solid var(--charcoal) !important;
  color: var(--charcoal) !important;
  background: transparent !important;
  border-radius: var(--border-radius-sm) !important;
}

.mobile-nav-login-btn:hover {
  background: var(--cream-dark) !important;
}

/* ============================================================
   Promo Banner
   ============================================================ */
.promo-banner {
  background-color: var(--forest);
  color: var(--white);
  text-align: center;
  padding: 10px var(--space-md);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.promo-banner a {
  color: var(--rose-light);
  text-decoration: underline;
  margin-left: 8px;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--cream-dark);
}

/* ── New Collage Hero ── */
.hero-collage {
  display: flex;
  flex-direction: column;
  background-color: var(--cream-dark);
  background-size: cover;
  background-position: center right;
  padding: 0;
  overflow: hidden;
  position: relative;
}

/* Subtle overlay so background image shows through softly */
.hero-collage::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(248, 244, 238, 0.96);
  z-index: 0;
  pointer-events: none;
}

/* Centered text block */
.hero-text-wrap {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}

.hero-text-wrap .container {
  display: flex;
  justify-content: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  width: 100%;
  text-align: center;
}

.hero-content .hero-social-proof {
  justify-content: center;
}

.hero-content .hero-cta {
  justify-content: center;
}

/* ── Photo mosaic grid ── */
/* ── Medvi-style mosaic: outer tall + inner 3-photo row ── */
.hero-mosaic {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 12px;
  padding: 0 40px 40px;
  align-items: flex-end;
  max-width: 1100px;
  margin: 0 auto;
}

/* Outer tall photos */
.mosaic-outer {
  flex: 0 0 220px;
  width: 220px;
}

.mosaic-outer .mosaic-photo {
  height: 480px;
}

/* Inner 3-photo row */
.mosaic-inner {
  flex: 1;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.mosaic-inner .mosaic-photo {
  flex: 1;
  height: 320px;
}

/* Stagger: middle inner photo is slightly taller */
.mosaic-inner .mosaic-photo:nth-child(2) {
  height: 360px;
}

.mosaic-photo {
  border-radius: 20px;
  overflow: hidden;
}

.mosaic-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transition: transform 0.6s ease;
}

.mosaic-photo:hover img {
  transform: scale(1.04);
}

.hero h1 {
  margin-bottom: var(--space-md);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
}

.hero h1 em {
  font-style: italic;
  color: var(--rose);
}

.hero .lead {
  margin-bottom: var(--space-lg);
  font-size: 1.1rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--white);
  border: 1px solid var(--taupe);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--charcoal-mid);
}

.badge svg {
  width: 14px;
  height: 14px;
  color: var(--sage);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  margin-bottom: var(--space-md);
}

.hero-avatars {
  display: flex;
}

.hero-avatars img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--white);
  margin-left: -10px;
  object-fit: cover;
}

.hero-avatars img:first-child {
  margin-left: 0;
}

.hero-social-proof p {
  font-size: 0.85rem;
  color: var(--charcoal-mid);
}

.hero-social-proof strong {
  color: var(--charcoal);
}

/* ============================================================
   Trust Bar
   ============================================================ */
.trust-bar {
  background-color: var(--white);
  border-top: 1px solid var(--taupe);
  border-bottom: 1px solid var(--taupe);
  padding: var(--space-md) 0;
}

.trust-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-xl);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--charcoal-mid);
}

.trust-item svg {
  width: 20px;
  height: 20px;
  color: var(--sage);
  flex-shrink: 0;
}

/* ============================================================
   Section Headers
   ============================================================ */
.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto var(--space-xl);
}

.section-header .overline {
  margin-bottom: var(--space-xs);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: 1.05rem;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--taupe);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ============================================================
   Symptom Cards
   ============================================================ */
.symptom-card {
  padding: var(--space-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.symptom-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: rgba(196, 130, 106, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  flex-shrink: 0;
}

.symptom-icon svg {
  width: 26px;
  height: 26px;
  color: var(--rose);
  stroke: var(--rose);
}

.symptom-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--charcoal);
}

.symptom-card p {
  font-size: 0.8rem;
  color: var(--charcoal-light);
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   Product Cards
   ============================================================ */
.product-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--taupe);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.product-card-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background-color: var(--cream-dark);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.04);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--rose);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}

.product-card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.product-card-body .product-desc {
  font-size: 0.875rem;
  color: var(--charcoal-light);
  margin-bottom: var(--space-sm);
  flex: 1;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: var(--space-sm);
}

.product-price .price-main {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--charcoal);
}

.product-price .price-period {
  font-size: 0.8rem;
  color: var(--charcoal-light);
}

.product-price .price-discount {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rose);
  background-color: rgba(196, 130, 106, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Product card actions: stacked buttons */
.product-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.product-card-actions .btn {
  font-size: 0.875rem;
  padding: 10px 16px;
}

/* ============================================================
   Testimonials
   ============================================================ */
.testimonial-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: var(--space-lg);
  border: 1px solid var(--taupe);
  box-shadow: var(--shadow-sm);
}

.testimonial-stars {
  display: flex;
  gap: 3px;
  margin-bottom: var(--space-sm);
  color: #F5A623;
}

.testimonial-stars svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.testimonial-quote {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--charcoal);
  margin-bottom: var(--space-md);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.testimonial-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-author-info strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--charcoal);
}

.testimonial-author-info span {
  font-size: 0.8rem;
  color: var(--charcoal-light);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--sage-dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 4px;
}

.verified-badge svg {
  width: 12px;
  height: 12px;
}

/* ============================================================
   How It Works
   ============================================================ */
.step-card {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--rose);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.step-card h3 {
  margin-bottom: var(--space-xs);
  font-size: 1.3rem;
}

.step-card p {
  font-size: 0.9rem;
  max-width: 260px;
  margin: 0 auto;
}

.steps-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 28px;
}

.steps-connector svg {
  width: 32px;
  height: 32px;
  color: var(--taupe);
}

/* ============================================================
   Stats / Numbers
   ============================================================ */
.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--charcoal-light);
}

/* ============================================================
   Comparison Table
   ============================================================ */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.comparison-table th {
  background-color: var(--charcoal);
  color: var(--white);
  padding: var(--space-sm) var(--space-md);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.comparison-table th.highlight {
  background-color: var(--forest);
  color: var(--white);
}

.comparison-table td {
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--taupe);
  background-color: var(--white);
}

.comparison-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--charcoal);
}

.comparison-table td.highlight {
  background-color: rgba(196, 130, 106, 0.06);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.check-icon { color: var(--sage); }
.x-icon    { color: #C0392B; }

/* ============================================================
   FAQ / Accordion
   ============================================================ */
.faq-item {
  border-bottom: 1px solid var(--taupe);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--charcoal);
  cursor: pointer;
  text-align: left;
  gap: var(--space-sm);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  color: var(--rose);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.faq-item.open .faq-question svg {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-answer-inner {
  padding-bottom: var(--space-md);
  font-size: 0.95rem;
  color: var(--charcoal-mid);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 400px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background-color: var(--forest);
  color: rgba(255,255,255,0.75);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand .logo {
  color: var(--white);
  margin-bottom: var(--space-sm);
  display: block;
}

.footer-brand .logo span {
  color: var(--rose-light);
}

.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.65;
  margin-bottom: var(--space-md);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: rgba(255,255,255,0.7);
}

.footer-social a:hover {
  border-color: var(--rose-light);
  color: var(--rose-light);
  background-color: rgba(196, 130, 106, 0.15);
}

.footer-social svg {
  width: 16px;
  height: 16px;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: var(--space-md);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-md);
}

.footer-bottom-links a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: rgba(255,255,255,0.8);
}

.footer-disclaimer {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
}

.legitscript-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-md);
}

.legitscript-badge img {
  height: 40px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.legitscript-badge img:hover {
  opacity: 1;
}

/* ============================================================
   Sections — Background Variants
   ============================================================ */
.bg-cream     { background-color: var(--cream); }
.bg-cream-dark { background-color: var(--cream-dark); }
.bg-white     { background-color: var(--white); }
.bg-forest    { background-color: var(--forest); color: var(--white); }
.bg-sage-light { background-color: rgba(181, 204, 186, 0.2); }

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--charcoal-light);
  margin-bottom: var(--space-md);
}

.breadcrumb a {
  color: var(--charcoal-light);
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--rose);
}

.breadcrumb svg {
  width: 12px;
  height: 12px;
}

/* ============================================================
   Blog Cards
   ============================================================ */
.blog-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--taupe);
  transition: var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.blog-card-image {
  aspect-ratio: 3/2;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.04);
}

.blog-card-body {
  padding: var(--space-md);
}

.blog-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 8px;
}

.blog-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  line-height: 1.35;
}

.blog-card-body p {
  font-size: 0.875rem;
  color: var(--charcoal-light);
  margin-bottom: var(--space-sm);
}

.blog-meta {
  font-size: 0.78rem;
  color: var(--charcoal-light);
}

/* ============================================================
   Form Elements
   ============================================================ */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--taupe);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--charcoal);
  background-color: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(196, 130, 106, 0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* ============================================================
   Guarantee Badge
   ============================================================ */
.guarantee-badge {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: rgba(122, 158, 126, 0.1);
  border: 1px solid rgba(122, 158, 126, 0.3);
  border-radius: var(--border-radius);
  padding: var(--space-md);
}

.guarantee-badge svg {
  width: 40px;
  height: 40px;
  color: var(--sage);
  flex-shrink: 0;
}

.guarantee-badge h4 {
  font-size: 1rem;
  margin-bottom: 2px;
  color: var(--charcoal);
}

.guarantee-badge p {
  font-size: 0.85rem;
  color: var(--charcoal-mid);
}

/* ============================================================
   Page Hero (inner pages)
   ============================================================ */
.page-hero {
  background-color: var(--cream-dark);
  padding: var(--space-2xl) 0 var(--space-xl);
  border-bottom: 1px solid var(--taupe);
}

.page-hero .overline {
  margin-bottom: var(--space-xs);
}

.page-hero h1 {
  margin-bottom: var(--space-sm);
}

.page-hero .lead {
  max-width: 560px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .nav-links,
  .header-cta .btn:not(.btn-sm) {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

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

  .hero {
    min-height: 70vh;
    padding: var(--space-xl) 0;
  }

  .trust-bar-inner {
    gap: var(--space-md);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .section {
    padding: var(--space-xl) 0;
  }

  .section-lg {
    padding: var(--space-2xl) 0;
  }
}

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

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-lg {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   Utilities
   ============================================================ */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

/* ============================================================
   Blog CTA Box
   ============================================================ */
.blog-cta {
  margin-top: var(--space-xl);
  padding: var(--space-lg) var(--space-lg) var(--space-lg);
  background-color: var(--cream-dark);
  border-radius: var(--border-radius);
  border: 1px solid var(--taupe);
  text-align: center;
}

.blog-cta h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.4rem;
}

.blog-cta p {
  margin-bottom: var(--space-md);
  color: var(--charcoal-mid);
  font-size: 0.95rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.blog-cta .btn {
  min-width: 200px;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .blog-cta {
    padding: var(--space-md);
  }

  .blog-cta h3 {
    font-size: 1.2rem;
  }

  .blog-cta .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
    justify-content: center;
    box-sizing: border-box;
  }
}

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Divider */
.divider {
  height: 1px;
  background-color: var(--taupe);
  margin: var(--space-xl) 0;
}

/* Pill tag */
.tag {
  display: inline-block;
  background-color: rgba(122, 158, 126, 0.15);
  color: var(--sage-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
}

/* Image with rounded corners */
.img-rounded {
  border-radius: var(--border-radius);
  overflow: hidden;
}

/* Sticky CTA bar — removed entirely */
.sticky-cta-bar { display: none !important; }

/* ============================================================
   Holo / Ghost Button (Patient Login)
   ============================================================ */
.btn-holo {
  background-color: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--taupe);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.btn-holo:hover {
  background-color: rgba(26,26,26,0.06);
  border-color: var(--charcoal-light);
  transform: translateY(-1px);
}

/* Homepage: show Patient Login, hide Start Consult */
body[data-page="home"] .btn-cta-consult { display: none; }
body[data-page="home"] .btn-cta-login  { display: inline-flex; }

/* All other pages: show Start Consult, hide Patient Login */
body:not([data-page="home"]) .btn-cta-consult { display: inline-flex; }
body:not([data-page="home"]) .btn-cta-login  { display: none; }

/* ============================================================
   Comparison Table — Mobile-First Rewrite
   ============================================================ */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  table-layout: fixed;
}

.comparison-table th,
.comparison-table td {
  word-break: break-word;
  hyphens: auto;
}

/* ============================================================
   Mobile Layout Audit — Comprehensive Fixes
   ============================================================ */

/* Ensure nothing overflows viewport */
body, .container, .container-narrow {
  overflow-x: hidden;
}

/* Prevent any element from exceeding viewport width */
* { max-width: 100%; }
img, video, iframe, table { max-width: 100%; }

@media (max-width: 768px) {

  /* ── Hero Collage — tablet ── */
  .hero-text-wrap {
    padding: var(--space-lg) 0 var(--space-md);
  }

  .hero-mosaic {
    gap: 8px;
    padding: 0 16px 24px;
  }

  .mosaic-outer {
    flex: 0 0 140px;
    width: 140px;
  }

  .mosaic-outer .mosaic-photo {
    height: 320px;
  }

  .mosaic-inner .mosaic-photo {
    height: 210px;
  }

  .mosaic-inner .mosaic-photo:nth-child(2) {
    height: 240px;
  }

  /* ── Hero ── */
  .hero {
    min-height: auto;
    padding: 0;
  }

  .hero-content {
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    margin-bottom: var(--space-sm);
  }

  .hero .lead {
    font-size: 1rem;
    margin-bottom: var(--space-md);
  }

  .hero-social-proof {
    margin-bottom: var(--space-sm);
  }

  .hero-avatars img {
    width: 30px;
    height: 30px;
  }

  .hero-social-proof p {
    font-size: 0.8rem;
  }

  /* ── Hero badges — inline row, wrap tightly ── */
  .hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: var(--space-md);
  }

  .badge {
    font-size: 0.72rem;
    padding: 5px 10px;
    gap: 4px;
  }

  .badge svg {
    width: 12px;
    height: 12px;
  }

  /* ── Hero CTA buttons ── */
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .btn-lg {
    font-size: 1rem;
    padding: 17px 28px;
  }

  /* ── Trust bar — centered 2-col grid on mobile ── */
  .trust-bar-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    justify-items: center;
    text-align: center;
    padding: 0 var(--space-sm);
  }

  .trust-item {
    font-size: 0.8rem;
    gap: 6px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: flex-start;
  }

  .trust-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  /* ── Section spacing ── */
  .section {
    padding: var(--space-lg) 0;
  }

  .section-sm {
    padding: var(--space-md) 0;
  }

  .section-header {
    margin-bottom: var(--space-lg);
  }

  .section-header h2 {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  /* ── How It Works steps — stack vertically, centered, hide connectors ── */
  .steps-connector {
    display: none;
  }

  /* The steps grid becomes single column on mobile */
  [style*="grid-template-columns: 1fr auto 1fr auto 1fr"] {
    display: flex !important;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: center;
    padding: 0 var(--space-sm);
  }

  .step-card {
    padding: var(--space-md) var(--space-sm);
    width: 100%;
    max-width: 400px;
    text-align: center;
  }

  .step-card p {
    max-width: 100%;
  }

  /* ── Comparison table — compact for mobile ── */
  .comparison-table th {
    padding: 10px 8px;
    font-size: 0.75rem;
  }

  .comparison-table td {
    padding: 10px 8px;
    font-size: 0.8rem;
  }

  .comparison-table td:first-child {
    font-size: 0.78rem;
  }

  /* ── Product cards — 2 col on mobile ── */
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .product-card-body {
    padding: var(--space-sm);
  }

  .product-card-body h3 {
    font-size: 1rem;
  }

  .product-card-body .product-desc {
    font-size: 0.8rem;
  }

  .product-price .price-main {
    font-size: 1.3rem;
  }

  /* ── Doctor section — stack on mobile ── */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* ── Testimonials ── */
  .testimonial-card {
    padding: var(--space-md);
  }

  .testimonial-quote {
    font-size: 1rem;
  }

  /* ── Stats bar ── */
  .grid-4.stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ── Guarantee badge ── */
  .guarantee-badge {
    flex-direction: column;
    text-align: center;
    padding: var(--space-md);
  }

  .guarantee-badge svg {
    margin: 0 auto;
  }

  /* ── Footer ── */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* ── Container padding ── */
  .container,
  .container-narrow {
    padding: 0 var(--space-sm);
  }
}

@media (max-width: 480px) {

  /* ── Comparison table — ultra-compact ── */
  .comparison-table th {
    padding: 8px 5px;
    font-size: 0.68rem;
    letter-spacing: 0;
  }

  .comparison-table td {
    padding: 8px 5px;
    font-size: 0.72rem;
  }

  .comparison-table td:first-child {
    font-size: 0.7rem;
  }

  /* ── Trust bar — keep 2-col on tiny screens too ── */
  .trust-bar-inner {
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    padding: 0 4px;
  }

  /* ── Stats — 2 col ── */
  .grid-4.stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ── Product cards — 1 col on small screens ── */
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Symptom grid stays 2-col even on small screens */
  .grid-4:has(.symptom-card) {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ── Section header ── */
  .section-header {
    margin-bottom: var(--space-md);
  }

  /* ── Hero Collage — mobile: text first, mosaic below ── */
  .hero-text-wrap {
    padding: var(--space-lg) 0 var(--space-md);
  }

  /* Mobile mosaic: hide outer tall photos, show only inner 3 as a compact row */
  .hero-mosaic {
    gap: 6px;
    padding: 0 12px 20px;
    align-items: flex-end;
  }

  .mosaic-outer {
    display: none;
  }

  .mosaic-inner {
    gap: 6px;
    flex: 1;
    width: 100%;
  }

  .mosaic-inner .mosaic-photo {
    height: 160px;
    border-radius: 14px;
    flex: 1;
  }

  .mosaic-inner .mosaic-photo:nth-child(2) {
    height: 185px;
    border-radius: 14px;
    flex: 1.2;
  }

  /* Center faces on mobile strip */
  .hero-mosaic .mosaic-photo img {
    object-position: center 20%;
  }

  /* ── Hero ── */
  .hero h1 {
    font-size: 1.9rem;
  }

  .overline {
    font-size: 0.68rem;
  }

  /* ── Footer bottom links — stack on tiny screens ── */
  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
  }

  /* ── Blog cards ── */
  .blog-card-body h3 {
    font-size: 1rem;
  }

  /* ── Page hero ── */
  .page-hero {
    padding: var(--space-xl) 0 var(--space-lg);
  }

  .page-hero h1 {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
  }
}

/* ============================================================
   Header mobile button visibility
   ============================================================ */
@media (max-width: 768px) {
  /* Hide both CTA buttons on mobile — the mobile nav has its own CTA */
  .btn-cta-consult,
  .btn-cta-login {
    display: none !important;
  }

  /* Ensure hamburger is always visible and has a good touch target */
  .hamburger {
    display: flex;
    padding: 8px;
    margin-right: -8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  /* Header height tighter on mobile */
  .header-inner {
    height: 60px;
  }

  /* Promo banner wraps cleanly */
  .promo-banner {
    font-size: 0.78rem;
    padding: 8px var(--space-sm);
    line-height: 1.4;
  }
}

/* ============================================================
   Treatment Page — Mobile Fixes (v12)
   Fixes: image overflow, carousel paths, dosage/CTA overflow
   ============================================================ */

/* Ensure the product grid column containing the image never overflows */
.product-page-grid {
  width: 100%;
  box-sizing: border-box;
}

.product-images {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.product-main-image {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.product-main-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Dosage options — prevent overflow on all screen sizes */
.dosage-option {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.dosage-option-left {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}

.dosage-name,
.dosage-desc {
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.dosage-price {
  flex-shrink: 0;
  white-space: nowrap;
}

/* CTA section */
.add-to-cart-section {
  width: 100%;
  box-sizing: border-box;
}

.add-to-cart-section .btn,
.add-to-cart-section a.btn {
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  text-align: center;
}

@media (max-width: 768px) {
  /* Disable sticky on mobile — it causes the image to escape the container */
  .product-images {
    position: static !important;
  }

  /* Stack the product grid columns */
  .product-page-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-lg);
  }

  /* Thumbnails wrap on mobile */
  .product-thumbnails {
    flex-wrap: wrap;
  }

  /* Dosage option rows: allow price to sit below on very narrow screens */
  .dosage-option {
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  /* On very small screens, stack dosage price below the name/desc */
  .dosage-option {
    flex-wrap: wrap;
  }

  .dosage-price {
    width: 100%;
    text-align: right;
    padding-top: 2px;
  }
}

/* ============================================================
   Treatment Page CTA Button Mobile Fix (v14)
   Ensures the Get Started button never overflows on mobile.
   The base .btn has white-space:nowrap and padding:18px 52px
   which causes overflow at narrow widths.
   ============================================================ */
@media (max-width: 768px) {
  .product-info .btn-lg,
  .product-info a.btn-lg,
  .product-info .btn.btn-primary,
  .product-info a.btn.btn-primary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    display: flex !important;
    justify-content: center !important;
    text-align: center !important;
  }
}
