/* =========================================================
   Digital Salud · Home (index.php)
   Hoja autónoma: no depende de Bootstrap ni de main_styles.css
   ========================================================= */

:root {
  --blue: #1b6fd0;
  --blue-600: #155bb0;
  --blue-700: #104a91;
  --blue-300: #8bb8ea;
  --blue-50: #eef5fd;
  --green: #22915a;
  --green-600: #1b7a4b;
  --ink: #0f1f3a;
  --text: #3d4a5f;
  --muted: #64748b;
  --line: #e3e9f2;
  --bg: #ffffff;
  --bg-soft: #f6f9fd;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 31, 58, .06), 0 2px 8px rgba(15, 31, 58, .05);
  --shadow: 0 10px 30px -10px rgba(15, 31, 58, .18);
  --header-h: 76px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-700); }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { color: var(--ink); font-weight: 600; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: #fff; }

.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border: 2px solid transparent; border-radius: 999px;
  font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-lg { min-height: 52px; padding: 12px 28px; font-size: 16px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px rgba(27, 111, 208, .6); }
.btn-primary:hover { background: var(--blue-600); color: #fff; }
.btn-accent { background: var(--green); color: #fff; }
.btn-accent:hover { background: var(--green-600); color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--blue-300); color: var(--blue-700); }
.btn-white { background: #fff; color: var(--blue-700); }
.btn-white:hover { background: var(--blue-50); color: var(--blue-700); }
.btn-outline-white { color: #fff; border-color: rgba(255, 255, 255, .6); background: transparent; }
.btn-outline-white:hover { background: rgba(255, 255, 255, .12); border-color: #fff; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(1.6) blur(10px);
  backdrop-filter: saturate(1.6) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -14px rgba(15, 31, 58, .35); }
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand img { width: 152px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.site-nav ul { display: flex; gap: 6px; }
.site-nav ul a {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-size: 15px; font-weight: 600; color: var(--ink);
}
.site-nav ul a:hover { background: var(--blue-50); color: var(--blue-700); }
.site-nav ul a[aria-current="page"] { color: var(--blue); }
.nav-toggle {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1060px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 16px 20px 24px;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 30px -20px rgba(15, 31, 58, .35);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav ul a { padding: 12px; font-size: 17px; }
  .nav-cta { width: 100%; min-height: 50px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: min(680px, calc(100vh - var(--header-h)));
  display: flex; align-items: center;
  padding: 72px 0 120px;
  background: var(--bg-soft);
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 75% center;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(246, 249, 253, .97) 0%, rgba(246, 249, 253, .9) 40%, rgba(246, 249, 253, .2) 72%, rgba(246, 249, 253, 0) 100%);
}
.hero-inner { position: relative; z-index: 1; }
.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.3rem, 1.2rem + 4.2vw, 4.1rem);
  font-weight: 800; letter-spacing: -.035em;
}
.hero-lead { max-width: 52ch; margin-top: 20px; font-size: clamp(1rem, .95rem + .3vw, 1.15rem); color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.hero-chips li {
  padding: 6px 12px 6px 28px; position: relative;
  font-size: 13px; font-weight: 600; color: var(--blue-700);
  background: rgba(255, 255, 255, .85); border: 1px solid var(--line); border-radius: 999px;
}
.hero-chips li::before {
  content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  border-radius: 50%; background: var(--green);
}
@media (max-width: 760px) {
  .hero { padding: 48px 0 104px; min-height: 0; }
  .hero-bg { object-position: 82% center; opacity: .55; }
  .hero::after { background: linear-gradient(180deg, rgba(246, 249, 253, .88) 0%, rgba(246, 249, 253, .95) 100%); }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ---------- Accesos por público ---------- */
.audiences { position: relative; z-index: 2; margin-top: -64px; }
.audiences-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.audience-card {
  display: flex; align-items: center; gap: 18px; width: 100%;
  padding: 24px 26px; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); color: var(--text); font-size: 15px; line-height: 1.5;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.audience-card:hover { transform: translateY(-3px); border-color: var(--blue-300); color: var(--text); box-shadow: 0 18px 40px -16px rgba(15, 31, 58, .3); }
.audience-card strong { display: block; font-size: 18px; margin-bottom: 2px; }
.audience-card > span:nth-child(2) > span { display: block; }
.audience-card .arrow { margin-left: auto; font-size: 22px; color: var(--blue); transition: transform .2s; }
.audience-card:hover .arrow { transform: translateX(4px); }
.audience-icon { flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--blue-50); display: grid; place-items: center; }
.audience-patient .audience-icon { background: #e8f6ee; }
.audience-patient .audience-icon::before { background: var(--green); }
@media (max-width: 760px) {
  .audiences-grid { grid-template-columns: 1fr; gap: 12px; }
  .audience-card { padding: 18px; }
  .audience-icon { width: 48px; height: 48px; }
}

/* ---------- Íconos (máscara SVG: se pintan con CSS, sin JS) ---------- */
.svc-icon::before, .audience-icon::before {
  content: ""; width: 28px; height: 28px; background: var(--blue);
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
}
.ic-calendar   { --m: url("../images/icons/calendar.svg"); }
.ic-tick       { --m: url("../images/icons/tick-mark.svg"); }
.ic-report-med { --m: url("../images/icons/medical-report.svg"); }
.ic-team       { --m: url("../images/icons/medical-team.svg"); }
.ic-bell       { --m: url("../images/icons/notification-bell.svg"); }
.ic-report     { --m: url("../images/icons/report.svg"); }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; }
.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); font-weight: 800; margin-bottom: 16px; }
.section-head p { font-size: 17px; }
@media (max-width: 760px) { .section { padding: 64px 0; } .section-head { margin-bottom: 32px; } }

/* Qué hacemos */
.about-grid { display: grid; grid-template-columns: 1fr 440px; gap: 56px; align-items: center; }
.about-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.point { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.point h3 { font-size: 17px; margin-bottom: 8px; padding-top: 14px; position: relative; }
.point h3::before { content: ""; position: absolute; top: 0; left: 0; width: 32px; height: 3px; border-radius: 3px; background: var(--blue); }
.point p { font-size: 15px; }
.about-figure { margin: 0; position: relative; }
.about-figure::before {
  content: ""; position: absolute; inset: 12% 4% 0; border-radius: 50% 50% var(--radius-lg) var(--radius-lg);
  background: linear-gradient(160deg, var(--blue-50), #dceafb);
}
.about-figure img { position: relative; }
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-figure { max-width: 380px; margin: 0 auto; order: -1; }
}
@media (max-width: 600px) { .about-points { grid-template-columns: 1fr; } }

/* Servicios */
.services { background: var(--bg-soft); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card {
  display: block; height: 100%; padding: 28px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-300); color: var(--text); }
.svc-icon { width: 56px; height: 56px; border-radius: 14px; background: var(--blue-50); display: grid; place-items: center; margin-bottom: 20px; transition: background-color .2s; }
.service-card:hover .svc-icon { background: var(--blue); }
.service-card:hover .svc-icon::before { background: #fff; }
.service-card h3 { font-size: 19px; margin-bottom: 8px; }
.service-card p { font-size: 15px; }
@media (max-width: 960px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } .service-card { padding: 22px; } }

/* Instituciones */
.inst-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.search {
  flex: 1 1 380px; max-width: 520px; display: flex; align-items: center; gap: 10px;
  padding: 0 16px; min-height: 52px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px; color: var(--muted);
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(27, 111, 208, .12); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); padding: 12px 0; }
.search input::placeholder { color: #94a3b8; }
.inst-count { margin: 0; font-size: 14px; color: var(--muted); }

.inst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.inst-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.inst-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.inst-logo { height: 150px; padding: 20px; display: grid; place-items: center; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.inst-logo img { max-height: 110px; width: auto; object-fit: contain; }
.inst-logo .fallback { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); font-size: 24px; font-weight: 800; }
.inst-body { flex: 1; display: flex; flex-direction: column; padding: 20px; }
.inst-body h3 { font-size: 17px; margin-bottom: 4px; }
.inst-meta { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.inst-pros { font-size: 14px; color: var(--text); margin-bottom: 16px; }
.inst-pros li { padding: 3px 0; }
.inst-pros li span { display: block; font-size: 12.5px; color: var(--muted); }
.inst-pros details summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 13.5px; padding: 4px 0; list-style: none; }
.inst-pros details summary::-webkit-details-marker { display: none; }
.inst-pros details[open] summary { display: none; }
.inst-card .btn { margin-top: auto; width: 100%; }
mark { background: #fff1b8; color: inherit; border-radius: 3px; padding: 0 1px; }

.inst-card.skeleton { min-height: 340px; background: linear-gradient(100deg, #f1f5fa 30%, #e8eef6 50%, #f1f5fa 70%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite linear; border-color: transparent; }
@keyframes shimmer { to { background-position: -150% 0; } }
.inst-empty { grid-column: 1 / -1; text-align: center; padding: 40px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.inst-empty .btn { margin-top: 12px; }

/* CTA */
.cta { padding: 0 0 96px; }
.cta-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: 56px; border-radius: var(--radius-lg);
  background: radial-gradient(circle at 85% 20%, rgba(139, 184, 234, .45), transparent 45%), linear-gradient(135deg, var(--blue) 0%, var(--blue-700) 100%);
  color: #dce9fb;
}
.cta-inner > div:first-child { flex: 1 1 420px; }
.cta h2 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 800; margin-bottom: 10px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .cta { padding-bottom: 64px; }
  .cta-inner { padding: 36px 24px; }
  .cta-actions .btn { flex: 1 1 100%; }
}

/* Footer */
.site-footer { background: var(--ink); color: #b6c2d4; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-top: 64px; padding-bottom: 48px; }
.footer-brand img { background: #fff; border-radius: 10px; padding: 8px 10px; box-sizing: content-box; margin-bottom: 16px; }
.footer-brand p { max-width: 34ch; }
.footer-col h2 { color: #fff; font-size: 15px; letter-spacing: .02em; margin-bottom: 14px; }
.footer-col li { padding: 4px 0; overflow-wrap: anywhere; }
.site-footer a { color: #b6c2d4; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 20px 0; font-size: 13.5px; color: #8494ab; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-top: 48px; } }

/* Volver arriba */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 48px; height: 48px; border: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue); color: #fff; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s, transform .25s, visibility .25s, background-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--blue-600); }

/* Modal (dialog nativo) */
.modal {
  width: min(560px, calc(100% - 32px)); padding: 36px 32px 28px;
  border: 0; border-radius: var(--radius-lg); color: var(--text);
  box-shadow: 0 30px 80px -20px rgba(15, 31, 58, .5);
}
.modal::backdrop { background: rgba(15, 31, 58, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal[open] { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.modal h2 { font-size: 22px; margin-bottom: 16px; padding-right: 32px; }
.modal-close-form { position: absolute; top: 14px; right: 14px; margin: 0; }
.modal-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg-soft); color: var(--ink); font-size: 24px; line-height: 1; }
.modal-close:hover { background: var(--blue-50); }
.modal-mail { padding: 14px 16px; background: var(--blue-50); border-radius: 10px; font-size: 15px; overflow-wrap: anywhere; }
.modal-mail a { font-weight: 700; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 24px; }
.modal-actions form { margin: 0; }
@media (max-width: 480px) {
  .modal { padding: 32px 20px 20px; }
  .modal-actions > * { flex: 1 1 100%; }
  .modal-actions .btn { width: 100%; }
}

/* ---------- Páginas internas: encabezado ---------- */
.page-hero {
  padding: 56px 0 64px;
  background: radial-gradient(circle at 90% 0%, rgba(139, 184, 234, .35), transparent 45%), var(--bg-soft);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; max-width: 20ch; }
.page-lead { max-width: 62ch; margin-top: 16px; font-size: clamp(1rem, .95rem + .3vw, 1.15rem); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 14px; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: #b4c0d0; }
.breadcrumbs a { color: var(--muted); font-weight: 600; }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs [aria-current] { color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .page-hero { padding: 36px 0 44px; } }

/* ---------- Contacto ---------- */
.contact { padding-top: 56px; }
.patient-notice {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 20px 24px; margin-bottom: 40px;
  background: #e8f6ee; border: 1px solid #bfe5cf; border-radius: var(--radius);
}
.patient-notice .audience-icon { background: #fff; }
.patient-notice .audience-icon::before { background: var(--green); }
.patient-notice > div { flex: 1 1 280px; }
.patient-notice strong { display: block; font-size: 17px; }
.patient-notice span { font-size: 15px; }
@media (max-width: 600px) { .patient-notice .btn { width: 100%; } }

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.contact-card {
  display: flex; flex-direction: column; padding: 28px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.contact-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); margin-bottom: 18px; }
.contact-card h2 { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.contact-value { font-size: 18px; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; margin-bottom: 18px; }
.contact-email { font-size: 17px; overflow-wrap: normal; word-break: normal; }
.contact-note { font-size: 15px; }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.contact-actions .btn { flex: 1 1 auto; }
.btn.is-done { border-color: var(--green); color: var(--green-600); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-why {
  margin-top: 40px; padding: 36px;
  background: var(--bg-soft); border-radius: var(--radius-lg);
}
.contact-why h2 { font-size: 22px; margin-bottom: 16px; }
.check-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 32px; margin-bottom: 24px; }
.check-list li { position: relative; padding-left: 30px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@media (max-width: 700px) { .check-list { grid-template-columns: 1fr; } .contact-why { padding: 24px; } }

/* ---------- Nosotros ---------- */
.section-soft { background: var(--bg-soft); }
.cta-spaced { padding-top: 96px; }
@media (max-width: 760px) { .cta-spaced { padding-top: 64px; } }

.stats { position: relative; z-index: 2; margin-top: -36px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  overflow: hidden;
}
.stat { padding: 28px 24px; text-align: center; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-num { display: block; font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); font-weight: 800; color: var(--blue); line-height: 1.05; letter-spacing: -.03em; }
.stat-label { display: block; margin-top: 6px; font-size: 14.5px; font-weight: 600; color: var(--muted); }
@media (max-width: 620px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { border-left: 0; border-top: 1px solid var(--line); padding: 20px 12px; }
  .stat:nth-child(-n+2) { border-top: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
}

.prose h2 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.3rem); font-weight: 800; margin-bottom: 18px; }
.prose p { font-size: 17px; }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 0; padding: 0; list-style: none; }
.pillar { padding: 28px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.pillar-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); margin-bottom: 18px; }
.pillar h3 { font-size: 18px; margin-bottom: 8px; }
.pillar p { font-size: 15px; }
@media (max-width: 1000px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Servicios ---------- */
.service-card.is-static:hover { transform: none; box-shadow: none; border-color: var(--line); }
.service-card.is-static:hover .svc-icon { background: var(--blue-50); }
.service-card.is-static:hover .svc-icon::before { background: var(--blue); }
.service-card:target { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(27, 111, 208, .15); }
.pillars-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .pillars-3 { grid-template-columns: 1fr; } }

.faq-wrap { max-width: 860px; }
.faq-list { display: grid; gap: 12px; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
.faq[open] { border-color: var(--blue-300); box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 22px; cursor: pointer; list-style: none;
  font-weight: 700; font-size: 16.5px; color: var(--ink); line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--blue-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%231b6fd0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform .2s;
}
.faq[open] summary::after { transform: rotate(180deg); }
.faq summary:hover { color: var(--blue-700); }
.faq p { padding: 0 22px 20px; margin: 0; font-size: 15.5px; }
.faq-more { text-align: center; margin-top: 28px; }
.faq-more a { font-weight: 700; }

/* ---------- Directorio (profesionales.php) ---------- */
.directory { padding-top: 48px; }
.dir-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.dir-toolbar .search { max-width: none; flex: 2 1 300px; }
.select { flex: 1 1 220px; position: relative; }
.select select {
  width: 100%; min-height: 52px; padding: 0 44px 0 18px;
  font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.select select:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(27, 111, 208, .12); }
.select::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); pointer-events: none;
}
.segmented { display: inline-flex; margin: 0; padding: 4px; border: 0; background: var(--bg-soft); border-radius: 999px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span { display: block; padding: 11px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 700; color: var(--muted); transition: background-color .2s, color .2s; }
.segmented input:checked + span { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); }
.segmented input:focus-visible + span { outline: 3px solid var(--blue-300); outline-offset: 2px; }
.dir-count { margin: 20px 4px 16px; }
@media (max-width: 700px) {
  .segmented { width: 100%; }
  .segmented label { flex: 1; text-align: center; }
}

.pro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pro-card {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: start;
  padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow .2s, border-color .2s;
}
.pro-card:hover { border-color: var(--blue-300); box-shadow: var(--shadow-sm); }
.pro-avatar {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue-50), #d6e6fa); color: var(--blue-700);
  font-weight: 800; font-size: 17px; letter-spacing: .02em;
}
.pro-info h3 { font-size: 16.5px; margin-bottom: 2px; }
.pro-esp { font-size: 14px; font-weight: 600; color: var(--blue-700); margin-bottom: 2px; }
.pro-inst { font-size: 13.5px; color: var(--muted); }
.pro-note { font-size: 12.5px; color: var(--muted); font-style: italic; margin-top: 4px; }
.pro-card .btn { grid-column: 1 / -1; margin-top: 10px; min-height: 42px; }
@media (max-width: 400px) { .pro-grid { grid-template-columns: 1fr; } }

/* ---------- Reserva de turnos ---------- */
.page-hero-compact { padding: 40px 0 44px; }
.booking { max-width: 980px; padding-top: 32px; padding-bottom: 80px; }

.steps { display: flex; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; counter-reset: none; }
.steps li {
  flex: 1; display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; background: var(--bg-soft);
  font-size: 14.5px; font-weight: 700; color: var(--muted);
}
.steps li span {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 1.5px solid var(--line); font-size: 13px;
}
.steps li[aria-current] { background: var(--blue-50); color: var(--blue-700); }
.steps li[aria-current] span { background: var(--blue); border-color: var(--blue); color: #fff; }
.steps li.done { color: var(--green-600); }
.steps li.done span { background: var(--green); border-color: var(--green); color: #fff; }
@media (max-width: 600px) {
  .steps li { flex-direction: column; gap: 4px; padding: 8px 4px; font-size: 12.5px; text-align: center; }
}

.bk-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.bk-panel[hidden] { display: none; }
.bk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.bk-head h2 { font-size: 21px; }
.link-btn { border: 0; background: none; color: var(--blue); font-weight: 700; padding: 6px 4px; }
.link-btn:hover { color: var(--blue-700); text-decoration: underline; }
@media (max-width: 600px) { .bk-panel { padding: 20px 16px; } .bk-head h2 { font-size: 19px; } }

/* Paso 1: profesionales */
#proPicker .search { max-width: none; margin-bottom: 14px; }
.pro-list { display: grid; gap: 8px; max-height: 460px; overflow-y: auto; padding: 2px; margin: -2px; overscroll-behavior: contain; }
.pro-option {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 12px 14px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  color: var(--text); font: inherit; transition: border-color .15s, background-color .15s;
}
button.pro-option:hover { border-color: var(--blue-300); background: var(--blue-50); }
.pro-option.is-selected { border-color: var(--blue); background: var(--blue-50); }
.pro-option.skeleton { height: 76px; border-color: transparent; background: linear-gradient(100deg, #f1f5fa 30%, #e8eef6 50%, #f1f5fa 70%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite linear; }
.pro-option .pro-avatar { flex: none; width: 46px; height: 46px; font-size: 15px; }
.pro-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.pro-txt strong { font-size: 16px; }
.pro-txt .pro-esp { font-size: 14px; margin: 0; }
.pro-txt .pro-inst { font-size: 13px; color: var(--muted); }
.tag { margin-left: auto; flex: none; padding: 4px 10px; border-radius: 999px; background: #fff4e0; color: #8a5300; font-size: 12px; font-weight: 700; }
.pro-empty { padding: 20px; text-align: center; color: var(--muted); }
@media (max-width: 520px) { .tag { display: none; } }

/* Paso 2: agenda */
.agenda-loading { display: flex; align-items: center; gap: 12px; padding: 24px 4px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--blue-50); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.agenda-grid { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
@media (max-width: 760px) { .agenda-grid { grid-template-columns: 1fr; gap: 20px; } }

.cal { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { text-transform: capitalize; color: var(--ink); }
.cal-nav { width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--bg-soft); color: var(--ink); font-size: 22px; line-height: 1; }
.cal-nav:hover:not(:disabled) { background: var(--blue-50); color: var(--blue); }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-week, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-week span { font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-day {
  aspect-ratio: 1; min-height: 38px; border: 0; border-radius: 10px; background: transparent;
  font: inherit; font-size: 14.5px; font-weight: 600; color: #b4bfcd; position: relative;
}
.cal-day.has { color: var(--ink); background: #e8f6ee; }
.cal-day.has::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--green); }
.cal-day.has:hover { background: #d3efdf; }
.cal-day.sel { background: var(--blue); color: #fff; }
.cal-day.sel::after { background: #fff; }
.cal-day.today:not(.sel) { box-shadow: inset 0 0 0 1.5px var(--blue-300); }
.cal-day:disabled { cursor: default; }
.cal-legend { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.cal-legend .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.slots h3 { font-size: 18px; text-transform: none; }
.slots h3::first-letter { text-transform: uppercase; }
.slots-count { font-size: 14px; color: var(--muted); margin: 2px 0 14px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slot {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 6px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit;
  transition: border-color .15s, background-color .15s, transform .15s;
}
.slot:hover:not(:disabled) { border-color: var(--blue); background: var(--blue-50); transform: translateY(-1px); }
.slot:disabled { opacity: .55; cursor: wait; }
.slot.is-loading { opacity: 1; border-color: var(--blue); background: var(--blue-50); }
.slot-hora { font-size: 17px; font-weight: 800; color: var(--ink); }
.slot-tipo { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.25; }
.slot-tipo i { flex: none; width: 7px; height: 7px; border-radius: 50%; }

.sin-web h3 { font-size: 18px; margin-bottom: 8px; }
.sin-web-sub { font-weight: 700; color: var(--ink); margin: 12px 0 4px; }
.horarios { margin: 0 0 8px; padding: 0; list-style: none; }
.horarios li { padding: 3px 0; }

/* Paso 3: datos */
.turno-resumen { margin-bottom: 16px; }
.resumen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; margin: 0; padding: 18px 20px; background: var(--bg-soft); border-radius: var(--radius); }
.resumen dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.resumen dd { margin: 2px 0 0; font-weight: 700; color: var(--ink); }
.resumen dd::first-letter { text-transform: uppercase; }
.resumen dd span { font-weight: 500; color: var(--muted); font-size: 14px; }
@media (max-width: 560px) { .resumen { grid-template-columns: 1fr; } }

.timer { display: block; margin: 0 0 22px; padding: 10px 14px; border-radius: 10px; background: #fff8e6; color: #7a4d00; font-size: 14.5px; line-height: 1.5; }
.timer strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.timer.is-low { background: #fdecec; color: #a02a2a; }

.bk-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 20px; }
.field { display: flex; flex-direction: column; margin-bottom: 12px; }
.field label { font-weight: 700; font-size: 14.5px; color: var(--ink); margin-bottom: 6px; }
.field label span { color: #c0392b; }
.field label .opt { color: var(--muted); font-weight: 500; }
.field input {
  min-height: 50px; padding: 10px 14px; font: inherit; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(27, 111, 208, .12); }
.field input[aria-invalid="true"] { border-color: #d64545; box-shadow: 0 0 0 4px rgba(214, 69, 69, .1); }
.field-hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.field-error { font-size: 13.5px; font-weight: 600; color: #c0392b; margin: 6px 0 0; }
.field-error:empty { display: none; }
.form-note { grid-column: 1 / -1; font-size: 13px; color: var(--muted); margin: 0; }
.bk-form .notice { grid-column: 1 / -1; }
.bk-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: 12px; }
.bk-actions-center { justify-content: center; }
@media (max-width: 640px) {
  .bk-form { grid-template-columns: 1fr; }
  .bk-actions { flex-direction: column-reverse; }
  .bk-actions .btn { width: 100%; }
}

/* Éxito */
.bk-success { text-align: center; padding: 40px 28px; }
.bk-success:focus { outline: 0; }
.success-icon { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: #e8f6ee; color: var(--green); }
.bk-success h2 { font-size: 26px; margin-bottom: 18px; }
.bk-success .resumen { text-align: left; max-width: 620px; margin: 0 auto 18px; }
.bk-success > p { max-width: 560px; margin: 0 auto; }
.bk-success .bk-actions { margin-top: 24px; }

/* Avisos */
.notice { padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 15px; border: 1px solid transparent; }
.notice-info { background: var(--blue-50); border-color: #cfe1f7; color: #16427a; }
.notice-warn { background: #fff8e6; border-color: #f5dfa8; color: #7a4d00; }
.notice-error { background: #fdecec; border-color: #f4c7c7; color: #8f2424; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Reserva: foto del profesional (si no carga, quedan las iniciales) y teléfono para los que dan turnos por teléfono */
.pro-avatar.has-foto { overflow: hidden; padding: 0; background: #fff; }
.pro-avatar.has-foto img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tag.tag-tel { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tag.tag-online { background: #e3f5ea; color: #1e6b3c; white-space: nowrap; }
.tag.tag-tel b { font-weight: 800; }
@media (max-width: 520px) {
  .pro-option { flex-wrap: wrap; }
  .pro-option .pro-txt { flex: 1 1 0; min-width: 0; }
  .tag.tag-tel { flex-basis: calc(100% - 58px); }
  .tag.tag-tel { display: block; margin-left: 58px; white-space: normal; line-height: 1.4; text-align: left; border-radius: 10px; }
  .tag.tag-tel svg { vertical-align: -1px; margin-right: 3px; }
  .tag.tag-tel b { white-space: nowrap; }
}
