/* ============================================================
   recovery-timeline.css
   Recovery Timeline Section — Gynecomastia Surgery
   Aesthetic: Clinical Luxury — Deep Navy + Soft Teal + Cream
   Fonts: DM Serif Display + Plus Jakarta Sans
   ============================================================ */

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

/* ── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  /* Colors */
  --navy:         #0d2137;
  --navy-mid:     #163352;
  --navy-light:   #1e4470;
  --teal:         #1a8c8c;
  --teal-light:   #22b0b0;
  --teal-pale:    #e8f7f7;
  --gold:         #c9943a;
  --gold-pale:    #fdf3e3;
  --cream:        #fafaf7;
  --white:        #ffffff;
  --text-dark:    #0d2137;
  --text-body:    #3d5166;
  --text-muted:   #7a92a8;
  --border:       rgba(26,140,140,.15);
  --border-light: rgba(13,33,55,.07);

  /* Phase colors */
  --phase1: #e05b5b;   /* Red — immediate */
  --phase2: #e0845b;   /* Orange — early */
  --phase3: #d4a017;   /* Amber — comfort */
  --phase4: #5b9de0;   /* Blue — routine */
  --phase5: #1a8c8c;   /* Teal — full */

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;

  /* Spacing & Shape */
  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows */
  --shadow-sm:   0 2px 12px rgba(13,33,55,.07);
  --shadow-md:   0 6px 28px rgba(13,33,55,.1);
  --shadow-lg:   0 16px 56px rgba(13,33,55,.14);
  --shadow-teal: 0 8px 32px rgba(26,140,140,.2);

  --transition: .38s cubic-bezier(.4,0,.2,1);
  --max-width: 860px;
}

/* ── BASE ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
ul  { list-style: none; }
a   { color: inherit; text-decoration: none; }

/* ══════════════════════════════════════════════════════════
   SECTION WRAPPER
══════════════════════════════════════════════════════════ */
.rt-section {
  padding: 6rem 1.5rem 5rem;
  background: var(--cream);
  position: relative;
  overflow: hidden;
}

/* Subtle background texture */
.rt-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(26,140,140,.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(13,33,55,.04) 0%, transparent 40%);
  pointer-events: none;
}

/* ══════════════════════════════════════════════════════════
   SECTION HEADER
══════════════════════════════════════════════════════════ */
.rt-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 4rem;
  position: relative;
  z-index: 1;
}

/* Eyebrow label */
.rt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.1rem;
}
.rt-eyebrow-line {
  display: inline-block;
  width: 28px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--teal));
  border-radius: 2px;
}
.rt-eyebrow-line:last-child {
  background: linear-gradient(90deg, var(--teal), transparent);
}

/* Main heading */
.rt-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--navy);
  margin-bottom: 1rem;
}
.rt-heading em {
  font-style: italic;
  color: var(--teal);
}

.rt-subheading {
  font-size: .95rem;
  color: var(--text-body);
  line-height: 1.8;
  max-width: 500px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════
   SCROLL PROGRESS BAR (left edge indicator)
══════════════════════════════════════════════════════════ */
.rt-progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 3px;
  height: 100vh;
  background: rgba(26,140,140,.12);
  z-index: 100;
}
.rt-progress-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--teal-light), var(--teal));
  border-radius: 0 0 2px 2px;
  transition: height .1s ease;
}

/* ══════════════════════════════════════════════════════════
   TIMELINE CONTAINER
══════════════════════════════════════════════════════════ */
.rt-timeline {
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ══════════════════════════════════════════════════════════
   TIMELINE ITEM
══════════════════════════════════════════════════════════ */
.rt-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 1.75rem;
  /* Scroll-in animation */
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .6s ease, transform .6s ease;
}
.rt-item.rt-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.rt-item[data-index="0"] { transition-delay: .0s; }
.rt-item[data-index="1"] { transition-delay: .12s; }
.rt-item[data-index="2"] { transition-delay: .24s; }
.rt-item[data-index="3"] { transition-delay: .36s; }
.rt-item[data-index="4"] { transition-delay: .48s; }

/* ── CONNECTOR (left column: node + stem) ── */
.rt-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 2rem;
}

/* Circle node */
.rt-node {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--white);
  border: 2.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.rt-node-inner {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

/* Active node when item is visible */
.rt-item.rt-visible .rt-node {
  background: var(--navy);
  border-color: var(--navy);
  box-shadow: 0 0 0 5px rgba(13,33,55,.08), var(--shadow-md);
}
.rt-item.rt-visible .rt-node-inner {
  color: var(--white);
}

/* Final (star) node */
.rt-node-final {
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  border-color: var(--teal);
  box-shadow: var(--shadow-teal);
}
.rt-item.rt-visible .rt-node-final {
  background: linear-gradient(135deg, var(--gold), #a8711f);
  border-color: var(--gold);
  box-shadow: 0 0 0 6px rgba(201,148,58,.14), 0 8px 28px rgba(201,148,58,.3);
  animation: pulseGold 2.8s ease-in-out infinite;
}
.rt-node-final .rt-node-inner { color: var(--white); font-size: .9rem; }

@keyframes pulseGold {
  0%,100% { box-shadow: 0 0 0 6px rgba(201,148,58,.12), 0 8px 28px rgba(201,148,58,.28); }
  50%      { box-shadow: 0 0 0 10px rgba(201,148,58,.05), 0 8px 32px rgba(201,148,58,.4); }
}

/* Connecting stem */
.rt-stem {
  width: 2px;
  flex: 1;
  min-height: 40px;
  background: linear-gradient(180deg, var(--navy) 0%, rgba(26,140,140,.3) 100%);
  margin-top: 4px;
  border-radius: 1px;
  opacity: 0;
  transform: scaleY(0);
  transform-origin: top;
  transition: opacity .4s ease .3s, transform .5s ease .25s;
}
.rt-item.rt-visible .rt-stem {
  opacity: 1;
  transform: scaleY(1);
}

/* ══════════════════════════════════════════════════════════
   CARD
══════════════════════════════════════════════════════════ */
.rt-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transition: all var(--transition);
}
.rt-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
  transform: translateY(-3px);
}

/* Top accent stripe (colored per phase) */
.rt-card-accent {
  height: 3px;
  background: var(--teal);
  transition: height var(--transition);
}
.rt-card:hover .rt-card-accent { height: 4px; }

/* Per-phase accent colors */
.rt-item[data-index="0"] .rt-card-accent { background: linear-gradient(90deg, var(--phase1), rgba(224,91,91,.4)); }
.rt-item[data-index="1"] .rt-card-accent { background: linear-gradient(90deg, var(--phase2), rgba(224,132,91,.4)); }
.rt-item[data-index="2"] .rt-card-accent { background: linear-gradient(90deg, var(--phase3), rgba(212,160,23,.4)); }
.rt-item[data-index="3"] .rt-card-accent { background: linear-gradient(90deg, var(--phase4), rgba(91,157,224,.4)); }
.rt-item[data-index="4"] .rt-card-accent { background: linear-gradient(90deg, var(--gold), rgba(201,148,58,.3)); }

/* Card inner layout: image + body side by side */
.rt-card-img-wrap {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 2rem 0;
}
.rt-card-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(26,140,140,.15));
  transition: transform var(--transition), filter var(--transition);
}
.rt-card:hover .rt-card-img {
  transform: scale(1.06) translateY(-3px);
  filter: drop-shadow(0 8px 20px rgba(26,140,140,.22));
}

/* Card body */
.rt-card-body {
  padding: 1.5rem 2rem 2rem;
}

/* Phase badge */
.rt-phase-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}
.rt-phase-badge i { font-size: .72rem; }

.rt-phase-1 { background: rgba(224,91,91,.1);   color: var(--phase1); }
.rt-phase-2 { background: rgba(224,132,91,.1);  color: var(--phase2); }
.rt-phase-3 { background: rgba(212,160,23,.12); color: #a07a10; }
.rt-phase-4 { background: rgba(91,157,224,.1);  color: var(--phase4); }
.rt-phase-5 { background: rgba(201,148,58,.12); color: var(--gold); }

/* Card title */
.rt-card-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

/* Detail blocks */
.rt-detail {
  margin-bottom: 1.2rem;
}
.rt-detail:last-child { margin-bottom: 0; }

.rt-detail-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: .55rem;
}
.rt-detail-label i { font-size: .75rem; }

.rt-detail-text {
  font-size: .9rem;
  color: var(--text-body);
  line-height: 1.75;
}

/* Tips list */
.rt-tips {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.rt-tips li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .9rem;
  color: var(--text-body);
  line-height: 1.65;
}

/* Custom dot for tips */
.rt-tip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  margin-top: .48rem;
  box-shadow: 0 0 0 3px rgba(26,140,140,.12);
}

/* ── FINAL CARD special styling ── */
.rt-card-final {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-color: rgba(201,148,58,.3);
  box-shadow: 0 8px 40px rgba(13,33,55,.25);
}
.rt-card-final:hover {
  box-shadow: 0 20px 60px rgba(13,33,55,.3);
  border-color: rgba(201,148,58,.5);
}
.rt-card-final .rt-card-title { color: var(--white); }
.rt-card-final .rt-detail-label { color: var(--gold-pale); opacity: .8; }
.rt-card-final .rt-detail-text { color: rgba(255,255,255,.72); }
.rt-card-final .rt-tips li { color: rgba(255,255,255,.72); }
.rt-card-final .rt-tip-dot { background: var(--gold); box-shadow: 0 0 0 3px rgba(201,148,58,.15); }
.rt-card-final .rt-card-img {
  filter: drop-shadow(0 4px 12px rgba(201,148,58,.25)) brightness(1.08);
}

/* Milestone badge inside final card */
.rt-milestone {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: linear-gradient(135deg, var(--gold), #a8711f);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .6rem 1.4rem;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  justify-content: center;
  box-shadow: 0 4px 20px rgba(201,148,58,.3);
}
.rt-milestone i { font-size: .85rem; }

/* ══════════════════════════════════════════════════════════
   BOTTOM CTA
══════════════════════════════════════════════════════════ */
.rt-cta {
  text-align: center;
  margin-top: 3.5rem;
  padding: 2.5rem 2rem;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1.5px solid var(--border-light);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
}
.rt-cta p {
  font-size: .95rem;
  color: var(--text-body);
  margin-bottom: 1.3rem;
}
.rt-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  padding: .85rem 2rem;
  border-radius: 50px;
  letter-spacing: .04em;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(13,33,55,.25);
}
.rt-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(13,33,55,.35);
  background: linear-gradient(135deg, var(--navy-light), var(--teal));
}
.rt-cta-btn i { font-size: .85rem; }

/* ══════════════════════════════════════════════════════════
   DESKTOP LAYOUT — side-by-side image + content
══════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
  .rt-card {
    flex-direction: row;
    align-items: stretch;
  }
  .rt-card-img-wrap {
    width: 160px;
    flex-shrink: 0;
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--border-light);
    align-items: center;
    background: linear-gradient(135deg, rgba(26,140,140,.035), transparent);
  }
  .rt-card-img { width: 100px; height: 100px; }
  .rt-card-body {
    flex: 1;
    padding: 1.8rem 2rem 1.8rem 1.8rem;
  }
  .rt-card-final .rt-card-img-wrap {
    border-right-color: rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
  }
  .rt-milestone {
    border-radius: 0 0 var(--radius-xl) 0;
    width: auto;
    align-self: flex-end;
    margin-top: auto;
  }
  /* Re-layout final card for milestone placement */
  .rt-card-final {
    flex-wrap: wrap;
  }
  .rt-card-final .rt-card-img-wrap,
  .rt-card-final .rt-card-body {
    flex: 1 1 0;
  }
  .rt-card-final .rt-milestone {
    flex: 0 0 100%;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  }
}

/* ══════════════════════════════════════════════════════════
   HOVER: Per-phase border glow
══════════════════════════════════════════════════════════ */
.rt-item[data-index="0"] .rt-card:hover { border-color: rgba(224,91,91,.25);   box-shadow: var(--shadow-lg), 0 0 0 1px rgba(224,91,91,.15); }
.rt-item[data-index="1"] .rt-card:hover { border-color: rgba(224,132,91,.25);  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(224,132,91,.15); }
.rt-item[data-index="2"] .rt-card:hover { border-color: rgba(212,160,23,.25);  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(212,160,23,.15); }
.rt-item[data-index="3"] .rt-card:hover { border-color: rgba(91,157,224,.25);  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(91,157,224,.15); }
.rt-item[data-index="4"] .rt-card:hover { border-color: rgba(201,148,58,.45);  box-shadow: 0 20px 60px rgba(13,33,55,.32); }

/* ══════════════════════════════════════════════════════════
   NODE active ring — phase colors
══════════════════════════════════════════════════════════ */
.rt-item[data-index="0"].rt-visible .rt-node { background: var(--phase1); border-color: var(--phase1); box-shadow: 0 0 0 5px rgba(224,91,91,.1), var(--shadow-md); }
.rt-item[data-index="1"].rt-visible .rt-node { background: var(--phase2); border-color: var(--phase2); box-shadow: 0 0 0 5px rgba(224,132,91,.1), var(--shadow-md); }
.rt-item[data-index="2"].rt-visible .rt-node { background: var(--phase3); border-color: var(--phase3); box-shadow: 0 0 0 5px rgba(212,160,23,.1), var(--shadow-md); }
.rt-item[data-index="3"].rt-visible .rt-node { background: var(--phase4); border-color: var(--phase4); box-shadow: 0 0 0 5px rgba(91,157,224,.1), var(--shadow-md); }

/* ══════════════════════════════════════════════════════════
   CONNECTOR line colors per phase
══════════════════════════════════════════════════════════ */
.rt-item[data-index="0"] .rt-stem { background: linear-gradient(180deg, var(--phase1) 0%, rgba(224,132,91,.4) 100%); }
.rt-item[data-index="1"] .rt-stem { background: linear-gradient(180deg, var(--phase2) 0%, rgba(212,160,23,.4) 100%); }
.rt-item[data-index="2"] .rt-stem { background: linear-gradient(180deg, var(--phase3) 0%, rgba(91,157,224,.4) 100%); }
.rt-item[data-index="3"] .rt-stem { background: linear-gradient(180deg, var(--phase4) 0%, rgba(26,140,140,.5) 100%); }

/* ══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 599px) {
  .rt-section { padding: 4rem 1rem 3.5rem; }
  .rt-header { margin-bottom: 2.5rem; }
  .rt-heading { font-size: 1.9rem; }

  .rt-timeline { padding-left: 0; }
  .rt-item { grid-template-columns: 44px 1fr; gap: 0 1rem; }
  .rt-connector { padding-top: 1.5rem; }
  .rt-node { width: 38px; height: 38px; }
  .rt-node-inner { font-size: .95rem; }

  .rt-card { border-radius: var(--radius-lg); }
  .rt-card-img-wrap { padding: 1.5rem 1.5rem 0; }
  .rt-card-img { width: 90px; height: 90px; }
  .rt-card-body { padding: 1.2rem 1.5rem 1.5rem; }
  .rt-card-title { font-size: 1.25rem; }

  .rt-progress-bar { display: none; }

  .rt-cta { padding: 2rem 1.5rem; margin-top: 2.5rem; }
}

@media (max-width: 380px) {
  .rt-item { grid-template-columns: 38px 1fr; gap: 0 .8rem; }
  .rt-node { width: 34px; height: 34px; }
  .rt-card-body { padding: 1rem 1.2rem 1.4rem; }
  .rt-card-title { font-size: 1.15rem; }
  .rt-tips li, .rt-detail-text { font-size: .85rem; }
}
