/* ==========================================================
   Vera Salud – styles.css
   Brand palette:
   #005EE9  Primary blue
   #1E355E  Dark navy
   #8FD6E0  Light teal / cyan accent
   #F3F5F7  Light background
   #7088A9  Muted blue-gray
========================================================== */

/* ===== Reset & base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue:    #005EE9;
  --navy:    #1E355E;
  --teal:    #8FD6E0;
  --light:   #F3F5F7;
  --muted:   #7088A9;
  --white:   #ffffff;
  --text:    #0D1B2E;
  --text-2:  #4B607A;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl:32px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 6px 20px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.12), 0 6px 18px rgba(0,0,0,.06);
  --shadow-blue: 0 8px 24px rgba(0,94,233,.30);
  --shadow-navy: 0 8px 24px rgba(30,53,94,.30);

  --nav-h: 68px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; }
a { color: inherit; }
button { cursor: pointer; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.65rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.015em; }

.gradient-text {
  background: linear-gradient(130deg, #1E355E 0%, #3a6db5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.18s, border-color 0.18s, color 0.18s,
              transform 0.18s var(--ease-out), box-shadow 0.18s;
  white-space: nowrap;
  line-height: 1;
  position: relative;
}

.btn--primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn--primary:hover {
  background: #162843;
  border-color: #162843;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(30,53,94,.30);
}
.btn--primary:active { transform: translateY(0); }

.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: #C8D5E8;
}
.btn--outline:hover {
  border-color: var(--navy);
  color: var(--navy);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--light);
  color: var(--navy);
}

.btn--white {
  background: white;
  color: var(--blue);
  border-color: white;
}
.btn--white:hover {
  background: rgba(255,255,255,.9);
  transform: translateY(-1px);
}

.btn--lg   { padding: 13px 26px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn--sm   { padding: 7px 14px; font-size: 0.84rem; border-radius: var(--radius-sm); }
.btn--full { width: 100%; }

/* ===== Section headers ===== */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  background: rgba(30,53,94,.07);
  color: var(--navy);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.features .section-header {
  max-width: 900px;
}

.wf-section .section-header {
  max-width: 900px;
}

.section-header p {
  margin-top: 14px;
  font-size: 1.05rem;
  color: var(--text-2);
  line-height: 1.75;
}

section { padding: 96px 0; }

/* ===== Reveal animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================
   NAVBAR — Floating pill
========================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 20px 0;
  pointer-events: none; /* el área vacía no bloquea clics */
}

.navbar__pill {
  max-width: 1160px;
  margin: 0 auto;
  background: rgba(10, 18, 38, 0.82);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.28), 0 1px 0 rgba(255,255,255,.05) inset;
  pointer-events: all;
  transition: background 0.3s, box-shadow 0.3s;
}

.navbar.scrolled .navbar__pill {
  background: rgba(10, 18, 38, 0.96);
  box-shadow: 0 12px 40px rgba(0,0,0,.38), 0 1px 0 rgba(255,255,255,.06) inset;
}

.navbar__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--nav-h);
  padding: 0 20px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  margin-right: 16px;
}

/* Logo imagen real */
.logo-img {
  height: 30px;
  width: auto;
  display: block;
  flex-shrink: 0;
  filter: brightness(0) invert(1); /* blanco sobre fondo oscuro */
}

/* Footer: logo sobre fondo oscuro */
.logo-img--footer {
  height: 28px;
  filter: brightness(0) invert(1);
  opacity: .85;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--blue) 0%, #003fa0 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,94,233,.35);
}
.logo-mark--sm { width: 24px; height: 24px; font-size: 0.78rem; border-radius: 6px; }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 2px;
  justify-content: center;
}

.navbar__links a {
  text-decoration: none;
  color: rgba(255,255,255,.65);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.navbar__links a:hover {
  color: white;
  background: rgba(255,255,255,.08);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

/* Botones específicos del navbar flotante */
.btn--nav-ghost {
  background: transparent;
  color: rgba(255,255,255,.72);
  border: 1.5px solid transparent;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s, background 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.btn--nav-ghost:hover {
  color: white;
  background: rgba(255,255,255,.08);
}

.btn--nav-primary {
  background: white;
  color: var(--navy);
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, transform 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.btn--nav-primary:hover {
  background: rgba(255,255,255,.9);
  transform: translateY(-1px);
}

.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
  margin-left: auto;
  cursor: pointer;
}
.navbar__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transition: all 0.28s var(--ease-out);
}
.navbar__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  padding: 8px 20px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.mobile-menu.open { display: block; }

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
}
.mobile-menu nav a {
  text-decoration: none;
  color: rgba(255,255,255,.72);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.mobile-menu nav a:hover {
  background: rgba(255,255,255,.07);
  color: white;
}

.mobile-menu__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mobile-menu__actions .btn--nav-ghost,
.mobile-menu__actions .btn--outline {
  color: white;
  border-color: rgba(255,255,255,.35);
}

/* ==========================================================
   HERO
========================================================== */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 0;
  background: #ffffff;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 70% 0%, rgba(30,53,94,.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
  padding-bottom: 64px;
}

/* --- Hero Content --- */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 10px;
  background: rgba(30,53,94,.06);
  border: 1px solid rgba(30,53,94,.14);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 20px;
}

.badge-dot {
  width: 7px;
  height: 7px;
  background: var(--navy);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.4); }
}

.hero__title {
  color: var(--navy);
  margin-bottom: 18px;
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 490px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

.hero--dark .hero__actions {
  flex-wrap: nowrap;
  margin-bottom: 44px;
}

/* Stats */
.hero__stats {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; }

.stat__figure {
  display: flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
}

.stat__number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat__suffix {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.stat__label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 5px;
}

.stat__divider {
  width: 1px;
  height: 38px;
  background: #D0DCEC;
  flex-shrink: 0;
}

/* --- Dashboard Mockup --- */
.hero__visual { position: relative; padding-bottom: 20px; }

.dashboard-mockup {
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,.06);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #F0F4FA;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.mockup-dots { display: flex; gap: 5px; }
.mockup-dots span {
  width: 10px; height: 10px; border-radius: 50%;
}
.mockup-dots span:nth-child(1) { background: #FF5F57; }
.mockup-dots span:nth-child(2) { background: #FEBC2E; }
.mockup-dots span:nth-child(3) { background: #28C840; }

.mockup-title {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

.mockup-body {
  display: flex;
  height: 360px;
}

.mockup-sidebar {
  width: 110px;
  background: var(--navy);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

.sidebar-logo {
  margin-bottom: 14px;
  padding: 2px 6px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 7px;
  color: rgba(255,255,255,.45);
  font-size: 0.7rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  cursor: default;
}
.sidebar-item svg { width: 13px; height: 13px; flex-shrink: 0; }
.sidebar-item.active {
  background: rgba(255,255,255,.12);
  color: white;
}

.mockup-main {
  flex: 1;
  padding: 12px 14px;
  background: #F7F9FC;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mockup-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mockup-greeting {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--navy);
}

.mockup-date {
  font-size: 0.6rem;
  color: var(--muted);
  margin-top: 1px;
}

.mockup-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  flex-shrink: 0;
}

.mockup-stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 7px;
}

.mockup-card {
  border-radius: 9px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card--blue  { background: var(--navy); color: white; }
.card--teal  { background: var(--blue); color: white; }
.card--light { background: white; border: 1px solid rgba(0,0,0,.06); color: var(--navy); }

.card-label  { font-size: 0.58rem; font-weight: 600; opacity: .7; text-transform: uppercase; letter-spacing: .04em; }
.card-value  { font-size: 1.4rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.card-change { font-size: 0.58rem; opacity: .7; }
.card-change--up { color: rgba(255,255,255,.9); opacity: 1; }
.card--light .card-change--up { color: var(--blue); }

/* Calendar in mockup */
.mockup-calendar {
  background: white;
  border-radius: 9px;
  padding: 9px 10px;
  border: 1px solid rgba(0,0,0,.06);
  flex: 1;
  overflow: hidden;
}

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cal-header span:first-child {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--navy);
}

.cal-view-toggle {
  font-size: 0.58rem;
  color: var(--muted);
}
.cal-view-toggle strong { color: var(--blue); }

.cal-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.cal-time {
  font-size: 0.58rem;
  color: var(--muted);
  font-weight: 600;
  width: 28px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.cal-bar {
  flex: 1;
  height: 20px;
  border-radius: 5px;
  font-size: 0.57rem;
  padding: 0 7px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-bar--1 { background: var(--blue); }
.cal-bar--2 { background: rgba(0,94,233,.55); }
.cal-bar--3 { background: rgba(30,53,94,.45); }

.cal-status {
  font-size: 0.6rem;
  flex-shrink: 0;
}
.cal-status--confirmed { color: #22c55e; }
.cal-status--pending   { color: var(--muted); }

/* Floating cards */
.floating-card {
  position: absolute;
  background: white;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
  min-width: 190px;
}

.floating-card--1 {
  left: -20px;
  bottom: 80px;
  animation: float-card 3.5s ease-in-out infinite;
}
.floating-card--2 {
  right: -16px;
  top: 54px;
  animation: float-card 3.5s ease-in-out 1.6s infinite;
}

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

.fc-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.fc-icon--green { background: rgba(0,94,233,.09); }
.fc-icon--blue  { background: rgba(0,94,233,.09); }

.fc-title { font-size: 0.78rem; font-weight: 700; color: var(--navy); }
.fc-sub   { font-size: 0.68rem; color: var(--muted); margin-top: 2px; }

/* Social proof bar */
.hero__social-proof {
  background: var(--white);
  border-top: 1px solid #E8EEF6;
  padding: 18px 0;
}

.hero__social-proof .container {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.social-proof__text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.social-proof__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.social-proof__badges span {
  padding: 4px 12px;
  background: var(--light);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-2);
}

/* ==========================================================
   FEATURES / FUNCIONALIDADES
========================================================== */
.features { background: #F7F9FC; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  border: 1.5px solid rgba(0,0,0,.05);
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s, border-color 0.22s;
  position: relative;
  overflow: hidden;
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(30,53,94,.16);
}

.feature-card--large { grid-column: span 2; }

.feature-card--dark {
  background: var(--navy);
}
.feature-card--dark h3 { color: white; }
.feature-card--dark p  { color: rgba(255,255,255,.62); }

.feature-card--accent {
  background: var(--light);
  border-color: rgba(0,0,0,.04);
}

.feature-icon {
  width: 46px; height: 46px;
  border-radius: 11px;
  background: rgba(30,53,94,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.feature-icon svg { width: 20px; height: 20px; stroke: var(--navy); }

/* Todos los variantes unifican al navy principal */
.feature-icon--teal,
.feature-icon--green,
.feature-icon--purple,
.feature-icon--orange,
.feature-icon--rose,
.feature-icon--navy   { background: rgba(30,53,94,.07); }
.feature-icon--teal svg,
.feature-icon--green svg,
.feature-icon--purple svg,
.feature-icon--orange svg,
.feature-icon--rose svg,
.feature-icon--navy svg { stroke: var(--navy); }

.feature-icon--light { background: rgba(255,255,255,.12); }
.feature-icon--light svg { stroke: white; }

.feature-card h3 {
  color: var(--navy);
  margin-bottom: 8px;
  font-size: 1.05rem;
}
.feature-card p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 16px;
}
.feature-tags span {
  padding: 3px 10px;
  background: var(--light);
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-2);
}

.feature-badge {
  position: absolute;
  top: 18px; right: 18px;
  padding: 4px 10px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  letter-spacing: .03em;
}

/* ==========================================================
   AREAS / ESPECIALIDADES
========================================================== */
.areas { background: var(--white); }

.areas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.area-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 22px 24px;
  text-align: center;
  border: 1.5px solid #e9eef5;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s, border-color 0.22s;
}
.area-card:hover {
  border-color: var(--blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.area-icon-box {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}

.area-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
.area-card p {
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.55;
}

/* CTA card */
.area-card--cta {
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.area-card--cta:hover {
  background: #162843;
  border-color: transparent;
  transform: translateY(-5px);
  box-shadow: 0 8px 28px rgba(30,53,94,.30);
}
.area-card--cta h3,
.area-card--cta p { color: white; }
.area-card--cta p  { opacity: .8; }

.area-icon-cta {
  width: 46px; height: 46px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  margin: 0 auto 10px;
}

/* ==========================================================
   PRICING / PRECIOS
========================================================== */
.pricing { background: #F7F9FC; }
.pricing .container { max-width: 1440px; }

/* .pricing-grid ya no se usa — reemplazado por .pricing-group__cards */

.pricing-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 34px 26px;
  border: 2px solid rgba(0,0,0,.06);
  position: relative;
  transition: box-shadow 0.22s;
}
.pricing-card:hover { box-shadow: var(--shadow-lg); }

.pricing-card--featured {
  background: var(--navy);
  border-color: var(--navy);
  transform: scale(1.02);
  box-shadow: var(--shadow-navy);
}
.pricing-card--featured:hover { box-shadow: 0 28px 70px rgba(30,53,94,.25); }

.featured-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: white;
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,94,233,.4);
}

.plan-header { margin-bottom: 20px; }

.plan-header h3 {
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 3px;
}
.pricing-card--featured .plan-header h3 { color: white; }

.plan-header p {
  font-size: 0.85rem;
  color: var(--muted);
}
.pricing-card--featured .plan-header p { color: rgba(255,255,255,.55); }

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 22px;
}

.plan-price--custom { align-items: center; }

.price-currency {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
}
.pricing-card--featured .price-currency { color: white; }

.price-amount {
  font-size: 3rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.04em;
  line-height: 1;
}
.pricing-card--featured .price-amount { color: white; }

.price-period {
  font-size: 0.875rem;
  color: var(--muted);
  font-weight: 500;
}
.pricing-card--featured .price-period { color: rgba(255,255,255,.5); }

.price-custom {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.plan-features {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.plan-features li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.875rem;
  color: var(--text-2);
}
.pricing-card--featured .plan-features li { color: rgba(255,255,255,.78); }

.plan-features li svg {
  width: 15px; height: 15px;
  stroke: var(--blue);
  flex-shrink: 0;
}
.pricing-card--featured .plan-features li svg { stroke: rgba(255,255,255,.7); }

/* Featured card outline button override */
.pricing-card--featured .btn--outline {
  border-color: rgba(255,255,255,.25);
  color: white;
}
.pricing-card--featured .btn--outline:hover {
  background: rgba(255,255,255,.1);
  border-color: white;
}

.pricing-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 32px;
}

/* ── Pricing groups ─────────────────────────────────────── */
.pricing-group {
  margin-bottom: 40px;
}
.pricing-group--clinics { margin-bottom: 0; }

.pricing-group__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--navy);
  background: white;
  border: 1.5px solid #D0DCEC;
  border-radius: 100px;
  padding: 6px 16px 6px 12px;
  margin-bottom: 18px;
}
.pricing-group__label svg { width: 14px; height: 14px; stroke: var(--blue); }

.pricing-group--clinics .pricing-group__label {
  border-color: rgba(143,214,224,.5);
  background: rgba(143,214,224,.08);
  color: #0d7a8a;
}
.pricing-group--clinics .pricing-group__label svg { stroke: #0891b2; }

.pricing-group__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

/* ── Plan section labels ────────────────────────────────── */
.plan-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--navy);
  margin: 18px 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.plan-section-label::before {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(0,94,233,.12);
  display: none;
}
.plan-section-label--no   { color: var(--muted); }
.plan-section-label--featured { color: rgba(255,255,255,.55); }
.plan-section-label--featured-no { color: rgba(255,255,255,.35); }

/* ── Feature items: check vs. X ─────────────────────────── */
.icon-check {
  width: 15px; height: 15px;
  stroke: var(--navy);
  flex-shrink: 0;
}

.icon-x {
  width: 13px; height: 13px;
  stroke: #C0CCDA;
  flex-shrink: 0;
}

.plan-features--no li {
  color: #A8B8CC;
  font-size: 0.84rem;
}

.plan-features--no-featured li {
  color: rgba(255,255,255,.28);
}
.plan-features--no-featured .icon-x { stroke: rgba(255,255,255,.2); }

.plan-feature--limit {
  font-size: 0.84rem;
  color: var(--text-2);
  font-weight: 500;
}
.plan-feature--limit .icon-check { stroke: var(--teal); }

/* ── Dark alt card (Clínica Personalizado) ─────────────── */
.pricing-card--dark-alt {
  background: var(--navy);
  border-color: var(--navy);
}
.pricing-card--dark-alt .plan-header h3 { color: white; }
.pricing-card--dark-alt .plan-header p  { color: rgba(255,255,255,.55); }
.pricing-card--dark-alt .price-custom   { color: white; }
.pricing-card--dark-alt .plan-features li { color: rgba(255,255,255,.82); }
.pricing-card--dark-alt .icon-check    { stroke: rgba(255,255,255,.7); }

.btn--outline-light {
  border-color: rgba(255,255,255,.25);
  color: white;
}
.btn--outline-light:hover {
  background: rgba(255,255,255,.1);
  border-color: white;
  color: white;
}

/* responsive */
@media (max-width: 960px) {
  .pricing-group__cards { grid-template-columns: 1fr; }
  .pricing-card--featured { transform: none; }
}
@media (max-width: 640px) {
  .pricing-group__cards { grid-template-columns: 1fr; }
}

/* ── pcard – new pricing card style ─────────────────────── */
.pcard {
  padding: 32px 28px 34px;
  display: flex;
  flex-direction: column;
}

.pcard-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.pcard-badge {
  background: rgba(0,94,233,.09);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 100px;
  letter-spacing: .02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.pcard-badge--featured {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,94,233,.45);
  font-size: 0.78rem;
  padding: 5px 13px;
}

.pcard-tier {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--blue);
  background: rgba(0,94,233,.08);
  padding: 3px 9px;
  border-radius: 100px;
  margin-bottom: 8px;
}
.pcard-tier--dark   { background: rgba(255,255,255,.12); color: rgba(255,255,255,.85); }
.pcard-tier--clinic { background: rgba(30,53,94,.08); color: var(--navy); }
.pcard-tier--custom { background: rgba(255,255,255,.12); color: rgba(255,255,255,.75); }

.pcard-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
}

.pcard-desc {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.45;
}

.pcard-original {
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-bottom: 3px;
  min-height: 1.2em;
}

.pcard-original--hidden {
  visibility: hidden;
}

.pcard-price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 22px;
}

.pcard-price--custom {
  align-items: center;
  margin-bottom: 22px;
}

.pcard-currency {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}

.pcard-amount {
  font-size: 3.2rem;
  font-weight: 900;
  color: var(--navy);
  letter-spacing: -0.04em;
  line-height: 1;
}

.pcard-period {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.pcard-custom-price {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.pcard-note {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 9px 0 16px;
  padding-top: 9px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.pcard-note--light {
  color: rgba(255,255,255,.38);
  border-top-color: rgba(255,255,255,.08);
}

.pcard-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.pcard-features li {
  font-size: 0.875rem;
  color: var(--text-2);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.4;
}

.pcard-features li::before {
  flex-shrink: 0;
  margin-top: 1px;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.35;
}

.pf--yes::before {
  content: '✓';
  color: #16a34a;
}

.pf--no {
  color: #A8B8CC;
}

.pf--no::before {
  content: '✕';
  color: #C0CCDA;
}

/* Dark featured card */
.pcard--dark {
  background: #0D1B2A;
  border-color: #0D1B2A;
  box-shadow: 0 20px 56px rgba(13,27,42,.28);
}

.pcard--dark .pcard-name    { color: #fff; }
.pcard--dark .pcard-desc    { color: rgba(255,255,255,.45); }
.pcard--dark .pcard-original { color: rgba(255,255,255,.32); }
.pcard--dark .pcard-currency { color: #fff; }
.pcard--dark .pcard-amount  { color: #fff; }
.pcard--dark .pcard-period  { color: rgba(255,255,255,.4); }
.pcard--dark .pcard-note    { color: rgba(255,255,255,.38); border-top-color: rgba(255,255,255,.08); }
.pcard--dark .pcard-features li { color: rgba(255,255,255,.75); }
.pcard--dark .pf--yes::before   { color: #5eead4; }
.pcard--dark .pf--no            { color: rgba(255,255,255,.3); }
.pcard--dark .pf--no::before    { color: rgba(255,255,255,.25); }

/* Dark alt card (Personalizado) */
.pcard--dark-alt {
  background: var(--navy);
  border-color: var(--navy);
}

.pcard--dark-alt .pcard-name    { color: #fff; }
.pcard--dark-alt .pcard-desc    { color: rgba(255,255,255,.45); }
.pcard--dark-alt .pcard-original { color: rgba(255,255,255,.32); }
.pcard--dark-alt .pcard-custom-price { color: #fff; }
.pcard--dark-alt .pcard-note    { color: rgba(255,255,255,.38); border-top-color: rgba(255,255,255,.08); }
.pcard--dark-alt .pcard-features li { color: rgba(255,255,255,.78); }
.pcard--dark-alt .pf--yes::before   { color: rgba(143,214,224,.9); }

/* ==========================================================
   TEAM / EQUIPO
========================================================== */
.team { background: var(--white); }

/* ── Team carousel ──────────────────────────────────────── */
.team-carousel {
  position: relative;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 72px;
}

.tcar-track {
  position: relative;
  min-height: 360px;
}

.tcar-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.tcar-slide--active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

.tcar-card {
  display: flex;
  gap: 72px;
  align-items: center;
  background: #0D1B2A;
  border-radius: 28px;
  padding: 70px 80px;
  min-height: 360px;
}

.tcar-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.tcar-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  box-shadow: 0 16px 48px rgba(0,0,0,.4);
}

.tcar-role-pill {
  background: rgba(0,94,233,.28);
  color: #7eb8ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 100px;
  border: 1px solid rgba(0,94,233,.35);
}

.tcar-right {
  flex: 1;
  min-width: 0;
}

.tcar-dept {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,.38);
  text-transform: uppercase;
  letter-spacing: .09em;
  margin-bottom: 8px;
}

.tcar-name {
  font-size: 2.4rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.tcar-bio {
  font-size: 1rem;
  color: rgba(255,255,255,.58);
  line-height: 1.75;
  margin-bottom: 30px;
}

.tcar-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,94,233,.2);
  border: 1px solid rgba(0,94,233,.4);
  color: #7eb8ff;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.tcar-linkedin:hover {
  background: rgba(0,94,233,.38);
  border-color: rgba(0,94,233,.7);
  color: #fff;
}

/* Arrows – float on left/right of the card */
.tcar-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1.5px solid #D0DCEC;
  background: #fff;
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.tcar-arrow:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  box-shadow: 0 4px 16px rgba(30,53,94,.25);
}
.tcar-arrow--prev { left: 0; }
.tcar-arrow--next { right: 0; }

/* Dots */
.tcar-controls {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.tcar-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}

.tcar-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #C8D6E8;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s, width 0.2s;
}

.tcar-dot--active {
  background: var(--blue);
  width: 26px;
  border-radius: 100px;
  transform: none;
}

/* ==========================================================
   RESOURCES / RECURSOS
========================================================== */
.resources { background: #F7F9FC; }

.resources-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 36px;
}

.tab-btn {
  padding: 8px 20px;
  border-radius: 100px;
  border: 2px solid rgba(0,0,0,.09);
  background: transparent;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.18s;
}
.tab-btn.active {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.tab-btn:hover:not(.active) {
  border-color: var(--navy);
  color: var(--navy);
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  max-width: 100%;
}
.resources-grid--hidden { display: none !important; }

.resource-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 0 0 22px;
  border: 1.5px solid rgba(0,0,0,.05);
  overflow: hidden;
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s, border-color 0.22s;
}
.resource-card-img {
  width: 100%;
  height: 160px;
  overflow: hidden;
  margin-bottom: 18px;
}
.resource-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.resource-tag { margin-left: 20px; }
.resource-card h3,
.resource-card p,
.resource-link {
  padding-left: 20px;
  padding-right: 20px;
}
.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(0,94,233,.12);
}

.resource-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(30,53,94,.07);
  color: var(--navy);
  border-radius: 100px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.resource-card h3 {
  font-size: 0.975rem;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.4;
}

.resource-card p {
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 16px;
}

.resource-link {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.18s;
}
.resource-link:hover { gap: 8px; }

/* ==========================================================
   FAQ
========================================================== */
.faq { background: var(--white); }

.faq-container { max-width: 800px; }

.faq-list {
  border: 1.5px solid rgba(0,0,0,.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1.5px solid rgba(0,0,0,.07);
}
.faq-item:last-child { border-bottom: none; }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.945rem;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.faq-question:hover { background: var(--light); }

.faq-question svg {
  width: 17px; height: 17px;
  flex-shrink: 0;
  stroke: var(--muted);
  transition: transform 0.3s var(--ease-out);
}

.faq-item.open .faq-question {
  color: var(--navy);
  background: rgba(30,53,94,.03);
}
.faq-item.open .faq-question svg { transform: rotate(180deg); }

.faq-answer {
  padding: 0 22px 20px 22px;
}
.faq-answer p {
  font-size: 0.88rem;
  color: var(--text-2);
  line-height: 1.75;
}

/* ==========================================================
   CONTACT / CONTACTO
========================================================== */
.contact { background: var(--navy); }

.contact-inner {
  display: grid;
  grid-template-columns: 0.65fr 1.6fr;
  gap: 40px;
  align-items: start;
}

/* Light tag for dark background */
.section-tag--light {
  background: rgba(143,214,224,.14);
  color: var(--teal);
}

.gradient-text-light {
  background: linear-gradient(130deg, rgba(255,255,255,.9) 0%, white 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.contact-info h2 {
  color: white;
  margin-top: 8px;
  margin-bottom: 16px;
}
.contact-info > p {
  color: rgba(255,255,255,.62);
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 36px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.78);
  font-size: 0.9rem;
}

.contact-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.06);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-icon svg { width: 16px; height: 16px; stroke: rgba(255,255,255,.6); }

.contact-socials { display: flex; gap: 10px; }

.social-link {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  transition: all 0.18s;
}
.social-link:hover {
  border-color: rgba(255,255,255,.4);
  color: white;
  background: rgba(255,255,255,.08);
}
.social-link svg { width: 18px; height: 18px; }

/* Contact Form */
.contact-form {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 34px 30px;
  box-shadow: var(--shadow-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}
.form-group label span { color: var(--blue); }

.form-group input {
  padding: 11px 13px;
  border: 1.5px solid #D0DCEC;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: white;
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
}
.form-group input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30,53,94,.1);
}
.form-group input::placeholder { color: #B4C5D8; }

/* Select wrapper */
.select-wrapper {
  position: relative;
}
.select-wrapper select {
  width: 100%;
  padding: 11px 36px 11px 13px;
  border: 1.5px solid #D0DCEC;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: white;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  cursor: pointer;
}
.select-wrapper select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30,53,94,.1);
}
.select-wrapper > svg {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  stroke: var(--muted);
  pointer-events: none;
}

.form-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 12px;
}

/* Form success state */
.form-success {
  text-align: center;
  padding: 32px 20px;
}
.form-success__icon {
  width: 60px; height: 60px;
  background: rgba(34,197,94,.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.6rem;
}
.form-success h3 { color: var(--navy); margin-bottom: 8px; }
.form-success p  { color: var(--text-2); font-size: 0.9rem; }

/* ==========================================================
   FOOTER
========================================================== */
.footer {
  background: #0A1929;
  padding: 60px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.footer-brand {}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
  color: white;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.84rem;
  color: rgba(255,255,255,.45);
  line-height: 1.65;
  max-width: 260px;
  margin-bottom: 20px;
}

.footer-social { display: flex; gap: 8px; }

.footer-social-link {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color 0.18s, border-color 0.18s;
}
.footer-social-link:hover {
  color: white;
  border-color: rgba(255,255,255,.3);
}
.footer-social-link svg { width: 15px; height: 15px; }

.footer-links h4 {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255,255,255,.85);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 14px;
}

.footer-links ul { display: flex; flex-direction: column; gap: 9px; }

.footer-links a {
  font-size: 0.84rem;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-links a:hover { color: white; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom span {
  font-size: 0.78rem;
  color: rgba(255,255,255,.35);
}

/* ==========================================================
   RESPONSIVE
========================================================== */
@media (max-width: 1100px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
  .feature-card--large { grid-column: span 2; }
}

@media (max-width: 960px) {
  .navbar__links   { display: none; }
  .navbar__actions { display: none; }
  .navbar__burger  { display: flex; }

  /* Fix burger alignment: switch grid → flex so burger goes to far right */
  .navbar__inner { display: flex; justify-content: space-between; align-items: center; }

  .hero__inner { grid-template-columns: 1fr; gap: 40px; padding-bottom: 48px; }
  .hero__visual { display: none; }
  .hero__subtitle { max-width: 100%; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card--large { grid-column: span 2; }

  .areas-grid { grid-template-columns: repeat(3, 1fr); }

  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .pricing-card--featured { transform: none; }

  .team-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }

  .resources-grid { grid-template-columns: repeat(2, 1fr); }

  .contact-inner { grid-template-columns: 1fr; gap: 40px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  section { padding: 64px 0; }

  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }

  .hero__stats { gap: 18px; }
  .stat__number, .stat__suffix { font-size: 1.5rem; }

  .hero__social-proof .container { flex-direction: column; align-items: flex-start; }

  .features-grid { grid-template-columns: 1fr; }
  .feature-card--large { grid-column: span 1; }

  .areas-grid { grid-template-columns: repeat(2, 1fr); }

  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }

  .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 420px) {
  .areas-grid { grid-template-columns: 1fr; }
  .resources-grid { grid-template-columns: 1fr; }
  .pricing-grid { max-width: 100%; }
}

/* ==========================================================
   HERO – Dark variant
========================================================== */
.hero--dark {
  background: #07101D;
  padding-top: calc(var(--nav-h) + 100px);
  padding-bottom: 0;
}

.hero--dark::before { display: none; }

.hero-orb {
  position: absolute;
  top: -320px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(0,94,233,.20) 0%, rgba(30,53,94,.10) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero__split {
  display: flex;
  align-items: flex-start;
  gap: 80px;
  padding-bottom: 80px;
  position: relative;
  z-index: 1;
}

.hero__center {
  flex: 0 0 580px;
  max-width: 580px;
  position: relative;
  z-index: 1;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero--dark .hero__badge {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.80);
}

.hero--dark .badge-dot { background: var(--teal); }

.hero-highlight {
  background: linear-gradient(120deg, #8FD6E0 0%, #60a5fa 55%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero--dark .hero__title {
  color: white;
  font-size: clamp(2.4rem, 3.8vw, 3.8rem);
  line-height: 1.12;
  margin-bottom: 36px;
  max-width: 560px;
}

.hero--dark .hero__subtitle {
  color: rgba(255,255,255,.55);
  font-size: 0.82rem;
  line-height: 1.6;
  max-width: 460px;
  margin-bottom: 28px;
  text-align: left;
}

.btn--hero-primary {
  background: white;
  color: var(--navy);
  border: 2px solid white;
  padding: 13px 22px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
  white-space: nowrap;
  cursor: pointer;
}
.btn--hero-primary:hover {
  background: rgba(255,255,255,.92);
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(255,255,255,.18);
}

.btn--hero-outline {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.82);
  border: 1.5px solid rgba(255,255,255,.15);
  padding: 13px 22px;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
  white-space: nowrap;
  cursor: pointer;
}
.btn--hero-outline:hover {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.32);
  transform: translateY(-2px);
}

.hero--dark .hero__stats { justify-content: flex-start; }

.hero--dark .stat__number,
.hero--dark .stat__suffix { color: white; }

.hero--dark .stat__label { color: rgba(255,255,255,.38); }

.hero--dark .stat__divider { background: rgba(255,255,255,.10); }

/* Hero preview – floating dashboard */
.hero__preview {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  z-index: 1;
  margin-right: calc(-1 * (max(0px, (100vw - 1200px) / 2) + 140px));
}

.hero-dash {
  display: flex;
  height: 520px;
  background: rgba(8,14,30,.92);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px 0 0 16px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04) inset, 0 0 60px rgba(0,94,233,.12);
}

/* ── Sidebar ── */
.hd-sidebar {
  width: 185px;
  flex-shrink: 0;
  background: rgba(5,9,22,.80);
  border-right: 1px solid rgba(255,255,255,.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hd-sb-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  flex-shrink: 0;
}

.hd-sb-logo {
  width: 26px; height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hd-sb-logo-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  display: block;
}

.hd-sb-brand {
  font-size: 0.78rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.01em;
}

.hd-sb-user {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  flex-shrink: 0;
}

.hd-sb-uavatar {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1a6b3a, #2d9c60);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  flex-shrink: 0;
}

.hd-sb-uname {
  font-size: 0.64rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hd-sb-urole {
  font-size: 0.56rem;
  color: rgba(255,255,255,.30);
}

.hd-sb-section {
  padding: 8px 10px 3px;
  font-size: 0.55rem;
  font-weight: 700;
  color: rgba(255,255,255,.22);
  text-transform: uppercase;
  letter-spacing: .07em;
  flex-shrink: 0;
}

.hd-sb-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  margin: 1px 6px;
  border-radius: 6px;
  font-size: 0.68rem;
  color: rgba(255,255,255,.42);
  flex-shrink: 0;
}
.hd-sb-item svg { width: 13px; height: 13px; flex-shrink: 0; }
.hd-sb-item--active {
  background: rgba(0,94,233,.22);
  color: rgba(255,255,255,.88);
}

/* ── Main area ── */
.hd-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.hd-appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: 40px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  flex-shrink: 0;
}

.hd-appbar-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hd-menu-icon {
  width: 15px; height: 15px;
  stroke: rgba(255,255,255,.35);
}

.hd-appbar-breadcrumb {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255,255,255,.55);
}

.hd-appbar-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.hd-appbar-icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.35);
}
.hd-appbar-icon svg { width: 13px; height: 13px; }

.hd-appbar-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.52rem;
  font-weight: 700;
  margin-left: 4px;
}

.hd-content {
  flex: 1;
  padding: 12px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hd-content-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}

.hd-content-title {
  font-size: 0.90rem;
  font-weight: 700;
  color: white;
  margin-bottom: 2px;
}

.hd-content-sub {
  font-size: 0.60rem;
  color: rgba(255,255,255,.30);
}

.hd-refresh-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 7px;
  color: rgba(255,255,255,.58);
  font-size: 0.64rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.hd-refresh-btn svg { width: 10px; height: 10px; }

/* KPI cards */
.hd-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  flex-shrink: 0;
}

.hd-kpi {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.05);
}
.hd-kpi--blue   { background: rgba(0,94,233,.13); }
.hd-kpi--green  { background: rgba(5,150,105,.10); }
.hd-kpi--purple { background: rgba(124,58,237,.10); }
.hd-kpi--orange { background: rgba(245,158,11,.10); }

.hd-kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.hd-kpi-label {
  font-size: 0.58rem;
  color: rgba(255,255,255,.40);
  line-height: 1.35;
  max-width: 75%;
}

.hd-kpi-icon {
  width: 20px; height: 20px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hd-kpi-icon svg { width: 10px; height: 10px; }
.hd-kpi-icon--blue   { background: rgba(0,94,233,.25); color: #60a5fa; }
.hd-kpi-icon--green  { background: rgba(5,150,105,.25); color: #34d399; }
.hd-kpi-icon--purple { background: rgba(124,58,237,.25); color: #a78bfa; }
.hd-kpi-icon--orange { background: rgba(245,158,11,.25); color: #fbbf24; }
.hd-kpi-icon svg { stroke: currentColor; }

.hd-kpi-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: white;
  letter-spacing: -0.03em;
  margin-bottom: 3px;
}

.hd-kpi-change { font-size: 0.55rem; font-weight: 500; }
.hd-kpi-change--up      { color: #34d399; }
.hd-kpi-change--neutral { color: rgba(255,255,255,.25); }

/* Charts row */
.hd-charts-row {
  display: grid;
  grid-template-columns: 1fr 175px;
  gap: 8px;
  flex: 1;
  min-height: 0;
}

.hd-chart-card {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hd-chart-head { margin-bottom: 6px; flex-shrink: 0; }

.hd-chart-title {
  font-size: 0.70rem;
  font-weight: 600;
  color: rgba(255,255,255,.72);
  margin-bottom: 1px;
}

.hd-chart-sub {
  font-size: 0.57rem;
  color: rgba(255,255,255,.25);
}

.hd-linechart-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
}

.hd-linechart-svg {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: block;
}

.hd-chart-xaxis {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  flex-shrink: 0;
}
.hd-chart-xaxis span { font-size: 0.52rem; color: rgba(255,255,255,.20); }

/* Donut */
.hd-chart-card--sm {}

.hd-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: center;
}

.hd-donut {
  width: 85px; height: 85px;
  border-radius: 50%;
  background: conic-gradient(
    #3b82f6 0deg 155deg,
    #10b981 155deg 218deg,
    #f59e0b 218deg 360deg
  );
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hd-donut::after {
  content: '';
  position: absolute;
  width: 59px; height: 59px;
  background: rgba(10,17,40,.95);
  border-radius: 50%;
}

.hd-donut-inner-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hd-donut-num { font-size: 0.95rem; font-weight: 800; color: white; letter-spacing: -0.03em; }
.hd-donut-lbl { font-size: 0.52rem; color: rgba(255,255,255,.30); }

.hd-donut-legend {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.hd-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.58rem;
  color: rgba(255,255,255,.42);
}

.hd-legend-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hd-legend-dot--blue   { background: #3b82f6; }
.hd-legend-dot--green  { background: #10b981; }
.hd-legend-dot--orange { background: #f59e0b; }

/* Floating notifications */
.hero-notif {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(12,22,48,.96);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0,0,0,.40);
  font-size: 0.78rem;
  min-width: 200px;
  z-index: 2;
}
.hero-notif--1 {
  top: -26px;
  right: 160px;
  animation: float 4s ease-in-out infinite;
}
.hero-notif--2 {
  bottom: 44px;
  left: 44px;
  animation: float 4s ease-in-out infinite 2s;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.hn-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hn-icon svg { width: 14px; height: 14px; }
.hn-icon--green { background: rgba(52,211,153,.14); color: #34d399; }
.hn-icon--blue  { background: rgba(0,94,233,.22); color: #60a5fa; }

.hn-title { font-size: 0.78rem; font-weight: 600; color: white; }
.hn-sub   { font-size: 0.66rem; color: rgba(255,255,255,.38); margin-top: 2px; }

/* ==========================================================
   FEATURES – Tab layout
========================================================== */
.ftabs {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}

.ftabs__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ftab-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.20s var(--ease-out);
  width: 100%;
}
.ftab-btn:hover { background: rgba(30,53,94,.05); }
.ftab-btn.active {
  background: rgba(30,53,94,.06);
  border-color: rgba(30,53,94,.14);
}

.ftab-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(30,53,94,.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.20s;
}
.ftab-icon svg { width: 18px; height: 18px; stroke: var(--navy); transition: stroke 0.20s; }
.ftab-btn.active .ftab-icon { background: var(--navy); }
.ftab-btn.active .ftab-icon svg { stroke: white; }

.ftab-text { display: flex; flex-direction: column; gap: 2px; }
.ftab-text strong { font-size: 0.875rem; font-weight: 600; color: var(--navy); line-height: 1.2; }
.ftab-text em     { font-size: 0.74rem; font-style: normal; color: var(--muted); }

.ftabs__panels { position: relative; min-height: 340px; }

.ftab-panel         { display: none; }
.ftab-panel.active  { display: block; animation: fadeInUp 0.25s ease-out; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Panel mockup shell */
.panel-mock {
  background: var(--white);
  border: 1px solid #E2EBF5;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.pm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #F7F9FC;
  border-bottom: 1px solid #E2EBF5;
}

.pm-title {
  font-size: 0.80rem;
  font-weight: 600;
  color: var(--navy);
}

.pm-btn {
  padding: 5px 12px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.pm-status {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}
.pm-status--on { background: rgba(52,211,153,.12); color: #059669; }

/* Agenda panel */
.pm-week {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
}

.pm-day-label {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.pm-slot {
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 0.65rem;
  font-weight: 500;
  margin-bottom: 4px;
}
.pm-slot--empty {
  background: #F7F9FC;
  color: var(--muted);
  border: 1px dashed #D0DCEC;
}
.pm-slot--busy  { color: white; }
.pm-slot--blue  { background: rgba(0,94,233,.70); }
.pm-slot--teal  { background: rgba(30,53,94,.60); }
.pm-slot--green { background: rgba(5,150,105,.65); }

/* Patient panel */
.pm-patient { padding: 16px; }

.pm-patient-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.pm-avatar-circle {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.80rem;
  flex-shrink: 0;
}

.pm-name { font-size: 0.875rem; font-weight: 600; color: var(--navy); }
.pm-meta { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

.pm-note-item { padding: 10px 0; border-bottom: 1px solid #EEF2F8; }
.pm-note-date { font-size: 0.68rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.pm-note-text { font-size: 0.75rem; color: var(--text-2); line-height: 1.5; }

.pm-tags-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pm-tag {
  padding: 3px 9px;
  background: rgba(30,53,94,.06);
  color: var(--navy);
  border-radius: 100px;
  font-size: 0.67rem;
  font-weight: 600;
}

/* WhatsApp panel */
.pm-chat { padding: 14px 16px; }

.pm-chat-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid #EEF2F8;
}

.pm-chat-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.64rem;
  font-weight: 700;
}

.pm-chat-name { font-size: 0.80rem; font-weight: 600; color: var(--navy); }
.pm-chat-sub  { font-size: 0.68rem; color: var(--muted); }

.pm-chat-badge {
  margin-left: auto;
  padding: 3px 9px;
  background: rgba(52,211,153,.10);
  color: #059669;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 600;
}

.pm-message {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.72rem;
  line-height: 1.55;
  margin-bottom: 8px;
}
.pm-message--out {
  background: var(--navy);
  color: rgba(255,255,255,.9);
  border-bottom-right-radius: 4px;
  margin-left: auto;
}
.pm-message--in {
  background: #EEF2F8;
  color: var(--text);
  border-bottom-left-radius: 4px;
}

/* Metrics panel */
.pm-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px;
}

.pm-metric-card {
  background: #F7F9FC;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pm-metric-label { font-size: 0.68rem; color: var(--muted); }
.pm-metric-value { font-size: 1.2rem; font-weight: 800; color: var(--navy); letter-spacing: -0.03em; }
.pm-metric-change { font-size: 0.64rem; font-weight: 600; }
.pm-metric-change--up      { color: #059669; }
.pm-metric-change--neutral { color: var(--muted); }

.pm-chart {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
}

.pm-chart-bar {
  flex: 1;
  background: rgba(30,53,94,.10);
  border-radius: 4px 4px 0 0;
}
.pm-chart-bar--active { background: var(--navy); }

/* Cobros panel */
.pm-payments {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pm-payment {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #F7F9FC;
}

.pm-pay-info { flex: 1; }
.pm-pay-name { font-size: 0.78rem; font-weight: 600; color: var(--navy); }
.pm-pay-date { font-size: 0.64rem; color: var(--muted); margin-top: 1px; }
.pm-pay-amount { font-size: 0.85rem; font-weight: 700; color: var(--navy); white-space: nowrap; }

.pm-pay-badge {
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}
.pm-pay-badge--paid    { background: rgba(52,211,153,.10); color: #059669; }
.pm-pay-badge--pending { background: rgba(245,158,11,.10); color: #d97706; }

/* ==========================================================
   AREAS – Infinite carousel
========================================================== */
.areas { overflow: hidden; }

.carousel-outer {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  padding: 8px 0 32px;
}

.carousel-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: marquee 30s linear infinite;
}
.carousel-track:hover { animation-play-state: paused; }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.spec-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 18px;
  width: 142px;
  background: white;
  border: 1.5px solid #E2EBF5;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  cursor: default;
}
.spec-card:hover {
  border-color: rgba(30,53,94,.30);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.spec-icon {
  width: 48px; height: 48px;
  background: rgba(30,53,94,.06);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.spec-icon svg { width: 24px; height: 24px; stroke: var(--navy); }

.spec-card span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
}

/* Pricing – 4 column grid */
.pricing-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 32px;
}

.pricing-grid-4 .pricing-card--featured {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(30,53,94,.18);
}

.plan-tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.plan-tier-badge--pro    { background: rgba(0,94,233,.10); color: var(--blue); }
.plan-tier-badge--clinic { background: rgba(30,53,94,.08); color: var(--navy); }
.plan-tier-badge--custom { background: rgba(30,53,94,.85); color: rgba(255,255,255,.85); }

@media (max-width: 1100px) {
  .pricing-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid-4 .pricing-card--featured { transform: none; }
}

@media (max-width: 640px) {
  .pricing-grid-4 { grid-template-columns: 1fr; }
}

/* ==========================================================
   Responsive – new sections
========================================================== */
@media (max-width: 960px) {
  .ftabs {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ftabs__nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .ftab-text em { display: none; }
  .hd-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .hero__split {
    flex-direction: column;
    gap: 40px;
    padding-bottom: 48px;
  }
  .hero__center {
    flex: none;
    max-width: 100%;
    text-align: center;
    align-items: center;
  }
  .hero--dark .hero__title { max-width: 100%; font-size: clamp(1.9rem, 5vw, 2.8rem); }
  .hero--dark .hero__subtitle { text-align: center; }
  .hero--dark .hero__stats { justify-content: center; }
  .hero-dash { height: 420px; border-radius: 16px; }
  .hero__preview { flex: none; width: 100%; margin-right: 0; }
}

@media (max-width: 640px) {
  .hero--dark { padding-top: calc(var(--nav-h) + 60px); }
  .hero__preview { padding: 0; }
  .hero-notif { display: none; }

  .hd-stats { grid-template-columns: repeat(2, 1fr); }

  .ftabs__nav { grid-template-columns: repeat(2, 1fr); }

  .pm-week { grid-template-columns: repeat(2, 1fr); }
  .pm-metrics { grid-template-columns: 1fr 1fr; }

  .spec-card { width: 120px; padding: 18px 12px; }
}

/* ── Calendar mockup ─────────────────────────────────────── */
.cal-mock {
  background: #f5f7fa;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.78rem;
  color: #1e293b;
  display: flex;
  flex-direction: column;
  height: 460px;
}

/* Topbar */
.cal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  gap: 12px;
}
.cal-topbar-left { display: flex; align-items: center; gap: 6px; }
.cal-topbar-right { display: flex; align-items: center; gap: 10px; }
.cal-today-btn {
  padding: 4px 12px; background: #fff; border: 1px solid #cbd5e1;
  border-radius: 6px; font-size: 0.74rem; font-weight: 600; color: #334155; cursor: pointer; font-family: inherit;
}
.cal-nav {
  width: 24px; height: 24px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 5px; font-size: 0.8rem; color: #64748b; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.cal-range { font-size: 0.75rem; font-weight: 600; color: #334155; }
.cal-leg { display: flex; align-items: center; gap: 4px; font-size: 0.68rem; color: #64748b; }
.cal-leg-dot { width: 8px; height: 8px; border-radius: 50%; }
.cal-leg-dot--avail { background: #3b82f6; }
.cal-leg-dot--past  { background: #94a3b8; }
.cal-leg-dot--rest  { background: #fbbf24; }
.cal-nuevo-btn {
  padding: 5px 14px; background: #0f172a; color: #fff; border: none;
  border-radius: 7px; font-size: 0.74rem; font-weight: 700; cursor: pointer; font-family: inherit;
}

/* Body */
.cal-body {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
}

/* Sidebar */
.cal-sidebar {
  width: 145px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  padding: 10px 10px 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cal-filter-lbl { font-size: 0.57rem; color: #94a3b8; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; }
.cal-dropdown {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 7px; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 7px; font-size: 0.62rem; color: #334155; font-weight: 500;
  justify-content: space-between; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden;
}
.cal-dd-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1;
}
.cal-dd-arrow { flex-shrink: 0; color: #94a3b8; font-size: 0.6rem; }
.cal-prof-dot { width: 8px; height: 8px; border-radius: 50%; background: #3b82f6; flex-shrink: 0; }
.cal-search-bar {
  display: flex; align-items: center; gap: 4px; margin-top: 8px;
  padding: 4px 6px; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 7px; font-size: 0.52rem; color: #94a3b8; white-space: nowrap; overflow: hidden;
}
.cal-search-bar svg { width: 9px; height: 9px; flex-shrink: 0; }
.cal-mini-cal { margin-top: 10px; }
.cal-mini-head { display: flex; justify-content: space-between; font-size: 0.72rem; font-weight: 700; color: #334155; margin-bottom: 6px; }
.cal-mini-head span { color: #94a3b8; cursor: pointer; }
.cal-mini-dow { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; font-size: 0.58rem; color: #94a3b8; font-weight: 600; margin-bottom: 3px; }
.cal-mini-days { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; font-size: 0.62rem; color: #334155; gap: 1px; }
.cal-mini-days span { padding: 2px 0; border-radius: 4px; }
.cal-mini-empty { visibility: hidden; }
.cal-today-d { background: #e0edff; color: #005EE9; font-weight: 700; border-radius: 50% !important; }
.cal-sel-d   { background: #1e355e; color: white; font-weight: 700; border-radius: 50% !important; }

/* Grid */
.cal-grid {
  flex: 1 1 0; min-width: 0; width: 0; display: flex; flex-direction: column; overflow: hidden;
}
.cal-grid-head {
  display: grid; grid-template-columns: 42px repeat(5,1fr);
  background: #fff; border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
  height: 44px;
}
.cal-time-gap { background: #f8fafc; }
.cal-dh {
  text-align: center; padding: 0 4px; font-size: 0.68rem; font-weight: 600;
  color: #475569; border-right: 1px solid #f1f5f9; line-height: 1.3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.cal-dh small { font-size: 0.60rem; color: #94a3b8; font-weight: 400; }
.cal-grid-rows { flex: 1; overflow-y: auto; }
.cal-row {
  display: grid; grid-template-columns: 42px repeat(5,1fr);
  border-bottom: 1px solid #f1f5f9; height: 54px; box-sizing: border-box;
}
.cal-row--pre { height: 32px; }
.cal-time {
  font-size: 0.55rem; color: #94a3b8; padding: 0 4px 0 0;
  text-align: right; font-weight: 500; overflow: visible; white-space: nowrap;
  display: flex; align-items: center; justify-content: flex-end;
}
.cal-cell {
  border-right: 1px solid #f1f5f9; padding: 3px;
  position: relative;
}
.cal-cell--active  { background: rgba(59,130,246,.04); }
.cal-cell--unavail { background: #e9ecf0; }
.cal-cell--rest    { background: #fef9c3; display: flex; align-items: center; justify-content: center; }
.cal-rest-lbl      { font-size: 0.58rem; font-weight: 700; color: #a16207; letter-spacing: .06em; }
.cal-appt {
  background: #3b82f6; color: white; border-radius: 5px;
  padding: 4px 6px; font-size: 0.60rem; line-height: 1.3;
  height: 100%; min-height: 44px; display: flex; flex-direction: column; justify-content: center;
}
.cal-appt small { opacity: .75; font-size: 0.55rem; }
.cal-appt--blue { background: #3b82f6; }

/* Popup card */
.cal-popup-card {
  position: absolute;
  right: 8px;
  top: 64px;
  width: 210px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 10;
  font-size: 0.72rem;
}
.cal-popup-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cal-popup-name { font-weight: 700; font-size: 0.80rem; color: #0f172a; }
.cal-popup-edit { font-size: 0.65rem; color: #005EE9; background: none; border: none; cursor: pointer; font-family: inherit; }
.cal-popup-service { color: #475569; margin-bottom: 4px; }
.cal-popup-price { font-size: 1.1rem; font-weight: 800; color: #0f172a; margin-bottom: 2px; }
.cal-popup-date { font-size: 0.64rem; color: #64748b; margin-bottom: 8px; }
.cal-popup-row {
  display: flex; align-items: center; gap: 6px; color: #334155;
  font-size: 0.66rem; margin-bottom: 4px;
}
.cal-popup-row svg { width: 12px; height: 12px; flex-shrink: 0; color: #94a3b8; }
.cal-popup-status { font-size: 0.66rem; color: #16a34a; font-weight: 600; margin: 6px 0; }
.cal-popup-pay {
  width: 100%; padding: 7px; background: #0f172a; color: white;
  border: none; border-radius: 7px; font-size: 0.72rem; font-weight: 700;
  cursor: pointer; font-family: inherit;
}

/* ══════════════════════════════════════════════════════════
   WORKFLOW DEMO SECTION
══════════════════════════════════════════════════════════ */

.func-intro { padding: 80px 0 24px; background: #fff; }
.wf-section { padding: 0 0 100px; background: #fff; }

.wf-demo {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-top: 60px;
}

/* ── Steps ─────────────────────────────────────────────── */
.wf-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
  width: 276px;
}

.wf-step {
  all: unset;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  position: relative;
  overflow: hidden;
  transition: background .22s, border-color .22s;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}
.wf-step:hover { background: #f8fafc; }
.wf-step--active { background: #eff6ff; border-color: #bfdbfe; }

.wf-step-iconbox {
  width: 40px; height: 40px; border-radius: 10px;
  background: #1E355E; color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wf-step-iconbox svg { width: 18px; height: 18px; }
.wf-step-iconbox--wa  { background: #1E355E; color: #fff; }
.wf-step-iconbox--bell{ background: #1E355E; color: #fff; }
.wf-step-iconbox--pay { background: #1E355E; color: #fff; }

.wf-step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wf-step-body strong { font-size: 0.88rem; font-weight: 600; color: #0D1B2E; }
.wf-step-body span   { font-size: 0.74rem; color: #7088A9; line-height: 1.3; }

.wf-step-prog {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: #e2e8f0;
}
.wf-step-fill { height: 100%; width: 0; background: #005EE9; }
.wf-step--active .wf-step-fill {
  animation: wf-fill 5.5s linear forwards;
}
@keyframes wf-fill { from { width: 0 } to { width: 100% } }

/* ── Screen ─────────────────────────────────────────────── */
.wf-screen {
  flex: 1; min-width: 0;
  position: relative;
  min-height: 450px;
}

.wf-panel {
  position: absolute; inset: 0;
  opacity: 0; pointer-events: none;
  transform: translateY(12px);
  transition: opacity .4s ease, transform .4s ease;
}
.wf-panel--active {
  opacity: 1; pointer-events: auto;
  transform: translateY(0);
}

/* ── Browser mockup ─────────────────────────────────────── */
.wf-browser {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.09), 0 4px 12px rgba(0,0,0,.05);
  height: 450px;
  display: flex; flex-direction: column;
}

.wf-browser-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.wf-browser-dots { display: flex; gap: 6px; }
.wf-browser-dots span { width: 11px; height: 11px; border-radius: 50%; }
.wf-browser-dots span:nth-child(1) { background: #ff5f57; }
.wf-browser-dots span:nth-child(2) { background: #ffbd2e; }
.wf-browser-dots span:nth-child(3) { background: #28c840; }

.wf-browser-url {
  flex: 1; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 20px; padding: 4px 14px;
  font-size: 0.72rem; color: #94a3b8; text-align: center;
}

.wf-browser-body {
  flex: 1; position: relative; overflow: hidden;
  background: #f5f7fa;
}

/* Blurred calendar bg */
.wf-bg-cal {
  position: absolute; inset: 0; padding: 20px 20px;
  display: flex; flex-direction: column; gap: 14px;
  filter: blur(2px); opacity: 0.3; pointer-events: none;
}
.wf-bg-row { display: flex; align-items: center; gap: 8px; height: 46px; }
.wf-bg-h { font-size: 0.65rem; color: #94a3b8; width: 28px; text-align: right; flex-shrink: 0; }
.wf-bg-apt {
  background: var(--c, #3b82f6); color: white;
  font-size: 0.6rem; font-weight: 500;
  padding: 6px 10px; border-radius: 6px;
  height: 42px; display: flex; align-items: center;
  min-width: 80px;
}

/* Overlay */
.wf-modal-overlay {
  position: absolute; inset: 0;
  background: rgba(15,23,42,0.45);
}

/* Nueva Cita modal */
.wf-ncita {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff; border-radius: 14px;
  padding: 22px 24px 20px;
  width: 90%; max-width: 460px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.24);
  border: 1px solid #e2e8f0;
}

.wf-panel--active .wf-ncita {
  animation: wf-popup .5s cubic-bezier(.22,1,.36,1) both;
  animation-delay: 2.5s;
}
@keyframes wf-popup {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

.wf-ncita-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.wf-ncita-title { font-size: 1rem; font-weight: 700; color: #0D1B2E; }
.wf-ncita-badge {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 500; color: #d97706;
  background: #fef3c7; padding: 4px 10px;
  border-radius: 20px; border: 1px solid #fde68a;
}
.wf-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }

.wf-ncita-fields { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.wf-nf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wf-nf { display: flex; flex-direction: column; gap: 4px; }
.wf-nf--full { grid-column: 1/-1; }
.wf-nf-lbl {
  font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: #94a3b8;
}
.wf-nf-val {
  font-size: 0.8rem; color: #1e293b;
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 7px 10px;
}
.wf-nf-val--focus {
  border-color: #005EE9; background: #fff;
  box-shadow: 0 0 0 3px rgba(0,94,233,.1);
}
.wf-cursor {
  display: inline-block; width: 1.5px; height: 13px;
  background: #005EE9; margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink-cur 1s step-end infinite;
}
@keyframes blink-cur { 0%,100% { opacity:1 } 50% { opacity:0 } }

.wf-ncita-footer { display: flex; justify-content: flex-end; gap: 10px; }
.wf-btn-cancel {
  all: unset; cursor: pointer; padding: 9px 16px;
  font-size: 0.8rem; font-weight: 500; color: #64748b;
  border: 1px solid #e2e8f0; border-radius: 8px; background: #fff;
}
.wf-btn-save {
  all: unset; cursor: pointer; padding: 9px 18px;
  font-size: 0.8rem; font-weight: 600; color: #fff;
  background: #1E355E; border-radius: 8px;
}

/* ── WhatsApp mockup ────────────────────────────────────── */
.wf-wa {
  height: 450px; border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.09), 0 4px 12px rgba(0,0,0,.05);
  display: flex; flex-direction: column;
  border: 1px solid #d1d5db;
}

.wf-wa-head {
  background: #075E54; padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  flex-shrink: 0;
}
.wf-wa-back { width: 18px; height: 18px; color: rgba(255,255,255,.75); flex-shrink: 0; }
.wf-wa-av {
  width: 38px; height: 38px; border-radius: 50%;
  background: #128C7E; color: #fff;
  font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wf-wa-info { flex: 1; min-width: 0; }
.wf-wa-nm { color: #fff; font-size: 0.85rem; font-weight: 600; }
.wf-wa-st { color: rgba(255,255,255,.7); font-size: 0.68rem; }

.wf-wa-body {
  flex: 1; background: #e5ddd5; padding: 14px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
}

.wf-wa-date-sep {
  align-self: center; background: rgba(255,255,255,.72);
  border-radius: 6px; padding: 3px 10px;
  font-size: 0.65rem; color: #6b7280;
}

.wf-wa-bbl {
  background: #fff;
  border-radius: 2px 12px 12px 12px;
  padding: 12px 14px 8px;
  max-width: 92%;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
  font-size: 0.74rem; line-height: 1.55; color: #1e293b;
}
.wf-wa-bbl p { margin-bottom: 5px; }
.wf-wa-bbl p:last-of-type { margin-bottom: 0; }
.wf-wa-list { color: #475569; font-size: 0.71rem; }
.wf-wa-sig  { color: #64748b; font-size: 0.69rem; }
.wf-wa-ts   { text-align: right; font-size: 0.62rem; color: #94a3b8; margin-top: 4px; }
.wf-wa-checks { color: #53bdeb; }

.wf-panel--active .wf-wa-bbl {
  animation: wf-bubble .45s cubic-bezier(.22,1,.36,1) both;
  animation-delay: .25s;
}
@keyframes wf-bubble {
  from { opacity:0; transform: translateY(10px); }
  to   { opacity:1; transform: translateY(0); }
}

.wf-wa-inputbar {
  background: #f0f2f5; padding: 10px 14px;
  flex-shrink: 0; border-top: 1px solid #e2e8f0;
}
.wf-wa-input {
  background: #fff; border-radius: 20px;
  padding: 8px 14px; font-size: 0.74rem; color: #94a3b8;
}

/* ── 7-step compact overrides ──────────────────────────── */
.wf-step { padding: 9px 12px 13px; gap: 10px; }
.wf-step-iconbox { width: 34px; height: 34px; border-radius: 8px; }
.wf-step-iconbox svg { width: 15px; height: 15px; }
.wf-step-body strong { font-size: 0.82rem; }
.wf-step-body span   { font-size: 0.7rem; }
.wf-steps { gap: 0; }
.wf-step-iconbox--mon  { background: #1E355E; color: #fff; }
.wf-step-iconbox--card { background: #1E355E; color: #fff; }
.wf-step-iconbox--check{ background: #1E355E; color: #fff; }

/* ── Calendar panel ────────────────────────────────────── */
.wf-browser-body--cal {
  padding: 0; display: flex; flex-direction: column; overflow: hidden;
}
.wf-cal-top {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-bottom: 1px solid #e2e8f0;
  background: #fff; flex-shrink: 0;
}
.wf-cal-hoy {
  border: 1px solid #e2e8f0; border-radius: 6px;
  padding: 3px 9px; font-size: 0.68rem; font-weight: 500;
  background: #fff; cursor: default; color: #334155; font-family: inherit;
}
.wf-cal-nav-btn {
  font-size: 0.8rem; color: #94a3b8; padding: 0 3px; cursor: default;
}
.wf-cal-range { flex: 1; font-size: 0.68rem; color: #475569; font-weight: 500; }
.wf-cal-nuevo {
  background: #1e355e; color: white; border: none;
  border-radius: 6px; padding: 4px 9px; font-size: 0.68rem;
  font-weight: 600; cursor: default; font-family: inherit;
}
.wf-cal-grid { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.wf-cal-head {
  display: grid; grid-template-columns: 30px repeat(5,1fr);
  background: #fff; border-bottom: 1px solid #e2e8f0; flex-shrink: 0;
}
.wf-cal-tgap { background: #f8fafc; }
.wf-cal-dh {
  text-align: center; padding: 5px 2px;
  font-size: 0.62rem; font-weight: 600; color: #475569;
  border-right: 1px solid #f1f5f9;
  display: flex; flex-direction: column; align-items: center;
}
.wf-cal-dh small { font-weight: 400; color: #94a3b8; font-size: 0.57rem; }
.wf-cal-row {
  display: grid; grid-template-columns: 30px repeat(5,1fr);
  border-bottom: 1px solid #f1f5f9; flex: 1;
}
.wf-cal-t {
  font-size: 0.52rem; color: #94a3b8; text-align: right;
  padding: 4px 3px 0 0; align-self: flex-start;
}
.wf-cal-c {
  border-right: 1px solid #f1f5f9; padding: 3px 2px; min-height: 56px;
  display: flex; flex-direction: column;
}
.wf-cal-c--na  { background: #e9ecf0; }
.wf-cal-c--rest{
  background: #fef9c3;
  display: flex; align-items: center; justify-content: center;
}
.wf-cal-c--rest span {
  font-size: 0.5rem; font-weight: 700; color: #a16207; letter-spacing: .06em;
}
.wf-apt {
  background: #dbeafe; border-left: 3px solid #3b82f6;
  border-radius: 4px; padding: 3px 5px 3px 5px; font-size: 0.57rem;
  font-weight: 600; color: #1e3a8a; position: relative; line-height: 1.2;
  display: flex; flex-direction: column; justify-content: center;
  height: calc(100% - 6px); min-height: 0;
}
.wf-apt small { display: block; font-weight: 400; color: #3b82f6; font-size: 0.53rem; }
.wf-apt--pending { background: #e0f2fe; border-left-color: #0ea5e9; color: #0c4a6e; }
.wf-apt:has(.wf-pagada) { padding-top: 13px; justify-content: flex-start; }
.wf-pagada {
  position: absolute; top: 2px; right: 2px;
  background: #10b981; color: white;
  font-size: 0.43rem; font-weight: 700;
  padding: 1px 4px; border-radius: 10px;
  letter-spacing: .03em;
}
.wf-pagada--anim {
  animation: wf-pagada-pop .5s cubic-bezier(.22,1,.36,1) both;
  animation-delay: .4s;
}
@keyframes wf-pagada-pop {
  from { opacity:0; transform: scale(.6); }
  to   { opacity:1; transform: scale(1); }
}

/* ── Caja / Pago panel ─────────────────────────────────── */
.wf-browser-body--caja {
  padding: 16px 18px; overflow: hidden; background: #fff;
}
.wf-caja-header { margin-bottom: 12px; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; }
.wf-caja-title  { font-size: 1.05rem; font-weight: 700; color: #0D1B2E; }
.wf-caja-sub    { font-size: 0.72rem; color: #7088A9; margin-top: 2px; }
.wf-caja-lbl    {
  font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #94a3b8; margin-bottom: 8px;
}
.wf-caja-order  {
  display: flex; align-items: center; gap: 10px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 10px; padding: 10px 12px;
}
.wf-order-icon  {
  width: 34px; height: 34px; background: #f1f5f9;
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-size: 1rem; flex-shrink: 0;
}
.wf-order-info  { flex: 1; }
.wf-order-name  { font-size: 0.82rem; font-weight: 600; color: #0D1B2E; }
.wf-order-dr    { font-size: 0.68rem; color: #7088A9; }
.wf-order-meta  { font-size: 0.65rem; color: #94a3b8; margin-top: 2px; }
.wf-order-price { font-size: 0.92rem; font-weight: 700; color: #0D1B2E; }
.wf-caja-total  {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-top: 1px dashed #e2e8f0;
  font-size: 0.8rem; color: #475569;
}
.wf-caja-total strong { font-size: 1.05rem; font-weight: 700; color: #0D1B2E; }
.wf-pay-grid    {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 0;
}
.wf-pay-opt     {
  border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 7px; cursor: default;
}
.wf-pay-opt--sel{ border-color: #1e355e; border-width: 2px; background: #f8fafc; }
.wf-pay-icon    {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; background: #f1f5f9;
}
.wf-pay-icon--green  { background: #dcfce7; }
.wf-pay-icon--blue   { background: #dbeafe; }
.wf-pay-icon--purple { background: #f3e8ff; }
.wf-pay-opt span{ font-size: 0.68rem; font-weight: 500; color: #334155; text-align: center; }
.wf-procesar-btn{
  width: 100%; margin-top: 14px; padding: 11px;
  background: #1e355e; color: white; border: none;
  border-radius: 10px; font-size: 0.83rem; font-weight: 700;
  cursor: default; font-family: inherit;
}

/* ── Toast + caja strip (panel 5) ──────────────────────── */
.wf-toast {
  position: absolute; top: 54px; right: 10px; z-index: 20;
  background: #10b981; color: white;
  font-size: 0.72rem; font-weight: 600;
  padding: 7px 13px; border-radius: 8px;
  box-shadow: 0 4px 14px rgba(16,185,129,.4);
  display: flex; align-items: center; gap: 6px;
  animation: wf-toast-in .45s cubic-bezier(.22,1,.36,1) both;
  animation-delay: .2s;
}
@keyframes wf-toast-in {
  from { opacity:0; transform: translateY(-8px); }
  to   { opacity:1; transform: translateY(0); }
}
.wf-caja-strip {
  border-top: 1px solid #e2e8f0; background: #fff;
  padding: 8px 10px; flex-shrink: 0; display: flex;
  align-items: center; gap: 14px;
}
.wf-caja-strip-lbl {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: #7088A9; flex-shrink: 0;
}
.wf-caja-strip-items { display: flex; gap: 18px; }
.wf-cs-item { display: flex; flex-direction: column; align-items: center; }
.wf-cs-item span  { font-size: 0.58rem; color: #94a3b8; }
.wf-cs-item strong{ font-size: 0.78rem; color: #0D1B2E; }
.wf-cs-green { color: #10b981 !important; }
.wf-cs-amber { color: #f59e0b !important; }

/* ── Two-phase panel (Caja → PAGADO) ───────────────────── */
.wf-browser-bar { position: relative; }
.wf-url-phase { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; }
.wf-url-phase--2,
.wf-url-phase--3 { opacity: 0; }

.wf-phase {
  position: absolute; inset: 0; background: #fff;
}
.wf-phase--1 { z-index: 3; overflow: hidden; }
.wf-phase--2 { z-index: 2; opacity: 0; display: flex; flex-direction: column; }
.wf-phase--3 { z-index: 1; opacity: 0; }
.wf-phase--3 .wf-wa { height: 100%; border-radius: 0; border: none; box-shadow: none; }

/* Generic 2-phase: phase 1 fades out at 2.3s, phase 2 fades in at 2.3s and stays */
.wf-panel--active .wf-phase--1 {
  animation: wf-phase-out .5s ease 2.3s forwards;
}
.wf-panel--active .wf-phase--2 {
  animation: wf-phase-in .5s ease 2.3s forwards;
}
@keyframes wf-phase-out { to { opacity: 0; } }
@keyframes wf-phase-in  { to { opacity: 1; } }

/* 3-phase payment panel overrides */
.wf-panel--3phase.wf-panel--active .wf-phase--1,
.wf-panel--3phase.wf-panel--active .wf-url-phase--1 {
  animation: wf-phase-out .5s ease 2.1s forwards;
}
.wf-panel--3phase.wf-panel--active .wf-phase--2,
.wf-panel--3phase.wf-panel--active .wf-url-phase--2 {
  animation: wf-phase-in .5s ease 2.1s forwards, wf-phase-out .5s ease 3.9s forwards;
}
.wf-panel--3phase.wf-panel--active .wf-phase--3,
.wf-panel--3phase.wf-panel--active .wf-url-phase--3 {
  animation: wf-phase-in .5s ease 3.9s forwards;
}
.wf-panel--3phase.wf-panel--active .wf-pagada--anim { animation-delay: 2.7s; }
.wf-panel--3phase.wf-panel--active .wf-toast        { animation-delay: 2.3s; }
.wf-panel--3phase.wf-panel--active .wf-phase--3 .wf-wa-bbl { animation-delay: 4.2s; }

/* ═══ Expedientes section ════════════════════════════════ */
.exp-section { padding: 100px 0; background: #f8fafc; }
.exp-section .section-header { max-width: 900px; }

.exp-demo { display: flex; gap: 48px; align-items: flex-start; }

.exp-steps { display: flex; flex-direction: column; gap: 8px; width: 276px; flex-shrink: 0; }
.exp-step {
  all: unset; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px 13px; border-radius: 12px;
  border: 1.5px solid transparent;
  position: relative; overflow: hidden; width: 100%; box-sizing: border-box;
}
.exp-step:hover { background: #f1f5f9; }
.exp-step--active { background: #eff6ff; border-color: #bfdbfe; }
.exp-step-iconbox {
  width: 34px; height: 34px; border-radius: 8px;
  background: #1E355E; color: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.exp-step-iconbox svg { width: 15px; height: 15px; }
.exp-step-iconbox--med { background: #1E355E; color: #fff; }
.exp-step-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.exp-step-body strong { font-size: 0.82rem; font-weight: 600; color: #0D1B2E; }
.exp-step-body span { font-size: 0.7rem; color: #7088A9; line-height: 1.3; }
.exp-step-prog { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: #e2e8f0; }
.exp-step-fill { height: 100%; width: 0; background: #005EE9; }
.exp-step--active .exp-step-fill { animation: wf-fill 5.5s linear forwards; }

.exp-screen { flex: 1; min-width: 0; position: relative; min-height: 450px; }
.exp-panel { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .4s ease; }
.exp-panel--active { opacity: 1; pointer-events: auto; }

/* Patient list */
.exp-list-body { flex: 1; display: flex; flex-direction: column; background: #f8fafc; padding: 10px 12px; gap: 8px; overflow: hidden; }
.exp-list-topbar { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.exp-search {
  flex: 1; border: 1.5px solid #bfdbfe; border-radius: 8px;
  padding: 5px 9px; font-size: 0.57rem; color: #94a3b8;
  display: flex; align-items: center; gap: 5px; background: #fff;
}
.exp-list-meta { font-size: 0.53rem; color: #94a3b8; white-space: nowrap; }
.exp-nuevo-btn {
  all: unset; background: #1e355e; color: #fff;
  border-radius: 7px; padding: 5px 9px;
  font-size: 0.57rem; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.exp-filters { display: flex; gap: 6px; flex-shrink: 0; align-items: flex-end; }
.exp-filter-col { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.exp-filter-label { font-size: 0.46rem; font-weight: 700; color: #94a3b8; letter-spacing: .05em; text-transform: uppercase; }
.exp-filter {
  border: 1.5px solid #e2e8f0; border-radius: 6px;
  padding: 4px 7px; font-size: 0.55rem; color: #1e355e;
  background: #fff; display: flex; justify-content: space-between; align-items: center;
  white-space: nowrap; overflow: hidden; gap: 4px;
}
.exp-filtrar-btn {
  all: unset; background: #1e355e; color: #fff;
  border-radius: 7px; padding: 5px 10px;
  font-size: 0.57rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.exp-table-wrap { flex: 1; overflow: hidden; background: #fff; border-radius: 8px; border: 1px solid #e2e8f0; }
.exp-table { width: 100%; border-collapse: collapse; font-size: 0.52rem; }
.exp-table thead tr { background: #f8fafc; }
.exp-table th { text-align: left; padding: 5px 7px; font-size: 0.46rem; font-weight: 700; color: #005EE9; letter-spacing: .04em; border-bottom: 1px solid #e2e8f0; }
.exp-table td { padding: 5px 7px; border-bottom: 1px solid #f1f5f9; color: #0D1B2E; vertical-align: middle; }
.exp-td-name { font-weight: 600; }
.exp-td-last { color: #7088A9; }
.exp-td-opts { display: flex; gap: 7px; align-items: center; }

/* Patient detail */
.exp-pt-outer { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.exp-pt-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid #e2e8f0;
  background: #fff; flex-shrink: 0;
}
.exp-pt-back { font-size: 1rem; color: #94a3b8; line-height: 1; }
.exp-pt-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #1e355e; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; flex-shrink: 0;
}
.exp-pt-name-block { flex: 1; min-width: 0; }
.exp-pt-name { font-size: 0.78rem; font-weight: 700; color: #0D1B2E; }
.exp-pt-since { font-size: 0.53rem; color: #94a3b8; }
.exp-pt-edit-btn {
  border: 1.5px solid #e2e8f0; border-radius: 7px;
  padding: 3px 9px; font-size: 0.53rem; color: #1e355e;
  background: #fff; white-space: nowrap;
}

/* Phases */
.exp-phase-container { position: relative; flex: 1; overflow: hidden; }
.exp-phase { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; overflow: hidden; }
.exp-phase--1 { z-index: 4; }
.exp-phase--2 { z-index: 3; opacity: 0; }
.exp-phase--3 { z-index: 2; opacity: 0; }
.exp-phase--4 { z-index: 1; opacity: 0; }
.exp-panel--active .exp-phase--1 { animation: wf-phase-out .5s ease 1.4s forwards; }
.exp-panel--active .exp-phase--2 { animation: wf-phase-in .5s ease 1.4s forwards, wf-phase-out .5s ease 2.8s forwards; }
.exp-panel--active .exp-phase--3 { animation: wf-phase-in .5s ease 2.8s forwards, wf-phase-out .5s ease 4.2s forwards; }
.exp-panel--active .exp-phase--4 { animation: wf-phase-in .5s ease 4.2s forwards; }

/* Asistencia stats */
.exp-asist-title { font-size: 0.64rem; font-weight: 700; color: #0D1B2E; flex-shrink: 0; }
.exp-asist-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; flex-shrink: 0; }
.exp-asist-card { border-radius: 7px; padding: 7px 4px; text-align: center; border: 1px solid rgba(0,0,0,.05); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.exp-asist-n { font-size: 1rem; font-weight: 700; line-height: 1.1; }
.exp-asist-l { font-size: 0.39rem; font-weight: 600; color: #64748b; letter-spacing: .02em; text-transform: uppercase; line-height: 1.3; }

/* Tabs */
.exp-pt-tabs { display: flex; border-bottom: 1px solid #e2e8f0; background: #fff; flex-shrink: 0; }
.exp-pt-tab { padding: 6px 11px; font-size: 0.59rem; color: #7088A9; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.exp-pt-tab--active { color: #0D1B2E; font-weight: 600; border-bottom-color: #1e355e; }

/* Content */
.exp-pt-content { flex: 1; overflow: hidden; background: #f8fafc; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }

/* Actividad */
.exp-act-stats { display: flex; gap: 5px; flex-shrink: 0; }
.exp-stat-card { flex: 1; background: #fff; border: 1px solid #e2e8f0; border-radius: 7px; padding: 5px 4px; text-align: center; }
.exp-stat-n { font-size: 1rem; font-weight: 700; line-height: 1.2; }
.exp-stat-l { font-size: 0.41rem; font-weight: 600; color: #94a3b8; letter-spacing: .04em; text-transform: uppercase; }
.exp-reservas-wrap { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.exp-reservas-title { font-size: 0.64rem; font-weight: 700; color: #0D1B2E; margin-bottom: 5px; flex-shrink: 0; }
.exp-reservas-table { width: 100%; border-collapse: collapse; font-size: 0.51rem; background: #fff; border-radius: 7px; overflow: hidden; border: 1px solid #e2e8f0; }
.exp-reservas-table th { text-align: left; padding: 4px 7px; font-size: 0.45rem; font-weight: 700; color: #005EE9; letter-spacing: .04em; border-bottom: 1px solid #e2e8f0; background: #fff; }
.exp-reservas-table td { padding: 4px 7px; border-bottom: 1px solid #f1f5f9; color: #0D1B2E; }
.exp-res-status { display: inline-block; padding: 1px 5px; border-radius: 20px; font-size: 0.43rem; font-weight: 600; background: #d1fae5; color: #059669; }

/* Ficha Médica */
.exp-fich-header { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.exp-fich-title { font-size: 0.64rem; font-weight: 700; color: #0D1B2E; flex: 1; }
.exp-fich-actions { display: flex; gap: 4px; }
.exp-fich-btn { all: unset; cursor: pointer; padding: 3px 8px; border-radius: 6px; font-size: 0.51rem; font-weight: 600; white-space: nowrap; }
.exp-fich-btn--navy { background: #1e355e; color: #fff; }
.exp-fich-btn--green { background: #059669; color: #fff; }
.exp-fich-entry { background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 10px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.exp-fich-icon { width: 26px; height: 26px; border-radius: 7px; background: #ede9fe; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.7rem; }
.exp-fich-name { font-size: 0.59rem; font-weight: 600; color: #0D1B2E; }
.exp-fich-meta { font-size: 0.49rem; color: #94a3b8; }

/* Archivos */
.exp-arch-header { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.exp-arch-title { font-size: 0.64rem; font-weight: 700; color: #0D1B2E; }
.exp-arch-dropzone { flex: 1; border: 2px dashed #bfdbfe; border-radius: 10px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 16px; }
.exp-arch-drop-title { font-size: 0.64rem; font-weight: 600; color: #0D1B2E; }
.exp-arch-drop-sub { font-size: 0.53rem; color: #94a3b8; max-width: 220px; line-height: 1.4; }
.exp-arch-select-btn { all: unset; cursor: pointer; border: 1.5px solid #e2e8f0; border-radius: 7px; padding: 4px 14px; font-size: 0.57rem; background: #fff; color: #0D1B2E; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .wf-demo { flex-direction: column; gap: 32px; }
  .wf-steps { width: 100%; flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .wf-step  { flex: 1 1 calc(50% - 4px); }
  .wf-screen { min-height: 420px; width: 100%; }
}

/* ==========================================================
   MODAL DEMO
========================================================== */
.demo-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.demo-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.demo-modal {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 32px 80px rgba(10,20,40,.3);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.demo-overlay.open .demo-modal {
  transform: translateY(0);
}

.demo-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid #E2E8F0;
  background: #fff;
  color: #64748b;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.18s, color 0.18s;
}
.demo-close:hover { background: #f1f5f9; color: var(--navy); }

.demo-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 600px;
}
.demo-submit-row { grid-column: 1 / -1; padding: 16px 36px 28px; border-top: 1px solid #E9EEF5; }

/* Left column */
.demo-left {
  padding: 48px 40px;
  border-right: 1px solid #E9EEF5;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.demo-lheader h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
  line-height: 1.25;
}
.demo-lheader p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Form fields */
.demo-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}
.demo-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: .01em;
}
.demo-field input,
.demo-field select {
  padding: 10px 14px;
  border: 1.5px solid #D0DCEC;
  border-radius: 10px;
  font-size: 0.875rem;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.18s;
  font-family: inherit;
}
.demo-field input:focus,
.demo-field select:focus { border-color: var(--blue); }
.demo-field input::placeholder { color: #A8B8CC; }

.demo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.demo-date-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1.5px solid #D0DCEC;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.83rem;
  color: var(--muted);
  background: #F7F9FC;
}
.demo-date-display.has-date {
  border-color: var(--blue);
  color: var(--navy);
  background: rgba(0,94,233,.04);
}
.demo-date-display svg { flex-shrink: 0; stroke: var(--blue); }

.demo-submit { margin-top: 4px; }

.demo-success {
  text-align: center;
  padding: 40px 0;
}
.demo-success-icon {
  width: 56px; height: 56px;
  background: #d1fae5;
  color: #059669;
  border-radius: 50%;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.demo-success h3 { font-size: 1.3rem; color: var(--navy); margin-bottom: 8px; }
.demo-success p  { font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

/* Right column: calendar */
.demo-right {
  padding: 40px 36px;
  background: #F7F9FC;
  border-radius: 0 24px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.demo-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.demo-cal-month {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: capitalize;
}
.demo-cal-btn {
  width: 32px; height: 32px;
  border: 1.5px solid #D0DCEC;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.demo-cal-btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

.demo-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day-header {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 0;
}

.cal-day {
  aspect-ratio: 1;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.cal-day--empty { background: transparent; }
.cal-day--disabled { color: #C8D6E8; cursor: not-allowed; }
.cal-day--available {
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.cal-day--available:hover { background: #e0edff; color: var(--blue); }
.cal-day--today { border: 1.5px solid var(--blue); color: var(--blue); font-weight: 700; }
.cal-day--selected {
  background: var(--blue) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0,94,233,.3);
}

/* Time slots */
.demo-slots-wrap { display: flex; flex-direction: column; gap: 10px; max-height: 280px; overflow-y: auto; padding-right: 4px; }
.demo-slots-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2px;
}
.demo-slots-group { display: flex; flex-direction: column; gap: 6px; }
.demo-slots-sub {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.demo-slots-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.demo-slot {
  padding: 6px 13px;
  border: 1.5px solid #D0DCEC;
  border-radius: 8px;
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.demo-slot:hover { border-color: var(--blue); color: var(--blue); }
.demo-slot--selected {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.demo-slot--taken {
  color: #C8D6E8;
  border-color: #EBF0F7;
  cursor: not-allowed;
  text-decoration: line-through;
}

@media (max-width: 768px) {
  .demo-inner { grid-template-columns: 1fr; }
  .demo-right { border-radius: 0 0 24px 24px; }
  .demo-left  { border-right: none; border-bottom: 1px solid #E9EEF5; padding: 36px 24px; }
  .demo-right { padding: 32px 24px; }
  .demo-row   { grid-template-columns: 1fr; }

  /* Submit rows */
  .demo-submit-row { padding: 12px 20px 20px; }
  .ctc-submit-row  { grid-column: 1 / -1; padding: 16px 28px 24px; border-top: 1px solid #E9EEF5; }
}

/* ===== Contact section – form + calendar panel ===== */
.ctc-panel {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.ctc-form-col {
  padding: 40px 32px;
  border-right: 1px solid #E9EEF5;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.ctc-form-col form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ctc-cal-col {
  padding: 40px 32px;
  background: #F8FAFD;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  min-height: 300px;
}
.ctc-form-col .demo-row { grid-template-columns: 1fr; }

@media (max-width: 900px) {
  .ctc-panel { grid-template-columns: 1fr; }
  .ctc-form-col { border-right: none; border-bottom: 1px solid #E9EEF5; padding: 36px 24px; }
  .ctc-cal-col  { padding: 32px 24px; }
}

/* ===== Reserva Online Demo ===== */
.bd-section {
  padding: 110px 0;
  background: #0D1B2A;
  overflow: hidden;
}
.bd-header {
  text-align: center;
  margin-bottom: 72px;
  opacity: 1;
  transform: none;
}
.bd-header h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 14px;
}
.bd-header p {
  color: #8FA7C8;
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.65;
}

.bd-body {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 72px;
  align-items: center;
}

/* Steps */
.bd-steps { display: flex; flex-direction: column; gap: 0; }
.bd-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  cursor: default;
  position: relative;
  opacity: .45;
  transition: opacity .3s;
}
.bd-step:last-child { border-bottom: none; }
.bd-step--active { opacity: 1; }
.bd-step-num {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 800; color: #8FA7C8;
  flex-shrink: 0;
  transition: background .3s, border-color .3s, color .3s;
  grid-row: 1;
}
.bd-step--active .bd-step-num {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.bd-step-content { grid-column: 2; grid-row: 1; padding-bottom: 10px; }
.bd-step-content strong { display: block; font-size: 0.95rem; color: #fff; font-weight: 700; margin-bottom: 4px; }
.bd-step-content span  { font-size: 0.83rem; color: #8FA7C8; line-height: 1.5; }
.bd-step-bar {
  grid-column: 2; grid-row: 2;
  height: 2px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  overflow: hidden;
}
.bd-step-fill {
  height: 100%;
  width: 0%;
  background: var(--blue);
  border-radius: 2px;
  transition: none;
}
.bd-step--active .bd-step-fill { transition: width 3.4s linear; }

/* Phone mockup */
.bd-phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}
.bd-phone {
  width: 280px;
  background: #1A2A3E;
  border-radius: 40px;
  padding: 14px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.07),
    0 32px 80px rgba(0,0,0,.5),
    0 8px 20px rgba(0,0,0,.3);
  position: relative;
}
.bd-phone-notch {
  width: 80px; height: 8px;
  background: #0D1B2A;
  border-radius: 0 0 8px 8px;
  margin: 0 auto 10px;
}
.bd-screen {
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  min-height: 520px;
  position: relative;
}
.bd-panel {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .4s var(--ease-out);
  overflow-y: auto;
  overflow-x: hidden;
}
.bd-panel--active { opacity: 1; position: relative; }

/* Panel 0: booking page generada por Vera */
.bdp0-header {
  background: #fff; padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid #EEF2F8;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.bdp0-logo {
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
}
.bdp0-name { font-size: 0.75rem; font-weight: 700; color: var(--text); }
.bdp0-map {
  height: 90px; background: #E8EFF7; position: relative; overflow: hidden;
}
.bdp0-map-grid { position: absolute; inset: 0; }
.bdp0-road { position: absolute; background: #fff; }
.bdp0-block { position: absolute; background: #D4DCE8; border-radius: 2px; }
.bdp0-pin {
  position: absolute; top: 42%; left: 50%;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}
.bdp0-map-label {
  position: absolute; bottom: 5px; right: 7px;
  font-size: 0.5rem; color: #6B87A8; font-weight: 500;
}
.bdp0-section { padding: 8px 12px; }
.bdp0-section-title {
  font-size: 0.58rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 7px;
}
.bdp0-divider { height: 1px; background: #EEF2F8; margin: 0 12px; }
.bdp0-sucursales { display: flex; gap: 10px; }
.bdp0-suc { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: default; }
.bdp0-suc-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  color: #fff; border: 2px solid var(--blue);
}
.bdp0-suc-icon--plain { background: #fff; color: var(--muted); border: 1.5px solid #D8E3F0; }
.bdp0-suc span { font-size: 0.55rem; color: var(--text-2); font-weight: 500; text-align: center; max-width: 52px; }
.bdp0-suc--active span { color: var(--blue); font-weight: 700; }
.bdp0-profs { display: flex; gap: 10px; }
.bdp0-prof { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: default; }
.bdp0-prof-av {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 700;
  border: 2.5px solid var(--blue);
}
.bdp0-prof span { font-size: 0.55rem; color: var(--text-2); font-weight: 500; }
.bdp0-prof--active .bdp0-prof-av { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--blue); }
.bdp0-svc-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px 4px;
}
.bdp0-svc-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: #EFF6FF;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue); flex-shrink: 0;
}
.bdp0-svc-title { font-size: 0.75rem; font-weight: 800; color: var(--text); }
.bdp0-svc-sub   { font-size: 0.58rem; color: var(--muted); }
.bdp0-cat { margin: 0 10px 10px; border: 1px solid #E4EAF3; border-radius: 10px; overflow: hidden; }
.bdp0-cat-name {
  padding: 8px 12px; font-size: 0.72rem; font-weight: 700;
  color: var(--text); display: flex; justify-content: space-between;
  background: #F8FAFD; border-bottom: 1px solid #E4EAF3;
}
.bdp0-cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: #fff;
}
.bdp0-item-name { font-size: 0.72rem; font-weight: 700; color: var(--text); margin-bottom: 5px; }
.bdp0-item-meta { display: flex; gap: 6px; }
.bdp0-pill {
  display: inline-flex; align-items: center; gap: 3px;
  background: #F1F5FB; border: 1px solid #E0E8F4;
  border-radius: 100px; padding: 2px 7px;
  font-size: 0.6rem; font-weight: 600; color: var(--text-2);
}
.bdp0-btn {
  background: var(--navy); color: #fff; border: none;
  border-radius: 20px; padding: 6px 14px;
  font-size: 0.68rem; font-weight: 700; cursor: default; font-family: inherit;
  white-space: nowrap;
}

/* Panel 1+: service selection */
.bd-app-bar {
  background: var(--navy);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 8px;
  color: #fff;
}
.bd-app-logo {
  width: 22px; height: 22px;
  background: var(--blue);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.bd-app-name { font-size: 0.75rem; font-weight: 800; }
.bd-app-clinic {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #F0F4FB;
}
.bd-clinic-av {
  width: 28px; height: 28px;
  background: #E0EDFF; border-radius: 8px;
  font-size: 0.62rem; font-weight: 800; color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.bd-clinic-name { font-size: 0.72rem; font-weight: 700; color: var(--text); }
.bd-clinic-sub  { font-size: 0.6rem; color: var(--muted); }
.bd-service-title {
  display: flex; align-items: center; gap: 5px;
  padding: 10px 14px 6px;
  font-size: 0.72rem; font-weight: 700; color: var(--navy);
}
.bd-services { display: flex; flex-direction: column; padding: 0 10px 10px; gap: 6px; }
.bd-service {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  border: 1.5px solid #E4EAF3;
  border-radius: 10px;
  background: #fff;
}
.bd-service--sel { border-color: var(--blue); background: #F0F6FF; }
.bd-service-name { font-size: 0.72rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.bd-service-meta { display: flex; gap: 8px; font-size: 0.6rem; color: var(--muted); font-weight: 500; }
.bd-agendar-btn {
  background: var(--blue); color: #fff; border: none;
  border-radius: 20px; padding: 5px 12px;
  font-size: 0.65rem; font-weight: 700; cursor: default; font-family: inherit;
  white-space: nowrap;
}
.bd-agendar-btn--ghost { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); }

/* Panel 1: calendar */
.bd-panel-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid #F0F4FB;
}
.bd-back { font-size: 1rem; color: var(--blue); cursor: default; }
.bd-panel-title { font-size: 0.78rem; font-weight: 700; color: var(--navy); }
.bd-mini-cal { padding: 10px 14px; }
.bd-cal-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.bd-cal-arrow { font-size: 1rem; color: var(--muted); cursor: default; padding: 0 4px; }
.bd-cal-month { font-size: 0.75rem; font-weight: 700; color: var(--navy); }
.bd-cal-grid {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 2px;
}
.bd-cal-hd { text-align: center; font-size: 0.58rem; font-weight: 700; color: var(--muted); padding: 3px 0; }
.bd-cal-d {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 0.62rem; font-weight: 500; color: var(--text-2);
  border-radius: 6px; cursor: default;
}
.bd-cal-d--off  { color: #D0D8E4; }
.bd-cal-d--dis  { color: #D0D8E4; }
.bd-cal-today   { border: 1.5px solid var(--blue); color: var(--blue); font-weight: 700; }
.bd-cal-sel     { background: var(--blue); color: #fff; font-weight: 700; }
.bd-slots-wrap  { padding: 0 14px 14px; }
.bd-slots-sub   { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 0 5px; }
.bd-slots-row   { display: flex; flex-wrap: wrap; gap: 4px; }
.bd-slot {
  padding: 4px 10px; border: 1.5px solid #D0DCEC;
  border-radius: 6px; font-size: 0.65rem; font-weight: 600; color: var(--navy); cursor: default;
}
.bd-slot--sel { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Panel 2: form */
.bd-form { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.bd-field-label { font-size: 0.62rem; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
.bd-field-input {
  font-size: 0.72rem; color: var(--text); font-weight: 500;
  border: 1.5px solid #D8E3F0; border-radius: 8px; padding: 7px 10px;
  background: #fff;
}
.bd-summary {
  background: #F8FAFD; border-radius: 10px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 5px; margin-top: 4px;
  border: 1px solid #E4EAF3;
}
.bd-summary-row { display: flex; justify-content: space-between; font-size: 0.65rem; color: var(--muted); }
.bd-summary-row span:last-child { color: var(--text); font-weight: 600; }
.bd-summary-total { font-size: 0.72rem; font-weight: 700; border-top: 1px solid #E4EAF3; padding-top: 5px; margin-top: 2px; }
.bd-summary-total span:last-child { color: var(--blue); }
.bd-confirm-btn {
  background: var(--blue); color: #fff; border: none;
  border-radius: 10px; padding: 11px; font-size: 0.78rem; font-weight: 700;
  cursor: default; font-family: inherit; margin-top: 4px;
}

/* Panel 3: confirmación */
.bd-success {
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 16px; text-align: center;
}
.bd-success-circle {
  width: 60px; height: 60px;
  background: #DCFCE7; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #16A34A; margin-bottom: 14px;
}
.bd-success-title { font-size: 1rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.bd-success-sub   { font-size: 0.72rem; color: var(--muted); margin-bottom: 14px; }
.bd-success-card {
  width: 100%;
  border: 1.5px solid #E4EAF3; border-radius: 12px;
  padding: 14px; margin-bottom: 12px;
}
.bd-success-date { font-size: 0.72rem; color: var(--muted); margin-bottom: 4px; }
.bd-success-time { font-size: 2rem; font-weight: 800; color: var(--blue); margin-bottom: 8px; }
.bd-success-place {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 0.68rem; color: var(--muted);
}
.bd-success-email { font-size: 0.68rem; color: var(--muted); line-height: 1.5; }
.bd-success-email strong { color: var(--text); }

/* Notificación toast */
.bd-notif {
  position: absolute;
  bottom: -10px;
  right: -20px;
  background: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.1);
  border: 1px solid #E4EAF3;
  max-width: 240px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s, transform .4s var(--ease-out);
  pointer-events: none;
  z-index: 10;
}
.bd-notif.bd-notif--show { opacity: 1; transform: translateY(0); }
.bd-notif-icon { font-size: 1.1rem; }
.bd-notif-title { font-size: 0.72rem; font-weight: 700; color: var(--navy); }
.bd-notif-desc  { font-size: 0.62rem; color: var(--muted); }
.bd-notif-badge {
  background: #E0F2FE; color: #0369A1;
  font-size: 0.58rem; font-weight: 700; padding: 2px 7px;
  border-radius: 100px; white-space: nowrap;
}

@media (max-width: 960px) {
  .bd-body { grid-template-columns: 1fr; gap: 52px; }
  .bd-phone-wrap { justify-content: center; }
}
@media (max-width: 480px) {
  .bd-phone { width: clamp(280px, 78vw, 340px); }
}

/* ==========================================================
   RESPONSIVE COMPLETE — Mobile-first overhaul
   320 / 375 / 390 / 414 · 768 / 820 / 1024 · 1280+
========================================================== */

/* ── 1024px – iPad Pro landscape ─────────────────────────── */
@media (max-width: 1024px) {
  .hero__center { flex: 0 0 460px; max-width: 460px; }
  .pcard { padding: 26px 22px 28px; }
  .pcard-amount { font-size: 2.8rem; }
}

/* ── 820px – iPad Mini / Air portrait ───────────────────── */
@media (max-width: 820px) {
  .hero--dark { padding-top: calc(var(--nav-h) + 72px); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card--large { grid-column: span 2; }
  .pricing-grid-4 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }
  .pricing-grid-4 .pricing-card--featured { transform: none; }
}

/* ── 768px – iPad portrait ───────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 20px; }

  /* Pricing: 1-col centrado en tablet */
  .pricing-grid-4 {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  /* Hero: reorder on mobile — badge→title→mockup→stats→buttons */
  .hero__split {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding-bottom: 48px;
  }

  /* Dissolve hero__center so its children join hero__split's flex flow */
  .hero__center {
    display: contents;
  }

  /* Assign visual order */
  .hero__badge   { order: 1; align-self: center; margin-bottom: 14px; }
  .hero__title   { order: 2; text-align: center; align-self: center; width: 100%; max-width: 600px; margin-bottom: 24px; }
  .hero__preview { order: 3; display: block !important; width: 100%; height: 218px; overflow: hidden; border-radius: 14px; margin-bottom: 20px; margin-right: 0; }
  .hero__stats   { order: 4; justify-content: center; width: 100%; margin-bottom: 20px; flex-wrap: nowrap; gap: 8px; }
  .hero__actions { order: 5; flex-direction: row; flex-wrap: wrap; width: 100%; gap: 10px; margin-bottom: 0; justify-content: center; }
  .hero__actions .btn { flex: 1 1 130px; min-width: 0; justify-content: center; font-size: 0.78rem; padding: 10px 12px; white-space: nowrap; }

  /* Scale down the dashboard mockup to fit mobile width */
  .hero-dash {
    transform: scale(0.42);
    transform-origin: top left;
    width: 238%;
    height: 520px;
    border-radius: 16px;
  }

  /* Stats: 3 en una sola línea */
  .stat__number { font-size: 1.2rem; }
  .stat__suffix { font-size: 1.05rem; }
  .stat__label  { font-size: 0.62rem; }
  .stat__divider { height: 28px; }

  .hero--dark .hero__title { max-width: 600px; text-align: center; }
  .hero--dark .hero__subtitle { text-align: center; max-width: 100%; }
  .hero--dark .hero__stats { justify-content: center; }

  /* Team carousel: grid so arrows move below the card alongside dots */
  .team-carousel {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    grid-template-rows: auto auto;
    padding: 0;
    gap: 20px 0;
  }
  .tcar-track    { grid-column: 1 / -1; grid-row: 1; }
  .tcar-arrow    { position: static; transform: none; width: 38px; height: 38px; align-self: center; justify-self: center; }
  .tcar-arrow svg { width: 16px; height: 16px; }
  .tcar-arrow--prev { grid-column: 1; grid-row: 2; }
  .tcar-arrow--next { grid-column: 3; grid-row: 2; }
  .tcar-controls { grid-column: 2; grid-row: 2; margin-top: 0; }

  /* Card: grid layout — photo+role left, dept+name right, bio spans full width */
  .tcar-card {
    display: grid;
    grid-template-columns: 76px 1fr;
    column-gap: 14px;
    row-gap: 8px;
    padding: 24px 20px;
    min-height: 0;
    text-align: left;
    align-items: start;
  }
  /* Dissolve both wrappers so avatar, pill, dept, name are direct grid items */
  .tcar-left   { display: contents; }
  .tcar-right  { display: contents; }

  /* Col 1: avatar spans all 3 right-column rows */
  .tcar-avatar    { grid-column: 1; grid-row: 1 / 4; width: 72px; height: 72px; font-size: 1.4rem; align-self: center; }

  /* Col 2, rows 1-3: pill → dept → name */
  .tcar-role-pill { grid-column: 2; grid-row: 1; align-self: center; justify-self: start; }
  .tcar-dept      { grid-column: 2; grid-row: 2; align-self: center; }
  .tcar-name      { grid-column: 2; grid-row: 3; font-size: 1.2rem; white-space: nowrap; align-self: center; }

  /* Rows 4-5: bio and LinkedIn span full width */
  .tcar-bio       { grid-column: 1 / -1; grid-row: 4; margin-top: 8px; }
  .tcar-linkedin  { grid-column: 1 / -1; grid-row: 5; justify-self: start; }

  /* Expedientes section: stack tabs above preview on mobile */
  .exp-demo { flex-direction: column; gap: 24px; }
  .exp-steps { width: 100%; }
  .exp-screen { width: 100%; min-height: 300px; overflow: hidden; }

  /* Scale inner content to fit mobile width (content is ~540px, browser ~347px) */
  .exp-list-body {
    transform: scale(0.64);
    transform-origin: top left;
    width: 156%;
  }

  /* Fix search text: don't wrap */
  .exp-search { overflow: hidden; white-space: nowrap; }

  /* Blog hero */
  .bl-hero { padding: 110px 0 48px; }

  /* Ventas modal: reduce padding on tablet */
  #ventasOverlay { padding: 16px !important; }
  #ventasOverlay > div { padding: 28px 24px !important; }
}

/* ── 640px – Phablet (already handled, but add missing pieces) */
@media (max-width: 640px) {
  /* Buttons: allow wrap so text never overflows cards */
  .btn--full { white-space: normal; line-height: 1.3; }

  /* pcard-desc: override any inline white-space:nowrap */
  .pcard-desc { white-space: normal !important; }

  /* Hero stats row */
  .hero__stats { flex-wrap: wrap; gap: 16px; }

  /* Floating cards hero: hide on small screens */
  .floating-card { display: none; }

  /* Footer: 1-col already handled, add touch spacing */
  .footer-links { padding-bottom: 4px; }

  /* Blog: ensure layout stacks */
  .bl-hero { padding: 100px 0 40px; }
}

/* ── 480px – Mobile large ────────────────────────────────── */
@media (max-width: 480px) {
  /* Base */
  .container { padding: 0 16px; }
  section { padding: 56px 0; }

  /* Navbar pill: compact */
  .navbar { padding: 8px 12px 0; }
  .navbar__inner { padding: 0 12px; height: 60px; }

  /* Touch targets ≥ 44px */
  .btn { min-height: 44px; padding: 11px 18px; }
  .btn--sm { min-height: 40px; padding: 8px 14px; }
  .btn--lg { min-height: 48px; padding: 13px 22px; }
  .navbar__burger { padding: 8px; }
  .mobile-menu nav a { padding: 12px 8px; min-height: 44px; display: flex; align-items: center; }
  .footer-social-link { width: 40px; height: 40px; }

  /* Buttons: always wrap on mobile */
  .btn { white-space: normal; line-height: 1.3; }

  /* Hero */
  .hero { padding-top: calc(60px + 40px); }
  .hero--dark { padding-top: calc(60px + 56px); }
  .hero__actions { flex-direction: row; flex-wrap: wrap; gap: 10px; justify-content: center; }
  .hero__actions .btn { flex: 1 1 120px; min-width: 0; justify-content: center; font-size: 0.78rem; padding: 10px 10px; white-space: nowrap; }
  /* Stats: 3 en una fila horizontal, no wrap */
  .hero__stats { gap: 8px; flex-wrap: nowrap; justify-content: center; }
  .stat__number { font-size: 1.2rem; }
  .stat__suffix { font-size: 1.05rem; }
  .stat__label  { font-size: 0.62rem; }
  .stat__divider { height: 28px; }
  .hero__subtitle { font-size: 1rem; }

  /* Social proof bar */
  .hero__social-proof .container { flex-direction: column; align-items: flex-start; gap: 12px; }

  /* Features */
  .features-grid { grid-template-columns: 1fr; }
  .feature-card--large { grid-column: span 1; }
  .feature-card { padding: 20px 18px; }

  /* Areas */
  .areas-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .area-card { padding: 20px 16px 18px; }

  /* Pricing */
  .pricing-grid-4 { max-width: 100%; }
  .pcard { padding: 22px 18px 24px; }
  .pcard-amount { font-size: 2.4rem; }
  .pcard-desc { white-space: normal !important; }
  .pcard-features li { font-size: 0.84rem; }

  /* Section headers */
  .section-header { margin-bottom: 40px; }
  .section-header p { font-size: 1rem; }

  /* Resources grid */
  .resources-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer { padding: 44px 0 24px; }
  .footer-grid { gap: 28px; padding-bottom: 32px; }
  .footer-brand p { max-width: 100%; }

  /* Demo modal */
  .demo-overlay { padding: 12px; }
  .demo-modal { border-radius: 16px; max-height: 96vh; }
  .demo-left { padding: 28px 18px; gap: 18px; }
  .demo-right { padding: 24px 18px; }
  .demo-lheader h2 { font-size: 1.35rem; }

  /* Ventas modal */
  #ventasOverlay { padding: 12px !important; }
  #ventasOverlay > div { padding: 24px 18px !important; border-radius: 16px !important; }

  /* Contact panel (ctc) */
  .ctc-form-col { padding: 28px 18px; }
  .ctc-cal-col  { padding: 24px 18px; }

  /* Blog layout */
  .bl-hero { padding: 90px 0 36px; }

  /* Workflow steps */
  .wf-steps { flex-direction: column; }
  .wf-step { flex: none; width: 100%; }
}

/* ── 414px – iPhone Plus / Max ───────────────────────────── */
@media (max-width: 414px) {
  .areas-grid { grid-template-columns: repeat(2, 1fr); }
  .pcard { padding: 20px 16px 22px; }
  .pcard-amount { font-size: 2.2rem; }
  .pcard-custom-price { font-size: 1.8rem; }
}

/* ── 390px – iPhone 14 Pro ───────────────────────────────── */
@media (max-width: 390px) {
  .container { padding: 0 14px; }

  /* Navbar */
  .navbar__inner { padding: 0 10px; height: 58px; }
  .navbar__logo { font-size: 0.92rem; gap: 7px; }
  .logo-img { height: 26px; }

  /* Section header */
  .section-header p { font-size: 0.95rem; }
  .section-header { margin-bottom: 32px; }

  /* h2 headings: tighter on small */
  h2 { font-size: clamp(1.5rem, 7vw, 2.2rem); }

  /* Pricing cards */
  .pcard-amount { font-size: 2rem; }
  .pcard { padding: 18px 14px 20px; }
  .pcard-features li { font-size: 0.8rem; gap: 7px; }
  .pcard-badge--featured { font-size: 0.7rem; padding: 4px 10px; }

  /* Areas: 1 col on very small */
  .areas-grid { grid-template-columns: 1fr; }

  /* Hero badge */
  .hero__badge { font-size: 0.7rem; padding: 4px 11px; }

  /* Blog hero */
  .bl-hero { padding: 80px 0 32px; }
}

/* ── 375px – iPhone SE / 8 ───────────────────────────────── */
@media (max-width: 375px) {
  .container { padding: 0 14px; }

  /* Section padding */
  section { padding: 48px 0; }

  /* Hero */
  .hero--dark { padding-top: calc(58px + 48px); }
  .hero__title { letter-spacing: -0.03em; }
  .hero__subtitle { font-size: 0.95rem; }
  /* Stats más compactas en 375px */
  .stat__number { font-size: 1.3rem; }
  .stat__suffix { font-size: 1.1rem; }
  .stat__divider { display: none; }

  /* Pricing */
  .pcard { padding: 16px 14px 18px; }
  .pcard-amount { font-size: 1.9rem; }
  .pcard-name { font-size: 1.2rem; }
  .pcard-desc { font-size: 0.82rem; }
  .pcard-features li { font-size: 0.78rem; }

  /* Footer: compact */
  .footer-grid { gap: 24px; }
  .footer-links h4 { font-size: 0.78rem; margin-bottom: 10px; }
  .footer-links ul li + li { margin-top: 8px; }
  .footer-links a { font-size: 0.78rem; }
}

/* ── 320px – Small mobile ────────────────────────────────── */
@media (max-width: 320px) {
  .container { padding: 0 12px; }
  .navbar__inner { padding: 0 8px; }
  section { padding: 44px 0; }

  /* Hero */
  .hero__actions .btn { font-size: 0.875rem; padding: 10px 14px; min-height: 44px; }

  /* Pricing */
  .pcard { padding: 14px 12px 16px; }
  .pcard-name { font-size: 1.1rem; }
  .pcard-amount { font-size: 1.75rem; }
  .pcard-features { gap: 8px; }
  .pcard-features li { font-size: 0.76rem; }

  /* Areas */
  .areas-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid { gap: 20px; }
  .footer-bottom { gap: 6px; }
  .footer-bottom span { font-size: 0.7rem; }

  /* Blog hero */
  .bl-hero { padding: 72px 0 28px; }

  /* Demo modal */
  .demo-overlay { padding: 8px; }
  #ventasOverlay { padding: 8px !important; }
  #ventasOverlay > div { padding: 20px 14px !important; }
}

/* ── Prevent horizontal overflow site-wide ───────────────── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

/* Ensure tables scroll horizontally on mobile */
table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* Safe area insets for notch/island devices (Safari iOS) */
@supports (padding: max(0px)) {
  .navbar { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
  .footer { padding-bottom: max(28px, env(safe-area-inset-bottom)); }
  .demo-overlay { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  #ventasOverlay { padding-bottom: max(12px, env(safe-area-inset-bottom)) !important; }
}
