/* ============================================================
   BRÚJULAMAYOR — home.css
   Estilos exclusivos de index.html — aligned to actual HTML
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */
#hero {
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5.5rem);
  background: var(--c-bg);
  position: relative;
  overflow: hidden;
}

/* Organic background shapes */
#hero::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  background: radial-gradient(ellipse, rgba(207,113,24,.07) 0%, transparent 68%);
  top: -180px; right: -120px;
  border-radius: 58% 42% 72% 28% / 44% 58% 42% 56%;
  pointer-events: none;
}
#hero::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(ellipse, rgba(29,106,86,.06) 0%, transparent 68%);
  bottom: -80px; left: 0%;
  border-radius: 42% 58% 28% 72% / 62% 32% 68% 38%;
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 5rem;
  align-items: center;
}

/* ── Hero copy ── */
.hero-copy .tag { margin-bottom: 1.5rem; }
.hero-copy h1 {
  font-family: var(--font-head);
  font-size: clamp(2.6rem, 5.2vw, 4.2rem);
  font-weight: 700;
  line-height: 1.06;
  color: var(--c-text);
  margin-bottom: 1.5rem;
}
.hero-copy h1 em {
  font-style: italic;
  color: var(--c-primary);
}
.hero-copy > p {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--c-text-mid);
  line-height: 1.82;
  margin-bottom: 2.5rem;
  max-width: 510px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
}
.hero-trust {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--c-text-soft);
}
.trust-item i { color: var(--c-primary); font-size: .95rem; }

/* ── Hero photo ── */
.hero-photo-wrap {
  position: relative;
  max-width: 460px;
  margin-left: auto;
}
.hero-photo-wrap img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 48px 48px 100px 48px;
  box-shadow: 0 24px 64px rgba(29,106,86,.2);
  display: block;
}

/* Floating notification card */
.hero-float-card {
  position: absolute;
  bottom: -22px;
  left: -32px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.35rem;
  border: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  gap: .85rem;
  max-width: 250px;
  animation: cardFloat 4s ease-in-out infinite;
}
.hero-float-card i {
  font-size: 1.5rem;
  color: var(--c-primary);
  flex-shrink: 0;
}
.hero-float-card strong {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
}
.hero-float-card span {
  font-size: .75rem;
  color: var(--c-text-soft);
}

/* Stat badge */
.hero-stat-badge {
  position: absolute;
  top: 28px;
  right: -22px;
  background: var(--c-warm);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-warm);
  text-align: center;
  min-width: 110px;
  animation: cardFloat 4s ease-in-out infinite;
  animation-delay: 2s;
}
.hero-stat-badge .stat-n {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 700;
  display: block;
  line-height: 1;
}
.hero-stat-badge .stat-l {
  font-size: .72rem;
  opacity: .88;
  display: block;
  margin-top: .3rem;
  line-height: 1.3;
}

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

/* ════════════════════════════════════════════════════════════
   STATS BAR
   ════════════════════════════════════════════════════════════ */
#stats-bar {
  background: var(--c-primary);
  padding: 2.5rem 0;
  position: relative;
  overflow: hidden;
}
#stats-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 600px 200px at 50% 100%, rgba(255,255,255,.05) 0%, transparent 70%);
  pointer-events: none;
}
.stats-row {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  position: relative;
}
.stat-item { text-align: center; }
.stat-item .stat-number {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
  display: block;
  line-height: 1;
}
.stat-item .stat-label {
  font-size: .8rem;
  color: rgba(255,255,255,.68);
  margin-top: .35rem;
  display: block;
  max-width: 150px;
  line-height: 1.4;
}
.stat-divider {
  width: 1px;
  height: 44px;
  background: rgba(255,255,255,.18);
  flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════════
   PROBLEMA
   ════════════════════════════════════════════════════════════ */
#problema {
  padding: var(--section-py) 0;
  background: var(--c-dark);
  position: relative;
  overflow: hidden;
}
#problema::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 900px 500px at 50% 110%, rgba(29,106,86,.15) 0%, transparent 70%);
  pointer-events: none;
}

/* Dark section overrides */
#problema .section-head h2 { color: #fff; }
#problema .section-head p  { color: rgba(255,255,255,.58); }
#problema .section-head .tag {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  border-color: rgba(255,255,255,.14);
}

.problem-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.problem-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.problem-card {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  position: relative;
  overflow: hidden;
  transition: background .3s, transform .3s;
}
.problem-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity .3s;
  background: linear-gradient(90deg, var(--c-primary-lt), var(--c-accent));
}
.problem-card:hover {
  background: rgba(255,255,255,.09);
  transform: translateY(-4px);
}
.problem-card:hover::before { opacity: 1; }

/* Icon — the <i> tag directly inside the card */
.problem-card > i {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin-bottom: 1.3rem;
}
.problem-card.pi-rose > i  { background: rgba(212,75,90,.16);  color: #FDA4AF; }
.problem-card.pi-amber > i { background: rgba(207,113,24,.16); color: #FCD34D; }
.problem-card.pi-blue > i  { background: rgba(59,130,246,.14); color: #93C5FD; }

.problem-card h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: .65rem;
  font-weight: 600;
  line-height: 1.25;
}
.problem-card p {
  font-size: .9rem;
  color: rgba(255,255,255,.56);
  line-height: 1.72;
}

/* ════════════════════════════════════════════════════════════
   PROPÓSITO
   ════════════════════════════════════════════════════════════ */
#proposito {
  padding: var(--section-py) 0;
  background: var(--c-bg-warm);
}
.proposito-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5.5rem;
  align-items: center;
}

/* Photo */
.prop-photo-frame {
  position: relative;
  border-radius: 48px 100px 48px 48px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(29,106,86,.18);
  height: 460px;
}
.prop-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .65s ease;
}
.prop-photo-frame:hover img { transform: scale(1.04); }

/* Floating badge */
.prop-badge {
  position: absolute;
  top: -16px; right: -16px;
  background: var(--c-warm);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-warm);
  display: flex;
  align-items: center;
  gap: .65rem;
  max-width: 210px;
}
.prop-badge i { font-size: 1.25rem; flex-shrink: 0; }
.prop-badge strong {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.2;
}
.prop-badge span {
  font-size: .75rem;
  opacity: .88;
  display: block;
  margin-top: .15rem;
  line-height: 1.3;
}

/* Copy */
.prop-copy > .tag { margin-bottom: 1rem; }
.prop-copy h2 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--c-text);
  margin-bottom: 1.35rem;
}
.prop-copy > p {
  font-size: 1.05rem;
  color: var(--c-text-mid);
  line-height: 1.82;
  margin-bottom: 2rem;
}
.prop-list {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-bottom: 2.5rem;
}
.prop-list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .95rem;
  color: var(--c-text-mid);
  line-height: 1.55;
}
.prop-list li i {
  color: var(--c-primary);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: .1rem;
}

/* ════════════════════════════════════════════════════════════
   CÓMO FUNCIONA
   ════════════════════════════════════════════════════════════ */
#como-funciona {
  padding: var(--section-py) 0;
  background: var(--c-bg-soft);
  position: relative;
  overflow: hidden;
}
#como-funciona::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(207,113,24,.06) 0%, transparent 70%);
  pointer-events: none;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
  margin-top: 4rem;
}
/* Connecting line */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 26px;
  left: calc(12.5% + 18px);
  right: calc(12.5% + 18px);
  height: 2px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  z-index: 0;
}

.step-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  border: 1px solid var(--c-border);
  text-align: center;
  position: relative;
  z-index: 1;
  transition: transform .3s, box-shadow .3s;
}
.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.step-number {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 1;
}
.step-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--c-primary-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  font-size: 1.2rem;
  margin: .4rem auto 1rem;
}
.step-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: .5rem;
  line-height: 1.3;
}
.step-card p {
  font-size: .84rem;
  color: var(--c-text-mid);
  line-height: 1.65;
}
.como-footer {
  margin-top: 3.5rem;
  text-align: center;
  padding: 1rem;
}
.como-footer p {
  font-size: .95rem;
  color: var(--c-text-mid);
}
.como-footer a {
  color: var(--c-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}
.como-footer a:hover { color: var(--c-primary-dark); }

/* ════════════════════════════════════════════════════════════
   TESTIMONIOS
   ════════════════════════════════════════════════════════════ */
#testimonios {
  padding: var(--section-py) 0;
  background: var(--c-bg);
}
.testimonios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testimonio-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  border: 1px solid var(--c-border);
  transition: transform .3s, box-shadow .3s;
  position: relative;
  overflow: hidden;
}
.testimonio-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-primary-lt));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.testimonio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.testimonio-card:hover::after { transform: scaleX(1); }

.quote-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--c-primary-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}
.testimonio-card > p {
  font-size: .95rem;
  color: var(--c-text-mid);
  line-height: 1.82;
  font-style: italic;
  margin-bottom: 1.5rem;
}
.testimonio-author {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--c-border);
}
.author-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}
.testimonio-author > div strong {
  display: block;
  font-size: .88rem;
  color: var(--c-text);
  font-weight: 700;
}
.testimonio-author > div span {
  font-size: .76rem;
  color: var(--c-text-soft);
  display: block;
  margin-top: .1rem;
}

/* ════════════════════════════════════════════════════════════
   SOLUCIÓN / CARACTERÍSTICAS
   ════════════════════════════════════════════════════════════ */
#solucion {
  padding: var(--section-py) 0;
  background: var(--c-bg);
}
.solucion-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.solucion-copy > .tag { margin-bottom: 1rem; }
.solucion-copy h2 {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--c-text);
  margin-bottom: 1rem;
}
.solucion-copy > p {
  font-size: 1.05rem;
  color: var(--c-text-mid);
  line-height: 1.78;
  margin-bottom: 2rem;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-bottom: 2.5rem;
}
.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all .25s;
  cursor: default;
}
.feature-item:hover {
  background: var(--c-bg-soft);
  border-color: var(--c-border);
}
.fi-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--c-primary-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: background .25s, color .25s;
}
.feature-item:hover .fi-icon {
  background: var(--c-primary);
  color: #fff;
}
.feature-item > div strong {
  display: block;
  font-size: .95rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: .25rem;
}
.feature-item > div span {
  font-size: .87rem;
  color: var(--c-text-mid);
  line-height: 1.6;
}

/* Dashboard visual */
.dashboard-mock {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-border);
  background: #fff;
}
.dashboard-mock img {
  width: 100%;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* ════════════════════════════════════════════════════════════
   TECNOLOGÍA
   ════════════════════════════════════════════════════════════ */
#tecnologia {
  padding: var(--section-py) 0;
  background: var(--c-dark);
  position: relative;
  overflow: hidden;
}
#tecnologia::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 400px at 100% 50%, rgba(29,106,86,.12) 0%, transparent 65%),
    radial-gradient(ellipse 500px 350px at 0% 50%, rgba(207,113,24,.08) 0%, transparent 65%);
  pointer-events: none;
}

/* Dark overrides */
#tecnologia .section-head h2 { color: #fff; }
#tecnologia .section-head p  { color: rgba(255,255,255,.58); }
#tecnologia .section-head .tag {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  border-color: rgba(255,255,255,.14);
}

.tech-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.tech-stack {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.tech-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  transition: background .25s, transform .25s;
}
.tech-item:hover {
  background: rgba(255,255,255,.095);
  transform: translateX(5px);
}
.ti-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(29,106,86,.28);
  color: #7ECFB8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.tech-item > div strong {
  display: block;
  font-size: .92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .2rem;
}
.tech-item > div span {
  font-size: .8rem;
  color: rgba(255,255,255,.5);
  line-height: 1.5;
}

/* Callout box */
.tech-callout {
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}
.tc-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(29,106,86,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #7ECFB8;
  margin-bottom: 1.25rem;
}
.tech-callout h3 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.25;
}
.tech-callout > p {
  font-size: .92rem;
  color: rgba(255,255,255,.6);
  line-height: 1.78;
  margin-bottom: 1.75rem;
}
.tech-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.tm-item {
  background: rgba(255,255,255,.07);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}
.tm-value {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--c-primary-lt);
  font-weight: 700;
  display: block;
  line-height: 1;
}
.tm-label {
  font-size: .72rem;
  color: rgba(255,255,255,.4);
  display: block;
  margin-top: .3rem;
  line-height: 1.3;
}

/* ════════════════════════════════════════════════════════════
   CONTENIDO EDUCATIVO / BLOG
   ════════════════════════════════════════════════════════════ */
#contenido {
  padding: var(--section-py) 0;
  background: var(--c-bg-soft);
}
.contenido-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.contenido-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--c-border);
  display: block;
  position: relative;
  overflow: hidden;
  transition: transform .3s, box-shadow .3s;
  color: inherit;
}
.contenido-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.contenido-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--c-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}
.contenido-card:hover::before { transform: scaleX(1); }

.cont-cat-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: .9rem;
}
.ci-purple { background: var(--c-primary-xl); color: var(--c-primary); }
.ci-green  { background: rgba(29,106,86,.1); color: var(--c-primary); }
.ci-amber  { background: var(--c-warm-lt); color: var(--c-accent); }
.ci-rose   { background: var(--c-rose-lt); color: var(--c-rose); }

.cc-cat {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--c-primary);
  margin-bottom: .5rem;
}
.contenido-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-text);
  margin-bottom: .5rem;
  line-height: 1.35;
}
.contenido-card p {
  font-size: .88rem;
  color: var(--c-text-mid);
  line-height: 1.68;
  margin-bottom: 1.25rem;
}
.cc-link {
  font-size: .84rem;
  font-weight: 700;
  color: var(--c-primary);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: gap .2s;
}
.contenido-card:hover .cc-link { gap: .6rem; }

.contenido-more { text-align: center; }

/* ════════════════════════════════════════════════════════════
   DEMO / CHAT
   ════════════════════════════════════════════════════════════ */
#demo {
  padding: var(--section-py) 0;
  background: var(--c-primary-dark);
  position: relative;
  overflow: hidden;
}
#demo::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(255,255,255,.055) 0%, transparent 60%),
    radial-gradient(ellipse 500px 400px at 0% 100%, rgba(207,113,24,.1) 0%, transparent 60%);
  pointer-events: none;
}

.demo-inner {
  max-width: 680px;
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Override section-head for dark background */
.demo-inner .section-head h2 { color: #fff; }
.demo-inner .section-head p  { color: rgba(255,255,255,.7); }
.demo-inner .section-head .tag {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  border-color: rgba(255,255,255,.2);
}
.demo-inner .section-head { margin-bottom: 2rem; }

/* Chat window */
.demo-chat-window {
  background: var(--c-bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
  overflow: hidden;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-height: 300px;
  max-height: 420px;
  overflow-y: auto;
  scroll-behavior: smooth;
  margin-bottom: 1.5rem;
}

/* Messages */
.msg {
  max-width: 82%;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
}
.msg.bot { align-self: flex-start; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--c-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
  flex-shrink: 0;
}
.msg-bubble {
  padding: .75rem 1rem;
  border-radius: 16px;
  font-size: .875rem;
  line-height: 1.55;
}
.msg.bot .msg-bubble {
  background: #fff;
  color: var(--c-text-mid);
  border-radius: 4px 16px 16px 16px;
  border: 1px solid var(--c-border);
}
.msg.user .msg-bubble {
  background: var(--c-primary);
  color: #fff;
  border-radius: 16px 4px 16px 16px;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: .5rem;
  align-self: flex-start;
}
.typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--c-border);
  padding: .65rem .9rem;
  border-radius: 4px 14px 14px 14px;
}
.typing-dots span {
  display: block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c-text-soft);
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .2s; }
.typing-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* Actions */
.demo-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.demo-actions .btn-outline {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  border-color: rgba(255,255,255,.28);
}
.demo-actions .btn-outline:hover {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.5);
  color: #fff;
}

/* ════════════════════════════════════════════════════════════
   CTA FINAL
   ════════════════════════════════════════════════════════════ */
#cta-final {
  padding: var(--section-py) 0;
  background: linear-gradient(148deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  position: relative;
  overflow: hidden;
}
#cta-final::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 800px 500px at 100% 0%, rgba(255,255,255,.06) 0%, transparent 60%),
    radial-gradient(ellipse 500px 400px at 0% 100%, rgba(207,113,24,.1) 0%, transparent 60%);
  pointer-events: none;
}

.cta-inner {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Dark bg overrides (match inline styles in HTML) */
.cta-inner .section-head h2 { color: #fff; }
.cta-inner .section-head p  { color: rgba(255,255,255,.78); }
.cta-inner .section-head .tag {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
.cta-inner .section-head { margin-bottom: 2rem; }

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.cta-cards {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 2.5rem;
}
.cta-icon {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: rgba(255,255,255,.75);
  font-size: .9rem;
}
.cta-icon i {
  font-size: 1.25rem;
  color: rgba(255,255,255,.55);
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET ≤ 900px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero-grid,
  .proposito-grid,
  .solucion-layout,
  .tech-layout { grid-template-columns: 1fr; gap: 3rem; }

  .hero-photo-wrap { display: none; }

  .problem-cards { grid-template-columns: 1fr 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid::before { display: none; }
  .testimonios-grid { grid-template-columns: 1fr; gap: 1rem; }
  .stat-divider { display: none; }
  .como-footer { flex-direction: column; text-align: center; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE ≤ 600px
   ════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  .hero-actions,
  .cta-buttons { flex-direction: column; }
  .btn { justify-content: center; }

  .problem-cards,
  .steps-grid,
  .contenido-grid { grid-template-columns: 1fr; }

  .hero-trust { gap: 1rem; }
  .cta-cards { gap: 1.5rem; flex-direction: column; align-items: center; }
  .tech-metrics { grid-template-columns: 1fr; }
}
