/* =================================================================
   Cita1 — sistema de diseño
   Paleta basada en el logo (azul tipo Telegram + verde tipo WhatsApp)
   sobre fondo blanco. Tipografía de sistema (sin webfonts externas
   por rendimiento y privacidad/GDPR).
   ================================================================= */

:root {
  /* Marca */
  --navy: #16357d;          /* azul principal del logo */
  --navy-600: #1f47a0;
  --navy-700: #122b66;
  --navy-900: #0b1e47;      /* footer / fondos oscuros */
  --tg-blue: #229ed9;       /* acento tipo Telegram */
  --tg-blue-soft: #e6f4fc;
  --wa-green: #1ea65a;      /* verde principal del logo (acento decorativo) */
  --wa-green-600: #178c4b;
  --wa-green-bright: #25d366;/* verde de marca WhatsApp (chips) */
  --wa-green-soft: #e7f6ee;
  --cta-green: #157a41;     /* verde accesible para texto blanco (>=4.5:1) */
  --cta-green-hover: #11663a;
  --tg-blue-ink: #176594;   /* azul accesible para texto/enlaces (>=4.5:1) */
  --tg-chip-ink: #0e6a98;   /* azul accesible sobre fondo azul suave */
  --wa-chip-ink: #0c6e39;   /* verde accesible sobre fondo verde suave */

  /* Neutros */
  --ink: #0f1b33;
  --muted: #5b6577;
  --line: #e4e9f2;
  --bg: #ffffff;
  --soft: #f4f7fb;
  --soft-2: #eaf0f9;
  --white: #ffffff;

  /* Sistema */
  --container: 1140px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 51, .06), 0 1px 3px rgba(15, 27, 51, .08);
  --shadow: 0 10px 30px -12px rgba(15, 27, 51, .18);
  --shadow-lg: 0 30px 60px -20px rgba(15, 27, 51, .25);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--navy-600); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
:focus-visible { outline: 3px solid var(--tg-blue); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--soft { background: var(--soft); }
.section--navy { background: var(--navy-900); color: #d7e0f2; }
.section--navy h2, .section--navy h3 { color: #fff; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--navy); background: var(--soft-2);
  padding: .4rem .8rem; border-radius: 999px; margin-bottom: 1rem;
}
.section-head { max-width: 720px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head p { color: var(--muted); font-size: 1.12rem; }
.lead { font-size: 1.18rem; color: var(--muted); }
.text-center { text-align: center; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font: inherit; font-weight: 700; line-height: 1;
  padding: .85rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s, background .2s, color .2s;
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--cta-green); color: #fff; box-shadow: 0 8px 20px -8px rgba(21, 122, 65, .6); }
.btn--primary:hover { background: var(--cta-green-hover); color: #fff; box-shadow: 0 12px 26px -8px rgba(21, 122, 65, .65); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-600); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { background: var(--soft); color: var(--navy); border-color: var(--soft-2); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--soft); color: var(--navy); }
.btn--lg { padding: 1.05rem 1.8rem; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--navy); font-size: 1.15rem; }
.brand img { height: 40px; width: auto; }
.nav-links { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); font-weight: 600; font-size: .98rem; padding: .5rem .75rem; border-radius: 8px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--navy); background: var(--soft); }
.nav-actions { display: flex; align-items: center; gap: .6rem; }
.nav-toggle { display: none; background: none; border: 0; padding: .4rem; cursor: pointer; color: var(--navy); }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links, .nav-actions .btn--nav-cta { display: none; }
  .site-nav[data-open="true"] .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 0; right: 0; top: 72px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 12px 20px 20px; gap: .2rem;
  }
  .site-nav[data-open="true"] .nav-links a { padding: .75rem .5rem; }
  .site-nav[data-open="true"] .nav-links .btn { margin-top: .5rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(40px, 6vw, 72px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 85% 0%, var(--tg-blue-soft) 0%, transparent 60%),
    radial-gradient(50% 50% at 5% 20%, var(--wa-green-soft) 0%, transparent 55%);
}
.hero__inner { text-align: center; max-width: 820px; margin: 0 auto; }
.hero h1 { margin-bottom: 1rem; }
.hero h1 .accent { color: var(--navy); }
.hero p.lead { margin: 0 auto 1.6rem; max-width: 640px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-bottom: 1.1rem; }
.hero__trust { display: inline-flex; flex-wrap: wrap; gap: 1rem 1.4rem; justify-content: center; color: var(--muted); font-size: .92rem; font-weight: 600; }
.hero__trust span { display: inline-flex; align-items: center; gap: .4rem; }
.dot-wa, .dot-tg { width: 10px; height: 10px; border-radius: 50%; }
.dot-wa { background: var(--wa-green-bright); }
.dot-tg { background: var(--tg-blue); }

/* ---------- Carrusel ---------- */
.carousel { margin-top: clamp(36px, 5vw, 56px); position: relative; }
.carousel__viewport { overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line); background: #fff; }
.carousel__track { display: flex; transition: transform .6s var(--ease); }
@media (prefers-reduced-motion: reduce) { .carousel__track { transition: none; } }
.carousel__slide { min-width: 100%; margin: 0; }
.carousel__slide img { display: block; width: 100%; height: auto; aspect-ratio: 1278 / 690; object-fit: contain; background: #fff; }
.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .92); color: var(--navy); cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow); transition: background .2s, transform .2s;
}
.carousel__btn:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.carousel__btn svg { width: 22px; height: 22px; }
.carousel__btn--prev { left: 14px; }
.carousel__btn--next { right: 14px; }
.carousel__pause {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  display: inline-flex; align-items: center; gap: .35rem;
  height: 38px; padding: 0 .8rem 0 .65rem; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .92); color: var(--navy);
  font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: background .2s;
}
.carousel__pause:hover { background: #fff; }
.carousel__pause svg { width: 16px; height: 16px; }
.carousel__dots { display: flex; gap: .5rem; justify-content: center; margin-top: 1.1rem; }
.carousel__dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: var(--soft-2); cursor: pointer; transition: width .3s var(--ease), background .3s; }
.carousel__dot[aria-current="true"] { width: 30px; background: var(--wa-green); }
@media (max-width: 640px) { .carousel__btn { display: none; } }

/* ---------- Tarjetas / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  margin-bottom: 16px; background: var(--soft-2); color: var(--navy);
}
.card__icon svg { width: 26px; height: 26px; }
.card__icon--green { background: var(--wa-green-soft); color: var(--wa-green-600); }
.card__icon--blue { background: var(--tg-blue-soft); color: var(--tg-blue); }

/* Pasos numerados */
.step { position: relative; }
.step__num {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 1.2rem; color: #fff; background: var(--navy); margin-bottom: 14px;
}
.step:nth-child(2) .step__num { background: var(--tg-blue); }
.step:nth-child(3) .step__num { background: var(--wa-green); }
.step:nth-child(4) .step__num { background: var(--navy-600); }

/* Lista de comprobación */
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { position: relative; padding-left: 2rem; margin-bottom: .7rem; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 1.3rem; height: 1.3rem;
  background: var(--wa-green-soft); border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23178c4b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: .9rem; background-repeat: no-repeat; background-position: center;
}

/* Sectores */
.sector { display: flex; align-items: center; gap: .7rem; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 600; box-shadow: var(--shadow-sm); }
.sector svg { width: 24px; height: 24px; color: var(--navy); flex: none; }

/* ---------- Precios ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; align-items: stretch; max-width: 800px; margin-inline: auto; }
@media (max-width: 560px) { .pricing { grid-template-columns: 1fr; max-width: 420px; } }
.plan { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.plan--featured { border-color: var(--cta-green); box-shadow: var(--shadow); position: relative; }
.plan__tag { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--cta-green); color: #fff; font-size: .78rem; font-weight: 700; padding: .3rem .8rem; border-radius: 999px; }
.plan h3 { font-size: 1.3rem; }
.plan__price { font-size: 2rem; font-weight: 800; color: var(--navy); margin: .2rem 0; }
.plan__price small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.plan li { padding-left: 1.7rem; position: relative; margin-bottom: .55rem; color: var(--muted); font-size: .96rem; }
.plan li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.05rem; height: 1.05rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231ea65a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; }
.plan .btn { margin-top: auto; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 60%, #143a86 100%); color: #fff; border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 64px); text-align: center; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfdcf6; max-width: 560px; margin: 0 auto 1.6rem; }
.cta-band .hero__cta { justify-content: center; }

/* ---------- Tabla comparativa ---------- */
.compare { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th { background: var(--soft); font-size: .95rem; }
.compare thead th:last-child { background: var(--wa-green-soft); color: var(--wa-chip-ink); }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 600; }
@media (max-width: 640px) {
  .compare, .compare tbody, .compare tr, .compare td { display: block; width: 100%; }
  .compare thead { display: none; }
  .compare tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .compare tbody tr:last-child { border-bottom: 0; }
  .compare td { border: 0; padding: 6px 18px; }
  .compare td:first-child { font-weight: 800; color: var(--navy); font-size: 1.05rem; padding-top: 14px; }
  .compare td[data-label]::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 2px; }
  .compare td[data-label="Con Cita1"] { color: var(--wa-green-600); font-weight: 600; }
  .compare td[data-label="Con Cita1"]::before { color: var(--wa-green-600); }
}

/* ---------- Acerca de / datos legales ---------- */
.legal-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.legal-card dl { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: .6rem 1rem; margin: 0; }
.legal-card dt { font-weight: 700; color: var(--navy); }
.legal-card dd { margin: 0; color: var(--ink); }
@media (max-width: 560px) { .legal-card dl { grid-template-columns: 1fr; gap: .1rem 0; } .legal-card dd { margin-bottom: .7rem; } }

/* ---------- Prosa (privacidad / términos) ---------- */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.prose h2:first-of-type { border-top: 0; padding-top: 0; }
.prose h3 { font-size: 1.12rem; margin-top: 1.5rem; }
.prose p, .prose li { color: #2c3852; }
.prose ul { padding-left: 1.3rem; }
.prose a { color: var(--tg-blue-ink); text-decoration: underline; }
.prose .toc { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.prose .toc ol { margin: .5rem 0 0; }
.legal-meta { color: var(--muted); font-size: .92rem; }

.page-hero { background: var(--soft); border-bottom: 1px solid var(--line); padding: clamp(40px, 6vw, 72px) 0; }
.page-hero .eyebrow { background: #fff; }
.page-hero p { color: var(--muted); font-size: 1.12rem; max-width: 680px; }

/* ---------- Formulario / contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .95rem; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; padding: .8rem 1rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--tg-blue); box-shadow: 0 0 0 3px var(--tg-blue-soft); }
.contact-card { background: var(--navy-900); color: #cdd9f0; border-radius: var(--radius); padding: 30px; }
.contact-card h3 { color: #fff; }
.contact-card a { color: #fff; text-decoration: underline; }
.contact-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.contact-list li { display: flex; gap: .7rem; padding: .55rem 0; align-items: flex-start; }
.contact-list svg { width: 20px; height: 20px; flex: none; color: var(--wa-green-bright); margin-top: .2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #aebbd6; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; }
.footer-badge { display: inline-flex; align-items: center; gap: .6rem; background: #fff; padding: .5rem .7rem; border-radius: 12px; }
.footer-badge img { height: 34px; width: auto; }
.site-footer h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; margin: 0 0 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .6rem; }
.site-footer a { color: #aebbd6; }
.site-footer a:hover { color: #fff; }
.footer-about { max-width: 320px; font-size: .92rem; line-height: 1.6; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding-top: 22px; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; font-size: .86rem; }
.footer-bottom a { color: #cdd9f0; text-decoration: underline; }

/* ---------- Utilidades ---------- */
.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: -999px; top: 0; background: var(--navy); color: #fff; padding: .7rem 1rem; border-radius: 0 0 8px 0; z-index: 100; }
.skip-link:focus { left: 0; color: #fff; }
.chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; }
.chip--wa { background: var(--wa-green-soft); color: var(--wa-chip-ink); }
.chip--tg { background: var(--tg-blue-soft); color: var(--tg-chip-ink); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
