/* ================== Variables + Base ================== */
:root { --neon:#e53935; --cyan:#39c1ff; }

html, body { height: 100%; }
body{
  margin:0;
  background:#000;
  color:#e0e0e0;
}

/* Sticky footer (si usas .site / .site-main en el layout) */
body.site{
  min-height:100svh;
  display:flex;
  flex-direction:column;
}
.site-main{ flex:1 0 auto; background:#000; }

/* ================== Utilidades ================== */
.gradient-top{
  height:3px;
  background:linear-gradient(90deg,rgba(0,0,0,0),var(--neon),var(--cyan),rgba(0,0,0,0));
  background-size:200% 100%;
  animation:slide 6s linear infinite;
}
@keyframes slide{ 0%{background-position:0 0} 100%{background-position:200% 0} }

.brand-glow{ box-shadow:0 0 30px -6px rgba(229,57,53,.45) }
.reveal{ opacity:0; transform:translateY(12px); animation:reveal .9s cubic-bezier(.2,.6,.2,1) forwards }
.reveal-2{ animation-delay:.15s } .reveal-3{ animation-delay:.3s } .reveal-4{ animation-delay:.45s }
@keyframes reveal{ to{ opacity:1; transform:none } }

.scanlines::after{
  content:""; position:absolute; inset:0;
  background:repeating-linear-gradient(to bottom,rgba(255,255,255,.06) 0 1px,transparent 1px 3px);
  mix-blend-mode:overlay; opacity:.15; pointer-events:none;
}

.kenburns{ animation:kenburns 30s ease-in-out infinite alternate; object-fit:cover; width:100%; height:100%; }
@keyframes kenburns{ 0%{transform:scale(1) translate(0,0)} 100%{transform:scale(1.15) translate(-2%,-2%)} }

/* ================== Hero base ================== */
.hero-bg{ position:relative; z-index:1; }
.hero-svg{ position:absolute; inset:0; z-index:2; opacity:.35; }
.hero-overlay{ position:absolute; inset:0; z-index:3; }

.logo-hero{
  width:clamp(240px, 25vw, 480px);
  height:auto;  /* fix: nunca 100% */
  filter: drop-shadow(0 8px 32px rgba(229,57,53,.35));
}

.hero-title{
  font-size:clamp(1.2rem, 6vw, 2.2rem);
  line-height:1.2;
  margin-left:auto; margin-right:auto;
  max-width:26ch;
}
.hero-subtitle{
  font-size:clamp(.95rem, 4.2vw, 1.15rem);
  line-height:1.35;
  margin-left:auto; margin-right:auto;
  max-width:40ch;
}

/* Asegura fondo negro detrás */
section.position-relative.text-center.overflow-hidden.scanlines{
  background:#000;
  margin-bottom:clamp(12px, 5vh, 32px);
}

/* ================== Hero responsive ================== */

/* XS: móvil muy pequeño */
@media (max-width: 575.98px){
  .hero-bg.ratio{
    padding-top:0 !important;
    min-height:90dvh;
  }
  .hero-bg.ratio > img.kenburns{
    position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  }

  /* overlay compacto */
  .hero-overlay{ padding: clamp(10px, 3.5vw, 20px) !important; }
  .hero-overlay > *{ max-width: 92vw; }

  .logo-hero{ width:clamp(140px, 34vw, 220px) !important; }
  .hero-title{ font-size:clamp(1.05rem, 5.2vw, 1.8rem) !important; max-width:24ch; }
  .hero-subtitle{ font-size:clamp(.9rem, 3.8vw, 1.05rem) !important; max-width:38ch; margin-bottom:1.25rem !important; }

  .metric-col{ flex:0 0 100% !important; max-width:100% !important; }
  .metric-col .p-4{ padding:.85rem !important; }
  .metric-col .fs-5{ font-size:.95rem !important; }
  .metric-col .fs-2{ font-size:1.5rem !important; }
}

/* SM: móviles grandes */
@media (min-width: 576px) and (max-width: 767.98px){
  .hero-bg.ratio{
    padding-top:0 !important;
    min-height:100dvh;
  }
  .hero-bg.ratio > img.kenburns{
    position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  }

  .hero-overlay{ padding: clamp(12px, 3vw, 24px) !important; }
  .hero-title{ font-size:clamp(1.2rem, 4.4vw, 2rem) !important; max-width:26ch; }
  .hero-subtitle{ font-size:clamp(.95rem, 3.2vw, 1.1rem) !important; max-width:40ch; }

  .metric-col{ flex:0 0 50% !important; max-width:50% !important; }
  .metric-col .p-4{ padding:1rem !important; }
  .metric-col .fs-2{ font-size:1.6rem !important; }
}

/* MD: tablets */
@media (min-width: 768px) and (max-width: 991.98px){
  .hero-bg.ratio{
    padding-top:0 !important;
    min-height:82dvh;
  }
  .hero-bg.ratio > img.kenburns{
    position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  }
}

/* LG: desktop */
@media (min-width: 992px){
  .hero-bg.ratio{
    padding-top:0 !important;
    min-height:88vh;
  }
  .hero-bg.ratio > img.kenburns{
    position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  }
}

/* ================== Header Electric Red ================== */
.electric-red-header{
  position:sticky; top:0; z-index:1030;
  background:linear-gradient(135deg,#12060a,#1a0b0e);
  border-bottom:2px solid #39c1ff;
  box-shadow:0 0 15px rgba(57,193,255,.4);
}
.electric-red-header .container-fluid{ padding:.5rem; }

.nav-bar{ display:flex; align-items:center; justify-content:space-between; gap:.75rem; }
.brand{ color:#f1f5f9; font-weight:800; text-decoration:none; letter-spacing:.04em; }

/* Logo solo en móvil */
.brand-logo{ display:none; }
@media (max-width:768px){
  .brand-logo{ display:inline-block; height:32px; width:auto; }
}

/* Botón hamburguesa */
.nav-toggle{
  display:none;
  background:transparent; color:#f1f5f9;
  border:1px solid rgba(57,193,255,.35);
  padding:.4rem .6rem; border-radius:10px; font-size:1.1rem;
}

/* Contenedor de links */
.nav-electric-red{
  display:flex; gap:.5rem; width:100%;
  background:linear-gradient(90deg, rgba(10,10,10,.1), rgba(26,11,11,.1), rgba(10,10,10,.1));
  background-size:200% 100%;
  animation:headerPulseRed 12s ease-in-out infinite alternate;
  padding:.25rem; border-radius:10px;
  border:1px solid rgba(57,193,255,.35);
}
@keyframes headerPulseRed{
  0%{ background-position:0% 50% } 100%{ background-position:100% 50% }
}

.nav-link-electric-red{
  flex:1 1 0; text-align:center; text-transform:uppercase;
  font-weight:700; letter-spacing:.05em;
  font-size:1.05rem; padding:.9rem .9rem;
  border-radius:12px; color:#f1f5f9; text-decoration:none;
  background:transparent; transition:all .25s ease; position:relative; overflow:hidden;
}
.nav-link-electric-red:hover{
  background:rgba(57,193,255,.08); color:#fff; transform:translateY(-2px);
  box-shadow:0 0 14px rgba(57,193,255,.45);
}
/* Halo */
.nav-link-electric-red::before{
  content:""; position:absolute; inset:-2px; border-radius:12px;
  background:radial-gradient(120px 60px at 50% 50%, rgba(57,193,255,.18), transparent 80%);
  opacity:0; transition:opacity .25s ease; pointer-events:none;
}
.nav-link-electric-red:hover::before{ opacity:.8; }

/* Móvil: menú colapsable vertical */
@media (max-width:768px){
  .nav-toggle{ display:block; }
  .nav-electric-red[data-collapsible]{ display:none; flex-direction:column; }
  .nav-electric-red.open{ display:flex; }
  .nav-electric-red{ gap:.4rem; }
  .nav-link-electric-red{
    flex:0 0 auto; width:100%; text-align:left;
    font-size:1rem; padding:.85rem 1rem;
    border:1px solid rgba(57,193,255,.18);
    background:rgba(255,255,255,.02);
  }
}

/* XS muy pequeño */
@media (max-width:480px){
  .nav-link-electric-red{ font-size:.95rem; padding:.8rem 1rem; }
}

/* ================== Footer compacto ================== */
.site-footer{
  padding:.5rem;
  font-size:.85rem;
  line-height:1.4;
  background:#000;
  border-top:1px solid rgba(255,255,255,.1);
}
.site-footer nav{ margin-bottom:.25rem; }
@media (max-width:575.98px){
  .site-footer{ padding:.75rem; }
}

/* Icono usuario: blanco (hereda color del link) */
.icon-user{ width:30px; height:30px; margin-right:.5rem; color:currentColor; }

/* ===== Móvil: panel inline dentro del listado ===== */
.login-panel{
  display:none;           /* oculto por defecto */
  width:100%;
  padding:.9rem;
  margin:.35rem 0 .5rem;
  border:1px solid rgba(255,255,255,.15);
  border-radius:12px;
  background:rgba(11,18,32,.65);
  backdrop-filter: blur(6px);
  box-shadow:0 8px 24px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.05);
}
.login-panel.open{ display:block; }

.login-panel .field{ margin-bottom:.6rem; }
.login-panel .modern-input{
  width:100%;
  background:#0b1220;
  border:1px solid rgba(255,255,255,.14);
  color:#e5e7eb;
  padding:.65rem .75rem;
  border-radius:10px;
  font-size:.95rem;
  transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.login-panel .modern-input:focus{
  outline:none;
  border-color:var(--cyan);
  background:#0a0f1b;
  box-shadow:0 0 0 .2rem rgba(57,193,255,.12);
}

.modern-btn{ border:0; border-radius:10px; font-weight:700; padding:.65rem .9rem; }
.modern-btn-primary{
  width:100%;
  background: linear-gradient(135deg, #39c1ff, #64d7ff);
  color:#07111f;
  box-shadow: 0 6px 16px rgba(57,193,255,.25);
  transition: transform .15s ease, filter .2s ease;
}
.modern-btn-primary:hover{ transform: translateY(-1px); filter: brightness(.95); }

/* Asegura que la 1ª opción (Acceder) sea visible estilo link */
.login-link{ display:flex; align-items:center; justify-content:flex-start; color:#f1f5f9; }

/* ===== Desktop: botón derecha con dropdown ===== */
.login-desktop{ margin-left:auto; position:relative; }
.login-desktop .user-icon{
  display:flex; align-items:center; gap:.4rem;
  background:transparent; border:none; color:#fff; /* blanco en desktop */
  font-weight:600; cursor:pointer; padding:.4rem .6rem; border-radius:10px;
  transition:background .2s ease, transform .2s ease;
}
.login-desktop .user-icon:hover{ background:rgba(255,255,255,.12); transform:scale(1.05); }

.login-dropdown{
  position:absolute; right:0; top:120%;
  display:none; flex-direction:column; gap:.75rem;
  padding:1rem; width:260px; z-index:2000;
  background:#0b1220; border:1px solid rgba(255,255,255,.15);
  border-radius:12px; box-shadow:0 8px 24px rgba(0,0,0,.45);
}
.login-dropdown.open{ display:flex; }
.login-dropdown .modern-input{ width:100%; background:#0b1220; border:1px solid rgba(255,255,255,.14); color:#e5e7eb; padding:.55rem .7rem; border-radius:10px; font-size:.95rem; }
.login-dropdown .modern-input:focus{ outline:none; border-color:var(--cyan); background:#0a0f1b; box-shadow:0 0 0 .2rem rgba(57,193,255,.12); }
.login-dropdown .modern-btn-primary{ width:100%; }

/* ===== Comportamiento responsive del menú ===== */
@media (max-width:768px){
  /* nav colapsa vertical cuando .open (esto ya lo tenías) */
  .nav-electric-red[data-collapsible]{ display:none; flex-direction:column; }
  .nav-electric-red.open{ display:flex; }
  /* cuando el menú se abre, el panel puede mostrarse inline */
  /* (la visibilidad la controla la clase .open en #loginPanel) */
}
/* ===== Modal de login (DESKTOP) centrado con glow ===== */
.login-modal{
  position: fixed; inset: 0;
  display: none;                 /* oculto por defecto */
  align-items: center; justify-content: center;
  z-index: 4000;
}
/* más aire entre inputs en el modal */
.login-modal .field {
  margin-bottom: 1rem;   /* prueba 0.75rem–1.25rem según te guste */
}

.login-modal.open{ display:flex; }

.login-modal__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(4px);
  animation: fadeIn .25s ease both;
}

.login-modal__panel{
  position: relative;
  width: min(420px, 92vw);
  border-radius: 16px;
  padding: 1.1rem;
  background: rgba(8,12,20,.85);
  box-shadow:
    0 10px 40px rgba(0,0,0,.45),
    0 0 0 1px rgba(57,193,255,.18),       /* borde sutil */
    0 0 26px rgba(57,193,255,.28),        /* glow cyan */
    0 0 18px rgba(229,57,53,.22) inset;   /* glow neon rojo interno */
  animation: scaleIn .24s cubic-bezier(.2,.7,.2,1) both;
}

/* cabecera */
.login-modal__header{
  display:flex; align-items:center; gap:.6rem; margin-bottom:.75rem;
}
.login-modal__header h3{
  color:#f1f5f9; margin:0; font-size:1.05rem; letter-spacing:.02em;
}
.icon-user.neon{ width:50px; height:50px; color:#fff; filter: drop-shadow(0 0 10px rgba(229,57,53,.45)); }

/* cerrar */
.login-modal__close{
  position:absolute; right:.5rem; top:.5rem;
  background:transparent; border:0; color:#e2e8f0; font-size:1rem;
  padding:.25rem .4rem; border-radius:8px; cursor:pointer;
}
.login-modal__close:hover{ background:rgba(255,255,255,.08); }

/* inputs del modal */
.login-modal .modern-input{
  width:100%;
  background:#0b1220;
  border:1px solid rgba(255,255,255,.14);
  color:#e5e7eb;
  padding:.6rem .7rem;
  border-radius:10px;
  font-size:.95rem;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.login-modal .modern-input:focus{
  outline:none;
  border-color:var(--cyan);
  background:#0a0f1b;
  box-shadow: 0 0 0 .18rem rgba(57,193,255,.18), 0 0 10px rgba(57,193,255,.25);
}

/* botón más pequeño */
.modern-btn-sm{ font-size:.9rem; padding:.5rem .8rem; border-radius:10px; }
.login-modal .modern-btn-primary{
  width:100%;
  background: linear-gradient(135deg, #39c1ff, #55d0ff);
  color:#07111f; font-weight:800;
  box-shadow: 0 6px 16px rgba(57,193,255,.25), 0 0 18px rgba(57,193,255,.25);
  transition: transform .15s ease, filter .2s ease;
}
.login-modal .modern-btn-primary:hover{ transform: translateY(-1px); filter: brightness(.97); }

/* animaciones */
@keyframes fadeIn{ from{opacity:0} to{opacity:1} }
@keyframes scaleIn{ from{opacity:0; transform: translateY(4px) scale(.96)} to{opacity:1; transform:none} }

/* Solo mostrar el modal en pantallas ≥ md; en móvil usamos el panel inline */
@media (max-width: 767.98px){
  .login-modal{ display:none !important; }
}


.login-alerts { margin: 8px 0 16px; }
.alert.error {
  background: #fee; border: 1px solid #f99; color: #900;
  padding: .5rem .75rem; border-radius: .5rem; font-weight: 600;
}