/* =========================================================
   BILLETERA VIRTUAL X — estilos.css
   Versión depurada UX/UI 2026
   Diseño fintech accesible, responsive y mantenible
   Compatible con el HTML y JavaScript existentes
   ========================================================= */

/* =========================================================
   1. VARIABLES GLOBALES
   ========================================================= */

:root {
  /* Colores principales */
  --azul-oscuro: #101828;
  --violeta: #6c4cf1;
  --verde: #16a36a;
  --fondo-claro: #f7f8fc;
  --blanco: #ffffff;
  --texto-secundario: #667085;
  --texto-suave: #98a2b3;
  --borde: #e4e7ec;
  --borde-fuerte: #d0d5dd;
  --superficie: #ffffff;
  --superficie-suave: #fafbff;

  /* Colores derivados */
  --violeta-dark: #5636d0;
  --violeta-suave: #efeaff;
  --verde-suave: #e4f6ed;
  --azul-suave: #eef1f6;
  --rojo-error: #d92d20;
  --rojo-error-claro: #fda29b;
  --amarillo-aviso: #b54708;

  /* Tipografías */
  --font-display: "Manrope", "Poppins", sans-serif;
  --font-body: "Inter", "Manrope", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Sombras */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 4px 14px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 12px 32px rgba(16, 24, 40, 0.09);
  --shadow-lg: 0 24px 64px rgba(16, 24, 40, 0.13);
  --shadow-violeta: 0 12px 28px rgba(108, 76, 241, 0.25);

  /* Bordes redondeados */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --radius-pill: 999px;

  /* Interacciones */
  --focus-ring: 0 0 0 4px rgba(108, 76, 241, 0.14);
  --transition-fast: 160ms ease;
  --transition-base: 240ms ease;

  /* Layout */
  --header-height: 76px;
  --max-width: 1200px;
}

/* =========================================================
   2. RESET Y ESTILOS GENERALES
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  scrollbar-color: rgba(108, 76, 241, 0.45) transparent;
  scrollbar-width: thin;
}

body {
  min-height: 100vh;
  overflow-x: hidden;

  font-family: var(--font-body);
  color: var(--azul-oscuro);
  background: var(--fondo-claro);
  line-height: 1.6;
  text-rendering: optimizeLegibility;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.nav-open {
  overflow: hidden;
}

main {
  display: block;
}

img,
svg {
  max-width: 100%;
}

img {
  display: block;
  height: auto;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

::selection {
  color: var(--azul-oscuro);
  background: rgba(108, 76, 241, 0.2);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(108, 76, 241, 0.38);
  border: 3px solid transparent;
  border-radius: var(--radius-pill);
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(108, 76, 241, 0.58);
  border: 3px solid transparent;
  background-clip: padding-box;
}

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Texto solamente para lectores de pantalla */

.sr-only {
  position: absolute !important;

  width: 1px !important;
  height: 1px !important;

  padding: 0 !important;
  margin: -1px !important;

  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;

  border: 0 !important;
}

/* Enlace para saltar al contenido */

.skip-link {
  position: fixed;
  top: 0;
  left: -9999px;

  padding: 12px 20px;

  color: var(--blanco);
  background: var(--violeta);

  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}

.skip-link:focus {
  left: 0;
}

/* Foco accesible */

:focus-visible {
  outline: 3px solid rgba(108, 76, 241, 0.7);
  outline-offset: 3px;
}

/* =========================================================
   3. BOTONES
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  min-height: 48px;
  padding: 12px 24px;

  border: 1px solid transparent;
  border-radius: 999px;

  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;

  white-space: nowrap;
  touch-action: manipulation;
  user-select: none;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease;
  will-change: transform;
}

.btn:not(:disabled):hover {
  transform: translateY(-2px);
}

.btn:not(:disabled):active {
  transform: translateY(0);
}

.btn-primary {
  color: var(--blanco);
  background: var(--violeta);
  box-shadow: var(--shadow-violeta);
}

.btn-primary:not(:disabled):hover {
  background: var(--violeta-dark);
}

.btn-secondary {
  color: var(--azul-oscuro);
  background: var(--blanco);
  border-color: var(--borde);
}

.btn-secondary:not(:disabled):hover {
  color: var(--violeta);
  border-color: var(--violeta);
}

.btn-outline {
  color: var(--azul-oscuro);
  background: transparent;
  border-color: var(--borde);
  border-width: 1.5px;
}

.btn-outline:not(:disabled):hover {
  color: var(--violeta);
  background: var(--violeta-suave);
  border-color: var(--violeta);
}

.btn-sm {
  min-height: 38px;
  padding: 9px 18px;
  font-size: 0.85rem;
}

.btn-header {
  display: inline-flex;
}

/* =========================================================
   4. HEADER
   ========================================================= */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 500;

  display: flex;
  align-items: center;

  width: 100%;
  height: var(--header-height);

  background: rgba(247, 248, 252, 0.9);
  border-bottom: 1px solid rgba(228, 231, 236, 0.72);

  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(16px) saturate(140%);

  transition:
    box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;

  color: var(--azul-oscuro);

  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;

  white-space: nowrap;
}

.logo-mark {
  display: block;
  flex-shrink: 0;
}

.logo-x {
  color: var(--violeta);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  position: relative;

  display: block;
  padding: 6px 0;

  color: var(--texto-secundario);

  font-size: 0.95rem;
  font-weight: 600;

  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";

  position: absolute;
  left: 0;
  bottom: -4px;

  width: 0;
  height: 2px;

  background: var(--violeta);
  border-radius: 999px;

  transition: width 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--azul-oscuro);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;

  width: 44px;
  height: 44px;

  border-radius: var(--radius-sm);
}

.menu-toggle:hover {
  background: var(--violeta-suave);
}

.menu-toggle span {
  display: block;

  width: 24px;
  height: 2px;
  margin-inline: auto;

  background: var(--azul-oscuro);
  border-radius: 2px;

  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   5. HERO
   ========================================================= */

.hero {
  position: relative;

  padding: calc(var(--header-height) + 64px) 0 88px;

  overflow: hidden;

  background: linear-gradient(180deg, #ffffff 0%, var(--fondo-claro) 100%);
}

.hero-bg-grid {
  position: absolute;
  inset: 0;

  pointer-events: none;

  background-image:
    linear-gradient(var(--borde) 1px, transparent 1px),
    linear-gradient(90deg, var(--borde) 1px, transparent 1px);

  background-size: 48px 48px;

  -webkit-mask-image: radial-gradient(
    ellipse 60% 50% at 70% 30%,
    black 10%,
    transparent 70%
  );

  mask-image: radial-gradient(
    ellipse 60% 50% at 70% 30%,
    black 10%,
    transparent 70%
  );

  opacity: 0.7;
}

.hero-inner {
  position: relative;
  z-index: 1;

  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(40px, 6vw, 72px);
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin-bottom: 20px;
  padding: 6px 14px;

  color: var(--violeta);
  background: var(--violeta-suave);

  border-radius: 999px;

  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 680px;
  margin-bottom: 20px;

  color: var(--azul-oscuro);

  font-size: clamp(2.35rem, 5vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero-subtext {
  max-width: 520px;
  margin-bottom: 32px;

  color: var(--texto-secundario);

  font-size: 1.08rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;

  margin-bottom: 24px;
}

.hero-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 8px;

  max-width: 580px;

  color: var(--texto-secundario);
  font-size: 0.85rem;
}

.hero-disclaimer i {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--violeta);
}

/* Tarjeta visual del hero */

.hero-visual {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.wallet-card {
  position: relative;

  width: 100%;
  max-width: 340px;
  padding: 28px;

  overflow: hidden;

  color: var(--blanco);
  background: var(--azul-oscuro);

  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.wallet-card::before {
  content: "";

  position: absolute;
  top: -60px;
  right: -60px;

  width: 200px;
  height: 200px;

  pointer-events: none;

  background: radial-gradient(
    circle,
    rgba(108, 76, 241, 0.5) 0%,
    transparent 70%
  );
}

.wallet-card > * {
  position: relative;
  z-index: 1;
}

.wallet-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 18px;

  color: rgba(255, 255, 255, 0.65);
}

.wallet-card-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.wallet-balance {
  margin-bottom: 12px;

  font-family: var(--font-mono);
  font-size: 2.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;

  white-space: nowrap;
}

.wallet-chart {
  display: block;

  width: 100%;
  height: 70px;
  margin-bottom: 18px;
}

#wallet-chart-line {
  stroke-dasharray: 360;
  stroke-dashoffset: 360;

  animation: draw-chart 1.8s ease forwards 0.4s;
}

@keyframes draw-chart {
  to {
    stroke-dashoffset: 0;
  }
}

.wallet-card-stats {
  display: flex;
  justify-content: space-between;
  gap: 20px;

  margin-bottom: 20px;
  padding-top: 16px;

  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.wallet-card-stats div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.wallet-stat-label {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
}

.wallet-stat-value {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.wallet-stat-value.green {
  color: #4ade80;
}

/* =========================================================
   6. ANIMACIONES FADE-IN
   ========================================================= */

.fade-in {
  opacity: 0;
  transform: translateY(24px);

  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   7. ESTADÍSTICAS
   ========================================================= */

.stats-section {
  padding: 48px 0;
  background: var(--azul-oscuro);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;

  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.stat-number {
  color: var(--blanco);

  font-family: var(--font-mono);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;

  overflow-wrap: anywhere;
}

.stat-date {
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.stat-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
}

/* =========================================================
   8. SECCIONES GENÉRICAS
   ========================================================= */

.section {
  padding: clamp(72px, 8vw, 104px) 0;
}

.section-alt {
  background: var(--blanco);
}

.section-head {
  max-width: 680px;
  margin-bottom: clamp(34px, 5vw, 52px);
}

.section-head h2 {
  margin: 10px 0 12px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.section-subtext {
  color: var(--texto-secundario);
  font-size: 1.02rem;
}

/* =========================================================
   9. FILTROS
   ========================================================= */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;

  margin-bottom: 32px;
}

.filter-btn {
  min-height: 44px;
  padding: 10px 18px;

  color: var(--texto-secundario);
  background: var(--blanco);

  border: 1px solid var(--borde);
  border-radius: var(--radius-pill);

  font-size: 0.88rem;
  font-weight: 600;

  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.filter-btn:hover {
  color: var(--violeta);
  border-color: var(--violeta);
}

.filter-btn:active {
  transform: scale(0.98);
}

.filter-btn.active,
.filter-btn[aria-pressed="true"] {
  color: var(--blanco);
  background: var(--violeta);
  border-color: var(--violeta);
  box-shadow: 0 8px 18px rgba(108, 76, 241, 0.2);
}

/* =========================================================
   10. TABLA DEL COMPARADOR
   ========================================================= */

.table-wrapper {
  width: 100%;

  overflow-x: auto;
  overscroll-behavior-inline: contain;

  background: var(--blanco);

  border: 1px solid var(--borde);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-sm);
  scrollbar-gutter: stable;

  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  min-width: 720px;

  border-collapse: collapse;
}

.compare-table caption {
  text-align: left;
}

.compare-table th {
  position: sticky;
  top: 0;
  z-index: 2;

  padding: 16px 20px;
  background: #fbfcfe;

  color: var(--texto-secundario);

  border-bottom: 1px solid var(--borde);

  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;

  white-space: nowrap;
}

.compare-table td {
  padding: 17px 20px;

  border-bottom: 1px solid var(--borde);

  font-size: 0.95rem;
  vertical-align: middle;
}

.compare-table tbody tr {
  transition: background-color 0.2s ease;
}

.compare-table tbody tr:hover {
  background: #f8f7ff;
}

.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table tbody tr.row-hidden {
  display: none;
}

.yield-badge {
  display: inline-flex;
  align-items: center;

  padding: 5px 12px;

  color: var(--verde);
  background: var(--verde-suave);

  border-radius: 999px;

  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;

  white-space: nowrap;
}

.status-dot {
  display: inline-block;

  width: 8px;
  height: 8px;
  margin-right: 6px;

  background: var(--verde);
  border-radius: 50%;
}

.table-empty {
  padding: 40px 24px;

  color: var(--texto-secundario);

  text-align: center;
}

.table-disclaimer {
  margin-top: 18px;

  color: var(--texto-secundario);

  font-size: 0.85rem;
  text-align: center;
}

/* =========================================================
   11. CALCULADORA
   ========================================================= */

.calculator {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;

  padding: 40px;

  background: var(--blanco);

  border: 1px solid var(--borde);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-sm);
}

.calculator-form,
.calculator-result {
  min-width: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;

  margin-bottom: 22px;
}

.field label {
  font-size: 0.9rem;
  font-weight: 700;
}

.field input[type="number"],
.field input[type="text"],
.field input[type="email"] {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;

  color: var(--azul-oscuro);
  background: #fcfcfd;

  border: 1.5px solid var(--borde);
  border-radius: var(--radius-sm);

  font-size: 1rem;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.field input:hover {
  border-color: #cbd0d8;
}

.field input:focus {
  border-color: var(--violeta);
  outline: none;

  box-shadow: var(--focus-ring);
}

.field input.input-invalid,
.input-prefix.input-invalid {
  border-color: var(--rojo-error);
}

.field input.input-invalid:focus,
.input-prefix.input-invalid:focus-within {
  border-color: var(--rojo-error);

  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.1);
}

.field-help {
  display: block;

  color: var(--texto-secundario);

  font-size: 0.78rem;
  line-height: 1.45;
}

.input-prefix {
  display: flex;
  align-items: stretch;

  width: 100%;

  overflow: hidden;

  background: #fcfcfd;

  border: 1.5px solid var(--borde);
  border-radius: var(--radius-sm);

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.input-prefix:hover {
  border-color: #cbd0d8;
}

.input-prefix:focus-within {
  border-color: var(--violeta);
  box-shadow: var(--focus-ring);
}

.input-prefix > span {
  display: flex;
  align-items: center;

  padding: 0 14px;

  color: var(--texto-secundario);
  background: var(--fondo-claro);

  border-right: 1px solid var(--borde);

  font-weight: 700;
}

.field .input-prefix input {
  flex: 1;
  min-width: 0;

  border: none;
  border-radius: 0;
  box-shadow: none;
}

.field .input-prefix input:focus {
  border: none;
  outline: none;
  box-shadow: none;
}

.range-slider {
  width: 100%;
  margin-top: 10px;

  accent-color: var(--violeta);
  cursor: pointer;
}

.input-error {
  display: block;

  color: var(--rojo-error);

  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.45;
}

.calculator-result {
  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 32px;

  color: var(--blanco);
  background: var(--azul-oscuro);

  border-radius: var(--radius-md);
}

.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 14px 0;

  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

  font-size: 0.92rem;
}

.result-row:last-of-type {
  border-bottom: none;
}

.result-row strong {
  flex-shrink: 0;

  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.result-row strong.green {
  color: #4ade80;
}

.calc-disclaimer {
  margin-top: 16px;

  color: rgba(255, 255, 255, 0.58);

  font-size: 0.78rem;
}

/* =========================================================
   12. RANKING
   ========================================================= */

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.ranking-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;

  min-width: 0;
  padding: 32px;

  background: var(--blanco);

  border: 1px solid var(--borde);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-sm);
  isolation: isolate;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.ranking-card:hover {
  transform: translateY(-4px);

  border-color: rgba(108, 76, 241, 0.25);
  box-shadow: var(--shadow-md);
}

.ranking-position {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin-bottom: 16px;
  padding: 4px 12px;

  color: var(--violeta);
  background: var(--violeta-suave);

  border-radius: 999px;

  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.ranking-card h3 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

.ranking-wallet {
  margin-bottom: 6px;

  color: var(--violeta);

  font-weight: 700;
}

.ranking-benefit {
  min-height: 42px;
  margin-bottom: 18px;

  color: var(--texto-secundario);

  font-size: 0.92rem;
}

.score-bar {
  width: 100%;
  height: 8px;
  margin-bottom: 22px;

  overflow: hidden;

  background: var(--azul-suave);
  border-radius: 999px;
}

.score-bar span {
  display: block;

  height: 100%;

  background: linear-gradient(90deg, var(--violeta), var(--verde));

  border-radius: 999px;
}

.ranking-card .btn {
  margin-top: auto;
}

/* =========================================================
   13. PROMOCIONES
   ========================================================= */

.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.promo-card {
  position: relative;

  display: flex;
  flex-direction: column;

  min-width: 0;
  padding: 28px;

  background: var(--blanco);

  border: 1px solid var(--borde);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-sm);
  isolation: isolate;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.promo-card:hover {
  transform: translateY(-4px);

  border-color: rgba(108, 76, 241, 0.25);
  box-shadow: var(--shadow-md);
}

.promo-card.row-hidden {
  display: none;
}

.sponsored-tag {
  position: absolute;
  top: 20px;
  right: 20px;

  padding: 4px 10px;

  color: var(--texto-secundario);
  background: var(--azul-suave);

  border-radius: 999px;

  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.promo-icon {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;
  margin-bottom: 18px;

  color: var(--violeta);
  background: var(--violeta-suave);

  border-radius: var(--radius-sm);

  font-size: 1.2rem;
}

.promo-category {
  display: inline-block;

  margin-bottom: 8px;

  color: var(--violeta);

  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.promo-card h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.promo-card > p {
  margin-bottom: 18px;

  color: var(--texto-secundario);

  font-size: 0.92rem;
}

.promo-date {
  display: flex;
  align-items: flex-start;
  gap: 6px;

  margin-bottom: 18px;

  color: var(--texto-secundario);

  font-size: 0.78rem;
}

.promo-date i {
  flex-shrink: 0;
  margin-top: 3px;
}

.promo-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

/* =========================================================
   14. GUÍAS Y ARTÍCULOS
   ========================================================= */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.article-card {
  display: flex;
  flex-direction: column;

  min-width: 0;
  overflow: hidden;

  background: var(--blanco);

  border: 1px solid var(--borde);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-sm);
  isolation: isolate;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.article-card:hover {
  transform: translateY(-4px);

  border-color: rgba(108, 76, 241, 0.25);
  box-shadow: var(--shadow-md);
}

.article-cover {
  display: flex;
  align-items: center;
  justify-content: center;

  height: 150px;

  color: rgba(255, 255, 255, 0.9);

  font-size: 2.6rem;
}

.cover-1 {
  background: linear-gradient(135deg, #6c4cf1, #101828);
}

.cover-2 {
  background: linear-gradient(135deg, #16a36a, #101828);
}

.cover-3 {
  background: linear-gradient(135deg, #101828, #667085);
}

.cover-4 {
  background: linear-gradient(135deg, #6c4cf1, #16a36a);
}

.cover-5 {
  background: linear-gradient(135deg, #5636d0, #101828);
}

.cover-6 {
  background: linear-gradient(135deg, #16a36a, #6c4cf1);
}

.article-body {
  display: flex;
  flex: 1;
  flex-direction: column;

  padding: 24px;
}

.article-body h3 {
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.article-body > p {
  margin-bottom: 16px;

  color: var(--texto-secundario);

  font-size: 0.9rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;

  margin-bottom: 16px;

  color: var(--texto-secundario);

  font-size: 0.78rem;
}

.article-meta span,
.article-meta time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  align-self: flex-start;
  margin-top: auto;

  color: var(--violeta);

  font-size: 0.9rem;
  font-weight: 700;

  transition:
    gap 0.2s ease,
    color 0.2s ease;
}

.link-arrow:hover {
  gap: 12px;
  color: var(--violeta-dark);
}

/* =========================================================
   15. NEWSLETTER
   ========================================================= */

.newsletter-section {
  padding-top: 0;
}

.newsletter-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(30px, 5vw, 56px);

  padding: clamp(30px, 5vw, 56px);

  color: var(--blanco);

  background: linear-gradient(120deg, var(--azul-oscuro), #1c2438);

  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.newsletter-copy h2 {
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.newsletter-copy p {
  color: rgba(255, 255, 255, 0.72);
}

.newsletter-form {
  position: relative;

  display: flex;
  flex-direction: column;
  gap: 4px;

  min-width: 0;
}

.newsletter-form .field {
  margin-bottom: 14px;
}

.newsletter-form label {
  color: rgba(255, 255, 255, 0.88);
}

.newsletter-form input[type="text"],
.newsletter-form input[type="email"] {
  color: var(--blanco);
  background: rgba(255, 255, 255, 0.06);

  border-color: rgba(255, 255, 255, 0.2);
}

.newsletter-form input[type="text"]:hover,
.newsletter-form input[type="email"]:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.newsletter-form input[type="text"]:focus,
.newsletter-form input[type="email"]:focus {
  border-color: #9b8bff;

  box-shadow: 0 0 0 4px rgba(155, 139, 255, 0.18);
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.newsletter-form .input-error {
  color: var(--rojo-error-claro);
}

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 10px;

  margin-bottom: 4px;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  color: rgba(255, 255, 255, 0.78);

  font-size: 0.85rem;
  cursor: pointer;
}

.checkbox-field input {
  flex-shrink: 0;

  width: 17px;
  height: 17px;
  margin-top: 2px;

  accent-color: var(--violeta);
}

.checkbox-row .checkbox-field {
  margin-bottom: 0;
}

.privacy-link {
  padding-top: 1px;

  color: var(--blanco);

  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-link:hover {
  color: #cfc7ff;
}

.newsletter-form .btn-primary {
  align-self: flex-start;
  margin-top: 18px;
}

.newsletter-form .btn-primary[aria-busy="true"] {
  pointer-events: none;
}

.form-success {
  display: flex;
  align-items: flex-start;
  gap: 8px;

  margin-top: 14px;

  color: #4ade80;

  font-size: 0.9rem;
  font-weight: 600;
}

.form-success i {
  flex-shrink: 0;
  margin-top: 3px;
}

.form-error {
  margin-top: 14px;
  color: var(--rojo-error-claro);
}

/* Campo honeypot antispam */

.honeypot-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;

  width: 1px !important;
  height: 1px !important;

  overflow: hidden !important;
}

/* =========================================================
   16. PREGUNTAS FRECUENTES
   ========================================================= */

.accordion {
  max-width: 780px;
}

.accordion-item {
  border-bottom: 1px solid var(--borde);
}

.accordion-heading {
  margin: 0;
  font: inherit;
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  width: 100%;
  padding: 22px 4px;

  color: var(--azul-oscuro);

  font-size: 1rem;
  font-weight: 700;
  text-align: left;
}

.accordion-trigger:hover {
  color: var(--violeta);
}

.accordion-trigger i {
  flex-shrink: 0;

  color: var(--violeta);

  transition: transform 0.25s ease;
}

.accordion-trigger[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.accordion-panel {
  max-height: 0;

  overflow: hidden;

  transition: max-height 0.3s ease;
}

.accordion-panel p {
  max-width: 660px;
  padding: 0 4px 22px;

  color: var(--texto-secundario);
}

/* =========================================================
   17. AVISO LEGAL
   ========================================================= */

.legal-notice {
  padding: 32px 0;

  background: var(--azul-suave);

  border-top: 1px solid var(--borde);
  border-bottom: 1px solid var(--borde);
}

.legal-notice p {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  max-width: 920px;

  color: var(--texto-secundario);

  font-size: 0.88rem;
}

.legal-notice i {
  flex-shrink: 0;

  margin-top: 3px;

  color: var(--amarillo-aviso);
}

.legal-notice strong {
  color: var(--azul-oscuro);
}

/* =========================================================
   18. FOOTER
   ========================================================= */

.site-footer {
  padding: 64px 0 0;

  color: rgba(255, 255, 255, 0.68);
  background: var(--azul-oscuro);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;

  padding-bottom: 48px;
}

.footer-logo {
  margin-bottom: 14px;
  color: var(--blanco);
}

.footer-brand > p {
  max-width: 280px;
  margin-bottom: 20px;

  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;

  color: rgba(255, 255, 255, 0.8);

  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;

  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.footer-social a:hover {
  transform: translateY(-2px);

  color: var(--blanco);
  background: var(--violeta);
  border-color: var(--violeta);
}

/* Compatible con h2.footer-title y con h4 antiguos */

.footer-title,
.footer-col h4 {
  margin-bottom: 18px;

  color: var(--blanco);

  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col li {
  line-height: 1.4;
}

.footer-col a {
  font-size: 0.9rem;

  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--blanco);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;

  padding: 24px;

  border-top: 1px solid rgba(255, 255, 255, 0.1);

  font-size: 0.82rem;
}

.footer-bottom a {
  color: var(--blanco);

  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =========================================================
   19. BOTÓN VOLVER ARRIBA
   ========================================================= */

.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 400;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 48px;
  height: 48px;

  color: var(--blanco);
  background: var(--violeta);

  border-radius: 50%;

  box-shadow: var(--shadow-violeta);

  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  pointer-events: none;

  transition:
    opacity 0.3s ease,
    visibility 0.3s ease,
    transform 0.3s ease,
    background-color 0.2s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--violeta-dark);
}

/* =========================================================
   20. MENSAJE SIN JAVASCRIPT
   ========================================================= */

.noscript-message {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 1100;

  max-width: 900px;
  margin-inline: auto;
  padding: 14px 18px;

  color: var(--azul-oscuro);
  background: #fff4e5;

  border: 1px solid #f5c26b;
  border-radius: var(--radius-sm);

  box-shadow: var(--shadow-lg);

  font-size: 0.9rem;
  font-weight: 600;
}

/* =========================================================
   21. RESPONSIVE — TABLET GRANDE
   ========================================================= */

@media (max-width: 1100px) {
  .main-nav ul {
    gap: 22px;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .btn-header {
    padding-inline: 20px;
  }
}

/* =========================================================
   22. RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 760px;
    margin-inline: auto;
    text-align: center;
  }

  .hero-subtext {
    margin-inline: auto;
  }

  .hero-buttons,
  .hero-disclaimer {
    justify-content: center;
  }

  .hero-visual {
    order: -1;

    width: 100%;
    max-width: 380px;
    margin: 0 auto 24px;
  }

  .ranking-grid,
  .promo-grid,
  .articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .newsletter-box {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   23. RESPONSIVE — MENÚ MÓVIL
   ========================================================= */

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;

    max-height: 0;

    overflow: hidden;

    background: var(--blanco);

    border-bottom: 1px solid var(--borde);

    box-shadow: var(--shadow-md);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
      max-height 0.3s ease,
      opacity 0.2s ease,
      visibility 0.3s ease;
  }

  .main-nav.open {
    max-height: calc(100vh - var(--header-height));

    overflow-y: auto;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;

    padding: 14px 20px 24px;
  }

  .nav-link {
    display: block;

    min-height: 48px;
    padding: 14px 10px;

    color: var(--azul-oscuro);

    border-bottom: 1px solid var(--borde);
  }

  .main-nav li:last-child .nav-link {
    border-bottom: none;
  }

  .nav-link::after {
    display: none;
  }

  .btn-header {
    display: none !important;
  }

  .menu-toggle {
    display: flex;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
  }

  .calculator {
    grid-template-columns: 1fr;
  }

  .compare-table {
    min-width: 0;
  }

  .compare-table thead {
    display: none;
  }

  .compare-table tbody {
    display: block;
  }

  .compare-table tbody tr {
    display: block;

    padding: 18px 20px;
  }

  .compare-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 10px 0;

    border-bottom: none;

    text-align: right;
  }

  .compare-table td::before {
    content: attr(data-label);

    flex: 0 0 42%;

    color: var(--texto-secundario);

    font-size: 0.78rem;
    font-weight: 700;
    text-align: left;
  }

  .compare-table td:first-child {
    justify-content: flex-start;
    padding-bottom: 14px;
  }

  .compare-table td:first-child::before {
    content: none;
  }

  .compare-table tbody tr:not(:last-child) {
    border-bottom: 1px solid var(--borde);
  }

  .wallet-name {
    min-width: 0;
    text-align: left;
  }
}

/* =========================================================
   24. RESPONSIVE — MÓVIL
   ========================================================= */

@media (max-width: 640px) {
  :root {
    --header-height: 68px;
  }

  .container {
    padding-inline: 18px;
  }

  .section {
    padding: 64px 0;
  }

  .section-head {
    margin-bottom: 34px;
  }

  .hero {
    padding: calc(var(--header-height) + 40px) 0 60px;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 2.6rem);
  }

  .hero-subtext {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .wallet-card {
    max-width: 100%;
    padding: 24px;
  }

  .wallet-balance {
    font-size: clamp(1.65rem, 9vw, 2.1rem);
  }

  .wallet-card-stats {
    gap: 14px;
  }

  .ranking-grid,
  .promo-grid,
  .articles-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-wrap: nowrap;

    margin-inline: -18px;
    padding-inline: 18px;
    padding-bottom: 6px;

    overflow-x: auto;

    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    flex-shrink: 0;
  }

  .calculator {
    gap: 24px;
    padding: 24px;
  }

  .calculator-result {
    padding: 24px;
  }

  .result-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .result-row span,
  .result-row strong {
    max-width: 100%;
  }

  .result-row strong {
    overflow-wrap: anywhere;
    text-align: left;
  }

  .newsletter-box {
    padding: 28px 22px;
  }

  .newsletter-form .btn-primary {
    width: 100%;
  }

  .accordion-trigger {
    align-items: flex-start;
    padding: 20px 2px;
  }

  .footer-grid {
    gap: 38px;
  }

  .footer-bottom {
    flex-direction: column;
    padding-inline: 18px;
  }

  .back-to-top {
    right: 18px;
    bottom: 18px;

    width: 44px;
    height: 44px;
  }
}

/* =========================================================
   25. RESPONSIVE — MÓVIL PEQUEÑO
   ========================================================= */

@media (max-width: 420px) {
  .logo {
    gap: 8px;
    font-size: 1.05rem;
  }

  .logo-mark {
    width: 30px;
    height: 30px;
  }

  .header-actions {
    gap: 8px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .wallet-card-stats {
    flex-direction: column;
  }

  .compare-table tbody tr {
    padding-inline: 16px;
  }

  .compare-table td {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;

    text-align: left;
  }

  .compare-table td::before {
    flex-basis: auto;
  }

  .compare-table td:first-child {
    flex-direction: row;
    align-items: center;
  }

  .compare-table td .btn {
    width: 100%;
  }

  .ranking-card,
  .promo-card,
  .article-body {
    padding: 24px;
  }

  .legal-notice p {
    font-size: 0.84rem;
  }
}

/* =========================================================
   26. MOVIMIENTO REDUCIDO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  #wallet-chart-line {
    stroke-dashoffset: 0;
  }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   27. IMPRESIÓN
   ========================================================= */

@media print {
  .site-header,
  .hero-buttons,
  .filter-bar,
  .newsletter-section,
  .back-to-top,
  .footer-social,
  .menu-toggle {
    display: none !important;
  }

  body {
    color: #000000;
    background: #ffffff;
  }

  .hero,
  .section,
  .stats-section,
  .legal-notice,
  .site-footer {
    padding: 24px 0;
    color: #000000;
    background: #ffffff;
  }

  .stat-number,
  .stat-label,
  .site-footer,
  .footer-logo,
  .footer-title {
    color: #000000;
  }

  .table-wrapper,
  .calculator,
  .ranking-card,
  .promo-card,
  .article-card {
    box-shadow: none;
  }
}

/* =========================================================
   28. PÁGINAS INTERNAS — BASE Y COMPATIBILIDAD
   ========================================================= */
.inner-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.92rem;
  font-weight: 700;
}
.inner-nav a:hover {
  color: var(--violeta);
}
.inner-main {
  padding-top: calc(var(--header-height) + 54px);
}
.inner-hero {
  padding: 72px 0 52px;
  background: linear-gradient(135deg, #f6f7fb 0%, #efeaff 100%);
  border-bottom: 1px solid var(--borde);
}
.inner-hero .container {
  max-width: 900px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--texto-secundario);
  font-size: 0.88rem;
}
.breadcrumbs a:hover {
  color: var(--violeta);
}
.inner-hero h1 {
  max-width: 820px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  margin-bottom: 18px;
}
.inner-hero .lead {
  max-width: 760px;
  color: var(--texto-secundario);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}
.content-section {
  padding: 64px 0 84px;
}
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 38px;
  align-items: start;
}
.article-content {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 52px);
  box-shadow: var(--shadow-sm);
}
.article-content h2 {
  margin: 34px 0 12px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}
.article-content h2:first-child {
  margin-top: 0;
}
.article-content h3 {
  margin: 26px 0 10px;
  font-size: 1.18rem;
}
.article-content p,
.article-content li {
  color: #344054;
}
.article-content p + p {
  margin-top: 15px;
}
.article-content ul,
.article-content ol {
  list-style: initial;
  padding-left: 22px;
  margin: 14px 0 20px;
}
.article-content li + li {
  margin-top: 8px;
}
.article-content a:not(.btn) {
  color: var(--violeta);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.info-card {
  position: sticky;
  top: calc(var(--header-height) + 22px);
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.info-card h2 {
  font-size: 1.15rem;
  margin-bottom: 14px;
}
.info-card dl {
  display: grid;
  gap: 14px;
}
.info-card dt {
  color: var(--texto-secundario);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.info-card dd {
  margin-top: 2px;
  font-weight: 800;
}
.info-card .btn {
  width: 100%;
  margin-top: 20px;
}
.notice-box {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--violeta);
  border-radius: var(--radius-sm);
  background: var(--violeta-suave);
  color: #344054;
}
.notice-box.warning {
  border-left-color: #b54708;
  background: #fff4e8;
}
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 24px;
  color: var(--texto-secundario);
  font-size: 0.9rem;
}
.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}
.data-box {
  padding: 18px;
  border: 1px solid var(--borde);
  border-radius: var(--radius-sm);
  background: #fafbfc;
}
.data-box span {
  display: block;
  color: var(--texto-secundario);
  font-size: 0.82rem;
}
.data-box strong {
  display: block;
  margin-top: 4px;
  font-size: 1.08rem;
}
.related-links {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.related-links a {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--borde);
  border-radius: var(--radius-sm);
  background: var(--blanco);
  font-weight: 700;
}
.related-links a:hover {
  border-color: var(--violeta);
  color: var(--violeta);
}
.contact-card {
  padding: 22px;
  border: 1px solid var(--borde);
  border-radius: var(--radius-md);
  background: #fafbfc;
}
.contact-card code {
  overflow-wrap: anywhere;
}
.inner-footer-grid {
  grid-template-columns: 1.4fr repeat(3, 1fr);
}
.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-height) + 70px) 24px 80px;
  text-align: center;
}
.error-page .error-code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 15vw, 9rem);
  color: var(--violeta);
  line-height: 1;
}
.error-page h1 {
  margin: 12px 0;
}
.error-page p {
  max-width: 580px;
  margin: 0 auto 26px;
  color: var(--texto-secundario);
}
@media (max-width: 900px) {
  .inner-nav {
    display: none;
  }
  .content-layout {
    grid-template-columns: 1fr;
  }
  .info-card {
    position: static;
  }
  .inner-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .inner-main {
    padding-top: var(--header-height);
  }
  .inner-hero {
    padding: 52px 0 38px;
  }
  .content-section {
    padding: 42px 0 60px;
  }
  .article-content {
    padding: 24px 20px;
  }
  .data-grid {
    grid-template-columns: 1fr;
  }
  .inner-footer-grid {
    grid-template-columns: 1fr;
  }
  .btn-header {
    display: none;
  }
}

/* =========================================================
   29. PÁGINAS INTERNAS — UX/UI 2026
   Jerarquía visual, lectura, navegación y responsive
   ========================================================= */

.inner-page {
  background: #f7f8fc;
}

.inner-page.nav-open {
  overflow: hidden;
}

.inner-page .inner-main {
  padding-top: var(--header-height);
}

.inner-page .site-header {
  border-bottom: 1px solid rgba(228, 231, 236, 0.88);
}

.inner-page .logo-text {
  white-space: nowrap;
}

.inner-page .inner-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 76px 0 68px;
  background:
    radial-gradient(
      circle at 12% 18%,
      rgba(108, 76, 241, 0.16),
      transparent 30%
    ),
    radial-gradient(
      circle at 88% 20%,
      rgba(22, 163, 106, 0.12),
      transparent 28%
    ),
    linear-gradient(135deg, #fbfbff 0%, #f0edff 55%, #f5fbf8 100%);
  border-bottom: 1px solid var(--borde);
}

.inner-page .inner-hero::before,
.inner-page .inner-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
}

.inner-page .inner-hero::before {
  width: 360px;
  height: 360px;
  right: -130px;
  top: -190px;
  border: 1px solid rgba(108, 76, 241, 0.16);
  box-shadow:
    0 0 0 45px rgba(108, 76, 241, 0.04),
    0 0 0 90px rgba(108, 76, 241, 0.025);
}

.inner-page .inner-hero::after {
  width: 180px;
  height: 180px;
  left: -70px;
  bottom: -110px;
  background: rgba(22, 163, 106, 0.07);
}

.inner-page .inner-hero .container {
  max-width: 1180px;
}

.inner-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 310px);
  align-items: center;
  gap: clamp(38px, 6vw, 84px);
}

.inner-hero-copy {
  min-width: 0;
}

.inner-page .breadcrumbs {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 22px;
  padding: 7px 11px;
  gap: 8px;
  color: #667085;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(228, 231, 236, 0.92);
  border-radius: 999px;
  box-shadow: 0 5px 18px rgba(16, 24, 40, 0.04);
  backdrop-filter: blur(10px);
}

.inner-page .breadcrumbs a {
  color: #475467;
  font-weight: 700;
  text-decoration: none;
}

.inner-page .breadcrumbs a:hover {
  color: var(--violeta);
}

.inner-page .inner-hero .eyebrow {
  margin-bottom: 13px;
}

.inner-page .inner-hero h1 {
  max-width: 850px;
  margin: 0 0 18px;
  font-size: clamp(2.15rem, 5vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.inner-page .inner-hero .lead {
  max-width: 780px;
  margin: 0;
  color: #475467;
  font-size: clamp(1.02rem, 2vw, 1.22rem);
  line-height: 1.72;
  text-wrap: pretty;
}

.inner-page .meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.inner-page .meta-line span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 11px;
  color: #475467;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(228, 231, 236, 0.95);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.inner-page .meta-line span::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--verde);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(22, 163, 106, 0.1);
}

.page-hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 30px;
  overflow: hidden;
  text-align: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  box-shadow: 0 30px 70px rgba(52, 38, 126, 0.14);
  backdrop-filter: blur(16px);
}

.page-hero-visual::before {
  content: "";
  position: absolute;
  inset: auto -55px -75px auto;
  width: 190px;
  height: 190px;
  background: linear-gradient(
    135deg,
    rgba(108, 76, 241, 0.14),
    rgba(22, 163, 106, 0.08)
  );
  border-radius: 50%;
}

.brand-hero-logo {
  position: relative;
  z-index: 1;
  width: 112px !important;
  min-width: 112px;
  max-width: 112px;
  height: auto;
  margin-bottom: 20px;
  padding: 8px;
  object-fit: contain;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 26px;
  box-shadow: 0 18px 35px rgba(16, 24, 40, 0.15);
}

.page-hero-visual .visual-kicker {
  position: relative;
  z-index: 1;
  color: var(--violeta);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-hero-visual strong {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: var(--azul-oscuro);
  font-family: var(--font-display);
  font-size: 1.38rem;
}

.page-hero-visual small {
  position: relative;
  z-index: 1;
  margin-top: 5px;
  color: var(--texto-secundario);
}

.page-hero-symbol {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 116px;
  height: 116px;
  color: #fff;
  background: linear-gradient(135deg, var(--violeta), #3f2bb8);
  border-radius: 28px;
  box-shadow: 0 22px 40px rgba(108, 76, 241, 0.28);
  font-family: var(--font-display);
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  transform: rotate(-4deg);
}

.page-hero-symbol--promotion {
  background: linear-gradient(135deg, #16a36a, #0f7c50);
  box-shadow: 0 22px 40px rgba(22, 163, 106, 0.25);
}

.page-hero-symbol--legal {
  background: linear-gradient(135deg, #344054, #101828);
}

.page-hero-symbol--contact {
  background: linear-gradient(135deg, #2e90fa, #175cd3);
}

.page-hero-lines {
  position: relative;
  z-index: 1;
  display: grid;
  width: 75%;
  gap: 9px;
  margin-top: 30px;
}

.page-hero-lines i {
  height: 8px;
  background: #ece9ff;
  border-radius: 999px;
}

.page-hero-lines i:nth-child(2) {
  width: 78%;
}
.page-hero-lines i:nth-child(3) {
  width: 56%;
}

.inner-page .content-section {
  position: relative;
  padding: 72px 0 96px;
  background:
    linear-gradient(180deg, rgba(246, 247, 251, 0.2), #f7f8fc 220px), #f7f8fc;
}

.inner-page .content-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(28px, 4vw, 48px);
}

.inner-page .article-content {
  padding: clamp(28px, 5vw, 58px);
  overflow: hidden;
  border: 1px solid rgba(228, 231, 236, 0.95);
  border-radius: 28px;
  box-shadow: 0 18px 55px rgba(16, 24, 40, 0.07);
}

.inner-page .article-content > * {
  max-width: 780px;
}

.inner-page .article-content h2,
.inner-page .article-content h3 {
  scroll-margin-top: calc(var(--header-height) + 26px);
  text-wrap: balance;
}

.inner-page .article-content h2 {
  position: relative;
  margin: 42px 0 15px;
  padding-left: 18px;
  color: var(--azul-oscuro);
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  letter-spacing: -0.025em;
}

.inner-page .article-content h2::before {
  content: "";
  position: absolute;
  top: 0.13em;
  bottom: 0.13em;
  left: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--violeta), var(--verde));
  border-radius: 999px;
}

.inner-page .article-content h2:first-child {
  margin-top: 0;
}

.inner-page .article-content h3 {
  margin-top: 30px;
  font-size: 1.2rem;
}

.inner-page .article-content p,
.inner-page .article-content li {
  color: #344054;
  font-size: 1rem;
  line-height: 1.78;
}

.inner-page .article-content p + p {
  margin-top: 17px;
}

.inner-page .article-content ul,
.inner-page .article-content ol {
  display: grid;
  gap: 10px;
  margin: 18px 0 25px;
  padding-left: 0;
  list-style: none;
}

.inner-page .article-content li {
  position: relative;
  padding: 11px 14px 11px 42px;
  background: #fafbff;
  border: 1px solid #eaecf0;
  border-radius: 13px;
}

.inner-page .article-content li::before {
  content: "✓";
  position: absolute;
  top: 12px;
  left: 14px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  color: var(--verde);
  background: var(--verde-suave);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 900;
}

.inner-page .data-grid {
  gap: 14px;
  margin: 28px 0;
}

.inner-page .data-box {
  position: relative;
  min-height: 114px;
  padding: 20px;
  overflow: hidden;
  background: linear-gradient(145deg, #ffffff, #f8f9fc);
  border: 1px solid #e4e7ec;
  border-radius: 17px;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.inner-page .data-box::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 72px;
  height: 72px;
  background: rgba(108, 76, 241, 0.06);
  border-radius: 50%;
}

.inner-page .data-box:hover {
  transform: translateY(-3px);
  border-color: rgba(108, 76, 241, 0.35);
  box-shadow: 0 12px 25px rgba(16, 24, 40, 0.07);
}

.inner-page .data-box span {
  position: relative;
  z-index: 1;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.inner-page .data-box strong {
  position: relative;
  z-index: 1;
  margin-top: 9px;
  color: #101828;
  font-size: 1.12rem;
  line-height: 1.35;
}

.inner-page .notice-box {
  position: relative;
  margin: 30px 0;
  padding: 20px 22px 20px 56px;
  border: 1px solid rgba(108, 76, 241, 0.18);
  border-left: 0;
  border-radius: 17px;
  background: linear-gradient(135deg, #f5f2ff, #faf9ff);
  line-height: 1.65;
}

.inner-page .notice-box::before {
  content: "i";
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #fff;
  background: var(--violeta);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-weight: 800;
}

.inner-page .notice-box.warning {
  color: #7a2e0e;
  background: #fff8ef;
  border-color: #fedfbc;
}

.inner-page .notice-box.warning::before {
  content: "!";
  background: #dc6803;
  font-family: var(--font-body);
}

.inner-page .info-card {
  top: calc(var(--header-height) + 22px);
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(228, 231, 236, 0.96);
  border-radius: 24px;
  box-shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
}

.inner-page .info-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--violeta), var(--verde));
}

.info-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 3px 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--borde);
}

.info-brand span {
  color: var(--violeta);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.inner-page .info-card h2 {
  color: #101828;
  font-size: 1.12rem;
  letter-spacing: -0.015em;
}

.inner-page .info-card dl > div {
  padding: 11px 0;
  border-bottom: 1px solid #f0f1f4;
}

.inner-page .info-card dl > div:last-child {
  border-bottom: 0;
}

.page-toc {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--borde);
}

.page-toc-title {
  display: block;
  margin-bottom: 10px;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-toc ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-toc a {
  display: block;
  padding: 8px 10px;
  color: #475467;
  background: #fafbfc;
  border-radius: 9px;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.page-toc a:hover {
  color: var(--violeta);
  background: var(--violeta-suave);
  transform: translateX(3px);
}

.content-end-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 42px;
  padding: 20px;
  background: linear-gradient(135deg, #effaf5, #f8fffb);
  border: 1px solid #ccebdc;
  border-radius: 17px;
}

.content-end-card > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: #fff;
  background: var(--verde);
  border-radius: 10px;
  font-weight: 900;
}

.content-end-card strong {
  display: block;
  margin-bottom: 3px;
  color: #075e3b;
}

.content-end-card p {
  margin: 0 !important;
  color: #28684f !important;
  font-size: 0.9rem !important;
  line-height: 1.55 !important;
}

.inner-page .contact-card {
  padding: 24px;
  background: linear-gradient(145deg, #fff, #fafbff);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
}

.inner-page .related-links a {
  padding: 14px 16px;
  border-radius: 12px;
  text-decoration: none !important;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.inner-page .related-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(16, 24, 40, 0.07);
}

.inner-page .back-to-top span {
  font-size: 1.35rem;
  line-height: 1;
}

.inner-page a:focus-visible,
.inner-page button:focus-visible {
  outline: 3px solid rgba(108, 76, 241, 0.35);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .inner-hero-grid {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 36px;
  }

  .inner-page .content-layout {
    grid-template-columns: minmax(0, 1fr) 285px;
    gap: 26px;
  }
}

@media (max-width: 860px) {
  .inner-page .inner-hero {
    padding: 58px 0 52px;
  }

  .inner-hero-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-visual {
    order: -1;
    min-height: 210px;
    max-width: 360px;
    width: 100%;
    margin-inline: auto;
  }

  .page-hero-symbol {
    width: 92px;
    height: 92px;
    font-size: 1.9rem;
  }

  .page-hero-lines {
    margin-top: 22px;
  }

  .inner-page .content-layout {
    grid-template-columns: 1fr;
  }

  .inner-page .info-card {
    position: static;
    order: -1;
  }

  .page-toc ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .inner-page .inner-hero {
    padding: 40px 0 42px;
  }

  .inner-page .breadcrumbs {
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  .inner-page .inner-hero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .page-hero-visual {
    width: 100%;
    max-width: 100%;
    min-height: 185px;
    padding: 22px;
    border-radius: 24px;
  }

  .inner-page .content-section {
    padding: 42px 0 68px;
  }

  .inner-page .article-content,
  .inner-page .info-card {
    border-radius: 20px;
  }

  .inner-page .article-content {
    padding: 26px 20px;
  }

  .inner-page .article-content h2 {
    margin-top: 34px;
    padding-left: 14px;
  }

  .inner-page .article-content p,
  .inner-page .article-content li {
    font-size: 0.96rem;
  }

  .inner-page .article-content li {
    padding: 10px 12px 10px 38px;
  }

  .inner-page .article-content li::before {
    left: 12px;
  }

  .inner-page .notice-box {
    padding: 50px 17px 18px;
  }

  .inner-page .notice-box::before {
    top: 17px;
    left: 17px;
  }

  .page-toc ul {
    grid-template-columns: 1fr;
  }

  .content-end-card {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .inner-page .logo-text {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .inner-page .meta-line span {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Numeración accesible en listas ordenadas de páginas internas. */
.inner-page .article-content ol {
  counter-reset: ordered-item;
}

.inner-page .article-content ol > li {
  counter-increment: ordered-item;
}

.inner-page .article-content ol > li::before {
  content: counter(ordered-item);
  color: #ffffff;
  background: var(--violeta);
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

/* Identidad visual de las billeteras en el ranking. */
.ranking-wallet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 8px;
}

.ranking-wallet-row .ranking-wallet {
  margin: 0;
}

/* Estado de navegación actual para orientar al usuario. */
.nav-link.active,
.nav-link[aria-current="page"] {
  color: var(--azul-oscuro);
  font-weight: 750;
}

.nav-link.active::after,
.nav-link[aria-current="page"]::after {
  width: 100%;
}

@media (max-width: 860px) {
  .nav-link.active,
  .nav-link[aria-current="page"] {
    margin-inline: -10px;
    padding-inline: 10px;
    color: var(--violeta);
    background: var(--violeta-suave);
    border-radius: 10px;
  }
}

/* =========================================================
   30. IMÁGENES Y LOGOS RESPONSIVE
   Ajusta los logos para que no se desborden ni se deformen
   ========================================================= */

.wallet-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wallet-name,
.ranking-wallet-row,
.info-brand {
  min-width: 0;
}

.wallet-name {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  font-weight: 700;
}

.wallet-logo,
.wallet-mini-logo,
.brand-hero-logo,
.info-brand-logo,
.ranking-wallet-logo {
  display: block;
  flex: 0 0 auto;
  max-width: 100%;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: contain !important;
  object-position: center;
  background: #ffffff;
  overflow: hidden;
}

.wallet-logo {
  width: 44px !important;
  min-width: 44px;
  max-width: 44px;
  padding: 4px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 13px;
  box-shadow: 0 7px 15px rgba(16, 24, 40, 0.1);
}

.wallet-mini-logo {
  width: 36px !important;
  min-width: 36px;
  max-width: 36px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.98);
}

.info-brand-logo {
  width: 54px !important;
  min-width: 54px;
  max-width: 54px;
  padding: 4px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.1);
}

.ranking-wallet-logo {
  width: 46px !important;
  min-width: 46px;
  max-width: 46px;
  padding: 4px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(16, 24, 40, 0.11);
}

.page-hero-visual,
.info-card,
.ranking-card,
.table-wrapper {
  overflow: hidden;
}

@media (max-width: 860px) {
  .wallet-card {
    max-width: 320px;
    padding: 24px;
  }

  .brand-hero-logo {
    width: 96px !important;
    min-width: 96px;
    max-width: 96px;
    margin-bottom: 15px;
    padding: 7px;
  }
}

@media (max-width: 640px) {
  .wallet-logo {
    width: 40px !important;
    min-width: 40px;
    max-width: 40px;
    padding: 3px;
  }

  .wallet-mini-logo {
    width: 32px !important;
    min-width: 32px;
    max-width: 32px;
    padding: 3px;
  }

  .brand-hero-logo {
    width: 84px !important;
    min-width: 84px;
    max-width: 84px;
    padding: 6px;
  }

  .info-brand-logo,
  .ranking-wallet-logo {
    width: 44px !important;
    min-width: 44px;
    max-width: 44px;
    padding: 3px;
  }

  .wallet-name {
    gap: 10px;
  }
}

/* =========================================================
   31. CALCULADORA Y NEWSLETTER — ESTADOS UX
   ========================================================= */

.calculator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.calculator-actions .btn {
  min-height: 48px;
}

.calc-error {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff1f0;
  border: 1px solid rgba(217, 45, 32, 0.2);
  border-radius: 10px;
}

.calculator-result strong {
  overflow-wrap: anywhere;
}

.newsletter-form .form-error {
  margin-top: 12px;
  padding: 11px 13px;
  color: #fecaca;
  background: rgba(217, 45, 32, 0.16);
  border: 1px solid rgba(254, 202, 202, 0.22);
  border-radius: 10px;
}

.newsletter-form .form-success {
  margin-top: 12px;
  padding: 11px 13px;
  color: #86efac;
  background: rgba(22, 163, 106, 0.14);
  border: 1px solid rgba(134, 239, 172, 0.2);
  border-radius: 10px;
}

.newsletter-form input.input-invalid {
  border-color: #fca5a5 !important;
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.12) !important;
}

.newsletter-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (max-width: 640px) {
  .calculator-actions {
    flex-direction: column;
  }

  .calculator-actions .btn,
  .newsletter-form .btn-primary {
    width: 100%;
  }
}

/* =========================================================
   32. CALCULADORA COMPARATIVA POR BILLETERA
   ========================================================= */

.calculator-compare {
  grid-template-columns: minmax(270px, 0.58fr) minmax(0, 1.42fr);
  align-items: start;
  gap: 28px;
}

.calculator-control-panel {
  position: sticky;
  top: calc(var(--header-height) + 20px);
  min-width: 0;
  padding: 26px;
  background: #fafbff;
  border: 1px solid var(--borde);
  border-radius: var(--radius-md);
}

.calculator-method {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 22px;
  padding: 15px;
  color: #344054;
  background: var(--violeta-suave);
  border: 1px solid rgba(108, 76, 241, 0.14);
  border-radius: 13px;
}

.calculator-method > i {
  flex: 0 0 auto;
  margin-top: 3px;
  color: var(--violeta);
}

.calculator-method strong {
  display: block;
  margin-bottom: 3px;
  color: var(--azul-oscuro);
  font-size: 0.88rem;
}

.calculator-method p {
  color: var(--texto-secundario);
  font-size: 0.78rem;
  line-height: 1.5;
}

.wallet-calculation-results {
  min-width: 0;
}

.calculator-results-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.calculator-results-head h3 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.results-kicker {
  color: var(--violeta);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.calculator-results-head > p {
  max-width: 390px;
  color: var(--texto-secundario);
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: right;
}

.wallet-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wallet-calc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  overflow: hidden;
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.wallet-calc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(108, 76, 241, 0.34);
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.1);
}

.wallet-calc-card:focus {
  outline: none;
}

.wallet-calc-card:focus-visible,
.wallet-calc-card.is-highlighted {
  border-color: var(--violeta);
  box-shadow:
    0 0 0 4px rgba(108, 76, 241, 0.16),
    0 16px 34px rgba(16, 24, 40, 0.12);
}

.wallet-calc-card.is-best {
  border-color: rgba(22, 163, 106, 0.35);
  background: linear-gradient(180deg, #ffffff 0%, #f5fcf8 100%);
}

.wallet-calc-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wallet-calc-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.wallet-calc-brand img {
  display: block;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding: 4px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 13px;
}

.wallet-calc-brand h4 {
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.25;
}

.wallet-calc-brand span {
  display: block;
  margin-top: 3px;
  color: var(--texto-secundario);
  font-size: 0.75rem;
  font-weight: 650;
}

.best-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 5px 8px;
  color: #067647;
  background: var(--verde-suave);
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.wallet-calc-main-value {
  margin: 19px 0 14px;
  padding: 15px;
  background: var(--azul-oscuro);
  border-radius: 13px;
}

.wallet-calc-main-value span {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.74rem;
}

.wallet-calc-main-value strong {
  display: block;
  color: #4ade80;
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.wallet-calc-details {
  display: grid;
  gap: 9px;
}

.wallet-calc-details > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--borde);
}

.wallet-calc-details dt {
  color: var(--texto-secundario);
  font-size: 0.74rem;
}

.wallet-calc-details dd {
  color: var(--azul-oscuro);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 750;
  text-align: right;
  overflow-wrap: anywhere;
}

.wallet-calc-warning {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  padding: 10px;
  color: #93420b;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  font-size: 0.72rem;
  line-height: 1.45;
}

.wallet-calc-warning i {
  flex: 0 0 auto;
  margin-top: 2px;
}

.wallet-calc-detail-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
  color: var(--violeta);
  font-size: 0.78rem;
  font-weight: 800;
}

.wallet-calc-detail-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.calc-global-disclaimer {
  margin-top: 18px;
  color: var(--texto-secundario);
  font-size: 0.76rem;
  line-height: 1.5;
}

.table-action-stack {
  display: table-cell;
}

.table-action-stack .btn {
  display: inline-flex;
}

.calc-from-table {
  display: block;
  margin-top: 8px;
  padding: 0;
  color: var(--violeta);
  background: transparent;
  border: 0;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.calc-from-table:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 1050px) {
  .calculator-compare {
    grid-template-columns: 1fr;
  }

  .calculator-control-panel {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 20px;
  }

  .calculator-control-panel .calculator-actions,
  .calculator-control-panel .calc-error,
  .calculator-control-panel .calculator-method {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .calculator-control-panel {
    display: block;
    padding: 20px;
  }

  .calculator-results-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .calculator-results-head > p {
    max-width: none;
    text-align: left;
  }

  .wallet-results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .calculator-compare {
    padding: 18px;
  }

  .wallet-calc-card {
    padding: 17px;
  }

  .wallet-calc-head {
    align-items: flex-start;
  }

  .best-result-badge {
    max-width: 96px;
    white-space: normal;
    text-align: center;
  }

  .table-action-stack {
    display: flex !important;
    align-items: stretch !important;
    width: 100%;
  }

  .table-action-stack .btn,
  .calc-from-table {
    width: 100%;
  }

  .calc-from-table {
    min-height: 42px;
    margin-top: 0;
    padding: 10px 14px;
    background: var(--violeta-suave);
    border-radius: 999px;
    text-align: center;
  }
}

/* =========================================================
   33. PULIDO DE INTERACCIÓN Y ACCESIBILIDAD
   ========================================================= */

@media (hover: hover) and (pointer: fine) {
  .btn:not(:disabled):hover,
  .ranking-card:hover,
  .promo-card:hover,
  .article-card:hover,
  .related-links a:hover {
    will-change: transform;
  }
}

@media (hover: none) {
  .btn:not(:disabled):hover,
  .ranking-card:hover,
  .promo-card:hover,
  .article-card:hover,
  .related-links a:hover {
    transform: none;
  }
}

@supports (padding: max(0px)) {
  .site-header .container,
  .site-footer .container {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
  }

  .back-to-top {
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
  }
}
