/* ==========================================================================
   Cresfy / Sol Sánchez Such — sistema de diseño
   Navy #0E1A2B · Crema #F4F1EA · Verde #12B76A/#22C55E · Dorado #C99A3B · Ámbar CTA #FCA311
   ========================================================================== */

:root {
  --navy: #0E1A2B;
  --navy-2: #0A1421;
  --crema: #F4F1EA;
  --crema-band: #EFEBE1;
  --verde: #12B76A;
  --verde-2: #22C55E;
  --verde-hover: #0E9E5F;
  --dorado: #C99A3B;
  --ambar: #FCA311;
  --ambar-hover: #FFC04D;
  --texto-sec: #46586E;
  --texto-mut: #8A97A6;
  --borde: rgba(14, 26, 43, 0.10);
  --borde-fuerte: rgba(14, 26, 43, 0.22);

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Sora', system-ui, -apple-system, Segoe UI, sans-serif;

  --container: 1120px;
  --radius: 14px;
  --skew: skewX(-15deg);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--crema);
  color: var(--navy);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Los campos de formulario siguen siendo seleccionables (hace falta para escribir/editar) */
input, textarea, select {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
}

img { max-width: 100%; display: block; }
a { color: var(--verde); text-decoration: none; }
a:hover { color: var(--verde-hover); }

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2.5px solid var(--verde);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--navy);
  color: var(--crema);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 1000;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; color: var(--crema); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(22px, 5vw, 56px); }

.eyebrow {
  margin: 0 0 16px;
  font-size: clamp(11.5px, 1.2vw, 13px);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dorado);
}

.accent-bar {
  display: block;
  width: clamp(90px, 10vw, 120px);
  height: 8px;
  margin-top: 20px;
  border-radius: 3px;
  background: var(--verde);
  transform: var(--skew);
}
.accent-bar.center { margin-left: auto; margin-right: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin: 0;
}
h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.08; }
h2 { font-size: clamp(28px, 3.6vw, 46px); line-height: 1.1; }
h3 { font-size: clamp(19px, 1.9vw, 23px); line-height: 1.15; }

em, .accent-italic { font-style: italic; color: var(--verde); }

p { line-height: 1.6; color: var(--texto-sec); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(2px); }
.btn-verde { background: var(--verde); color: var(--navy); }
.btn-verde:hover { background: var(--verde-2); color: var(--navy); }
.btn-ambar { background: var(--ambar); color: var(--navy); }
.btn-ambar:hover { background: var(--ambar-hover); color: var(--navy); }
.btn-outline {
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid var(--borde-fuerte);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover { background: var(--verde); color: var(--navy); border-color: var(--verde); }
.btn-text {
  color: var(--navy);
  font-weight: 600;
  font-size: 15px;
  border-bottom: 2px solid var(--verde);
  padding-bottom: 2px;
  display: inline-flex;
}
.btn-text:hover { opacity: .6; color: var(--navy); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  border-bottom: 1px solid var(--borde);
  background: var(--crema);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -12px rgba(14, 26, 43, 0.22); }
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(22px, 5vw, 56px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--navy);
}
.brand img { height: 28px; width: auto; }
.brand-name { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.01em; line-height: 1; }
.brand-tick { display: inline-block; width: 3px; height: 20px; border-radius: 2px; background: var(--verde); transform: skewX(-14deg); }
.brand-sub { font-size: 11px; font-weight: 600; letter-spacing: 0.22em; color: rgba(14, 26, 43, 0.5); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--borde-fuerte);
  background: transparent;
  cursor: pointer;
}
.nav-toggle .bar { display: block; width: 20px; height: 2px; background: var(--navy); position: relative; }
.nav-toggle .bar::before, .nav-toggle .bar::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--navy); transition: transform .2s ease; }
.nav-toggle .bar::before { top: -6px; }
.nav-toggle .bar::after { top: 6px; }

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(18px, 2.4vw, 30px);
}
.nav-links a { font-size: 14px; font-weight: 500; color: var(--texto-sec); }
.nav-links a[aria-current="page"] { color: var(--navy); font-weight: 600; border-bottom: 2px solid var(--verde); padding-bottom: 2px; }
.nav-cta { flex-shrink: 0; min-height: 44px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; order: 3; }
  .nav-links {
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav-links a { display: block; width: 100%; padding: 12px 4px; border-bottom: 1px solid var(--borde); }
  .site-header.nav-open .nav-links { max-height: 420px; }
  .nav-bar { flex-wrap: wrap; }
}

/* ---------- Secciones ---------- */
section { position: relative; padding: clamp(56px, 7vw, 96px) clamp(22px, 5vw, 56px); }
section.band-crema { background: var(--crema); border-top: 1px solid var(--borde); }
section.band-beige { background: var(--crema-band); border-top: 1px solid var(--borde); }
section.band-navy { background: var(--navy); color: var(--crema); }
section.hero { padding-top: clamp(32px, 5vw, 52px); padding-bottom: clamp(40px, 5vw, 64px); overflow: hidden; }

.section-inner { max-width: 900px; margin: 0 auto; }
.section-inner.wide { max-width: var(--container); }
.section-inner.narrow { max-width: 820px; }

.deco-skew {
  position: absolute;
  background: rgba(201, 154, 59, 0.07);
  transform: var(--skew);
  filter: blur(2px);
  pointer-events: none;
}

/* ---------- Tarjetas ---------- */
.card {
  background: #FFFFFF;
  border: 1px solid rgba(14, 26, 43, 0.09);
  border-radius: var(--radius);
  padding: clamp(22px, 2.4vw, 28px);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(18, 183, 106, 0.55); box-shadow: 0 18px 40px -24px rgba(14, 26, 43, 0.45); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(14, 26, 43, 0.16);
  background: rgba(255, 255, 255, 0.5);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- FAQ (details/summary nativo) ---------- */
details.faq { background: #FFFFFF; border: 1px solid var(--borde); border-radius: 12px; overflow: hidden; }
details.faq + details.faq { margin-top: 12px; }
details.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-size: clamp(16px, 1.5vw, 18px);
  font-weight: 600;
  color: var(--navy);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq .faq-plus { flex: 0 0 auto; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; line-height: 1; color: var(--verde); transition: transform .2s ease; }
details.faq[open] .faq-plus { transform: rotate(45deg); }
details.faq .faq-body { padding: 0 22px 22px; font-size: clamp(15px, 1.4vw, 16px); line-height: 1.62; color: var(--texto-sec); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-2); color: var(--crema); padding: clamp(48px, 6vw, 72px) clamp(22px, 5vw, 56px) clamp(28px, 3vw, 36px); }
.footer-grid { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: clamp(28px, 3vw, 44px); }
.footer-brand { min-width: 220px; display: flex; flex-direction: column; gap: 14px; }
.footer-wordmark { font-family: var(--font-display); font-size: 28px; color: var(--crema); }
.footer-wordmark .y { color: var(--verde-2); }
.footer-col { display: flex; flex-direction: column; gap: 13px; }
.footer-col h2 { font-family: var(--font-body); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--verde-2); margin: 0; }
.footer-col a { font-size: 14px; color: rgba(244, 241, 234, 0.72); }
.footer-col a:hover { color: var(--verde-2); }
.footer-bottom { max-width: var(--container); margin: clamp(40px, 5vw, 56px) auto 0; padding-top: 22px; border-top: 1px solid rgba(244, 241, 234, 0.12); font-size: 12px; color: rgba(244, 241, 234, 0.45); }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Utilidades responsive ---------- */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.flex-hero { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(28px, 4vw, 56px); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.photo-frame { position: relative; width: 100%; min-height: clamp(340px, 42vw, 460px); border-radius: 16px; overflow: hidden; border: 1px solid var(--borde); background: rgba(127, 127, 127, 0.15); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.photo-frame .tick { position: absolute; bottom: 28px; width: 80px; height: 12px; border-radius: 3px; background: var(--verde); transform: var(--skew); }

/* Foto placeholder (temporal hasta subir foto final en alta resolución) */
.photo-frame.placeholder { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(14,26,43,0.06), rgba(18,183,106,0.10)); }
.photo-frame.placeholder .placeholder-label { font-size: 13px; font-weight: 600; color: var(--texto-mut); text-align: center; padding: 0 24px; }

/* ---------- Formulario de contacto ---------- */
.contact-card { max-width: 560px; margin: 0 auto; background: #FFFFFF; border: 1px solid var(--borde); border-radius: 18px; padding: clamp(26px, 3vw, 34px); }
.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--navy);
  background: var(--crema);
  border: 1px solid var(--borde-fuerte);
  border-radius: 8px;
  padding: 13px 14px;
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: 12px; color: var(--texto-mut); margin-top: 10px; text-align: center; }

/* ---------- Test de nivel (Cursos) ---------- */
.quiz-card { width: 100%; max-width: 580px; margin: clamp(28px, 3vw, 36px) auto 0; background: #FFFFFF; border: 1.5px solid rgba(18, 183, 106, 0.45); border-radius: 16px; overflow: hidden; text-align: left; box-shadow: 0 16px 40px rgba(18, 183, 106, 0.16); }
.quiz-card summary { background: rgba(18, 183, 106, 0.09); }
.quiz-badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 11px; border-radius: 999px; background: var(--verde); color: var(--navy); font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; transform: skewX(-14deg); }
.quiz-badge span { display: inline-block; transform: skewX(14deg); }
.quiz-body { padding: 0 22px 24px; }
.quiz-dots { display: flex; gap: 5px; margin-bottom: 18px; }
.quiz-dot { flex: 1; height: 5px; border-radius: 3px; background: rgba(14, 26, 43, 0.12); transition: background .3s ease; }
.quiz-dot.done { background: var(--verde); }
.quiz-dot.current { background: rgba(18, 183, 106, 0.4); }
.quiz-qnum { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texto-mut); margin-bottom: 8px; }
.quiz-qtext { font-family: var(--font-display); font-size: clamp(17px, 1.9vw, 21px); line-height: 1.3; color: var(--navy); margin-bottom: 18px; }
.quiz-opts { display: flex; flex-direction: column; gap: 9px; }
.quiz-opt { text-align: left; background: var(--crema); border: 1px solid var(--borde); border-radius: 12px; padding: 14px 16px; font-family: var(--font-body); font-size: 14.5px; color: #2A3A4D; cursor: pointer; transition: all .15s ease; }
.quiz-opt:hover { border-color: var(--verde); background: rgba(18, 183, 106, 0.06); color: var(--navy); }
.quiz-result { text-align: center; }
.quiz-result-badge { display: inline-block; background: rgba(18, 183, 106, 0.12); color: var(--verde-hover); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px; }
.quiz-topics { text-align: left; background: var(--crema); border: 1px solid var(--borde); border-radius: 14px; padding: 18px 20px; margin: 20px 0; }
.quiz-topics p { margin: 0 0 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--texto-mut); }
.quiz-topics ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.quiz-topics li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #2A3A4D; }
.quiz-actions { display: flex; flex-direction: column; gap: 9px; }
.quiz-restart { background: none; border: none; padding: 8px; font-family: var(--font-body); font-size: 13px; color: var(--texto-mut); cursor: pointer; text-decoration: underline; }

/* ---------- Temario (cursos) ---------- */
.temario-list { margin: 28px 0 0; padding: 0; list-style: none; width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.temario-list li { display: flex; gap: 13px; align-items: flex-start; background: #FFFFFF; border: 1px solid rgba(14, 26, 43, 0.08); border-radius: 12px; padding: 15px 17px; transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.temario-list li:hover { box-shadow: 0 12px 30px rgba(14, 26, 43, 0.13); transform: translateY(-2px); border-color: rgba(18, 183, 106, 0.40); }
.temario-list li.sub { margin-left: 22px; }
.temario-list .check { flex: 0 0 auto; margin-top: 1px; font-weight: 700; font-size: 14px; }

.incluye-box { margin-top: 24px; width: 100%; background: var(--navy); border-radius: 16px; padding: clamp(24px, 2.8vw, 32px); }
.incluye-box p.label { margin: 0 0 16px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--verde-2); }
.incluye-box ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.incluye-box li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.55; color: rgba(244, 241, 234, 0.86); }
.incluye-box .check { color: var(--verde-2); font-weight: 700; }

.leer-antes { margin-top: 16px; width: 100%; background: rgba(201, 154, 59, 0.07); border: 1px solid rgba(201, 154, 59, 0.28); border-radius: 16px; padding: clamp(22px, 2.6vw, 30px); }
.leer-antes p.label { margin: 0 0 14px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: #A67C24; }
.leer-antes ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.leer-antes li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.55; color: var(--texto-sec); }
.leer-antes .bang { color: var(--dorado); font-weight: 700; }

/* ---------- Modulos Finanzas ---------- */
.modulo-card { background: #FFFFFF; border: 1px solid rgba(14, 26, 43, 0.08); border-radius: 16px; padding: clamp(22px, 2.4vw, 28px); transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease; }
.modulo-card:hover { box-shadow: 0 12px 30px rgba(14, 26, 43, 0.13); transform: translateY(-2px); border-color: rgba(18, 183, 106, 0.40); }
.modulo-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.modulo-num { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(18, 183, 106, 0.12); color: var(--verde); font-family: var(--font-display); font-size: 17px; }
.modulo-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.modulo-card li { display: flex; gap: 11px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: #2A3A4D; }

/* ---------- Media / respeto de preferencias ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Loading skeleton para imagenes lazy */
img[loading="lazy"] { background: rgba(14, 26, 43, 0.04); }

/* ==========================================================================
   Chatbot / asistente virtual
   ========================================================================== */
.chatbot-root { position: fixed; z-index: 999999; bottom: 22px; right: 22px; font-family: var(--font-body); }

.chatbot-toggle { display: flex; align-items: center; gap: 10px; background: none; border: none; cursor: pointer; padding: 0; }
.chatbot-toggle-label {
  background: var(--navy);
  color: var(--crema);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(14, 26, 43, 0.28);
  animation: chatbotLabelPulse 3s ease-in-out infinite;
}
.chatbot-toggle-circle {
  flex-shrink: 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--verde);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(18, 183, 106, 0.45), 0 0 0 6px rgba(18, 183, 106, 0.16);
  transition: transform .2s ease;
}
.chatbot-toggle:hover .chatbot-toggle-circle { transform: scale(1.06); }
.chatbot-toggle-circle svg { width: 26px; height: 26px; fill: var(--navy); }
@keyframes chatbotLabelPulse { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
@keyframes chatbotDotPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.45); } 50% { box-shadow: 0 0 0 5px rgba(34,197,94,0); } }

.chatbot-panel {
  position: fixed;
  bottom: 98px;
  right: 22px;
  width: 368px;
  max-width: calc(100vw - 32px);
  max-height: min(560px, calc(100vh - 130px));
  background: var(--navy);
  border-radius: 20px;
  box-shadow: 0 30px 70px -18px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(244, 241, 234, 0.10);
}
.chatbot-panel[hidden] { display: none; }

.chatbot-header {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(135deg, var(--navy), #142238);
  border-bottom: 1px solid rgba(244, 241, 234, 0.1);
}
.chatbot-header::after {
  content: "";
  position: absolute;
  top: -22px;
  right: -12px;
  width: 90px;
  height: 160px;
  background: rgba(18, 183, 106, 0.14);
  transform: var(--skew);
  pointer-events: none;
}
.chatbot-avatar {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(18, 183, 106, 0.18);
  border: 2px solid rgba(18, 183, 106, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chatbot-avatar svg { width: 19px; height: 19px; fill: var(--verde-2); }
.chatbot-header-info { position: relative; flex: 1; min-width: 0; }
.chatbot-header-name { display: block; font-family: var(--font-display); font-size: 16px; color: var(--crema); }
.chatbot-header-status { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: rgba(244, 241, 234, 0.65); margin-top: 3px; }
.chatbot-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--verde-2); animation: chatbotDotPulse 2.2s infinite; }
.chatbot-close {
  position: relative;
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(244, 241, 234, 0.6);
  font-size: 15px;
  cursor: pointer;
  padding: 7px;
  line-height: 1;
  border-radius: 7px;
}
.chatbot-close:hover { color: var(--crema); background: rgba(244, 241, 234, 0.08); }

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--navy);
}
.chatbot-bubble { max-width: 85%; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; white-space: pre-line; }
.chatbot-bubble.bot { align-self: flex-start; background: rgba(244, 241, 234, 0.07); border: 1px solid rgba(244, 241, 234, 0.08); color: rgba(244, 241, 234, 0.92); border-radius: 4px 14px 14px 14px; }
.chatbot-bubble.user { align-self: flex-end; background: var(--verde); color: var(--navy); font-weight: 500; border-radius: 14px 4px 14px 14px; }

.chatbot-options { flex-shrink: 0; padding: 2px 18px 16px; display: flex; flex-direction: column; gap: 8px; background: var(--navy); }
.chatbot-opt {
  text-align: left;
  background: rgba(244, 241, 234, 0.05);
  border: 1px solid rgba(244, 241, 234, 0.18);
  color: rgba(244, 241, 234, 0.92);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-family: var(--font-body);
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.chatbot-opt:hover { background: rgba(18, 183, 106, 0.18); border-color: var(--verde); color: var(--crema); }

.chatbot-footer { flex-shrink: 0; padding: 8px 14px 14px; border-top: 1px solid rgba(244, 241, 234, 0.08); display: flex; justify-content: center; background: var(--navy); }
.chatbot-restart { background: none; border: none; color: rgba(244, 241, 234, 0.42); font-size: 12px; font-family: var(--font-body); cursor: pointer; padding: 4px 8px; }
.chatbot-restart:hover { color: rgba(244, 241, 234, 0.78); }

@media (max-width: 480px) {
  .chatbot-root { right: 14px; bottom: 14px; }
  .chatbot-toggle-label { display: none; }
  .chatbot-panel { right: 14px; bottom: 88px; width: calc(100vw - 28px); }
}

/* ==========================================================================
   Scroll reveal — elementos aparecen al entrar en pantalla
   ========================================================================== */
.reveal, .fade-up {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible, .fade-up.visible { opacity: 1; transform: translateY(0); }

.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity .7s ease, transform .7s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right { opacity: 0; transform: translateX(40px); transition: opacity .7s ease, transform .7s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }
.reveal-delay-5 { transition-delay: .5s; }

/* Escalonado automático para grillas/listas: agregar .stagger al contenedor
   y .reveal a cada hijo directo — no hace falta numerar el delay a mano. */
.stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.stagger > .reveal:nth-child(2) { transition-delay: .08s; }
.stagger > .reveal:nth-child(3) { transition-delay: .16s; }
.stagger > .reveal:nth-child(4) { transition-delay: .24s; }
.stagger > .reveal:nth-child(5) { transition-delay: .32s; }
.stagger > .reveal:nth-child(6) { transition-delay: .4s; }
.stagger > .reveal:nth-child(n+7) { transition-delay: .46s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .fade-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================================
   Ediciones del newsletter
   ========================================================================== */
.ediciones-list { list-style: none; margin: clamp(36px, 4vw, 48px) 0 0; padding: 0; }
.edicion-item {
  padding: clamp(20px, 2.4vw, 26px) 0;
  border-top: 1px solid rgba(14, 26, 43, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.edicion-fecha {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dorado);
}
.edicion-titulo {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  font-family: var(--font-display);
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.35;
  color: var(--navy);
}
.edicion-titulo:hover { color: var(--verde-hover); }
.edicion-flecha { flex: 0 0 auto; font-size: 14px; color: var(--verde); transition: transform .18s ease; }
.edicion-titulo:hover .edicion-flecha { transform: translate(2px, -2px); }
