/* ============================================================
   FUENTES — Proxima Nova desde CDN MercadoLibre
============================================================ */
@font-face {
  font-family: 'Proxima Nova';
  src: url('https://http2.mlstatic.com/ui/webfonts/v3.0.0/proxima-nova/proximanova-regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Proxima Nova';
  src: url('https://http2.mlstatic.com/ui/webfonts/v3.0.0/proxima-nova/proximanova-semibold.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Proxima Nova';
  src: url('https://http2.mlstatic.com/ui/webfonts/v3.0.0/proxima-nova/proximanova-bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ============================================================
   TOKENS — design system (scope CALM: .page-container en lugar de :root)
============================================================ */
.page-container {
  /* ---- COLORES ---- */
  --brand-yellow: #FFE600;
  --accent-blue: #3483FA;
  --accent-blue-dark: #2968C8;
  --text-primary: rgba(0,0,0,0.9);
  --text-secondary: rgba(0,0,0,0.55);
  --text-white: #FFFFFF;
  --text-link: #3483FA;
  --text-positive: #00A650;
  --bg-white: #FFFFFF;
  --bg-gray: #F5F5F5;
  --gray-dark: #1A1A1A;
  --divider: rgba(0,0,0,0.1);
  --shadow-flat: 0 1px 2px rgba(0,0,0,0.12);
  --andes-surface-secondary-idle: #f4f5f9;
  --andes-text-secondary-legal: #646587;
  --andes-text-primary-heavy: #282834;
  --footer-strip-bg: #f7f7f7;

  /* ---- BORDER RADIUS ---- */
  --radius-2: 2px;
  --radius-4: 4px;
  --radius-6: 6px;
  --radius-12: 12px;
  --radius-16: 16px;
  --radius-20: 20px;
  --radius-full: 100px;

  /* ---- ALIAS CALM ---- */
  --r-hero: 24px;
  --r-card: 20px;
  --r-sm: 12px;
  --r-pill: 9999px;

  /* ---- ESPACIADO (escala 8px) ---- */
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s5: 40px;
  --s6: 48px;
  --s7: 56px;
  --s8: 64px;
  --s10: 80px;

  /* ---- TIPOGRAFÍA ---- */
  --font: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Navbar height (móvil: 12 + 56 + 12) */
  --navbar-height: 80px;

  /* Inset horizontal */
  --page-gutter: 8px;
  --content-inset: 20px;

  /* Contenedor — siempre 100% */
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
}

/* ============================================================
   RESET & BASE
============================================================ */
.page-container img { display: block; max-width: 100%; }
.page-container a { text-decoration: none; color: inherit; }
.page-container button { font-family: var(--font); cursor: pointer; border: none; background: none; }

/* ============================================================
   SECCIÓN FEATURED — "Plan Siempre Nuevo para renovar"
============================================================ */
.section-featured {
  background: var(--bg-gray);
  border-radius: var(--radius-16);
  overflow: hidden;
  isolation: isolate;
  padding: 20px var(--content-inset) 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: none;
}
.section-featured-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 27px;
  color: var(--text-primary);
  margin: 0;
}

.section-featured-img {
  height: 240px;
  flex: 0 0 240px;
  width: 100%;
  position: relative;
  overflow: hidden;
}
.section-featured-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
}

/* ============================================================
   VALUE PROPS — 3 tarjetas
============================================================ */
.vp-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ============================================================
   FEATURED + VP — wrapper stacking (mobile) / fila (desktop)
   Sticky stack solo <768px; sin JS (compatible CALM §11).
============================================================ */
.featured-vp-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  isolation: isolate;
  padding-bottom: clamp(8px, 2.5vh, 24px);
}

@media (max-width: 767px) {
  /* Stacking: mismo top + z-index creciente */
  .section-featured,
  .vp-cards-grid > .vp-card {
    position: sticky;
    top: var(--page-gutter);
    overflow: hidden;
  }
  .section-featured {
    z-index: 1;
    gap: 20px;
    padding: 20px var(--content-inset) 0;
  }
  .section-featured,
  .vp-cards-grid > .vp-card:nth-child(1),
  .vp-cards-grid > .vp-card:nth-child(2) {
    will-change: opacity;
  }
  /* VP1=nth-child(1) z:2, VP2=nth-child(2) z:3, VP3=nth-child(3) z:4 */
  .vp-cards-grid > .vp-card:nth-child(1) { z-index: 2; }
  .vp-cards-grid > .vp-card:nth-child(2) { z-index: 3; }
  .vp-cards-grid > .vp-card:nth-child(3) { z-index: 4; }

  .featured-vp-stack {
    padding-bottom: clamp(6px, 2vh, 20px);
  }
}

.vp-card {
  background: var(--bg-gray);
  border-radius: var(--radius-16);
  padding: 20px var(--content-inset);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  box-shadow: none;
}
.vp-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  align-self: flex-start;
  object-fit: contain;
}
.vp-text { display: flex; flex-direction: column; gap: 8px; }
.vp-intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.vp-card--full .vp-text { gap: 24px; }
.vp-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 20.25px;
  color: var(--text-primary);
}
.vp-desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 17.5px;
  color: rgba(0,0,0,0.9);
}
/* VP3 — opciones mes 24 */
.vp-options {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.vp-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vp-option-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vp-option-icon {
  height: 20px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
  max-width: none;
}
.vp-option-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 18px;
  color: rgba(0,0,0,0.9);
}
.vp-option-desc {
  font-size: 14px;
  font-weight: 400;
  line-height: 17.5px;
  color: var(--text-primary);
  padding-left: 32px;
}
/* VP grid móvil */
.vp-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* VP3 subtítulo: oculto en mobile */
.vp-desc--desktop-only { display: none; }

/* ============================================================
   DESKTOP — 768px+
============================================================ */
@media (min-width: 768px) {

  /* Tokens desktop */
  .page-container {
    --content-inset: 32px;
  }

  /* Sección featured + VP — lado a lado */
  .featured-vp-stack {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    padding-bottom: 0;
  }
  .section-featured,
  .vp-cards-grid > .vp-card {
    position: static;
    top: auto;
    z-index: auto;
    box-shadow: none;
  }
  /* Card featured desktop */
  .section-featured {
    flex: 1;
    padding: var(--content-inset) var(--content-inset) 0;
    gap: 16px;
    min-height: 400px;
    overflow: hidden;
  }
  .section-featured-title {
    font-size: 36px;
    line-height: 40.5px;
  }

  .section-featured-img {
    flex: 1;
    min-height: 0;
    width: 100%;
    position: relative;
    overflow: hidden;
  }
  .section-featured-img img {
    object-fit: contain;
    object-position: center bottom;
  }

  /* VP container proporcional */
  .vp-container {
    flex: 2;
    min-width: 0;
  }
  /* VP grid: CSS Grid 2 columnas */
  .vp-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .vp-card--full { grid-column: 1 / -1; }
  /* Cards desktop */
  .vp-card { padding: var(--content-inset); gap: 52px; align-items: flex-start; }
  /* Icon 100×100 en desktop */
  .vp-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    object-position: left top;
    max-width: none;
    align-self: flex-start;
  }
  /* Texto desktop */
  .vp-text { gap: 12px; }
  .vp-card--full .vp-text { gap: 16px; }
  .vp-title { font-size: 24px; line-height: 27px; }
  .vp-desc { font-size: 18px; line-height: 22.5px; }
  .vp-desc--desktop-only { display: block; }
  /* VP3 opciones: 3 columnas horizontales */
  .vp-card--full .vp-options { flex-direction: row; }
  .vp-card--full .vp-option { flex: 1; }
  .vp-card--full .vp-option-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .vp-card--full .vp-option-icon {
    height: 32px;
    width: auto;
  }
  .vp-card--full .vp-option-desc { padding-left: 0; }
}
