/* ============================================================
   COMPONENTES BASE — Sistema de diseño VCE (rediseño 2026)
   Fundación aprobada en /design-system-preview.html.
   Carga global después de tokens.css; las secciones adoptan
   estas clases en la cascada del rediseño.
   ============================================================ */

/* ------------------------------------------------------------
   1. BOTONES
   Primario (magenta) = LA acción de la vista. Secundario (azul)
   = acciones de apoyo. Outline = terciario. Ghost = sobre oscuro.
   ------------------------------------------------------------ */
.vce-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--vce-font-display);
  font-weight: var(--vce-fw-semibold);
  font-size: var(--vce-fs-sm);
  line-height: 1;
  padding: 0.65rem 1.4rem;
  border-radius: var(--vce-radius-pill);
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  cursor: pointer;
  transition: transform var(--vce-transition-fast), background var(--vce-transition-fast),
              box-shadow var(--vce-transition-fast), color var(--vce-transition-fast),
              border-color var(--vce-transition-fast);
}
.vce-btn:focus-visible { outline: none; box-shadow: var(--vce-focus-ring); }

.vce-btn--cta { background: var(--vce-cta); color: var(--vce-blanco); }
.vce-btn--cta:hover { background: var(--vce-cta-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(233, 30, 99, 0.28); }

.vce-btn--secondary { background: var(--vce-indigo); color: var(--vce-blanco); }
.vce-btn--secondary:hover { background: var(--vce-yale); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 51, 102, 0.22); }

/* .vce-btn.vce-btn--outline: doble clase para ganar a header.css (.vce-btn { border: 0 }) */
.vce-btn.vce-btn--outline { background: transparent; border: 1.5px solid var(--vce-indigo); color: var(--vce-indigo); }
.vce-btn.vce-btn--outline:hover { background: rgba(0, 87, 184, 0.08); transform: translateY(-2px); }

/* Sobre secciones oscuras */
.vce-btn--ghost { background: transparent; border: 1.5px solid rgba(255, 255, 255, 0.55); color: var(--vce-blanco); }
.vce-btn--ghost:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--vce-blanco); transform: translateY(-2px); }

.vce-btn--lg { padding: 0.9rem 2rem; font-size: var(--vce-fs-base); }

/* ------------------------------------------------------------
   2. CHIPS / PILLS
   Tags, filtros y categorías (sustituyen checkboxes de sistema).
   Seleccionado = azul profundo sólido (el magenta queda reservado
   para la acción principal).
   ------------------------------------------------------------ */
.vce-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 1rem;
  border-radius: var(--vce-radius-pill);
  border: 1px solid rgba(0, 51, 102, 0.18);
  background: var(--vce-blanco);
  color: var(--vce-yale);
  font-family: var(--vce-font-body);
  font-weight: var(--vce-fw-medium);
  font-size: var(--vce-fs-sm);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background var(--vce-transition-fast), border-color var(--vce-transition-fast),
              color var(--vce-transition-fast), transform var(--vce-transition-fast);
}
.vce-chip:hover { border-color: var(--vce-indigo); color: var(--vce-indigo); }
.vce-chip:focus-visible { outline: none; box-shadow: var(--vce-focus-ring); }
.vce-chip.is-selected,
.vce-chip[aria-pressed="true"] {
  background: var(--vce-yale);
  border-color: var(--vce-yale);
  color: var(--vce-blanco);
  font-weight: var(--vce-fw-semibold);
}
.vce-chip__count {
  font-size: var(--vce-fs-xs);
  font-weight: var(--vce-fw-semibold);
  padding: 0.05rem 0.45rem;
  border-radius: var(--vce-radius-pill);
  background: rgba(0, 51, 102, 0.08);
}
.vce-chip.is-selected .vce-chip__count,
.vce-chip[aria-pressed="true"] .vce-chip__count { background: rgba(255, 255, 255, 0.22); }
/* Chip que refleja su propio checkbox/radio (filtros con AJAX, sin recarga):
   el estado seleccionado se pinta desde el input marcado, sin JS extra. */
.vce-chip:has(.vce-chip__input:checked) {
  background: var(--vce-yale);
  border-color: var(--vce-yale);
  color: var(--vce-blanco);
  font-weight: var(--vce-fw-semibold);
}
.vce-chip:has(.vce-chip__input:checked) .vce-chip__count { background: rgba(255, 255, 255, 0.22); }

/* Chip como control de formulario: el label ES el chip y el checkbox vive
   oculto dentro. El foco del input ilumina el chip (accesible con teclado);
   el estado seleccionado lo pinta el servidor con .is-selected. */
.vce-chip { position: relative; }
.vce-chip__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.vce-chip:focus-within { box-shadow: var(--vce-focus-ring); }

/* ------------------------------------------------------------
   3. CARDS
   Radio 16px, borde + sombra sutil, hover con elevación.
   ------------------------------------------------------------ */
.vce-card {
  background: var(--vce-surface);
  border: 1px solid var(--vce-color-border);
  border-radius: var(--vce-radius-card);
  box-shadow: var(--vce-shadow-sm);
  overflow: hidden;
  transition: transform var(--vce-transition-base), box-shadow var(--vce-transition-base);
}
.vce-card:hover,
.vce-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--vce-shadow-lg);
}
.vce-card__media {
  margin: 0;
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: linear-gradient(135deg, var(--vce-yale), var(--vce-indigo));
}
.vce-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vce-card__body { padding: var(--vce-spacing-lg); display: flex; flex-direction: column; gap: var(--vce-spacing-sm); }

/* ------------------------------------------------------------
   4. EYEBROW + TÍTULO DE SECCIÓN (encabezado canónico)
   El eyebrow es un elemento de diseño: tracking amplio, Poppins
   seminegrita, turquesa tinta (legible sobre claro). El título
   lleva la FIRMA del sistema: la línea serape.
   ------------------------------------------------------------ */
.vce-eyebrow {
  display: inline-block;
  font-family: var(--vce-font-display);
  font-weight: var(--vce-fw-semibold);
  font-size: var(--vce-eyebrow-fs);
  letter-spacing: var(--vce-eyebrow-tracking);
  text-transform: uppercase;
  color: var(--vce-acento-tinta);
}
.vce-title {
  font-family: var(--vce-font-display);
  font-size: var(--vce-fs-2xl);
  font-weight: var(--vce-fw-black);
  line-height: var(--vce-lh-tight);
  color: var(--vce-yale);
  margin: 0;
}
/* Encabezado de sección: eyebrow + título + línea serape */
.vce-heading {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.55rem;
  margin-bottom: var(--vce-spacing-2xl);
}
.vce-heading::after {
  content: '';
  width: 64px;
  height: 4px;
  border-radius: var(--vce-radius-pill);
  background: var(--vce-linea);
  margin-top: 0.4rem;
}
.vce-heading--left { justify-items: start; text-align: left; }
/* order:1 empuja el subtítulo detrás del ::after (la línea queda bajo el título) */
.vce-heading__sub { order: 1; margin: 0.15rem 0 0; max-width: 56ch; color: var(--vce-color-text-muted); line-height: var(--vce-lh-relaxed); }

/* ------------------------------------------------------------
   5. BADGES
   Ámbar = destacados (texto azul profundo, festivo y legible).
   Magenta = conteos/nuevo. Turquesa = informativo suave.
   ------------------------------------------------------------ */
.vce-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.72rem;
  border-radius: var(--vce-radius-pill);
  font-family: var(--vce-font-body);
  font-size: var(--vce-fs-xs);
  font-weight: var(--vce-fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}
.vce-badge--ambar { background: var(--vce-highlight); color: var(--vce-yale); }
.vce-badge--magenta { background: var(--vce-cta); color: var(--vce-blanco); }
.vce-badge--turquesa { background: rgba(23, 190, 187, 0.15); color: var(--vce-acento-tinta); }

/* ------------------------------------------------------------
   6. OVERLAY DE IMAGEN
   Degradado estándar para texto sobre fotos (cards destino/viaje).
   ------------------------------------------------------------ */
.vce-img-overlay { position: relative; }
.vce-img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--vce-overlay-img);
  pointer-events: none;
  z-index: 1;
}
.vce-img-overlay__content {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  padding: var(--vce-spacing-lg);
  color: var(--vce-blanco);
}

/* ------------------------------------------------------------
   7. RITMO DE SECCIONES
   Claro → tenue → claro → OSCURO full-bleed. El home (y el resto)
   alternan estas superficies para romper el compás blanco.
   ------------------------------------------------------------ */
.vce-section { padding-block: clamp(3.5rem, 8vw, 6rem); background: var(--vce-surface); }
.vce-section--tint { background: var(--vce-surface-tint); }
.vce-section--dark { background: var(--vce-surface-dark); color: var(--vce-on-dark); }

.vce-section--dark .vce-title { color: var(--vce-blanco); }
.vce-section--dark .vce-eyebrow { color: var(--vce-picton); }
.vce-section--dark .vce-heading__sub { color: rgba(233, 241, 248, 0.75); }

/* ------------------------------------------------------------
   8. AVATAR
   Identidad de asesor. Con foto: recorte circular. Sin foto:
   iniciales blancas sobre degradado azul (adiós silueta gris).
   Definido en la sección Asesores de la cascada.
   ------------------------------------------------------------ */
.vce-avatar {
  --vce-avatar-size: 48px;
  width: var(--vce-avatar-size);
  height: var(--vce-avatar-size);
  border-radius: 50%;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(135deg, var(--vce-yale), var(--vce-indigo));
  color: var(--vce-blanco);
  font-family: var(--vce-font-display);
  font-weight: var(--vce-fw-bold);
  font-size: calc(var(--vce-avatar-size) * 0.36);
  letter-spacing: 0.03em;
  user-select: none;
}
.vce-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vce-avatar--sm { --vce-avatar-size: 36px; }
.vce-avatar--lg { --vce-avatar-size: 72px; }
.vce-avatar--xl { --vce-avatar-size: 112px; }

/* ------------------------------------------------------------
   9. EMPTY STATE
   Cuando una lista queda en cero (p. ej. filtros sin resultados).
   Icono + título + texto + una acción para salir del callejón.
   Definido en la sección Asesores de la cascada.
   ------------------------------------------------------------ */
.vce-empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--vce-spacing-sm);
  padding: var(--vce-spacing-3xl) var(--vce-spacing-lg);
}
.vce-empty__icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--vce-surface-tint);
  color: var(--vce-indigo);
  margin-bottom: var(--vce-spacing-xs);
}
.vce-empty__icon svg { width: 30px; height: 30px; }
.vce-empty__title {
  font-family: var(--vce-font-display);
  font-size: var(--vce-fs-lg);
  font-weight: var(--vce-fw-bold);
  color: var(--vce-yale);
  margin: 0;
}
.vce-empty__text { color: var(--vce-color-text-muted); max-width: 46ch; margin: 0; }
.vce-empty__action { margin-top: var(--vce-spacing-md); }

/* ------------------------------------------------------------
   Accesibilidad: sin movimiento si el usuario lo pide.
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .vce-btn, .vce-chip, .vce-card { transition: none; }
  .vce-btn:hover, .vce-chip:hover, .vce-card:hover, .vce-card:focus-within { transform: none; }
}

/* Íconos inline de metadatos (reemplazan emojis en viajes) */
.vce-meta-icon { width: 1em; height: 1em; flex: none; vertical-align: -0.15em; opacity: 0.85; }

/* Avatar placeholder: silueta gris cuando el asesor no tiene foto */
.vce-avatar--placeholder { background: var(--vce-gris-claro); color: var(--vce-gris-medio); }
.vce-avatar--placeholder svg { width: 60%; height: 60%; }

/* ------------------------------------------------------------
   CARRUSEL DE CERTIFICACIONES (marquee automático de logos)
   ------------------------------------------------------------ */
.vce-cert-marquee { overflow: hidden; width: 100%; padding-block: var(--vce-spacing-sm);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.vce-cert-marquee__track { display: flex; align-items: center; gap: var(--vce-spacing-lg); width: max-content; animation: vce-cert-scroll 45s linear infinite; }
.vce-cert-marquee:hover .vce-cert-marquee__track { animation-play-state: paused; }
.vce-cert-item { flex: 0 0 auto; display: grid; place-items: center; height: 80px; padding: 0 10px; }
.vce-cert-item img { height: 60px; width: auto; max-width: 200px; object-fit: contain; display: block; transition: transform 0.3s ease; }
.vce-cert-item:hover img { transform: scale(1.18); }
@keyframes vce-cert-scroll { from { transform: translateX(0); } to { transform: translateX(calc(-50% - (var(--vce-spacing-lg) / 2))); } }
@media (prefers-reduced-motion: reduce) { .vce-cert-marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; } .vce-cert-marquee { -webkit-mask-image: none; mask-image: none; } }


/* "Ver todos" al cierre de secciones: pill visible con flecha */
.vce-bento__more .vce-btn, .vce-home-blog__all .vce-btn {
  border-radius: var(--vce-radius-pill); padding: 0.75rem 1.9rem; font-size: var(--vce-fs-base);
}
.vce-bento__more .vce-btn::after, .vce-home-blog__all .vce-btn::after { content: " \2192"; transition: transform var(--vce-transition-fast); display: inline-block; margin-left: 0.35rem; }
.vce-bento__more .vce-btn:hover::after, .vce-home-blog__all .vce-btn:hover::after { transform: translateX(3px); }


/* ============================================================
   Línea serape animada — firma de todos los encabezados del sitio.
   Deriva suavemente de lado a lado (ida y vuelta, muy lenta).
   ============================================================ */
@keyframes vce-serape-drift {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}
.vce-hero,
.vce-archive-hero,
.vce-viaje-hero,
.vce-post-hero,
.vce-nosotros-hero,
.vce-transfer-hero { position: relative; }
.vce-hero::before,
.vce-archive-hero::before,
.vce-viaje-hero::before,
.vce-post-hero::before,
.vce-nosotros-hero::before,
.vce-transfer-hero::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(90deg,
    var(--vce-indigo), var(--vce-bronce), var(--vce-naranja), var(--vce-picton),
    var(--vce-naranja), var(--vce-bronce), var(--vce-indigo));
  background-size: 300% 100%;
  animation: vce-serape-drift 14s ease-in-out infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .vce-hero::before, .vce-archive-hero::before, .vce-viaje-hero::before,
  .vce-post-hero::before, .vce-nosotros-hero::before, .vce-transfer-hero::before { animation: none; }
}
