/* =====================================================================
   HERO — portada: titular, llamadas a la acción, velas animadas,
   partículas, imagen de fondo y panel "Mayor movimiento del día".
   Lógica en js/modules/hero.js y js/modules/movers.js
   ===================================================================== */

.hero { position: relative; padding: 158px 28px 70px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(46px,6vw,78px); line-height: 1.02; font-weight: 700; letter-spacing: -1px; }
.hero h1 .red {
  background: linear-gradient(180deg, #ffab4a, #ff7a1a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(255,122,26,.45));
}
.side-note { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 14px; max-width: 120px; }
.hero-sub { color: var(--muted); font-size: 16.5px; line-height: 1.7; margin: 24px 0 32px; max-width: 480px; }
.hero-cta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.dl-cap { width: 100%; font-size: 12px; color: var(--faint); margin-top: 10px; }

/* ---------- Composición visual ---------- */
.hero-visual { position: relative; height: 560px; }

/* velas de neón */
.candle {
  position: absolute; bottom: 60px; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  filter: drop-shadow(0 0 28px rgba(255,122,26,.55));
}
.candle .wick { width: 7px; background: linear-gradient(180deg, rgba(255,170,80,.9), rgba(255,122,26,.5)); border-radius: 4px; }
.candle .body {
  border-radius: 8px; backdrop-filter: blur(2px);
  background: linear-gradient(180deg, rgba(250,150,50,.85) 0%, rgba(240,120,15,.35) 70%, rgba(240,120,15,.12) 100%);
  border: 1px solid rgba(255,180,100,.75);
  box-shadow: 0 0 44px rgba(255,122,26,.5), inset 0 0 30px rgba(255,80,80,.25);
}
.c1 { left: 33%; animation: float 7s ease-in-out infinite; }
.c1 .wick { height: 70px; }
.c1 .wick.low { height: 56px; }
.c1 .body { width: 96px; height: 300px; }
.c2 { left: 52%; bottom: 110px; animation: float 8.5s ease-in-out infinite reverse; }
.c2 .wick { height: 96px; }
.c2 .wick.low { height: 80px; }
.c2 .body { width: 120px; height: 380px; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

/* partículas (se generan en hero.js) */
.particle {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, #ff8c3a, rgba(255,122,26,0));
  animation: rise linear infinite;
}
@keyframes rise { from { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } to { transform: translateY(-260px); opacity: 0; } }

/* imagen de la terminal difuminada al fondo */
.term-bg {
  position: absolute; top: 0; right: 0; bottom: 0; width: 84%; z-index: 0; pointer-events: none;
  background: url("../img/trading-setup.jpg") center / cover;
  opacity: .94; filter: saturate(1.35) contrast(1.12) brightness(.82);
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 44%), linear-gradient(to bottom, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0, #000 44%), linear-gradient(to bottom, #000 80%, transparent 100%);
  mask-composite: intersect;
}
.term-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(6,6,8,.92) 0%, rgba(6,6,8,.35) 26%, transparent 50%),
    radial-gradient(55% 45% at 68% 38%, rgba(255,122,26,.16), transparent 70%),
    linear-gradient(to top, rgba(6,6,8,.55), transparent 26%);
}

/* ---------- Panel flotante genérico ---------- */
.panel {
  position: absolute; padding: 16px 18px; font-size: 12px;
  background: rgba(12,12,16,.78); backdrop-filter: blur(14px);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.panel h4 { font-size: 12.5px; font-weight: 600; margin-bottom: 2px; }
.up { color: #3ddc84; }
.dn { color: #ff5a5a; }

/* ---------- Panel "Mayor movimiento del día" ---------- */
.movers {
  right: 0; bottom: 20px; width: 254px; z-index: 2;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.movers:hover { transform: translateY(-6px); border-color: rgba(255,122,26,.35); box-shadow: 0 26px 60px rgba(0,0,0,.55), 0 0 36px rgba(255,122,26,.10); }
.mv-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2px; }
.mv-head h4 { font-size: 12.5px; font-weight: 700; margin: 0; }
.cboe { font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px; color: #0b0b0d; background: var(--red); border-radius: 5px; padding: 3px 8px; }
.mv-sub { font-size: 10.5px; color: var(--faint); margin-bottom: 8px; }
.mv-row {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; margin: 0 -8px;
  border-top: 1px solid rgba(255,255,255,.06); border-radius: 10px;
  transition: background .25s ease, transform .25s ease;
}
.mv-row:hover { background: rgba(255,122,26,.07); transform: translateX(3px); }
.mv-row:hover .mv-ch { filter: brightness(1.15); }
.mv-tick {
  width: 30px; height: 30px; border-radius: 9px; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #fff; letter-spacing: .3px;
}
.mv-tick img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mv-id { flex: 1; min-width: 0; }
.mv-id b { display: block; font-size: 12.5px; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-id small { display: block; font-size: 10px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-px { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv-ch { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mv-ch.up { color: #3ddc84; background: rgba(61,220,132,.13); }
.mv-ch.dn { color: #ff8a8a; background: rgba(255,90,90,.13); }
.mv-empty { text-align: center; color: #888; font-size: 11px; padding: 16px; }
.mv-foot { margin-top: 10px; font-size: 10px; color: var(--faint); }
.mv-loading { display: flex; justify-content: center; padding: 24px; }
.mv-spin { width: 26px; height: 26px; border: 2px solid rgba(255,255,255,.1); border-top-color: var(--red); border-radius: 50%; animation: spin 1s linear infinite; }
.mv-live { font-size: 9px; font-weight: 800; letter-spacing: 1px; color: #3ddc84; display: inline-flex; align-items: center; gap: 5px; }
.mv-live i { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; animation: blink 1.6s infinite; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 480px; max-width: 560px; }
}
@media (max-width: 900px) {
  .term-bg { width: 100%; opacity: .32; }
  /* el panel necesita ancho real: 230px aplastaba el nombre del símbolo
     encima del precio (flex + min-width:0 lo desbordaban) */
  .movers { width: 248px; right: 0; }
  .mv-row { gap: 8px; }
  .mv-ch { padding: 3px 7px; }
}
@media (max-width: 680px) {
  .hero { padding-top: 130px; padding-left: 16px; padding-right: 16px; }
  .c1 { left: 6%; }
  .c2 { left: 38%; }
}
