/* ===== Extras del sitio (secciones nuevas + animaciones) =====
   Complementa el CSS compilado original; solo clases con prefijo cx- y el
   sistema de aparición .rv (activo únicamente si JS marca html.js-anim). */

html {
  scroll-behavior: smooth;
}
section[id] {
  scroll-margin-top: 88px;
}

/* --- Sistema de aparición al hacer scroll --- */
html.js-anim .rv {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transition-delay: var(--d, 0s);
}
html.js-anim .rv.rv-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html.js-anim .rv {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* --- Menú móvil abierto --- */
.cx-open {
  display: flex !important;
}

/* --- Banda de resultados (contadores) --- */
.cx-stats {
  background: linear-gradient(135deg, #004499 0%, #0066cc 100%);
}
.cx-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 1.5rem;
}
@media (max-width: 1023px) {
  .cx-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.cx-stat-num {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.cx-stat-label {
  margin-top: 0.4rem;
  color: #cfe3ff;
  font-size: 0.95rem;
}
.cx-stat-rule {
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: #6b8e23;
  margin: 0.8rem auto 0;
}

/* --- Proceso de trabajo --- */
.cx-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
@media (max-width: 1023px) {
  .cx-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 639px) {
  .cx-steps {
    grid-template-columns: 1fr;
  }
}
/* Línea que conecta los pasos (solo escritorio) y se dibuja al entrar */
@media (min-width: 1024px) {
  .cx-steps::before {
    content: "";
    position: absolute;
    top: 28px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: #d5d0c4;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.1s ease-out 0.2s;
  }
  html.js-anim .cx-steps.rv-in::before,
  html:not(.js-anim) .cx-steps::before {
    transform: scaleX(1);
  }
}
.cx-step-num {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--primary, #0066cc);
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 68, 153, 0.28);
}
.cx-step h3 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* --- Testimonios --- */
.cx-stars {
  color: #6b8e23;
  letter-spacing: 2px;
  margin-bottom: 0.9rem;
}
.cx-quote {
  font-style: italic;
  line-height: 1.65;
}
.cx-author {
  margin-top: 1.1rem;
  font-weight: 700;
  color: var(--foreground, #1e3a5f);
}
.cx-author span {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted-foreground, #6b7280);
}

/* --- FAQ (acordeón) --- */
.cx-faq {
  max-width: 46rem;
  margin: 0 auto;
  display: grid;
  gap: 0.9rem;
}
.cx-faq details {
  background: #ffffff;
  border: 1px solid var(--border, #e5e2da);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.cx-faq details[open] {
  border-color: var(--primary, #0066cc);
  box-shadow: 0 10px 26px rgba(0, 68, 153, 0.08);
}
.cx-faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  font-weight: 600;
  color: var(--foreground, #1e3a5f);
}
.cx-faq summary::-webkit-details-marker {
  display: none;
}
.cx-faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--primary, #0066cc);
  border-bottom: 2px solid var(--primary, #0066cc);
  transform: rotate(45deg);
  transition: transform 0.3s;
}
.cx-faq details[open] summary::after {
  transform: rotate(-135deg);
}
.cx-faq .cx-faq-body {
  padding: 0 1.3rem 1.2rem;
  color: var(--muted-foreground, #6b7280);
  line-height: 1.6;
  animation: cx-fade 0.35s ease-out;
}
@keyframes cx-fade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- Nota del formulario --- */
.cx-form-note {
  margin-top: 0.9rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted-foreground, #6b7280);
}

/* --- Pensiones en México (selector + gráfica animada) --- */
.cx-ptabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.cx-ptab {
  border: 1px solid rgba(0, 102, 204, 0.35);
  color: var(--primary, #0066cc);
  background: #fff;
  border-radius: 9999px;
  padding: 0.55rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s;
}
.cx-ptab:hover {
  border-color: var(--primary, #0066cc);
  background: rgba(0, 102, 204, 0.06);
}
.cx-ptab[aria-selected="true"] {
  background: var(--primary, #0066cc);
  color: #fff;
  border-color: var(--primary, #0066cc);
  box-shadow: 0 6px 16px rgba(0, 68, 153, 0.25);
}
.cx-ppanel {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border, #e5e2da);
  border-radius: 1rem;
  padding: 2.2rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
  max-width: 60rem;
  margin: 0 auto;
}
@media (max-width: 1023px) {
  .cx-ppanel {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }
}
.cx-panim {
  animation: cx-fade 0.45s ease-out;
}
.cx-pinfo h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--foreground, #1e3a5f);
  margin-bottom: 0.4rem;
}
.cx-pwho {
  color: var(--primary, #0066cc);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
}
.cx-pinfo ul {
  display: grid;
  gap: 0.65rem;
}
.cx-pinfo li {
  display: flex;
  gap: 0.6rem;
  color: var(--muted-foreground, #6b7280);
  font-size: 0.95rem;
  line-height: 1.55;
}
.cx-pinfo li::before {
  content: "✓";
  color: #6b8e23;
  font-weight: 700;
  flex-shrink: 0;
}
.cx-chart {
  display: flex;
  gap: clamp(1.2rem, 4vw, 2.4rem);
  align-items: flex-end;
  justify-content: center;
}
.cx-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: clamp(88px, 12vw, 120px);
}
.cx-bar-tag {
  background: #6b8e23;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease-out 0.85s, transform 0.4s ease-out 0.85s;
  white-space: nowrap;
}
.cx-bar-tag.cx-tag-in {
  opacity: 1;
  transform: none;
}
.cx-bar-tag.cx-tag-empty {
  visibility: hidden;
}
.cx-bar {
  width: clamp(52px, 6vw, 66px);
  height: 200px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(#f2f5f9, #e9eef5);
  border-radius: 0.6rem;
  overflow: hidden;
}
.cx-bar-fill {
  width: 100%;
  height: 0%;
  border-radius: 0.6rem 0.6rem 0 0;
  background: linear-gradient(180deg, #0066cc, #004499);
  transition: height 1s cubic-bezier(0.22, 0.9, 0.35, 1) 0.15s;
}
.cx-bar-fill.cx-green {
  background: linear-gradient(180deg, #8aa845, #556b2f);
}
.cx-bar-label {
  font-size: 0.8rem;
  color: var(--muted-foreground, #6b7280);
  text-align: center;
  line-height: 1.35;
  min-height: 2.2em;
}
.cx-pnote {
  margin-top: 1.6rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted-foreground, #6b7280);
}

/* ===== v3: nav premium + pensiones premium ===== */

/* Contenedor global más contenido en pantallas muy anchas */
.container {
  max-width: 80rem;
}

/* --- Nav --- */
.cx-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cx-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.cx-brand img {
  height: 46px;
  width: 46px;
}
.cx-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}
.cx-brand-name {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--foreground, #1e3a5f);
}
.cx-brand-sub {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: var(--primary, #0066cc);
  text-transform: uppercase;
}
.cx-navlink {
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--foreground, #1e3a5f);
  padding: 0.25rem 0;
  transition: color 0.25s;
}
.cx-navlink:hover {
  color: var(--primary, #0066cc);
}
.cx-navlink::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary, #0066cc);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}
.cx-navlink:hover::after {
  transform: scaleX(1);
}
.cx-navbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0066cc, #004499);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 1.5rem;
  border-radius: 0.65rem;
  box-shadow: 0 6px 14px rgba(0, 68, 153, 0.25);
  transition: transform 0.25s, box-shadow 0.25s;
}
.cx-navbtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0, 68, 153, 0.32);
}

/* --- Pensiones: fondo con profundidad --- */
#pensiones {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(0, 102, 204, 0.06), transparent 60%),
    radial-gradient(50rem 26rem at 10% 110%, rgba(107, 142, 35, 0.05), transparent 60%),
    var(--background, #faf9f6);
}

/* Selector tipo "segmented control" */
.cx-ptabs-wrap {
  text-align: center;
  margin-bottom: 2.6rem;
}
.cx-ptabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: center;
  background: #fff;
  padding: 0.4rem;
  border-radius: 1.6rem;
  border: 1px solid var(--border, #e5e2da);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  margin-bottom: 0;
}
.cx-ptab {
  border: none;
  background: transparent;
  color: #5a6b7d;
  box-shadow: none;
}
.cx-ptab:hover {
  background: rgba(0, 102, 204, 0.07);
  border: none;
}
.cx-ptab[aria-selected="true"] {
  background: linear-gradient(135deg, #0066cc, #004499);
  color: #fff;
  border: none;
  box-shadow: 0 6px 14px rgba(0, 68, 153, 0.3);
}

/* Panel premium */
.cx-ppanel {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  padding: 2.5rem;
  box-shadow: 0 24px 60px -12px rgba(0, 40, 90, 0.14), 0 4px 14px rgba(0, 0, 0, 0.04);
}
.cx-ppanel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #0066cc, #6b8e23);
}
@media (max-width: 1023px) {
  .cx-ppanel {
    padding: 1.6rem;
  }
}

/* Chips de requisitos clave */
.cx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.9rem 0 1.1rem;
}
.cx-chip {
  background: rgba(0, 102, 204, 0.08);
  color: #004499;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid rgba(0, 102, 204, 0.14);
}

/* Barras premium: guías punteadas, brillo y monto que cuenta */
.cx-bar {
  position: relative;
  border-radius: 0.7rem 0.7rem 0 0;
  background: linear-gradient(#eef2f7, #e7ecf3);
}
.cx-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to top,
    transparent 0 49px,
    rgba(0, 68, 153, 0.08) 49px 50px
  );
  pointer-events: none;
}
.cx-bar-fill {
  position: relative;
  border-radius: 0.7rem 0.7rem 0 0;
  transition: height 1.1s cubic-bezier(0.34, 1.35, 0.45, 1) 0.15s;
}
.cx-bar-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.3), transparent 40%);
}
.cx-amount {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: #004499;
  font-variant-numeric: tabular-nums;
  min-height: 1.35em;
}
.cx-amount.cx-amount-green {
  color: #556b2f;
}
.cx-amount-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted-foreground, #6b7280);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: -0.2rem;
}
.cx-bar-tag {
  transition: none;
}
.cx-bar-tag.cx-tag-in {
  animation: cx-pop 0.55s 0.95s both;
}
@keyframes cx-pop {
  0% {
    transform: scale(0.5) translateY(8px);
    opacity: 0;
  }
  65% {
    transform: scale(1.12);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cx-bar-fill {
    transition: none;
  }
  .cx-bar-tag.cx-tag-in {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ===== v4: menú de navegación con estilos propios (el CSS compilado no
   incluye utilidades que su build original no usaba, p.ej. gap-5/md:gap-7) ===== */
.cx-navmenu {
  /* móvil: panel desplegable bajo el header */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.4rem 1.5rem;
  background: #ffffff;
  border-top: 1px solid var(--border, #e5e2da);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.08);
}
@media (min-width: 768px) {
  .cx-navmenu {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 1.75rem;
    padding: 0;
    background: transparent;
    border-top: none;
    box-shadow: none;
  }
}
