/* ─────────────────────────────────────────────────────────────────────────────
   Symptex — main.css
   Brand system: white background, black text, yellow (#FFF36D) CTAs only
   Mobile-first, max-width 390px, SF Pro body, Helvetica Now Display headings
   ───────────────────────────────────────────────────────────────────────────── */

/* ── CSS Custom Properties ── */
:root {
  --y1: #FFF36D;
  --g3: #EFEFEF;
  --g4: #FFFFFF;
  --b1: #000000;
  --b2: #1F1F1F;
  --b4: #545454;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  --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.12);

  --transition: 0.18s ease;
  --transition-slow: 0.3s ease;

  --max-w: 390px;
  --header-h: 56px;
  --bottom-nav-h: 64px;

  --font-logo: 'Aeonik Pro', 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'HelveticaNowDisplay-Black', 'Helvetica Now Display', 'Helvetica Neue', Arial, sans-serif;
  --font-body: -apple-system, 'SF Pro Text', 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
}

/* ── Additional component styles beyond what's in base.html ── */

/* Prose content styling */
.prose { line-height: 1.65; }
.prose > * + * { margin-top: 12px; }
.prose h1 { font-family: var(--font-heading); font-size: 26px; color: var(--b1); margin-top: 32px; margin-bottom: 12px; letter-spacing: -0.02em; }
.prose h2 { font-family: var(--font-heading); font-size: 22px; color: var(--b1); margin-top: 28px; margin-bottom: 10px; letter-spacing: -0.02em; }
.prose h3 { font-family: var(--font-heading); font-size: 18px; color: var(--b1); margin-top: 22px; margin-bottom: 8px; }
.prose h4 { font-family: var(--font-heading); font-size: 15px; color: var(--b1); margin-top: 18px; margin-bottom: 6px; }
.prose h5 { font-size: 14px; font-weight: 600; color: var(--b1); margin-top: 14px; margin-bottom: 4px; }
.prose h6 { font-size: 13px; font-weight: 600; color: var(--b4); margin-top: 12px; margin-bottom: 4px; }
.prose p { font-size: 15px; color: var(--b2); line-height: 1.7; }
.prose ul { padding-left: 20px; list-style-type: disc; }
.prose ol { padding-left: 20px; list-style-type: decimal; }
.prose li { font-size: 15px; color: var(--b2); margin-bottom: 6px; line-height: 1.6; }
.prose a { color: var(--b1); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong, .prose b { font-weight: 700; color: var(--b1); }
.prose em, .prose i { font-style: italic; }
.prose code { font-family: var(--font-mono); font-size: 13px; background: var(--g3); padding: 2px 5px; border-radius: var(--radius-xs); }
.prose blockquote { border-left: 3px solid var(--b1); padding-left: 14px; color: var(--b4); font-size: 15px; }
.prose hr { border: none; border-top: 1px solid var(--g3); margin: 20px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { border: 1px solid var(--g3); padding: 8px 12px; text-align: left; }
.prose th { background: var(--g3); font-weight: 600; }

/* ── Search highlight ── */
.search-highlight { background: var(--y1); border-radius: 2px; padding: 0 2px; }

/* ── Loading spinner ── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--g3);
  border-top-color: var(--b1);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--b1);
  color: var(--g4);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  transition: all var(--transition);
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Image with aspect ratio ── */
.img-ratio {
  position: relative;
  overflow: hidden;
  background: var(--g3);
}
.img-ratio img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.img-ratio--1x1 { padding-top: 100%; }
.img-ratio--4x3 { padding-top: 75%; }
.img-ratio--16x9 { padding-top: 56.25%; }

/* ── Tag list ── */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  background: var(--g3);
  color: var(--b4);
  text-decoration: none;
  transition: all var(--transition);
}
.tag:hover { background: var(--b1); color: var(--g4); }
.tag-yellow { background: var(--y1); color: var(--b1); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--b4);
}
.empty-state-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  color: var(--g3);
}
.empty-state-title {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--b1);
  margin-bottom: 8px;
}
.empty-state-desc { font-size: 14px; line-height: 1.5; }

/* ── Progress bar ── */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--g3);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--b1);
  border-radius: var(--radius-pill);
  transition: width var(--transition-slow);
}
.progress-bar-fill--yellow { background: var(--y1); }

/* ── Accordion ── */
.accordion { border: 1px solid var(--g3); border-radius: var(--radius-md); overflow: hidden; }
.accordion-item { border-bottom: 1px solid var(--g3); }
.accordion-item:last-child { border-bottom: none; }
.accordion-trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--b1);
  background: var(--g4);
  cursor: pointer;
  transition: background var(--transition);
  border: none;
}
.accordion-trigger:hover { background: var(--g3); }
.accordion-trigger-icon { transition: transform var(--transition); }
.accordion-trigger[aria-expanded="true"] .accordion-trigger-icon { transform: rotate(180deg); }
.accordion-content {
  padding: 0 16px;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding var(--transition);
}
.accordion-content.open { padding: 0 16px 14px; max-height: 500px; }

/* ── Sticky CTA bar (mobile) ── */
.sticky-cta {
  position: sticky;
  bottom: calc(var(--bottom-nav-h) + 8px);
  z-index: 50;
  padding: 0 8px;
  pointer-events: none;
}
.sticky-cta .btn { pointer-events: auto; box-shadow: var(--shadow-lg); }

/* ── Date picker customization ── */
input[type="date"] { cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.6; }

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease forwards; }

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* ── Focus visible ── */
:focus-visible {
  outline: 2px solid var(--b1);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ── Print styles ── */
@media print {
  .site-header,
  .bottom-nav,
  .sticky-cta { display: none !important; }
  body { padding: 0 !important; }
}

/* ── Dark mode (reserved, not active) ── */
/* @media (prefers-color-scheme: dark) { ... } */

/* ── Utility classes ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.p-0 { padding: 0; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.opacity-50 { opacity: 0.5; }

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Skeleton / Shimmer loading ── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, #efefef 25%, #e0e0e0 50%, #efefef 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
}
.skeleton-text  { height: 14px; border-radius: 4px; margin-bottom: 8px; }
.skeleton-title { height: 22px; border-radius: 4px; margin-bottom: 12px; }
.skeleton-img   { border-radius: var(--radius-md); }
.skeleton-card  { padding: 16px; background: var(--g4); border: 1px solid var(--g3); border-radius: var(--radius-md); margin-bottom: 12px; }

/* ── Spring hover (cards, buttons) ── */
.card,
.doctor-card,
.blog-card {
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), box-shadow 0.2s ease;
  will-change: transform;
}
.card:hover,
.doctor-card:hover,
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
