:root {
  /* Paleta Institucional: Dental Solutions R&M (Clínica Odontológica Especializada) */
  --ink: #07192b;
  --ink-medium: #1e3a56;
  --ink-soft: #4a6580;
  --ink-muted: #7691ab;

  /* Azul Clínico & Cerúleo Institucional */
  --brand-navy: #06213d;
  --brand-deep: #07477a;
  --brand-dark: #0369a1;
  --brand: #0284c7;
  --brand-bright: #0ea5e9;
  --brand-light: #38bdf8;
  --brand-tint: #e0f2fe;
  --brand-soft: #f0f9ff;

  /* Turquesa / Salud Dental & Frescura */
  --teal-dark: #0f766e;
  --teal: #0d9488;
  --teal-light: #14b8a6;
  --teal-tint: #ccfbf1;

  /* Esmeralda / Éxito Clínico */
  --mint-dark: #047857;
  --mint: #10b981;
  --mint-tint: #d1fae5;

  /* Ámbar / Excelencia & Pendientes */
  --amber: #d97706;
  --amber-bright: #f59e0b;
  --amber-tint: #fef3c7;

  /* Coral / Alertas */
  --rose: #e11d48;
  --rose-tint: #ffe4e6;

  /* Superficies y Bordes */
  --porcelain: #eef6fc;
  --surface: #ffffff;
  --surface-subtle: #f7fbff;
  --line: #cde0ef;
  --line-soft: #e1eef8;
  --white: #ffffff;

  /* Tipografía */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Sombras Multicapa */
  --card-shadow: 0 12px 32px -6px rgba(7, 25, 43, 0.06), 0 4px 12px -2px rgba(2, 132, 199, 0.05);
  --card-shadow-hover: 0 22px 44px -10px rgba(2, 132, 199, 0.16), 0 8px 20px -4px rgba(7, 25, 43, 0.07);
  --glow-brand: 0 0 25px rgba(14, 165, 233, 0.28);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

/* ---------- Animaciones Clave ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(1.5deg); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(8px); }
}

@keyframes shimmerRail {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(31, 168, 85, 0.55);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(31, 168, 85, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(31, 168, 85, 0);
  }
}

@keyframes pulseNode {
  0% {
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(2, 132, 199, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0);
  }
}

@keyframes toothShine {
  0%, 100% { filter: drop-shadow(0 2px 6px rgba(14, 165, 233, 0.25)); transform: scale(1); }
  50% { filter: drop-shadow(0 4px 12px rgba(20, 184, 166, 0.5)); transform: scale(1.05); }
}

/* Clases de animación al hacer scroll o cargar */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Base & Fondo Institucional ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: #f2f8fd;
  background-image:
    radial-gradient(at 8% 6%, rgba(224, 242, 254, 0.85) 0px, transparent 48%),
    radial-gradient(at 92% 14%, rgba(204, 251, 241, 0.65) 0px, transparent 45%),
    radial-gradient(at 85% 88%, rgba(224, 242, 254, 0.7) 0px, transparent 50%),
    linear-gradient(180deg, #f0f7fe 0%, #f7fbff 360px, #eef6fc 100%);
  background-attachment: fixed;
  min-height: 100vh;
  font-size: 1.02rem;
  line-height: 1.62;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.18;
  color: var(--ink);
}
h1 { font-size: clamp(2.05rem, 4.2vw, 3.25rem); }
h2 { font-size: clamp(1.55rem, 2.7vw, 2.15rem); }
h3 { font-size: 1.22rem; }

a { color: var(--brand); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--brand-deep); }
:focus-visible { outline: 3px solid var(--brand-bright); outline-offset: 2px; }

.text-soft { color: var(--ink-soft) !important; }
.text-ink { color: var(--ink) !important; }
.text-brand { color: var(--brand) !important; }
.text-brand-dark { color: var(--brand-dark) !important; }
.text-teal { color: var(--teal) !important; }
.text-mint { color: var(--mint-dark) !important; }
.text-amber { color: var(--amber) !important; }
.bg-brand-subtle { background-color: var(--brand-tint) !important; }
.bg-teal-subtle { background-color: var(--teal-tint) !important; }
.bg-mint-tint { background-color: var(--mint-tint) !important; }
.bg-amber-tint { background-color: var(--amber-tint) !important; }
.measure { max-width: 62ch; }

/* Etiqueta / Pill de sección */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--brand-tint) 0%, var(--teal-tint) 100%);
  color: var(--brand-deep);
  border: 1px solid rgba(2, 132, 199, 0.2);
  margin-bottom: 0.75rem;
}

/* ---------- Barra Superior Institucional (Topbar) ---------- */
.inst-topbar {
  background: linear-gradient(90deg, var(--brand-navy) 0%, #09355e 50%, #0b4f6c 100%);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.83rem;
  padding: 0.42rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.inst-topbar a {
  color: #7dd3fc;
  font-weight: 600;
}
.inst-topbar a:hover {
  color: #ffffff;
}
.inst-topbar .topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.inst-topbar .topbar-item i {
  color: #2dd4bf;
}

/* ---------- Navegación Principal ---------- */
.site-nav {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(205, 224, 239, 0.85);
  box-shadow: 0 4px 24px -4px rgba(6, 33, 61, 0.07);
  position: sticky;
  top: 0;
  z-index: 1020;
  padding: 0.65rem 0;
  transition: all 0.25s ease;
}
.site-nav .brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  transition: transform 0.2s ease;
}
.site-nav .brand:hover {
  transform: translateY(-1px);
}
.brand-emblem {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--teal) 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(2, 132, 199, 0.3);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.brand-emblem svg {
  width: 22px;
  height: 22px;
  animation: toothShine 4s ease-in-out infinite;
}
.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand-title span {
  background: linear-gradient(135deg, var(--brand) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-subtitle {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-top: 2px;
}

.site-nav .nav-link {
  color: var(--ink-medium);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
  transition: all 0.2s ease;
  position: relative;
}
.site-nav .nav-link:hover {
  color: var(--brand-dark);
  background: var(--brand-tint);
  transform: translateY(-1px);
}
.site-nav .nav-link.active {
  color: var(--brand-dark);
  background: linear-gradient(135deg, var(--brand-tint) 0%, var(--teal-tint) 100%);
  font-weight: 700;
}

/* ---------- Botones ---------- */
.btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 0.62rem 1.25rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.btn-brand {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 55%, var(--teal-dark) 100%);
  background-size: 160% 160%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  box-shadow: 0 6px 18px -2px rgba(2, 132, 199, 0.38);
}
.btn-brand:hover, .btn-brand:focus {
  background-position: 100% 50%;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -3px rgba(2, 132, 199, 0.5);
}
.btn-brand:active {
  transform: translateY(0);
}
.btn-outline-brand {
  border: 1.5px solid var(--brand);
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.06);
}
.btn-outline-brand:hover, .btn-outline-brand:focus {
  background: var(--brand-tint);
  color: var(--brand-deep);
  border-color: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.15);
}
.btn-quiet {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.btn-quiet:hover {
  background: var(--porcelain);
  color: var(--ink);
  border-color: #a9cbe4;
  transform: translateY(-1px);
}
.btn-sm { padding: 0.4rem 0.88rem; font-size: 0.88rem; border-radius: 9px; }
.btn-lg { padding: 0.78rem 1.55rem; font-size: 1.05rem; border-radius: 14px; }

/* ---------- Bloques y Paneles ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  position: relative;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.panel:hover {
  box-shadow: 0 16px 36px -8px rgba(7, 25, 43, 0.09), 0 4px 12px -2px rgba(2, 132, 199, 0.06);
}
.panel + .panel { margin-top: 1.35rem; }

.section { padding: 5rem 0; position: relative; }
.section-alt {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.page {
  padding: 2.4rem 0 4.5rem;
  animation: fadeIn 0.4s ease-out;
}
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 2rem;
  padding: 1.5rem 1.8rem;
  background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 65%, #e6faf6 100%);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
}
.page-head p { margin: 0.25rem 0 0; color: var(--ink-soft); }

.crumb {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-dark);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.85rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}
.crumb:hover {
  color: var(--brand-deep);
  background: var(--brand-tint);
  border-color: var(--brand-light);
  transform: translateX(-3px);
}

/* ---------- Estados Clínicos ---------- */
.estado {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.82rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.estado::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.estado-pendiente {
  background: var(--amber-tint);
  color: #92400e;
  border: 1px solid #fcd34d;
}
.estado-pendiente::before { background: #f59e0b; }

.estado-confirmada, .estado-en_curso {
  background: var(--brand-tint);
  color: #075985;
  border: 1px solid #7dd3fc;
}
.estado-confirmada::before, .estado-en_curso::before { background: #0284c7; }

.estado-atendida, .estado-finalizado {
  background: var(--mint-tint);
  color: #065f46;
  border: 1px solid #6ee7b7;
}
.estado-atendida::before, .estado-finalizado::before { background: #10b981; }

.estado-cancelada, .estado-cancelado {
  background: var(--rose-tint);
  color: #9f1239;
  border: 1px solid #fda4af;
}
.estado-cancelada::before, .estado-cancelado::before { background: #e11d48; }

/* ---------- Barra de Progreso Animada ---------- */
.rail {
  height: 10px;
  border-radius: 999px;
  background: #dcebf7;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(7, 25, 43, 0.08);
}
.rail > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--teal) 50%, var(--mint) 100%);
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  animation: shimmerRail 4.5s linear infinite;
}
.rail-lg { height: 14px; }

/* ---------- Línea de Tiempo (Timeline) ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0 0.25rem 1.85rem;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 0.6rem;
  bottom: 0.6rem;
  width: 2.5px;
  background: linear-gradient(180deg, var(--brand) 0%, var(--teal) 70%, var(--line) 100%);
  border-radius: 999px;
}
.timeline li {
  position: relative;
  padding-bottom: 1.5rem;
  transition: transform 0.2s ease;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -1.8rem;
  top: 0.28rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--mint);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2.5px var(--mint);
  transition: transform 0.2s ease;
}
.timeline li:hover::before {
  transform: scale(1.18);
}
.timeline li.next::before {
  background: var(--white);
  box-shadow: 0 0 0 2.5px var(--brand);
  border-color: var(--brand);
  animation: pulseNode 2.2s infinite;
}
.timeline li.start::before {
  background: var(--brand);
  box-shadow: 0 0 0 2.5px var(--brand);
}
.timeline .when { font-size: 0.88rem; color: var(--ink-soft); }
.timeline .what { font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.timeline img.foto {
  margin-top: 0.65rem;
  width: 170px;
  height: 125px;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid var(--white);
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.timeline img.foto:hover {
  transform: scale(1.04);
  box-shadow: var(--card-shadow-hover);
}

/* ---------- Tarjetas de Tratamiento (Portal y Admin) ---------- */
.tcard {
  display: block;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.45rem;
  height: 100%;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.28s ease, box-shadow 0.28s ease;
}
.tcard::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--teal) 50%, var(--mint) 100%);
  opacity: 0.85;
  transition: height 0.25s ease, opacity 0.25s ease;
}
.tcard:hover {
  transform: translateY(-5px);
  border-color: var(--brand-light);
  box-shadow: var(--card-shadow-hover);
  color: inherit;
}
.tcard:hover::before {
  height: 6px;
  opacity: 1;
}
.tcard h3 { margin: 0 0 0.25rem; color: var(--ink); font-size: 1.18rem; }
.tcard .meta { color: var(--ink-soft); font-size: 0.92rem; }

/* ---------- Hero Institucional ---------- */
.hero {
  padding: 5.2rem 0 4.8rem;
  background:
    radial-gradient(circle at 18% 22%, rgba(56, 189, 248, 0.22) 0%, transparent 42%),
    radial-gradient(circle at 85% 75%, rgba(20, 184, 166, 0.25) 0%, transparent 45%),
    linear-gradient(132deg, #041527 0%, #072f54 42%, #055880 78%, #0c7c7b 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 70%);
  pointer-events: none;
  animation: floatSlow 9s ease-in-out infinite;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -140px;
  left: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.16) 0%, transparent 70%);
  pointer-events: none;
  animation: floatReverse 11s ease-in-out infinite;
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  color: #f0f9ff;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  animation: fadeUp 0.6s ease-out;
}
.hero h1 {
  color: #ffffff;
  font-size: clamp(2.2rem, 4.5vw, 3.45rem);
  line-height: 1.12;
  animation: fadeUp 0.7s ease-out;
}
.hero h1 .hero-highlight {
  background: linear-gradient(90deg, #7dd3fc 0%, #5eead4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  color: #d9effc;
  font-size: 1.16rem;
  margin: 1.15rem 0 1.9rem;
  animation: fadeUp 0.8s ease-out;
}
.hero .btn-brand {
  background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
  color: var(--brand-navy);
  border-color: #ffffff;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
}
.hero .btn-brand:hover {
  background: #ffffff;
  color: var(--brand-dark);
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(56, 189, 248, 0.35);
}
.hero .btn-outline-brand {
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}
.hero .btn-outline-brand:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #ffffff;
  color: #ffffff;
}

/* Pilares de confianza en el Hero */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 2.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  animation: fadeUp 0.95s ease-out;
}
.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: #e0f2fe;
}
.hero-trust-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #5eead4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

/* Tarjeta Demo Flotante en el Hero */
.hero .demo {
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 1.9rem;
  box-shadow: 0 28px 60px -12px rgba(3, 18, 36, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2);
  position: relative;
  animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1), floatSlow 8s ease-in-out 1s infinite;
}
.demo-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  background: var(--mint-tint);
  color: var(--mint-dark);
  font-size: 0.78rem;
  font-weight: 700;
}
.demo .mini {
  font-size: 0.84rem;
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.precio {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--brand-deep);
}

/* ---------- Servicios / Especialidades con Foto ---------- */
.svc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--card-shadow);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.32s ease, border-color 0.32s ease;
  position: relative;
}
.svc:hover {
  transform: translateY(-7px);
  border-color: var(--brand-light);
  box-shadow: var(--card-shadow-hover);
}
.svc-img-wrap {
  position: relative;
  overflow: hidden;
  height: 195px;
  background: var(--porcelain);
}
.svc-img {
  width: 100%;
  height: 195px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid var(--line-soft);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.svc:hover .svc-img {
  transform: scale(1.07);
}
.svc-price-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(6, 33, 61, 0.86);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.svc-body {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.svc-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-tint) 0%, var(--teal-tint) 100%);
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.svc:hover .svc-icon-box {
  background: linear-gradient(135deg, var(--brand) 0%, var(--teal) 100%);
  color: #ffffff;
  transform: rotate(-6deg) scale(1.06);
}
.svc-body p {
  flex: 1;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  font-size: 0.97rem;
}
.svc .bi { font-size: 1.25rem; vertical-align: -2px; color: var(--brand); }
.svc:hover .svc-icon-box .bi { color: #ffffff; }
.svc h3 { margin: 0 0 0.45rem; font-size: 1.18rem; color: var(--ink); }

/* ---------- Pasos ("Cómo funciona") ---------- */
.steps { padding-left: 1.3rem; font-size: 1.05rem; }
.steps li { margin-bottom: 0.8rem; color: var(--ink); }

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.step-card + .step-card { margin-top: 0.85rem; }
.step-card:hover {
  transform: translateX(5px);
  border-color: var(--brand-light);
}
.step-num {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--teal) 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* ---------- Tarjeta Institucional del Doctor ---------- */
.doctor-card {
  background: linear-gradient(145deg, #ffffff 0%, #f0f8ff 60%, #e6faf5 100%);
  border: 1.5px solid var(--line);
  border-radius: 22px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}
.doctor-avatar {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand) 60%, var(--teal) 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  box-shadow: 0 10px 24px rgba(2, 132, 199, 0.28);
  flex-shrink: 0;
}

/* ---------- Formularios & Tarjetas de Autenticación ---------- */
.form-label { font-weight: 600; font-size: 0.94rem; color: var(--ink); }
.form-control, .form-select {
  border-radius: 11px;
  border: 1.5px solid var(--line);
  padding: 0.65rem 0.95rem;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus, .form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 0.25rem rgba(2, 132, 199, 0.18);
}
.input-group-text {
  border-radius: 11px;
  border: 1.5px solid var(--line);
  background-color: #f4f9fd;
  color: var(--brand-dark);
}
.auth-card {
  max-width: 490px;
  margin: 3.2rem auto;
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 22px 50px -10px rgba(7, 25, 43, 0.12);
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--teal) 50%, var(--mint) 100%);
}
.auth-icon-circle {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-tint) 0%, var(--teal-tint) 100%);
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.14);
}
.turno-opt .btn { width: 100%; }

/* ---------- Tablas Clínicas ---------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table thead th {
  font-weight: 700;
  color: var(--ink-soft);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background-color: #eef6fc;
  border-bottom: 2px solid var(--line);
  padding: 0.85rem 1rem;
}
.table td {
  vertical-align: middle;
  border-color: var(--line-soft);
  padding: 0.9rem 1rem;
  transition: background-color 0.15s ease;
}
.table tbody tr {
  transition: background-color 0.15s ease;
}
.table tbody tr:hover {
  background-color: rgba(224, 242, 254, 0.45);
}

/* Avatar de iniciales para pacientes */
.avatar-initials {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand-tint) 0%, var(--teal-tint) 100%);
  color: var(--brand-deep);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(2, 132, 199, 0.2);
}

/* ---------- Estadísticas del Doctor (KPI Cards) ---------- */
.stat {
  background: linear-gradient(135deg, #ffffff 0%, #f2f9ff 100%);
  border: 1.5px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 18px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}
.stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--brand-light);
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2.15rem;
  line-height: 1.05;
  color: var(--brand-deep);
}
.stat span {
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 600;
}
.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-tint) 0%, var(--teal-tint) 100%);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* ---------- Botones Interactivos de Horarios (Slots) ---------- */
.horario-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 26px -4px rgba(2, 132, 199, 0.1);
}
.slot-btn {
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.42rem 0.9rem;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.slot-btn.slot-disponible {
  background: #ecfbf6;
  border: 1.5px solid #10b981;
  color: #065f46;
  cursor: pointer;
}
.slot-btn.slot-disponible:hover {
  background: #10b981;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.32);
}
.slot-btn.slot-ocupado {
  background: #fee2e2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
  opacity: 0.72;
  cursor: not-allowed;
  text-decoration: line-through;
}
.slot-btn.slot-seleccionado {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  border: 1.5px solid var(--brand-deep);
  color: #ffffff !important;
  font-weight: 700;
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.42);
}
.slot-badge-legend {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-block;
}
.legend-disponible { background: #10b981; }
.legend-ocupado { background: #ef4444; }
.legend-seleccionado { background: var(--brand); }

/* ---------- Recetas Médicas ---------- */
.receta {
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  background: linear-gradient(180deg, #ffffff 0%, #fafdff 100%);
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.receta:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}
.receta + .receta { margin-top: 1rem; }
.receta pre {
  font-family: var(--font-body);
  white-space: pre-wrap;
  margin: 0.35rem 0 0;
  color: var(--ink);
  background: var(--surface-subtle);
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
}

/* ---------- Estados Vacíos ---------- */
.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 2.5rem 1.2rem;
}
.empty .bi {
  font-size: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 0.75rem;
}

/* ---------- Pie de Página (Footer Institucional) ---------- */
.site-footer {
  background: linear-gradient(160deg, #051628 0%, #08233e 60%, #07344b 100%);
  color: #cbd5e1;
  padding: 3.5rem 0 2rem;
  font-size: 0.95rem;
  border-top: 4px solid var(--brand);
  margin-top: auto;
}
.site-footer a { color: #7dd3fc; transition: color 0.2s ease; }
.site-footer a:hover { color: #ffffff; text-decoration: underline; }
.foot-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.foot-line { border-color: rgba(255, 255, 255, 0.14); margin: 2rem 0 1.25rem; }
.foot-list li { display: flex; gap: 0.75rem; margin-bottom: 0.65rem; align-items: flex-start; }
.foot-list .bi { color: #2dd4bf; margin-top: 0.15rem; font-size: 1.12rem; }
.foot-list.ink { color: var(--ink); }
.foot-list.ink .bi { color: var(--brand); }

/* ---------- Mapa ---------- */
.mapa {
  height: 100%;
  min-height: 340px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--porcelain);
  box-shadow: var(--card-shadow);
}
.mapa iframe { width: 100%; height: 100%; min-height: 340px; border: 0; display: block; }

/* ---------- Botón Flotante de WhatsApp con Pulso ---------- */
.wa-float {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 1030;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(135deg, #25d366 0%, #16a34a 100%);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(22, 163, 74, 0.38);
  animation: pulseRing 2.6s infinite;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.wa-float:hover {
  color: #ffffff;
  transform: translateY(-3px) scale(1.03);
  filter: brightness(1.06);
}
.wa-float .bi { font-size: 1.38rem; line-height: 1; }
@media (max-width: 575px) {
  .wa-float span { display: none; }
  .wa-float { padding: 0.9rem; }
}

/* ---------- Acordeón de FAQs ---------- */
.accordion {
  --bs-accordion-border-color: var(--line);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 0.2rem rgba(2, 132, 199, 0.18);
  --bs-accordion-active-bg: var(--brand-tint);
  --bs-accordion-active-color: var(--brand-deep);
  --bs-accordion-border-radius: 16px;
  --bs-accordion-inner-border-radius: 15px;
}
.accordion-item {
  border: 1px solid var(--line);
  border-radius: 16px !important;
  overflow: hidden;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 14px rgba(7, 25, 43, 0.04);
}
.accordion-button {
  font-weight: 700;
  font-size: 1.02rem;
  padding: 1.15rem 1.35rem;
}

/* ---------- Impresión de Recetas ---------- */
@media print {
  .site-nav, .inst-topbar, .site-footer, .wa-float, .no-print {
    display: none !important;
  }
  body { background: #ffffff !important; }
  .panel, .receta { box-shadow: none !important; border: 1px solid #cbd5e1 !important; }
}

@media (max-width: 575px) {
  .section { padding: 3.2rem 0; }
  .hero { padding: 3.2rem 0; }
  .panel { padding: 1.25rem; }
  .page-head { padding: 1.2rem; }
}
