/* =====================================================================
   EN ACCIÓN — galería de capturas reales (js/modules/gallery.js).
   Estilo: ventana de la app con barra superior, línea de luz naranja
   arriba, sombra profunda, bordes que se funden con el fondo negro,
   fundido + zoom lento entre capturas y chips flotantes con datos.
   ===================================================================== */

.gal-sec { padding-top: 40px; }
.gal-head { max-width: 760px; margin: 0 auto 34px; }
.gal-head .eyebrow { justify-content: center; }
.gal-head h2 { font-size: clamp(32px,4.2vw,54px); letter-spacing: -1.2px; line-height: 1.08; margin-bottom: 14px; }
.gal-head h2 .red { filter: drop-shadow(0 0 18px rgba(255,122,26,.45)); }
.gal-head p { color: var(--muted); line-height: 1.7; font-size: 16px; }

/* ---------- pestañas con icono ---------- */
.gal-tabs { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 30px; }
.gal-tab {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 10px;
  min-width: 128px; padding: 14px 16px 16px; border-radius: 16px; color: var(--muted); font: 600 14px Inter, sans-serif;
  background: rgba(255,255,255,.02); border: 1px solid var(--border); transition: color .25s, border-color .25s, transform .25s, background .25s;
}
.gal-tab:hover { color: var(--text); transform: translateY(-2px); border-color: rgba(255,122,26,.3); }
.gt-ic {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: #111114; border: 1px solid var(--border); color: var(--muted); transition: .25s;
}
.gal-tab.on { color: var(--text); border-color: rgba(255,122,26,.45); background: linear-gradient(180deg, rgba(255,122,26,.10), rgba(255,122,26,.02)); }
.gal-tab.on .gt-ic { color: #fff; border-color: transparent; background: linear-gradient(135deg, #ff7a1a, #ff4d2e); box-shadow: 0 8px 24px rgba(255,90,30,.45); }
/* barra de progreso del cambio automático */
.gt-bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: linear-gradient(90deg, #ff7a1a, #ff4d2e); transform: scaleX(0); transform-origin: left; }
.gal-tab.on .gt-bar { animation: gal-progress var(--gal-ms, 6500ms) linear forwards; }
.gal-stage.paused .gal-tab.on .gt-bar, .gal-tabs.paused .gal-tab.on .gt-bar { animation-play-state: paused; }
@keyframes gal-progress { to { transform: scaleX(1); } }

/* ---------- escenario ---------- */
.gal-stage { position: relative; max-width: 1080px; margin: 0 auto; padding: 0 0 10px; }
.gal-glow {
  position: absolute; inset: -60px -40px 10%; z-index: 0; pointer-events: none; filter: blur(60px);
  background: radial-gradient(60% 50% at 50% 0%, rgba(255,122,26,.30), transparent 70%),
              radial-gradient(40% 40% at 85% 60%, rgba(255,77,46,.14), transparent 70%);
  animation: gal-breathe 7s ease-in-out infinite alternate;
}
@keyframes gal-breathe { from { opacity: .65; transform: scale(.97); } to { opacity: 1; transform: scale(1.03); } }

.gal-frame {
  position: relative; z-index: 1; border-radius: 20px; overflow: hidden;
  background: #0b0b0d; border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 50px 120px rgba(0,0,0,.75), 0 18px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(255,122,26,.06), inset 0 1px 0 rgba(255,255,255,.04);
  transform: perspective(1600px) rotateX(5deg); transform-origin: 50% 100%;
  transition: transform 1s cubic-bezier(.2,.7,.2,1);
}
.gal-sec.in .gal-frame, .gal-stage:hover .gal-frame { transform: none; }
/* línea de luz naranja en el borde superior */
.gal-frame::before {
  content: ''; position: absolute; top: 0; left: 8%; right: 8%; height: 1px; z-index: 3;
  background: linear-gradient(90deg, transparent, #ff7a1a 30%, #ffb26b 50%, #ff4d2e 70%, transparent);
  box-shadow: 0 0 18px 2px rgba(255,122,26,.55);
}
.gal-bar {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; position: relative; z-index: 2;
  background: linear-gradient(180deg, #141417, #0f0f12); border-bottom: 1px solid rgba(255,255,255,.06);
}
.gal-bar .dots { display: flex; gap: 6px; }
.gal-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #2a2a30; }
.gal-bar .dots i:first-child { background: #ff5a3c; }
.gal-bar .url {
  flex: 1; max-width: 420px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; color: var(--muted); padding: 6px 14px; border-radius: 8px; background: #0a0a0c; border: 1px solid rgba(255,255,255,.05);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gal-bar .live { display: flex; align-items: center; gap: 6px; font: 700 10.5px Inter, sans-serif; letter-spacing: 1.5px; color: #3ddc84; }
.gal-bar .live i { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 10px #3ddc84; animation: gal-pulse 1.6s ease-in-out infinite; }
@keyframes gal-pulse { 50% { opacity: .35; } }

.gal-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0a0a0b; }
.gal-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .9s ease; }
.gal-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; transform: scale(1.06); }
.gal-slide.on { opacity: 1; }
.gal-slide.on img { animation: gal-kenburns var(--gal-ms, 6500ms) ease-out forwards; }
@keyframes gal-kenburns { from { transform: scale(1.08) translate(1%, 1%); } to { transform: scale(1.0) translate(0, 0); } }
/* bordes que se funden con el negro (viñeta + fundido inferior) */
.gal-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, transparent 62%, rgba(10,10,12,.92) 100%),
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,.55) 100%);
}

/* ---------- chips flotantes y leyenda ---------- */
.gal-chip {
  position: absolute; z-index: 4; padding: 12px 16px; border-radius: 14px; min-width: 128px;
  background: rgba(20,20,23,.82); border: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 20px 44px rgba(0,0,0,.6), 0 0 0 1px rgba(255,122,26,.08);
  transition: opacity .45s, transform .45s cubic-bezier(.2,.8,.2,1);
  animation: gal-float 6s ease-in-out infinite;
}
.gal-chip small { display: block; font-size: 11px; color: var(--muted); letter-spacing: .3px; margin-bottom: 4px; }
.gal-chip b { font: 700 22px 'Space Grotesk', sans-serif; letter-spacing: -.5px; color: var(--text); }
.gal-chip b.pos { color: #3ddc84; text-shadow: 0 0 18px rgba(61,220,132,.35); }
.gal-chip b.neg { color: #ff5a5a; text-shadow: 0 0 18px rgba(255,90,90,.3); }
.gal-chip.gc1 { top: 22%; left: -46px; }
.gal-chip.gc2 { top: 52%; right: -46px; animation-delay: -3s; }
.gal-chip.swap { opacity: 0; transform: translateY(10px) scale(.96); }
@keyframes gal-float { 50% { translate: 0 -8px; } }

.gal-cap {
  position: absolute; z-index: 4; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; width: min(560px, 86%);
  transition: opacity .45s, transform .45s;
}
.gal-cap b { font: 600 18px 'Space Grotesk', sans-serif; text-shadow: 0 2px 18px rgba(0,0,0,.9); }
.gal-cap span { font-size: 13.5px; color: #c9c9d1; text-shadow: 0 2px 14px rgba(0,0,0,.95); }
.gal-cap.swap { opacity: 0; transform: translate(-50%, 8px); }

/* ---------- móvil ---------- */
@media (max-width: 1180px) {
  .gal-chip.gc1 { left: 14px; top: 64px; }
  .gal-chip.gc2 { right: 14px; top: 64px; }
}
@media (max-width: 680px) {
  .gal-tabs { gap: 8px; }
  .gal-tab { min-width: 0; flex: 1 1 calc(50% - 8px); padding: 10px 8px 12px; font-size: 13px; }
  .gt-ic { width: 38px; height: 38px; }
  .gal-view { aspect-ratio: 4 / 3; }
  .gal-bar .url { font-size: 11px; }
  .gal-bar .live { display: none; }
  .gal-chip { display: none; }          /* en móvil taparían la captura: queda la leyenda */
  .gal-cap { position: static; transform: none; width: auto; margin: 16px auto 0; }
  .gal-cap.swap { transform: translateY(8px); }
  .gal-frame { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gal-slide.on img, .gal-chip, .gal-glow, .gal-tab.on .gt-bar { animation: none; }
  .gal-slide img { transform: none; }
}
