/* ═══════════════════════════════════════════════════════════════════
   cerca · Editorial Médico · v3.1
   Inspirado en: The Verge, Apple Health, Kinfolk, Monocle
   Filosofía: blanco inmenso, tipografía enorme, fotos como protagonistas
   Mejoras v3.1: marcos finos en horarios, mejor espaciado, más cohesión
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --c-ink:       #1A1A1A;
  --c-ink-2:     #3D3D3D;
  --c-ink-3:     #6B6B6B;
  --c-ink-4:     #9E9E9E;
  --c-paper:     #FAFAF8;
  --c-paper-2:   #F2F0EC;
  --c-line:      #E0DDD7;
  --c-line-2:    #D4D1CB;
  --c-accent:    #C62828;
  --c-accent-2:  #8B3A4C;
  --c-white:     #FFFFFF;
  --c-wood:      #B8864A;
  --c-success:   #2E7D32;

  --f-display:   'Playfair Display', Georgia, serif;
  --f-body:      'Inter', -apple-system, sans-serif;
  --f-mono:      'JetBrains Mono', monospace;

  --t:           0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --r:           2px;
  --r-md:        6px;
  --max:         1280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  color: var(--c-ink);
  background: var(--c-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--c-ink); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--c-accent); }
button { cursor: pointer; font-family: inherit; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ─── HEADER ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow var(--t);
}
.site-header.scrolled { box-shadow: 0 1px 20px rgba(0,0,0,0.04); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.brand-name {
  font-family: var(--f-display); font-size: 20px; font-weight: 700;
  color: var(--c-ink); letter-spacing: -0.5px;
}
.brand-sub {
  font-size: 9px; color: var(--c-ink-3);
  letter-spacing: 2.5px; text-transform: uppercase; font-weight: 600;
}
.nav { display: flex; align-items: center; gap: 28px; }
.nav-link {
  font-size: 13px; font-weight: 500; color: var(--c-ink-2);
  transition: color var(--t); position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--c-accent);
  transition: width var(--t);
}
.nav-link:hover { color: var(--c-accent); }
.nav-link:hover::after { width: 100%; }

/* ─── BOTONES ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; font-size: 13px; font-weight: 600;
  border: none; border-radius: var(--r); cursor: pointer;
  text-decoration: none; font-family: inherit; transition: all var(--t);
  letter-spacing: 0.3px;
}
.btn-primary { background: var(--c-ink); color: var(--c-white); }
.btn-primary:hover { background: var(--c-accent); color: var(--c-white); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--c-ink); border: 1px solid var(--c-line); }
.btn-ghost:hover { border-color: var(--c-ink); }

/* ─── HERO ──────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 90vh;
  display: flex; align-items: flex-end; overflow: hidden;
  background: var(--c-ink);
}
.hero-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.55;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(26,26,26,0.85) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 0 32px 80px;
  max-width: var(--max); margin: 0 auto; width: 100%;
}
.hero-eyebrow {
  font-size: 11px; font-weight: 600;
  color: var(--c-white); opacity: 0.7;
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.hero-eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--c-accent); }
.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 700; line-height: 0.98;
  color: var(--c-white); letter-spacing: -2px;
  margin-bottom: 20px; max-width: 700px;
}
.hero h1 .italic { font-style: italic; font-weight: 400; color: rgba(255,255,255,0.85); }
.hero-sub {
  font-size: 17px; line-height: 1.6;
  color: rgba(255,255,255,0.75);
  max-width: 480px; margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn-primary { background: var(--c-white); color: var(--c-ink); }
.hero-actions .btn-primary:hover { background: var(--c-accent); color: var(--c-white); }
.hero-actions .btn-ghost {
  background: transparent; color: var(--c-white);
  border-color: rgba(255,255,255,0.3);
}
.hero-actions .btn-ghost:hover { border-color: var(--c-white); background: rgba(255,255,255,0.05); }

/* ─── SECCIONES ────────────────────────────────────────────────── */
.section { padding: 100px 0; border-bottom: 1px solid var(--c-line); }
.section-label {
  font-size: 10px; font-weight: 700; color: var(--c-accent);
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 16px; display: flex; align-items: center; gap: 8px;
}
.section-label::before { content: ''; width: 20px; height: 1px; background: var(--c-accent); }
.section-title {
  font-family: var(--f-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700; line-height: 1.05;
  color: var(--c-ink); letter-spacing: -1.5px; margin-bottom: 16px;
}
.section-title .italic { font-style: italic; font-weight: 400; color: var(--c-ink-3); }
.section-desc {
  font-size: 17px; color: var(--c-ink-3);
  line-height: 1.7; max-width: 560px; margin-bottom: 48px;
}

/* ─── ESPECIALIDADES (grid tipo revista) ────────────────────────── */
.esp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0;
  border-top: 1px solid var(--c-line);
  border-left: 1px solid var(--c-line);
}
.esp-card {
  border-right: 1px solid var(--c-line);
  border-bottom: 1px solid var(--c-line);
  padding: 32px 24px;
  text-decoration: none; color: var(--c-ink);
  transition: all var(--t);
  position: relative; min-height: 180px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.esp-card:hover { background: var(--c-paper); color: var(--c-ink); }
.esp-card:hover .esp-arrow { opacity: 1; transform: translateX(0); }
.esp-card-num { font-family: var(--f-mono); font-size: 10px; color: var(--c-ink-4); margin-bottom: 12px; }
.esp-name {
  font-family: var(--f-display); font-size: 18px; font-weight: 700;
  color: var(--c-ink); margin-bottom: 4px;
}
.esp-count { font-size: 12px; color: var(--c-ink-3); }
.esp-arrow {
  position: absolute; bottom: 24px; right: 24px;
  color: var(--c-accent); opacity: 0; transform: translateX(-8px);
  transition: all var(--t);
}

/* ─── MÉDICOS (cards editoriales con foto) ──────────────────────── */
.med-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.med-card {
  text-decoration: none; color: var(--c-ink);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform var(--t);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 16px;
  background: var(--c-white);
}
.med-card:hover { transform: translateY(-2px); color: var(--c-ink); border-color: var(--c-ink); }
.med-card-header {
  display: flex; align-items: center; gap: 12px;
}
.med-photo {
  width: 64px; height: 64px;
  flex-shrink: 0;
  background: var(--c-paper-2);
  border: 1px solid var(--c-line);
  border-radius: 50%;
  overflow: hidden; position: relative;
}
.med-photo-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--c-paper-2), var(--c-line));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 20px; font-weight: 700;
  color: var(--c-ink-4);
}
.med-card-info { flex: 1; min-width: 0; }
.med-esp {
  font-size: 10px; font-weight: 600; color: var(--c-accent);
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 2px;
}
.med-name {
  font-family: var(--f-display); font-size: 16px; font-weight: 700;
  color: var(--c-ink); line-height: 1.2;
}
.med-card-mat {
  font-size: 10px; color: var(--c-ink-3); font-family: var(--f-mono);
  margin-top: 2px;
}
.med-bio {
  font-size: 12px; color: var(--c-ink-3); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.med-meta {
  display: flex; gap: 12px; align-items: center;
  padding-top: 10px; border-top: 1px solid var(--c-line);
  font-size: 11px; color: var(--c-ink-3);
}
.med-meta strong { color: var(--c-ink); }

/* Responsive: en pantallas chicas las cards se achican más */
@media (max-width: 640px) {
  .med-grid { grid-template-columns: 1fr; gap: 12px; }
  .med-card { padding: 12px; }
  .med-photo { width: 56px; height: 56px; }
  .med-name { font-size: 15px; }
}

/* ─── ABOUT (foto + texto) ──────────────────────────────────────── */
.about-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.about-photo {
  width: 100%; aspect-ratio: 3/4;
  background-size: cover; background-position: center;
  border: 1px solid var(--c-line); border-radius: var(--r);
}
.about-text h2 {
  font-family: var(--f-display); font-size: 36px; font-weight: 700;
  line-height: 1.1; letter-spacing: -1px; margin-bottom: 20px; color: var(--c-ink);
}
.about-text { padding: 32px; border: 1px solid var(--c-line); border-radius: var(--r); background: var(--c-white); }
.about-text p { font-size: 16px; color: var(--c-ink-2); line-height: 1.8; margin-bottom: 16px; }
.about-checks { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.about-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--c-ink-2); }
.about-check::before { content: '—'; color: var(--c-accent); font-weight: 700; font-size: 16px; }

/* ─── PASOS (editorial numerados) ───────────────────────────────── */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--c-line);
}
.step { padding: 40px 32px; border-right: 1px solid var(--c-line); background: var(--c-white); }
.step:first-child { border-radius: var(--r) 0 0 var(--r); }
.step:last-child { border-radius: 0 var(--r) var(--r) 0; border-right: none; }
.step-num {
  font-family: var(--f-display); font-size: 56px; font-weight: 400;
  font-style: italic; color: var(--c-accent);
  line-height: 1; margin-bottom: 16px;
}
.step-title {
  font-family: var(--f-display); font-size: 18px; font-weight: 700;
  color: var(--c-ink); margin-bottom: 8px;
}
.step-desc { font-size: 14px; color: var(--c-ink-3); line-height: 1.6; }

/* ─── VALORES (banda oscura) ────────────────────────────────────── */
.valores { background: var(--c-ink); padding: 100px 0; border-bottom: none; }
.valores-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; text-align: left;
}
.valores-item { padding: 24px; border: 1px solid rgba(255,255,255,0.1); border-radius: var(--r); }
.valores-item h3 {
  font-family: var(--f-display); font-size: 24px; font-weight: 700;
  color: var(--c-white); margin-bottom: 8px; letter-spacing: -0.5px;
}
.valores-item p { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.6; }
.valores-item .num {
  font-family: var(--f-mono); font-size: 10px; color: var(--c-accent);
  margin-bottom: 12px; letter-spacing: 2px;
}

/* ─── TESTIMONIOS (citas editoriales) ───────────────────────────── */
.testimonios-grid { display: grid; grid-template-columns: 1fr; gap: 48px; }
.testimonio { max-width: 680px; margin: 0 auto; text-align: center; border: 1px solid var(--c-line); border-radius: var(--r); padding: 40px 32px; background: var(--c-white); }
.testimonio-quote {
  font-family: var(--f-display); font-size: 24px; font-weight: 400;
  font-style: italic; line-height: 1.5; color: var(--c-ink); margin-bottom: 20px;
}
.testimonio-quote::before { content: '\201C'; color: var(--c-accent); font-size: 48px; vertical-align: -10px; margin-right: 4px; }
.testimonio-quote::after { content: '\201D'; color: var(--c-accent); font-size: 48px; vertical-align: -10px; margin-left: 4px; }
.testimonio-author { font-size: 13px; font-weight: 600; color: var(--c-ink-2); }
.testimonio-stars { color: var(--c-accent); font-size: 14px; margin-top: 4px; }
.testimonio-meta { font-size: 11px; color: var(--c-ink-4); margin-top: 4px; }

/* ─── BLOG (layout de revista) ──────────────────────────────────── */
.blog-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.blog-card { text-decoration: none; color: var(--c-ink); display: flex; flex-direction: column; border: 1px solid var(--c-line); border-radius: var(--r); overflow: hidden; background: var(--c-white); transition: all var(--t); }
.blog-card:hover { color: var(--c-ink); border-color: var(--c-accent); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.blog-img {
  width: 100%; aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--c-ink), var(--c-accent-2));
  margin-bottom: 0; position: relative; overflow: hidden;
}
.blog-img-sm { aspect-ratio: 4/3; }
.blog-cat {
  position: absolute; top: 12px; left: 12px;
  background: var(--c-white); color: var(--c-accent);
  font-size: 10px; font-weight: 700; padding: 4px 10px;
  border-radius: 100px; letter-spacing: 1px; text-transform: uppercase;
}
.blog-title {
  font-family: var(--f-display); font-size: 20px; font-weight: 700;
  line-height: 1.2; margin-bottom: 8px;
}
.blog-card:first-child .blog-title { font-size: 28px; }
.blog-card:first-child .blog-img { aspect-ratio: 16/9; }
.blog-meta { font-size: 12px; color: var(--c-ink-3); margin-bottom: 8px; }
.blog-resumen { font-size: 14px; color: var(--c-ink-3); line-height: 1.6; }
.blog-read { font-size: 12px; font-weight: 600; color: var(--c-accent); margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.blog-read::after { content: '→'; transition: transform 0.2s; }
.blog-card:hover .blog-read::after { transform: translateX(4px); }

@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; gap: 20px; }
  .blog-card:first-child .blog-title { font-size: 22px; }
}

/* ─── FAQ (minimal accordion) ───────────────────────────────────── */
.faq-list { max-width: 720px; margin: 0 auto; border-top: 1px solid var(--c-line); }
.faq-item { border-bottom: 1px solid var(--c-line); transition: border-color var(--t); }
.faq-item[open] { border-bottom-color: var(--c-accent); }
.faq-item summary {
  padding: 24px 0; font-size: 17px; font-weight: 600; color: var(--c-ink);
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 24px; color: var(--c-accent);
  transition: transform var(--t); font-weight: 300;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 0 24px; font-size: 15px; color: var(--c-ink-3); line-height: 1.8; }

/* ─── CTA (simple, tipográfico) ──────────────────────────────────── */
.cta-section { text-align: center; padding: 120px 0; background: var(--c-paper); }
.cta-section h2 {
  font-family: var(--f-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700; line-height: 1.05;
  letter-spacing: -2px; margin-bottom: 16px;
}
.cta-section h2 .italic { font-style: italic; font-weight: 400; color: var(--c-accent); }
.cta-section p { font-size: 17px; color: var(--c-ink-3); margin-bottom: 32px; }

/* ─── FOOTER ────────────────────────────────────────────────────── */
.site-footer { background: var(--c-ink); color: var(--c-white); padding: 80px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 60px; }
.footer-brand h3 { font-family: var(--f-display); font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; color: rgba(255,255,255,0.5); line-height: 1.6; max-width: 320px; }
.footer-col h4 {
  font-size: 10px; font-weight: 700; color: var(--c-white);
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13px; color: rgba(255,255,255,0.5); }
.footer-col a:hover { color: var(--c-white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px;
  display: flex; justify-content: space-between;
  font-size: 11px; color: rgba(255,255,255,0.3);
}

/* ─── Animación reveal ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── PÁGINAS INTERNAS (especialidad, medico, reservar, articulo) ── */

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--c-ink-3); margin-bottom: 24px;
}
.breadcrumb a { color: var(--c-ink-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb .sep { color: var(--c-line); }

/* Cards internas */
.esp-header, .med-hero, .reserva-card, .info-card {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 32px;
  margin-bottom: 24px;
}

/* ─── HORARIOS con marco fino (NUEVO v3.1) ──────────────────────── */
.horarios-list { display: flex; flex-direction: column; gap: 6px; }
.horario-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-accent);
  border-radius: var(--r-md);
  font-size: 13px;
  transition: all var(--t);
}
.horario-row:hover { border-color: var(--c-ink); background: var(--c-paper); }
.horario-row .dia { font-weight: 600; color: var(--c-ink); min-width: 100px; }
.horario-row .rango { font-family: var(--f-mono); color: var(--c-accent); font-weight: 600; }
.horario-row .lugar { margin-left: auto; font-size: 11px; color: var(--c-ink-3); }

/* Info card de horarios (contenedor con borde) */
.info-card { border: 1px solid var(--c-line); border-radius: var(--r); padding: 24px; background: var(--c-white); }
.info-card h2 {
  font-family: var(--f-display); font-size: 22px; color: var(--c-ink);
  margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px dashed var(--c-line);
}

/* ─── SLOTS de turnos con marco fino (rojo en hover/seleccionado) ── */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}
.slot-card, .slot-radio-card {
  background: var(--c-white);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 12px;
  text-align: center;
  transition: all var(--t);
  cursor: pointer;
  text-decoration: none;
  color: var(--c-ink);
  display: block;
}
.slot-card:hover, .slot-radio:hover .slot-radio-card {
  border: 2px solid var(--c-accent);
  background: rgba(198, 40, 40, 0.05);
  transform: translateY(-2px);
  padding: 11px;
}
.slot-card .dia-corto, .slot-radio-card .dia {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; opacity: 0.7;
}
.slot-card .fecha, .slot-radio-card .fecha {
  font-size: 14px; font-weight: 700; margin: 2px 0;
}
.slot-card .hora, .slot-radio-card .hora {
  font-size: 16px; font-family: var(--f-mono); font-weight: 600;
  color: var(--c-accent);
}
.slot-card .rel, .slot-radio-card .rel { font-size: 10px; opacity: 0.6; margin-top: 2px; }
/* Slot seleccionado (radio checked) */
.slot-radio input:checked + .slot-radio-card {
  background: var(--c-accent);
  color: white;
  border: 2px solid var(--c-accent);
}
.slot-radio input:checked + .slot-radio-card .hora { color: white; }
.slot-radio input:checked + .slot-radio-card .dia { opacity: 0.8; }

/* ─── Forms (reservar) ───────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--c-ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--c-line); border-radius: var(--r-md);
  font-family: inherit; font-size: 14px; color: var(--c-ink);
  background: var(--c-paper);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--c-ink); background: var(--c-white);
}

/* ─── Progress steps (reservar) ─────────────────────────────────── */
.progress-steps {
  display: flex; gap: 4px; margin-bottom: 32px;
  padding: 16px; background: var(--c-white);
  border: 1px solid var(--c-line); border-radius: var(--r-md);
}
.progress-step {
  flex: 1; display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--c-ink-3);
}
.progress-step .num {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  background: var(--c-paper-2); color: var(--c-ink-3);
  flex-shrink: 0; transition: all var(--t);
}
.progress-step.active .num { background: var(--c-ink); color: white; }
.progress-step.active .label { color: var(--c-ink); font-weight: 600; }
.progress-step.done .num { background: var(--c-success); color: white; }

/* ─── Medico hero ───────────────────────────────────────────────── */
.med-hero { display: grid; grid-template-columns: 160px 1fr 240px; gap: 32px; align-items: start; }
.med-avatar-xl {
  width: 160px; height: 160px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-paper-2), var(--c-line));
  border: 2px solid var(--c-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-ink-3); font-family: var(--f-display);
  font-size: 56px; font-weight: 700; flex-shrink: 0;
}
.med-hero-card {
  background: var(--c-white); border: 2px solid var(--c-ink);
  border-radius: var(--r-md); padding: 20px;
}
.med-hero-card .precio { font-family: var(--f-display); font-size: 32px; font-weight: 700; color: var(--c-accent); }
.med-hero-card h3 { font-size: 12px; color: var(--c-ink-3); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 8px; }

/* ─── Especialidad header ──────────────────────────────────────── */
.esp-header-grid { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.esp-icon-lg {
  width: 80px; height: 80px; background: var(--c-ink);
  border-radius: var(--r-md); display: flex; align-items: center; justify-content: center;
  color: white; flex-shrink: 0;
}
.esp-title { font-family: var(--f-display); font-size: 36px; font-weight: 700; color: var(--c-ink); letter-spacing: -1px; margin-bottom: 6px; }

/* ─── Médico detail card (en especialidad.php) ──────────────────── */
.med-detail-card {
  background: var(--c-white); border: 1px solid var(--c-line);
  border-radius: var(--r); padding: 24px;
  transition: all var(--t);
  display: grid; grid-template-columns: 80px 1fr 240px; gap: 20px; align-items: start;
}
.med-detail-card:hover { border-color: var(--c-ink); box-shadow: 0 4px 20px rgba(0,0,0,0.04); }
.med-avatar-lg {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-paper-2), var(--c-line));
  border: 1px solid var(--c-line);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-ink-3); font-family: var(--f-display);
  font-size: 28px; font-weight: 700; flex-shrink: 0;
}

/* ─── Artículo ──────────────────────────────────────────────────── */
.articulo { max-width: 760px; margin: 0 auto; }
.articulo h1 {
  font-family: var(--f-display); font-size: 36px; font-weight: 700;
  color: var(--c-ink); letter-spacing: -1px; line-height: 1.15; margin-bottom: 14px;
}
.articulo-cuerpo { font-size: 16px; color: var(--c-ink); line-height: 1.75; }
.articulo-cuerpo h2 {
  font-family: var(--f-display); font-size: 22px; color: var(--c-ink);
  margin-top: 32px; margin-bottom: 12px; font-weight: 700;
}
.articulo-cuerpo p { margin-bottom: 16px; }
.articulo-cuerpo strong { color: var(--c-ink); font-weight: 700; }
.articulo-cuerpo a { color: var(--c-accent); text-decoration: underline; text-underline-offset: 2px; }

/* ─── Estado vacío ──────────────────────────────────────────────── */
.no-slots, .empty { text-align: center; padding: 40px 20px; color: var(--c-ink-4); }

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav { display: none; }
  .about-layout, .blog-grid, .valores-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .med-hero, .med-detail-card { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .section { padding: 60px 0; }
  .hero { min-height: 70vh; }
  .esp-grid { grid-template-columns: 1fr 1fr; }
  .med-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--c-line); }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .progress-steps { flex-direction: column; }
}

/* ═══ RESERVA DINÁMICA PROGRESIVA (Cascading UI) ═══════════════════ */
#reserva-dinamica { font-family: 'Inter', sans-serif; color: #263238; }
.rd-loading, .rd-vacio { text-align: center; padding: 32px; color: #78909C; font-size: 14px; }
.rd-vacio a { display: inline-block; margin-top: 16px; padding: 10px 20px; background: #2E7D32; color: white; text-decoration: none; border-radius: 4px; font-weight: 600; font-size: 14px; }
.rd-error, .rd-err { color: #C62828; font-size: 13px; padding: 10px; background: rgba(198,40,40,0.05); border-radius: 4px; margin: 8px 0; }

/* Pasos indicadores */
.rd-pasos { display: flex; gap: 6px; margin-bottom: 20px; }
.rd-paso {
  flex: 1; height: 6px; border-radius: 3px; background: #ECEFF1; transition: all 0.3s;
}
.rd-paso.activo { background: #C62828; }
.rd-paso.done { background: #2E7D32; }

/* Títulos de paso */
.rd-titulo { font-size: 16px; font-weight: 700; color: #263238; margin-bottom: 12px; font-family: 'Playfair Display', serif; }

/* Paso 1: Días */
.rd-dias { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 16px; }
.rd-dia {
  flex-shrink: 0; min-width: 72px; padding: 10px 6px;
  background: #F5F0E8; border: 1.5px solid #ECEFF1; border-radius: 10px;
  cursor: pointer; text-align: center; font-family: inherit; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 2px; color: #263238;
}
.rd-dia:hover { border-color: #C62828; transform: translateY(-2px); }
.rd-dia.seleccionado { background: #C62828; border-color: #C62828; color: white; box-shadow: 0 4px 12px rgba(198,40,40,0.25); }
.rd-dia-nom { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.7; }
.rd-dia-num { font-size: 22px; font-weight: 700; line-height: 1; font-family: 'Playfair Display', serif; }
.rd-dia-mes { font-size: 10px; opacity: 0.7; text-transform: uppercase; }
.rd-dia-cant { font-size: 9px; opacity: 0.5; margin-top: 2px; }

/* Paso 2: Horas */
.rd-fecha-info { font-size: 13px; font-weight: 600; color: #263238; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid #ECEFF1; }
.rd-relativo { font-weight: 400; color: #C62828; font-size: 11px; margin-left: 6px; }
.rd-horas { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.rd-hora {
  padding: 12px 6px; background: #F5F0E8; border: 1.5px solid #ECEFF1;
  border-radius: 8px; cursor: pointer; text-align: center;
  font-size: 15px; font-family: 'JetBrains Mono', monospace; font-weight: 600;
  color: #263238; transition: all 0.2s;
}
.rd-hora:hover { border-color: #C62828; }
.rd-hora.seleccionado { background: #C62828; border-color: #C62828; color: white; transform: scale(1.05); }

/* Paso 3: Cobertura */
.rd-cobertura { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.rd-cob-btn {
  padding: 16px; background: #F5F0E8; border: 2px solid #ECEFF1; border-radius: 8px;
  cursor: pointer; text-align: center; font-family: inherit; transition: all 0.2s;
}
.rd-cob-btn:hover { border-color: #C62828; }
.rd-cob-btn.seleccionado { border-color: #C62828; background: rgba(198,40,40,0.05); }
.rd-cob-titulo { font-size: 15px; font-weight: 600; color: #263238; margin-bottom: 4px; }
.rd-cob-precio { font-size: 13px; color: #78909C; }
.rd-os-select-wrap { margin: 8px 0 12px; }
.rd-os-select {
  width: 100%; padding: 12px; border: 1.5px solid #ECEFF1; border-radius: 6px;
  font-size: 14px; font-family: inherit; background: white; color: #263238;
}
.rd-os-select:focus { outline: none; border-color: #C62828; }
.rd-copago-box {
  padding: 12px 16px; background: rgba(46,125,50,0.08); border: 1px solid #2E7D32;
  border-radius: 6px; font-size: 14px; color: #2E7D32; margin-bottom: 12px;
}
.rd-copago-error { background: rgba(198,40,40,0.05); border-color: #C62828; color: #C62828; }
.rd-copago-loading, .rd-os-loading { font-size: 13px; color: #78909C; padding: 8px 0; }

/* Paso 4: Formulario */
.rd-form { display: grid; gap: 12px; }
.rd-field { display: flex; flex-direction: column; gap: 4px; }
.rd-field label { font-size: 12px; font-weight: 600; color: #263238; }
.rd-req { color: #C62828; }
.rd-field input {
  padding: 12px 14px; border: 1.5px solid #ECEFF1; border-radius: 6px;
  font-size: 15px; font-family: inherit; color: #263238; background: white;
}
.rd-field input:focus { outline: none; border-color: #C62828; }
.rd-paciente-found { font-size: 12px; color: #2E7D32; padding: 6px 0; }
.rd-paciente-new { font-size: 12px; color: #78909C; padding: 6px 0; font-style: italic; }

/* Botones */
.rd-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.rd-btn-primary {
  padding: 14px 28px; background: #C62828; color: white; border: none;
  border-radius: 6px; font-size: 15px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all 0.2s; text-decoration: none; display: inline-block;
}
.rd-btn-primary:hover { background: #B71C1C; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(198,40,40,0.3); }
.rd-btn-primary:disabled { background: #BDBDBD; cursor: not-allowed; transform: none; box-shadow: none; }
.rd-btn-ghost {
  padding: 14px 20px; background: transparent; color: #546E7A; border: 1.5px solid #ECEFF1;
  border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all 0.2s; text-decoration: none; display: inline-block;
}
.rd-btn-ghost:hover { border-color: #263238; color: #263238; }

/* Pantalla de éxito */
.rd-exito { text-align: center; padding: 32px 16px; }
.rd-exito-icon {
  width: 64px; height: 64px; background: #2E7D32; color: white;
  border-radius: 50%; font-size: 32px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px; animation: rd-pop 0.5s ease;
}
@keyframes rd-pop { 0% { transform: scale(0); } 70% { transform: scale(1.1); } 100% { transform: scale(1); } }
.rd-exito h2 { font-family: 'Playfair Display', serif; font-size: 24px; color: #263238; margin: 0 0 8px; }
.rd-exito p { font-size: 16px; color: #455A64; margin: 0 0 4px; }
.rd-exito-fecha { font-size: 14px; color: #C62828; font-weight: 600; margin: 8px 0; }
.rd-exito-turno { font-size: 12px; color: #78909C; font-family: monospace; margin-bottom: 20px; }
.rd-exito-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.rd-exito-info { font-size: 12px; color: #78909C; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #ECEFF1; }

/* Mobile */
@media (max-width: 640px) {
  .rd-cobertura { grid-template-columns: 1fr; }
  .rd-horas { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
  .rd-actions { flex-direction: column; }
  .rd-btn-primary, .rd-btn-ghost { width: 100%; text-align: center; }
}
