/* ============================================================
   Sharpa — Programm Page Styles
   Used by: programm.html
   ============================================================ */

/* ---------- PAGE HEADER ---------- */
.page-header { background: var(--creme); padding: clamp(6.5rem, 10vw, 8.5rem) clamp(1.25rem,4vw,2rem) clamp(3rem,5vw,4.5rem); }
.page-header-content { max-width: 720px; }
.page-header-content h1 { margin: 0.75rem 0 1.25rem; }
.page-header-intro { font-size: clamp(1rem, 2vw, 1.1rem); line-height: 1.75; color: var(--text-dark); max-width: 640px; }

/* ---------- TIMELINE SECTION ---------- */
.timeline-section { padding: clamp(3.5rem,7vw,5.5rem) clamp(1.25rem,4vw,2rem); background: var(--bg-light); }
.timeline-wrap { max-width: 800px; margin: 0 auto; }

/* ---------- TIMELINE ---------- */
.timeline-item { display: grid; grid-template-columns: 56px 1fr; gap: 1.75rem; scroll-margin-top: 90px; }
@media (max-width: 540px) { .timeline-item { grid-template-columns: 44px 1fr; gap: 1.25rem; } }

.timeline-left { display: flex; flex-direction: column; align-items: center; }

.timeline-node {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--petrol); color: var(--creme);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 600; font-size: 1rem;
  flex-shrink: 0; z-index: 1; position: relative;
  transition: background 0.25s, box-shadow 0.25s;
}
.timeline-item.open .timeline-node { background: var(--petrol-light); box-shadow: 0 0 0 5px rgba(45,106,106,.12); }
.timeline-node.optional-node { background: transparent; border: 2px dashed var(--petrol); color: var(--petrol); }
.timeline-item.open .timeline-node.optional-node { background: rgba(45,106,106,.06); }
@media (max-width: 540px) { .timeline-node { width: 44px; height: 44px; font-size: 0.85rem; } }

.timeline-connector { flex: 1; width: 2px; background: var(--bg-medium); margin: 5px 0; min-height: 1.5rem; }
.timeline-item:last-child .timeline-connector { display: none; }

.timeline-right { padding-bottom: 2rem; }
.timeline-item:last-child .timeline-right { padding-bottom: 0; }

/* ---------- TRIGGER ---------- */
.timeline-trigger {
  width: 100%; background: none; border: none; cursor: pointer;
  text-align: left; padding: 0.75rem 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
}
.timeline-trigger:hover h3 { color: var(--petrol); }
.timeline-summary { display: flex; flex-direction: column; gap: 0.45rem; }
.timeline-summary h3 { transition: color 0.2s; margin-bottom: 0; font-size: clamp(1.1rem, 2.2vw, 1.3rem); }

.tag-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 0.78rem; font-weight: 600; color: var(--petrol); background: rgba(45,106,106,.08); padding: .2rem .6rem; border-radius: 4px; }
.tag-optional { background: transparent; border: 1px dashed var(--amber); color: var(--amber); }

.tl-chevron { flex-shrink: 0; width: 20px; height: 20px; color: var(--text-muted); transition: transform .3s, color .2s; margin-top: 0.85rem; }
.timeline-item.open .tl-chevron { transform: rotate(180deg); color: var(--petrol); }

/* ---------- BODY ---------- */
.timeline-body { overflow: hidden; max-height: 0; transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1); }
.timeline-item.open .timeline-body { max-height: 3600px; }
.timeline-body-inner { padding: 0.25rem 0 2rem; }

/* ---------- META GRID ---------- */
.meta-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--creme); border-radius: 10px;
  border: 1px solid var(--bg-medium); overflow: hidden;
  margin-bottom: 1.75rem;
}
.meta-cell { padding: 1rem 1.25rem; border-right: 1px solid var(--bg-medium); }
.meta-cell:last-child { border-right: none; }
.meta-label { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.3rem; }
.meta-value { font-size: 0.95rem; font-weight: 600; color: var(--text-black); line-height: 1.4; }
.meta-value.cost { color: var(--text-black); }
@media (max-width: 560px) {
  .meta-grid { grid-template-columns: 1fr 1fr; }
  .meta-cell { border-bottom: 1px solid var(--bg-medium); }
  .meta-cell:nth-child(2) { border-right: none; }
  .meta-cell:last-child { border-bottom: none; }
}
@media (max-width: 380px) {
  .meta-grid { grid-template-columns: 1fr; }
  .meta-cell { border-right: none; }
  .meta-cell:last-child { border-bottom: none; }
}

/* ---------- BODY TEXT ---------- */
.timeline-body-inner p { font-size: 0.95rem; line-height: 1.7; color: var(--text-dark); }
.timeline-body-inner strong { color: var(--text-black); }

/* ---------- NOTE BOX ---------- */
.note-box { background: rgba(196,154,108,.09); border-left: 3px solid var(--amber); border-radius: 0 8px 8px 0; padding: 1rem 1.25rem; margin-top: 1.25rem; }
.note-box p { font-size: 0.875rem !important; margin: 0 !important; }

/* ---------- MODALITIES ---------- */
.modalities-intro { font-size: 0.875rem; font-weight: 600; color: var(--text-black); margin: 1.5rem 0 0.75rem; letter-spacing: 0.01em; }
.modalities { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-top: 0; }
@media (max-width: 600px) { .modalities { grid-template-columns: 1fr; } }
.modality-card { background: var(--creme); border-radius: 10px; padding: 1rem 1.25rem; border: 1px solid var(--bg-medium); }
.modality-title { font-family: var(--font-heading); font-weight: 500; font-size: 0.975rem; color: var(--text-black); margin-bottom: 0.35rem; }
.modality-card p { font-size: 0.875rem !important; line-height: 1.6; color: var(--text-dark); margin: 0 !important; }
.modality-link { display: inline-block; font-size: 0.8rem; font-weight: 600; color: var(--petrol); margin-top: 0.6rem; }
.modality-link:hover { color: var(--petrol-light); }

/* ---------- DOCTOR NOTE ---------- */
.doctor-note { display: flex; gap: 0.85rem; align-items: flex-start; background: var(--bg-medium); border-radius: 10px; padding: 1rem 1.25rem; margin-top: 1.25rem; }
.doctor-note svg { flex-shrink: 0; color: var(--petrol); margin-top: 2px; }
.doctor-note p { font-size: 0.875rem !important; line-height: 1.6; color: var(--text-dark); margin: 0 !important; }

/* ---------- INLINE LINK ---------- */
.text-link { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- TOOLTIP ---------- */
/* Anchors to left edge of term to avoid clipping at left margin.
   max-width clamps to viewport - 2rem so tooltip never overflows. */
.tooltip-term { border-bottom: 1px dashed currentColor; cursor: help; position: relative; display: inline; }
.tooltip-term::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  transform: none;
  background: var(--amber);
  color: var(--text-black);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  width: max-content;
  max-width: min(280px, calc(100vw - 2rem));
  white-space: normal;
  box-shadow: 0 4px 14px rgba(43,42,39,.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 10;
}
.tooltip-term:hover::after { opacity: 1; }

/* ---------- TIMELINE HINT ---------- */
.timeline-hint { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--text-muted); margin-top: 2.5rem; }
.timeline-hint svg { flex-shrink: 0; }

/* ---------- CTA SECTION ---------- */
.cta-section { background: var(--creme); padding: clamp(4rem,8vw,6rem) clamp(1.25rem,4vw,2rem); text-align: center; }
.cta-section h2 { margin-bottom: 0.75rem; }
.cta-section .sub { font-size: 1.05rem; color: var(--text-dark); max-width: 520px; margin: 0 auto 2rem; }
