/* ============================================================
   explicacion.css — Total Ratio page
   ============================================================ */

:root {
  --azul-oscuro: #285260;
  --azul-medio:  #548C92;
  --azul-claro:  #B4D7D8;
  --crema:       #E0D7CF;
  --arena:       #AB9072;
  --fondo:       #ffffff;
  --blanco:      #ffffff;
  --texto:       #1a1a1a;
  --radio:       14px;
  --sombra:      0 4px 18px rgba(40,82,96,0.09);
}



@font-face {
  font-family: 'Inter';
  src: url('../../../../paquetesDescargados/Inter/static/Inter_18pt-Light.ttf') format('truetype');
}

body {
  font-family: 'Inter', sans-serif;
}



html, body, * {
  user-select: none;
  -webkit-user-select: none;
}
input, textarea {
  user-select: text;
  -webkit-user-select: text;
}

a { text-decoration: none; color: var(--texto); }

.hidden { display: none !important; }

/* ── Fondo general ── */
body {
  background: var(--fondo);
}

.homeContainer {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============================================================
   SECCIÓN FIJA — header + empresa
   ============================================================ */
.seccionFija {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 98%;
  max-width: 1500px;
  padding-top: 20px;
  padding-bottom: 6px;
  position: fixed;
  z-index: 999;
  /* Glass effect */
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(180, 215, 216, 0.35);
  margin-top: -10px;
}

/* ── Barra búsqueda + auth ── */
.busquedaUsuario {
  width: 92%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.baraBusqueda {
  position: relative;
  width: 500px;
  max-width: 500px;
  min-width: 200px;
  flex-shrink: 1;
  height: 45px;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  border-radius: 20px;
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(100, 100, 100, 0.1);
  margin-left: 28px;
  background: #fff;
}
.baraBusquedaactivada { border-radius: 23px !important; box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important; }

.baraBusqueda a { height: 100%; margin-left: 12px; display: flex; align-items: center; }
.logoAlpha { height: 78%; transition: transform 0.2s; }
.logoAlpha:hover { transform: scale(1.06); }

.baraBusqueda .input {
  outline: none; border: none;
  height: 80%; width: 85%;
  font-size: 15px; margin-left: 10px;
  background: transparent;
  text-transform: uppercase;
}
.baraBusqueda .input::placeholder { text-transform: none; color: #aaa; }

/* Autocomplete */
.autocomplete-items {
  display: none;
  position: absolute;
  z-index: 9999;
  top: calc(100% + 10px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid rgba(84,140,146,0.18);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(40,82,96,0.16);
}
.posibleResult {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  cursor: pointer;
  background: var(--blanco);
  border-bottom: 1px solid rgba(84,140,146,0.07);
  transition: background 0.12s;
  text-align: left;
}
.posibleResult:last-child { border-bottom: none; }
.posibleResult:hover, .autocomplete-active { background: rgba(84,140,146,0.07); }

/* Info dentro del resultado */
.ac-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ac-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #1c1c1c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ac-ticker {
  font-size: 11.5px;
  font-weight: 700;
  color: #548C92;
  letter-spacing: 0.04em;
}
.posibleResult mark {
  background: none;
  color: #285260;
  font-weight: 800;
}
.ac-arrow {
  flex-shrink: 0;
  color: #c0d5d7;
  display: flex;
  align-items: center;
  transition: color 0.12s;
}
.posibleResult:hover .ac-arrow,
.posibleResult.autocomplete-active .ac-arrow { color: #548C92; }

/* Auth */
.contenedorBotonLogin { display: flex; align-items: center; gap: 12px; }
.botonesAuth { display: flex; gap: 10px; align-items: center; }
.botonesAuth a {
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px; font-weight: 600;
  border: 2px solid var(--azul-medio);
  transition: all 0.25s;
}
.botonLogin { background: var(--azul-medio); color: #fff; }
.botonLogin:hover { background: var(--azul-oscuro); border-color: var(--azul-oscuro); }
.botonSignin { background: transparent; color: var(--azul-medio); }
.botonSignin:hover { background: var(--azul-medio); color: #fff; }

.perfilUsuario {
  display: none;
  align-items: center;
  gap: 5px;
  margin-left: 5px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: #f8f9fa;
  border: 1px solid transparent;
  transition: background 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.perfilUsuario:hover {
  background: #e6f0f2;
}
.perfilUsuario a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
}
.nombreUsuario {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a1a;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.perfilCirculo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-azul-medio);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}

/* === Premium gold === */
.perfilUsuario.is-premium {
  background: linear-gradient(135deg, rgba(182,138,58,0.13), rgba(210,178,95,0.06));
  border: 1px solid rgba(182,138,58,0.38);
  box-shadow: 0 2px 10px rgba(182,138,58,0.15);
}
.perfilUsuario.is-premium:hover {
  background: linear-gradient(135deg, rgba(182,138,58,0.20), rgba(210,178,95,0.10));
}
.perfilUsuario.is-premium .perfilCirculo {
  background: linear-gradient(135deg, #B68A3A, #D2B25F);
  box-shadow: 0 0 0 2px rgba(182,138,58,0.22);
}
.perfilUsuario.is-premium .nombreUsuario {
  color: #8A6423;
}

.botonBack {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  background: var(--blanco);
  color: var(--azul-medio);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(40,82,96,0.12);
  border: 1px solid rgba(84,140,146,0.2);
  transition: background 0.18s, transform 0.15s, box-shadow 0.15s, color 0.18s;
  white-space: nowrap;
}
.botonBack:hover {
  background: var(--azul-medio);
  color: #fff;
  transform: translateX(-2px);
  box-shadow: 0 4px 14px rgba(40,82,96,0.22);
}
.botonBack:active {
  transform: translateX(-1px) scale(0.97);
}
.botonBack svg {
  transition: transform 0.18s;
}
.botonBack:hover svg {
  transform: translateX(-2px);
}

/* ── Learning badge ── */
.learningBadge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(40, 82, 96, 0.07);
  border: 1px solid rgba(84,140,146,0.22);
  border-radius: 20px;
  padding: 5px 12px 5px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--azul-oscuro);
  white-space: nowrap;
}
.learningBadge img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ── Watermark logo en fórmula ── */
.formulaWatermark {
  position: absolute;
  bottom: 12px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.22;
  pointer-events: none;
  user-select: none;
}
.formulaWatermark img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.formulaWatermark span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--azul-oscuro);
}

/* ── Identidad empresa — una fila: back+empresa | título | learning ── */
.parteEmpresa {
  width: 92%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--azul-claro);
  position: relative;
}

/* Desktop: fila1 oculta (ya no existe pero por si acaso) */
.parteEmpresaFila1 {
  display: none;
}

/* Fila 2 — en desktop es la fila única, position relative para título abs */
.parteEmpresaFila2 {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
}

/* Título absolutamente centrado en parteEmpresa */
.parteEmpresa .tituloElemento {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}

/* ── fila2Izquierda desktop: back + empresa en fila horizontal ── */
.fila2Izquierda {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Empresa — estilo card con logo 3D */
.fila2Izquierda .empresaInfo {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  background: var(--blanco) !important;
  border: 1px solid rgba(84,140,146,0.12) !important;
  border-radius: 14px !important;
  padding: 6px 18px 6px 6px !important;
  box-shadow: 0 4px 16px rgba(40,82,96,0.1) !important;
  transition: transform 0.18s, box-shadow 0.18s !important;
  min-width: 220px !important;
}
.fila2Izquierda .empresaInfo:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(40,82,96,0.15) !important;
}

/* Logo en caja blanca elevada tipo 3D */
.fila2Izquierda .logoEmpresa {
  width: 46px !important;
  height: 46px !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08) !important;
  background: #fff !important;
  padding: 4px !important;
  object-fit: contain !important;
}

.fila2Izquierda .empresaInfo > div {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}
.fila2Izquierda .nombreEmpresa {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--azul-oscuro) !important;
  line-height: 1.2 !important;
}
.fila2Izquierda .tickerEmpresa {
  font-size: 11px !important;
  color: var(--azul-medio) !important;
  margin-top: 0 !important;
  font-weight: 500 !important;
}

.empresaInfo {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--blanco);
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 14px;
  padding: 10px 16px;
  box-shadow: 0 4px 14px rgba(40,82,96,0.08);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}
.empresaInfo:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(40,82,96,0.13); }

.logoEmpresa { width: 52px; height: 52px; border-radius: 10px; object-fit: contain; }
.nombreEmpresa { font-size: 20px; font-weight: 700; color: var(--azul-oscuro); }
.tickerEmpresa { font-size: 13px; color: var(--azul-medio); margin-top: 2px; }
.tituloElemento { font-size: 26px; font-weight: 800; color: var(--azul-oscuro); letter-spacing: -0.5px; text-align: center; }

/* ============================================================
   GRID PRINCIPAL
   ============================================================ */
.contenido {
  width: 92%;
  max-width: 1350px;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  grid-template-areas:
    "formula"
    "valorActual"
    "grafica"
    "tabla"
    "definicion"
    "aiAnalisis";
  margin-top: 230px;
  padding-bottom: 60px;
}

/* ── Cajas base ── */
.caja {
  background: var(--blanco);
  border-radius: var(--radio);
  padding: 18px 20px;
  box-shadow: var(--sombra);
  border: 1px solid rgba(84,140,146,0.1);
}

.tituloSeccion {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--azul-medio);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--azul-claro);
}

/* ============================================================
   1. FÓRMULA
   ============================================================ */
.seccion-formula { grid-area: formula; position: relative; }

.formulaWrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.formulaEcuacion {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: #f6fbfb;
  border: 1px solid var(--azul-claro);
  border-radius: 10px;
  padding: 16px 20px;
  width: fit-content;
}

.formulaNombre {
  font-size: 16px;
  font-weight: 700;
  color: var(--azul-oscuro);
  white-space: nowrap;
}

.formulaIgual {
  font-size: 26px;
  color: #bbb;
  font-weight: 300;
  line-height: 1;
}

.formulaFraccion {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.formulaNumerador,
.formulaDenominador {
  font-size: 15px;
  font-weight: 700;
  color: var(--azul-oscuro);
  padding: 3px 14px;
}
.formulaNumerador {
  border-bottom: 2.5px solid var(--azul-oscuro);
}

.formulaDesc {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.formulaDesc li {
  font-size: 13.5px;
  color: #555;
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}
.formulaDesc li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--azul-medio);
  font-size: 16px;
}

/* ============================================================
   2. GRÁFICA
   ============================================================ */
.seccion-grafica { grid-area: grafica; }

.graficaWrap {
  position: relative;
  width: 100%;
  height: 280px;
}
.graficaWrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ============================================================
   3. TABLA
   ============================================================ */
.seccion-tabla { grid-area: tabla; }

.tablaScroll {
  max-height: 320px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid var(--azul-claro);
}
.tablaScroll::-webkit-scrollbar { width: 4px; }
.tablaScroll::-webkit-scrollbar-thumb { background: var(--azul-claro); border-radius: 10px; }

.tablaDatos {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tablaDatos th, .tablaDatos td {
  padding: 10px 16px;
  text-align: center;
  border-bottom: 1px solid #eef4f4;
}
.tablaDatos th {
  background: var(--azul-claro);
  color: var(--azul-oscuro);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
}
.tablaDatos tr:last-child td { border-bottom: none; }
.tablaDatos tr:nth-child(even) td { background: #f6fefe; }
.tablaDatos tr:hover td { background: rgba(84,140,146,0.06); }

/* ============================================================
   4. DEFINICIÓN + RANGOS
   ============================================================ */
.seccion-definicion { grid-area: definicion; }

.textoDefinicion {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  text-align: justify;
  margin-bottom: 18px;
}

.rangos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.rango {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  border-radius: 10px;
  border-left: 4px solid transparent;
  font-size: 13px;
}
.rangoTexto { display: flex; flex-direction: column; gap: 2px; }
.rangoTexto b    { font-size: 13px; font-weight: 700; }
.rangoTexto span { font-size: 12px; opacity: 0.75; }

.rango--strong { background: #e8f5e9; color: #2e7d32; border-left-color: #4caf50; }
.rango--ok     { background: #e3f2fd; color: #1565c0; border-left-color: #42a5f5; }
.rango--thin   { background: #fff8e1; color: #e65100; border-left-color: #ffa726; }
.rango--risk   { background: #fce4ec; color: #c62828; border-left-color: #ef5350; }

/* ============================================================
   5. AI ANALYSIS — Alpha Analyst card
   ============================================================ */
.aiAnalisis {
  grid-area: aiAnalisis;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.ai-card {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, rgba(180,215,216,0.06) 100%);
  border: 1px solid rgba(84,140,146,0.18);
  border-left: 3px solid var(--azul-oscuro);
  border-radius: 12px;
  padding: 14px 18px 12px;
  box-shadow: 0 2px 12px rgba(40,82,96,0.09);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.ai-card__title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Avatar robot */
.alpha-avatar {
  position: relative;
  flex-shrink: 0;
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
}
.alpha-avatar__svg {
  width: 36px; height: 36px;
  filter: drop-shadow(0 2px 6px rgba(40,82,96,0.22));
  animation: alpha-idle 3s ease-in-out infinite;
}
@keyframes alpha-idle {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-2px); }
}
.alpha-avatar__pulse {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid #fff;
  animation: alpha-pulse 2s ease-in-out infinite;
}
@keyframes alpha-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

.ai-card__name-group { display: flex; flex-direction: column; gap: 1px; }
.ai-card__brand {
  font-size: 13px; font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--azul-oscuro); line-height: 1.2;
}
.ai-card__label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--azul-medio); line-height: 1.2;
}

.ai-card__controls { display: flex; align-items: center; }

.ai-card__body { display: flex; flex-direction: column; }
.ai-card__text {
  font-size: 14px; line-height: 1.7;
  color: var(--texto); margin: 0;
}

.ai-card__footer {
  display: flex; align-items: center; gap: 8px;
  padding-top: 9px;
  border-top: 1px solid rgba(84,140,146,0.12);
}
.ai-card__opinion-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--azul-medio); white-space: nowrap;
}
.ai-card__opinion-value {
  font-size: 13px; font-weight: 700;
  color: var(--texto); letter-spacing: 0.02em;
}

/* Botón Generate */
.btn-analisis {
  background: var(--azul-oscuro);
  color: #fff; border: none;
  padding: 7px 14px;
  border-radius: 50px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; letter-spacing: 0.02em;
  transition: background 0.2s, box-shadow 0.2s;
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(40,82,96,0.20);
}
.btn-analisis:hover  { background: var(--azul-medio); box-shadow: 0 4px 12px rgba(40,82,96,0.28); }
.btn-analisis:active { transform: scale(0.97); }
.btn-analisis:disabled {
  background: #c8cfd0; color: rgba(255,255,255,0.8);
  cursor: wait; box-shadow: none;
}

/* Cargando */
.cargando::after {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--azul-medio);
  animation: dotPulse 1s infinite steps(3, end);
}
@keyframes dotPulse {
  0%, 20% { transform: scale(0); }
  50%      { transform: scale(1); }
  100%     { transform: scale(0); }
}

/* ============================================================
   CAJA VALOR ACTUAL
   ============================================================ */
.seccion-valorActual { grid-area: valorActual; }

.mrqBadge {
  display: inline-block;
  margin-left: 6px;
  background: var(--azul-claro);
  color: var(--azul-oscuro);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 20px;
  vertical-align: middle;
  text-transform: uppercase;
}

.valorActualWrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: calc(100% - 48px); /* descuenta el tituloSeccion */
  justify-content: center;
}

.valorActualFila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.valorActualLabel {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

.valorActualNum {
  font-size: 15px;
  font-weight: 700;
  color: var(--azul-oscuro);
  white-space: nowrap;
}

.valorActualDivisor {
  width: 100%;
  height: 1.5px;
  background: var(--azul-claro);
  border-radius: 2px;
  margin: 2px 0;
}

.valorActualResultado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f6fbfb;
  border: 1px solid var(--azul-claro);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 4px;
  gap: 8px;
  flex-wrap: wrap;
}

.valorActualResultLabel {
  font-size: 13px;
  font-weight: 700;
  color: var(--azul-oscuro);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.valorActualResultNum {
  font-size: 26px;
  font-weight: 800;
  color: var(--azul-oscuro);
  line-height: 1;
}

.valorActualResultTag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.tag--strong { background: #e8f5e9; color: #2e7d32; }
.tag--ok     { background: #e3f2fd; color: #1565c0; }
.tag--thin   { background: #fff8e1; color: #e65100; }
.tag--risk   { background: #fce4ec; color: #c62828; }

/* ============================================================
   RESPONSIVE — DESKTOP (≥1000px)
   ============================================================ */
@media (min-width: 1000px) {
  .contenido {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-areas:
      "formula      formula      formula      valorActual"
      "grafica      grafica      grafica      tabla"
      "definicion   definicion   aiAnalisis   aiAnalisis";
    margin-top: 200px;
  }

  .seccion-grafica .graficaWrap { height: 300px; }

  .aiAnalisis, .seccion-definicion { min-height: 220px; }

  .formulaEcuacion { padding: 18px 28px; }
  .formulaNombre   { font-size: 18px; }
  .formulaNumerador,
  .formulaDenominador { font-size: 16px; }
}

/* ── TABLET (600–999px) ── */
@media (min-width: 600px) and (max-width: 999px) {
  .contenido { margin-top: 240px; }
  .baraBusqueda { width: 100%; }
  .parteEmpresa { width: 100%; padding: 0 10px 10px; }
}

/* ── parteEmpresa-movil-fila2: oculto en desktop ── */
.parteEmpresa-movil-fila2 { display: none; }
.tituloElemento-movil {
  font-size: 17px;
  font-weight: 800;
  color: var(--azul-oscuro);
  letter-spacing: -0.5px;
  flex: 1;
  text-align: center;
}

/* ── MÓVIL (<600px) ── */
@media (max-width: 599px) {

  .contenido { margin-top: 300px !important; }

  /* Barra búsqueda apilada */
  .busquedaUsuario { flex-direction: column; align-items: stretch; gap: 8px; }
  .contenedorBotonLogin { order: 0; align-self: flex-end; }
  .baraBusqueda { order: 1; width: 100%; height: 48px; }
  .baraBusqueda .input { width: 100%; max-width: 100%; }
  .nombreUsuario { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }

  /* parteEmpresa: columna centrada */
  .parteEmpresa {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 4px 8px 10px !important;
    position: static !important;
  }

  /* fila2Izquierda: empresa centrada (back oculto en móvil) */
  .fila2Izquierda {
    justify-content: center !important;
    width: 100% !important;
  }
  .fila2Izquierda .botonBack { display: none !important; }
  .fila2Izquierda .empresaInfo {
    background: var(--blanco) !important;
    border: 1px solid rgba(0,0,0,0.07) !important;
    box-shadow: 0 2px 8px rgba(40,82,96,0.08) !important;
    padding: 8px 14px !important;
    gap: 10px !important;
    transform: none !important;
  }
  .fila2Izquierda .empresaInfo > div {
    flex-direction: column !important;
    gap: 2px !important;
  }
  .fila2Izquierda .logoEmpresa { width: 32px !important; height: 32px !important; }
  .fila2Izquierda .nombreEmpresa { font-size: 15px !important; font-weight: 700 !important; }
  .fila2Izquierda .tickerEmpresa { font-size: 11px !important; }

  /* Ocultar desktop elements en móvil */
  .parteEmpresa .tituloElemento { display: none !important; }
  .parteEmpresa > .learningBadge { display: none !important; }

  /* Mostrar fila móvil: back | Total Ratio | Learning */
  .parteEmpresa-movil-fila2 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .botonBack { padding: 6px 10px !important; font-size: 12px !important; flex-shrink: 0; }
  .learningBadge { flex-shrink: 0; }

  .graficaWrap { height: 210px !important; }
  .rangos { grid-template-columns: 1fr 1fr !important; }
  .ai-card { padding: 12px 14px 10px !important; }
  .btn-analisis { font-size: 11px !important; padding: 6px 10px !important; }
}

/* ============================================================
   HOVER EFFECTS — página activa
   ============================================================ */

/* Cajas generales se levantan al hover */
.caja {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.caja:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(40,82,96,0.13);
}

/* Filas de la tabla */
.tablaDatos tbody tr {
  transition: background 0.12s ease;
  cursor: default;
}
.tablaDatos tbody tr:hover td {
  background: rgba(84,140,146,0.09) !important;
}

/* Rangos */
.rango {
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  cursor: default;
}
.rango:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  filter: brightness(0.97);
}

/* Formula ecuacion */
.formulaEcuacion {
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.formulaEcuacion:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(84,140,146,0.15);
}

/* Valor actual resultado */
.valorActualResultado {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.valorActualResultado:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(84,140,146,0.14);
}

/* Filas de valor actual */
.valorActualFila {
  transition: background 0.12s ease;
  border-radius: 6px;
  padding: 4px 6px;
  margin: -4px -6px;
}
.valorActualFila:hover {
  background: rgba(84,140,146,0.07);
}

/* AI card */
.ai-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ai-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(40,82,96,0.13);
}

/* Barra búsqueda focus glow */
.baraBusqueda:focus-within {
  border-color: rgba(84,140,146,0.5);
  box-shadow: 0 0 0 3px rgba(84,140,146,0.12), 0 4px 16px rgba(0,0,0,0.12);
}

/* Learning badge */
.learningBadge {
  transition: background 0.18s, border-color 0.18s, transform 0.15s;
  cursor: default;
}
.learningBadge:hover {
  background: rgba(40,82,96,0.12);
  border-color: rgba(84,140,146,0.4);
  transform: scale(1.04);
}

/* ============================================================
   FOOTER
   ============================================================ */
.alpha-footer {
  width: 100%;
  background: #F4F9FA;
  border-top: 2px solid var(--azul-medio);
  font-size: 0.875rem;
}

.alpha-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.alpha-footer__home-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--azul-oscuro);
  font-weight: 500;
  font-size: 0.875rem;
  transition: opacity 0.15s ease;
}
.alpha-footer__home-link:hover { opacity: 0.7; }
.alpha-footer__home-link:hover .alpha-footer__logo { transform: scale(1.08); }

.alpha-footer__logo {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.alpha-footer__home-text { font-size: 0.875rem; }

.alpha-footer__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.alpha-footer__sep {
  color: var(--azul-medio);
  font-size: 0.8rem;
  padding: 0 2px;
  opacity: 0.4;
}

.alpha-footer__link {
  text-decoration: none;
  color: var(--azul-medio);
  font-weight: 400;
  font-size: 0.875rem;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.alpha-footer__link:hover {
  color: var(--azul-oscuro);
  background: rgba(84,140,146,0.08);
}

.alpha-footer__social {
  display: flex;
  align-items: center;
  gap: 6px;
}




.alpha-footer__icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--azul-medio);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--azul-medio);
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}
.alpha-footer__icon i { font-size: 0.82rem; }
.alpha-footer__icon:hover {
  color: #fff;
  background: var(--azul-medio);
  border-color: var(--azul-medio);
  transform: translateY(-2px);
}

.footer-logo-link { display: flex; align-items: center; }

@media (max-width: 600px) {
  .alpha-footer__inner {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    text-align: center;
  }
  .alpha-footer__nav { flex-wrap: wrap; justify-content: center; }
}

/* ── Footer icon hover mejorado ── */
.alpha-footer__icon {
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s,
              transform 0.18s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s;
}
.alpha-footer__icon:hover {
  color: #fff;
  background: var(--azul-medio);
  border-color: var(--azul-medio);
  transform: translateY(-3px) scale(1.12);
  box-shadow: 0 6px 16px rgba(84,140,146,0.35);
}
.alpha-footer__icon:active {
  transform: translateY(0) scale(0.95);
}

/* ── Learning badge clicable ── */
.learningBadge {
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s,
              transform 0.18s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s;
  text-decoration: none;
  color: var(--azul-oscuro);
}
.learningBadge:hover {
  background: rgba(40,82,96,0.13);
  border-color: rgba(84,140,146,0.45);
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(84,140,146,0.2);
}
.learningBadge:active {
  transform: scale(0.97);
}

/* ── Learning badge — clicable claro ── */
.learningBadge {
  cursor: pointer;
  text-decoration: none;
  color: var(--azul-oscuro);
  transition: background 0.18s, border-color 0.18s, transform 0.18s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s, color 0.18s;
  position: relative;
}
.learningBadge:hover {
  background: var(--azul-medio);
  border-color: var(--azul-medio);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 14px rgba(84,140,146,0.3);
}
.learningBadge:hover img {
  filter: brightness(0) invert(1);
}
.learningBadge:active {
  transform: scale(0.97);
}
/* ============================================================
   MARKET CAP — fórmula multiplicación (no fracción)
   ============================================================ */
.formulaMultiply {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.formulaTermino {
  font-size: 15px;
  font-weight: 700;
  color: var(--azul-oscuro);
  padding: 6px 14px;
  background: rgba(84,140,146,0.07);
  border-radius: 8px;
  border: 1px solid rgba(84,140,146,0.18);
}
.formulaX {
  font-size: 22px;
  font-weight: 700;
  color: var(--azul-medio);
  line-height: 1;
}
@media (min-width: 1000px) {
  .formulaTermino { font-size: 16px; }
  .formulaX { font-size: 24px; }
}
/* ============================================================
   ALPHA SCORE — estilos específicos
   (El header/seccionFija usa el nuevo estilo del learning CSS)
   ============================================================ */

/* Fondo gris claro igual que las métricas */
body { background: var(--fondo); }

/* Contenedor principal — desplazado bajo la seccionFija nueva */
.alphaScore-contenedor {
  width: 92%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 0 80px;
  margin-top: 220px;
  font-family: 'Inter', sans-serif;
  color: var(--texto);
}

@media (max-width: 999px) {
  .alphaScore-contenedor { margin-top: 250px; }
}
@media (max-width: 599px) {
  .alphaScore-contenedor {
    margin-top: 310px;
    width: 96%;
    padding: 0 0 60px;
  }
}

/* ── Alineación forzada al 100% ── */
.alphaScore-headerCard,
.alphaScore-resumen,
.alphaScore-definicion-card,
.alphaScore-breakdownCard {
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100%;
  box-sizing: border-box;
}

/* ── Header card ── */
.alphaScore-headerCard {
  background: var(--blanco);
  padding: 28px 32px;
  border-radius: 20px;
  border: 1px solid rgba(84,140,146,0.12);
  box-shadow: var(--sombra);
  margin-bottom: 24px;
}

.alphaScore-titulo {
  font-size: 2rem;
  font-weight: 700;
  color: var(--azul-medio);
  margin-bottom: 4px;
}

.alphaScore-subtitulo {
  font-size: 0.95rem;
  color: var(--azul-medio);
  margin-bottom: 18px;
  opacity: 0.75;
}

/* Autor */
.alphaScore-autor { margin-bottom: 20px; }

.alphaScore-autorNombre {
  font-size: 1rem;
  font-weight: 600;
  color: var(--azul-medio);
  margin-bottom: 4px;
}

.alphaScore-foto {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--azul-claro);
  box-shadow: 0 4px 10px rgba(0,0,0,0.07);
  margin-left: 24px;
  margin-top: 8px;
}

.alphaScore-autorLinea { margin-top: 2px; }

.alphaScore-autorRol {
  font-size: 0.85rem;
  color: #666;
}

.alphaScore-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: #0A66C2;
  transition: color 0.15s;
}
.alphaScore-linkedin:hover { color: var(--azul-medio); }

.alphaScore-linkedinIcon {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #0A66C2;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: 16px;
  transition: background 0.15s;
}
.alphaScore-linkedin:hover .alphaScore-linkedinIcon { background: var(--azul-medio); }

/* Score resumen */
.alphaScore-resumen {
  background: var(--blanco);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(84,140,146,0.12);
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  margin-top: 8px;
}

.alphaScore-score {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}

.alphaScore-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--azul-medio);
  letter-spacing: 0.1em;
  font-weight: 700;
}

.alphaScore-valor {
  font-size: 2.3rem;
  font-weight: 800;
  color: var(--azul-oscuro);
}

.alphaScore-rating {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid rgba(84,140,146,0.25);
  background: var(--blanco);
  color: var(--azul-medio);
}

.alphaScore-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.84rem;
  color: #777;
}

/* ── Definición card ── */
.alphaScore-definicion-card {
  background: var(--blanco);
  padding: 26px 30px;
  border-radius: 20px;
  margin-bottom: 24px;
  border: 1px solid rgba(84,140,146,0.1);
  box-shadow: var(--sombra);
}

.alphaScore-definicion-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--azul-medio);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--azul-claro);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 13px;
}

.alphaScore-definicionTexto {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  text-align: justify;
  margin-bottom: 18px;
}

.alphaScore-definicionNota {
  font-size: 13px;
  color: #777;
  margin-top: 12px;
  line-height: 1.6;
}

/* Rangos */
.alphaScore-rangos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.alphaScore-rango {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid transparent;
  border-left: 4px solid transparent;
  font-weight: 500;
}

.alphaScore-rango-score { font-weight: 700; }

.alphaScore-rango-strongbuy {
  background: #e8f5e9; color: #2e7d32;
  border-color: #4caf50; border-left-color: #4caf50;
}
.alphaScore-rango-buy {
  background: #e3f2fd; color: #1565c0;
  border-color: #42a5f5; border-left-color: #42a5f5;
}
.alphaScore-rango-hold {
  background: #fff8e1; color: #e65100;
  border-color: #ffa726; border-left-color: #ffa726;
}
.alphaScore-rango-sell {
  background: #fff3e0; color: #bf360c;
  border-color: #ff7043; border-left-color: #ff7043;
}
.alphaScore-rango-strongsell {
  background: #fce4ec; color: #c62828;
  border-color: #ef5350; border-left-color: #ef5350;
}

/* ── Breakdown ── */
.alphaScore-breakdown { margin-top: 4px; }

.alphaScore-breakdownTitulo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--azul-medio);   /* igual que alphaScore-titulo */
  margin-bottom: 6px;
}

.alphaScore-breakdownIntro {
  font-size: 13px;
  color: #888;
  margin-bottom: 14px;
}

/* Chips de categoría */
.alphaScore-categorias {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.alphaScore-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(84,140,146,0.18);
  background: var(--blanco);
  font-size: 12px;
  color: #555;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  font-weight: 500;
}
.alphaScore-chipNombre { font-weight: 600; }
.alphaScore-chipPts    { font-weight: 700; }
.alphaScore-chip.positivo .alphaScore-chipPts { color: #22c55e; }
.alphaScore-chip.negativo .alphaScore-chipPts { color: #ef4444; }
.alphaScore-chip-dominante {
  border-color: var(--azul-medio);
  box-shadow: 0 0 0 1px rgba(84,140,146,0.2), 0 4px 12px rgba(0,0,0,0.05);
}

/* ── Tarjetas factor — nuevo diseño azul ── */
.alphaScore-listaFactores {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alphaScore-factor {
  background: rgba(180,215,216,0.10);      /* azul muy claro */
  border-radius: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(84,140,146,0.22); /* contorno azul medio */
  box-shadow: 0 2px 10px rgba(40,82,96,0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  cursor: pointer;                          /* ahora es clicable */
  position: relative;
  overflow: hidden;
}
.alphaScore-factor::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--azul-medio);
  border-radius: 14px 0 0 14px;
  opacity: 0.6;
  transition: opacity 0.18s;
}
.alphaScore-factor:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(40,82,96,0.13);
  border-color: rgba(84,140,146,0.40);
  background: rgba(180,215,216,0.18);
}
.alphaScore-factor:hover::before { opacity: 1; }

/* Factor abierto */
.alphaScore-factor.abierto {
  border-color: var(--azul-medio);
  background: rgba(180,215,216,0.20);
  box-shadow: 0 6px 20px rgba(40,82,96,0.14);
}
.alphaScore-factor.abierto::before { opacity: 1; }

.alphaScore-factor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Izquierda: nombre */
.alphaScore-factor-nombre {
  font-size: 14px;
  font-weight: 700;
  color: var(--azul-oscuro);
  flex: 1;
}

/* Derecha: puntos + botón ? */
.alphaScore-factor-derecha {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.alphaScore-factor-points {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.alphaScore-factor-points.positivo { color: #22c55e; }
.alphaScore-factor-points.negativo { color: #ef4444; }

/* Botón ? */
.alphaScore-factor-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(84,140,146,0.40);
  background: var(--blanco);
  color: var(--azul-medio);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
}
.alphaScore-factor-btn:hover {
  background: var(--azul-medio);
  color: #fff;
  border-color: var(--azul-medio);
  transform: scale(1.12);
}
.alphaScore-factor.abierto .alphaScore-factor-btn {
  background: var(--azul-oscuro);
  color: #fff;
  border-color: var(--azul-oscuro);
}

.alphaScore-factor-valor {
  font-size: 13px;
  margin-top: 6px;
  color: #556;
  font-weight: 500;
}

.alphaScore-factor-comment {
  font-size: 12.5px;
  margin-top: 4px;
  color: #888;
  line-height: 1.5;
}

/* ── Panel de explicación ── */
.alphaScore-factor-explicacion {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.4,0,0.2,1), opacity 0.28s ease;
  opacity: 0;
}
.alphaScore-factor.abierto .alphaScore-factor-explicacion {
  max-height: 400px;
  opacity: 1;
}

.alphaScore-factor-explicacion-inner {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(84,140,146,0.18);
  border-left: 3px solid var(--azul-medio);
  font-size: 13px;
  color: #444;
  line-height: 1.65;
}
.alphaScore-factor-explicacion-inner b {
  color: var(--azul-oscuro);
}

/* ── Header card dos columnas ── */
.alphaScore-headerGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}

@media (max-width: 800px) {
  .alphaScore-headerGrid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ── Empresa card (columna derecha) ── */
.alphaScore-empresaCard {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(180,215,216,0.14) 0%, rgba(40,82,96,0.05) 100%);
  border: 1px solid rgba(84,140,146,0.22);
  border-radius: 18px;
  padding: 24px 26px 16px;
  min-height: 200px;
  position: relative;
}



.alphaScore-empresaCard-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--azul-medio);
  margin: 0;
}

.alphaScore-empresaCard-body {
  display: flex;
  align-items: center;
  gap: 16px;
}

.alphaScore-empresaCard-logo {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  padding: 5px;
  box-shadow: 0 4px 14px rgba(40,82,96,0.13), 0 1px 3px rgba(0,0,0,0.07);
  display: none; /* visible via JS cuando carga */
  flex-shrink: 0;
}

.alphaScore-empresaCard-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.alphaScore-empresaCard-nombre {
  font-size: 18px;
  font-weight: 800;
  color: var(--azul-oscuro);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.alphaScore-empresaCard-ticker {
  font-size: 12px;
  font-weight: 700;
  color: var(--azul-medio);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.alphaScore-empresaCard-sector {
  font-size: 12px;
  color: #888;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Mini gauge del score ── */
.alphaScore-empresaCard-gauge {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.alphaScore-empresaCard-gaugeBar {
  width: 100%;
  height: 8px;
  background: rgba(84,140,146,0.12);
  border-radius: 99px;
  overflow: hidden;
}

.alphaScore-empresaCard-gaugeFill {
  height: 100%;
  border-radius: 99px;
  width: 0%;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  background: linear-gradient(90deg, #ef4444 0%, #f97316 25%, #eab308 50%, #4ade80 75%, #22c55e 100%);
  background-size: 400% 100%;
  /* Mostrar el color correcto según el score: clip en x */
  background-position-x: 0%;
}

.alphaScore-empresaCard-gaugeLabels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #aaa;
  font-weight: 600;
  padding: 0 2px;
}

/* ── Watermark Alpha Finance ── */
.alphaScore-empresaCard-watermark {
  display: flex;
  align-items: center;
  outline: 1px solid rgba(255,255,255,0.6);
  gap: 7px;
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
  position: absolute;
  bottom: 14px;
  right: 18px;
}
.alphaScore-empresaCard-watermark img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.alphaScore-empresaCard-watermark span {
  font-size: 13px;
  font-weight: 700;
  color: var(--azul-oscuro);
  letter-spacing: 0.03em;
}
.alphaScore-empresaCard-watermark-powered {
  font-size: 10px;
  font-weight: 500;
  color: var(--azul-oscuro);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
  display: block;
  margin-bottom: 2px;
}

/* ── Responsive tablet ── */
@media (max-width: 900px) {
  .alphaScore-headerCard { padding: 20px 18px; }
  .alphaScore-titulo { font-size: 1.8rem; }
  .alphaScore-definicion-card { padding: 20px 18px; }
  .alphaScore-factor { padding: 12px 14px; }
}

/* ── Responsive móvil ── */
@media (max-width: 599px) {
  .alphaScore-headerCard { padding: 16px 14px; }
  .alphaScore-titulo { font-size: 1.5rem; }
  .alphaScore-definicion-card { padding: 16px 14px; margin-bottom: 20px; }
  .alphaScore-rangos { gap: 6px; }
  .alphaScore-rango { font-size: 12px; padding: 6px 10px; }
  .alphaScore-categorias { gap: 6px; }
  .alphaScore-chip { font-size: 11.5px; padding: 4px 9px; }
  .alphaScore-listaFactores { gap: 8px; }
  .alphaScore-factor { padding: 10px 12px; }
  .alphaScore-factor-nombre { font-size: 13px; }
  .alphaScore-factor-valor,
  .alphaScore-factor-comment { font-size: 12px; }
}


/* ============================================================
   BOTTOM NAV — solo móvil (≤768px)
   ============================================================ */

/* Ocultar completamente en desktop */
.bottom-nav,
.bottom-nav__drawer {
  display: none !important;
}

@media (max-width: 768px) {

  /* Barra inferior fija */
  .bottom-nav {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1200;
    align-items: stretch;
    background: #ffffff;
    border-top: 1px solid rgba(84, 140, 146, 0.18);
    box-shadow: 0 -4px 20px rgba(40, 82, 96, 0.10);
    padding-bottom: env(safe-area-inset-bottom);
  }

  /* Cada item de la barra */
  .bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px 8px;
    gap: 3px;
    cursor: pointer;
    border: none;
    background: none;
    border-top: 2px solid transparent;
    transition: border-color 0.15s, color 0.15s;
    text-decoration: none;
    color: #888;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Inter', sans-serif;
  }

  .bottom-nav__item.activo,
  .bottom-nav__item[aria-current="page"] {
    border-top-color: #548C92;
    color: #285260;
  }

  .bottom-nav__item:hover {
    color: #548C92;
  }

  .bottom-nav__icon {
    font-size: 18px;
    line-height: 1;
  }

  .bottom-nav__label {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
  }

  /* Drawer del "More" */
  .bottom-nav__drawer {
    display: grid !important;
    position: fixed;
    bottom: 58px;
    left: 0;
    right: 0;
    z-index: 1199;
    background: #ffffff;
    border-top: 0.5px solid rgba(84, 140, 146, 0.2);
    box-shadow: 0 -4px 20px rgba(40, 82, 96, 0.12);
    padding: 10px 16px 12px;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    transform: translateY(100%);
    transition: transform 0.25s ease;
  }

  .bottom-nav__drawer.abierto {
    transform: translateY(0);
  }

  .bottom-nav__drawer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 10px;
    border: 0.5px solid rgba(84, 140, 146, 0.2);
    background: #f5f9f9;
    cursor: pointer;
    text-decoration: none;
    color: #548C92;
    font-size: 10px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
  }

  .bottom-nav__drawer-item i {
    font-size: 16px;
  }

  /* Footer sube sobre la barra */
  .alpha-footer {
    margin-bottom: 60px !important;
  }

  /* Empujar contenido para no quedar tapado */
  .alphaScore-contenedor {
    padding-bottom: 80px;
  }
}

/* ── Global site nav ── */
.busqueda-af-nav {
  display: flex; gap: 4px; align-items: center; flex-shrink: 0;
}
.busqueda-af-nav .af-nav__link {
  display: inline-flex; align-items: center; text-decoration: none;
  color: rgba(26,26,26,0.70); font-size: 14px; font-weight: 600;
  padding: 8px 10px; border-radius: 12px; border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap; cursor: pointer;
}
.busqueda-af-nav .af-nav__link:hover {
  background: rgba(0,0,0,0.04); color: rgba(26,26,26,0.92);
}
.busqueda-af-nav .af-nav__link.is-active {
  background: rgba(84,140,146,0.12); color: #285260;
  border: 1px solid rgba(84,140,146,0.35);
}
.busqueda-nav-toggle {
  display: none; border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.7); backdrop-filter: blur(10px);
  border-radius: 12px; padding: 10px 12px; cursor: pointer; line-height: 1; flex-shrink: 0;
}
.busqueda-nav-toggle i { font-size: 16px; color: rgba(26,26,26,0.75); }
.busqueda-nav-mobile {
  display: none; position: absolute; top: calc(100% + 8px);
  left: 16px; right: 16px; background: #fff;
  border: 1px solid rgba(0,0,0,0.08); border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0,0,0,0.12); padding: 10px; z-index: 4000;
}
.busqueda-nav-mobile .af-nav__link { display: block; padding: 11px 12px; border-radius: 12px; }

@media (max-width: 768px) {
  .seccionFija .paginas { display: none !important; }
  .menu-hamburguesa { display: none !important; }
  .busqueda-af-nav { display: none; }
  .busqueda-nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .seccionFija.is-open .busqueda-nav-mobile { display: block; }
  .seccionFija.is-open .busqueda-nav-toggle { border-color: rgba(84,140,146,0.35); }
  .menu-mobile-section-label {
    font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--color-azul-medio, #548C92);
    padding: 16px 16px 6px; opacity: 0.7;
  }
  .menu-mobile-item i { width: 18px; text-align: center; margin-right: 8px; opacity: 0.7; }
}

@media (max-width: 1100px) {
  .baraBusqueda {
    width: 340px;
  }
  .busqueda-af-nav .af-nav__link {
    font-size: 13px;
    padding: 7px 8px;
  }
}

@media (max-width: 900px) {
  .baraBusqueda {
    width: 260px;
  }
  .busqueda-af-nav {
    gap: 2px;
  }
  .busqueda-af-nav .af-nav__link {
    font-size: 12px;
    padding: 6px 7px;
  }
}

/* ============================================================
   MENÚ "SITE" MÓVIL — panel deslizante lateral (estilo scores)
   ============================================================ */
.menu-overlay, #menuOverlay {
  position: fixed; inset: 0;
  background-color: rgba(0,0,0,0.5);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 4900;
}
.menu-overlay.activo, #menuOverlay.activo {
  opacity: 1; visibility: visible; pointer-events: auto;
}

.menu-mobile, #menuMobile {
  position: fixed; top: 0; right: -100%;
  width: 85%; max-width: 360px; height: 100vh;
  background: var(--fondo, #f4f6f7);
  box-shadow: -4px 0 16px rgba(0,0,0,0.18);
  transition: right 0.3s ease;
  z-index: 5000; padding-top: 70px; overflow-y: auto;
}
.menu-mobile.menu-abierto, #menuMobile.menu-abierto { right: 0; }

.menu-mobile-contenido { padding: 12px; }

.menu-mobile-section-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--azul-medio, #548C92);
  padding: 8px 16px 6px; opacity: 0.7;
}

.menu-mobile-item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; color: #1a1a1a; text-decoration: none;
  font-size: 16px; font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s ease, color 0.2s ease;
}
.menu-mobile-item i { width: 18px; text-align: center; opacity: 0.7; }
.menu-mobile-item:hover { background: var(--azul-claro, #B4D7D8); color: var(--azul-oscuro, #285260); }
.menu-mobile-item.activo {
  background: var(--azul-medio, #548C92); color: #fff;
}
.menu-mobile-item.activo i { opacity: 1; }

.menu-cerrar {
  position: absolute; top: 18px; right: 18px;
  background: none; border: none; font-size: 22px;
  color: var(--azul-medio, #548C92); cursor: pointer; padding: 8px; z-index: 1;
}