/* RESET */
*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family:'Segoe UI',sans-serif;
  background:#fff;
  color:#0f172a;
  scroll-behavior:smooth;
}

/* VARIABLES */
:root{
  --azul:#1e3a8a;
  --azul-osc:#0f172a;
  --dorado:#f59e0b;
  --rojo:#dc2626;
  --naranja:#ea580c;
}

/* HEADER */
.header{
  position:fixed;
  width:100%;
  top:0;
  background:#fff;
  border-bottom:1px solid #eee;
  z-index:1000;
  transition:.3s;
}

.header.scrolled{
  box-shadow:0 5px 20px rgba(0,0,0,.08);
}

.header-container{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  padding:10px 60px;
  height: 100px; 
}

.logo img{
  height:80px;
  cursor:pointer;
}

/* NAV */
.nav ul{
  display:flex;
  gap:30px;
  list-style:none;
}

.nav a{
  text-decoration:none;
  color:#0f172a;
  font-size:14px;
  position:relative;
  transition:.3s;
}

.nav a::after{
  content:"";
  position:absolute;
  width:0;
  height:2px;
  background:var(--rojo);
  left:0;
  bottom:-5px;
  transition:.3s;
}

.nav a:hover::after{
  width:100%;
}

/* CTA HEADER */
.header-cta{
  justify-self:end;
}

.cta{
  background:linear-gradient(135deg,var(--azul),var(--dorado));
  border:none;
  padding:10px 22px;
  border-radius:25px;
  color:#fff;
  font-weight:600;
  cursor:pointer;
  transition:.3s;
}

.cta:hover{
  transform:scale(1.05);
  background:linear-gradient(135deg,var(--rojo),var(--naranja));
}

/* HERO */
.hero{
  height:600px;
  display:flex;
  align-items:center;
  padding:80px;
  margin-top:70px;
  position:relative;
  overflow:hidden;

  background:
    linear-gradient(rgba(255, 255, 255, 0),rgb(5, 10, 38)),
    url('img/hero-impresoras.png') center/cover no-repeat;
}

.hero h1{
  font-size:48px;
  min-height:120px;
}

.hero span{
  color:var(--dorado);
}

.hero p{
  margin-top:15px;
  font-size:18px;
  color:#cbd5f5;
}

.hero button{
  margin-top:20px;
  padding:14px 28px;
  background:var(--dorado);
  border:none;
  color:#fff;
  border-radius:8px;
  font-weight:600;
  cursor:pointer;
  transition:.3s;
}

.hero button:hover{
  background:var(--rojo);
  transform:translateY(-2px);
}

/* KPIs */
.kpis{
  display:flex;
  gap:40px;
  margin-top:25px;
}

.kpi strong{
  display:block;
  color:var(--dorado);
  font-size:22px;
}

/* SECTIONS */
.section{
  padding:90px 80px;
  max-width:1200px;
  margin:auto;
}

.section h2{
  text-align:center;
  color:var(--azul);
  margin-bottom:30px;
  font-size:30px;
}

.section > p{
  text-align:center;
  max-width:700px;
  margin:0 auto 30px auto;
}

/* GRID CENTRADO */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,300px));
  gap:25px;
  justify-content:center;
}

.card{
  width:100%;
  max-width:300px;
  margin:0 auto;
}

/* CARDS */
.card{
  padding:25px;
  border-radius:14px;
  border:1px solid #e5e7eb;
  background:#fff;
  transition:.3s;
  text-align:center;
}

.card:hover{
  transform:translateY(-8px);
  border-color:var(--dorado);
  box-shadow:0 15px 35px rgba(0,0,0,.1);
}

.card p{
  margin-top:10px;
}

/* BOTONES CARD */
.card button{
  width:100%;
  margin-top:15px;
  padding:12px;
  background:linear-gradient(135deg,var(--azul),var(--dorado));
  color:#fff;
  border:none;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
  transition:.3s;
  box-shadow:0 8px 20px rgba(0,0,0,.15);
}

.card button:hover{
  transform:translateY(-3px);
  background:linear-gradient(135deg,var(--rojo),var(--naranja));
}

/* PRODUCTOS */
.productos{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,300px));
  gap:25px;
  justify-content:center;
}

.producto{
  border:1px solid #e5e7eb;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  position:relative;
  transition:.35s;
}

.producto:hover{
  transform:translateY(-10px);
  border-color:var(--dorado);
  box-shadow:0 15px 35px rgba(0,0,0,.15);
}

/* IMAGEN */
.producto img{
  width:100%;
  height:200px;
  object-fit:contain;
  padding:20px;
  background:#ffffff;
}

/* TEXTO */
.producto h3{
  padding:15px;
}

.producto p{
  padding:0 15px 10px;
  color:#64748b;
}

/* BOTÓN PRODUCTO */
.producto button{
  margin:10px 15px 20px;
  padding:12px 18px;
  background:linear-gradient(135deg,var(--azul),var(--dorado));
  color:#fff;
  border:none;
  border-radius:10px;
  font-weight:600;
  cursor:pointer;
  transition:.3s;
  box-shadow:0 8px 20px rgba(0,0,0,.15);
  width:calc(100% - 30px);
}

.producto button:hover{
  transform:translateY(-3px);
  background:linear-gradient(135deg,var(--rojo),var(--naranja));
}

/* TAGS */
.producto-tag{
  position:absolute;
  top:10px;
  right:10px;
  background:var(--dorado);
  color:#fff;
  padding:5px 10px;
  font-size:11px;
  border-radius:20px;
  font-weight:600;
  z-index:3;
}

.producto-tag.red{background:var(--rojo);}
.producto-tag.blue{background:var(--azul);}


/* OVERLAY PRO */
.producto-overlay{
  position:absolute;
  inset:0;

  /* glass */
  background:rgba(15,23,42,.75);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);

  color:#fff;
  padding:22px;

  /* animación */
  opacity:0;
  transform:translateY(12px) scale(.98);
  transition:opacity .35s ease, transform .35s ease;

  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:6px;
  font-size:13px;

  z-index:2;
  pointer-events:none;

  /* spotlight (se moverá con el mouse) */
  --x:50%;
  --y:50%;
}

.producto-overlay::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;

  background:
    radial-gradient(120px 120px at var(--x) var(--y),
      rgba(245,158,11,.35),
      transparent 60%);
  opacity:.0;
  transition:opacity .3s ease;
}

/* activación */
.producto:hover .producto-overlay{
  opacity:1;
  transform:translateY(0) scale(1);
}

.producto:hover .producto-overlay::before{
  opacity:.8;
}

/* texto */
.producto-overlay h4{
  color:var(--dorado);
  margin-bottom:8px;
  letter-spacing:.3px;
}

.producto-overlay ul{
  list-style:none;
  padding:0;
  margin:0;
}

.producto-overlay li{
  margin-bottom:6px;
  opacity:.95;
}


/* BOTÓN OVERLAY */
.overlay-btn{
  margin-top:12px;
  padding:8px;
  background:var(--naranja);
  border:none;
  color:#fff;
  border-radius:6px;
  cursor:pointer;
  font-size:12px;
  transition:.3s;
}

.overlay-btn:hover{
  background:var(--rojo);
}

/* FILTROS */
.filters{
  display:flex;
  gap:10px;
  margin-bottom:20px;
  justify-content:center;
}

.filters button{
  padding:8px 16px;
  border-radius:20px;
  border:1px solid var(--azul);
  background:#fff;
  color:var(--azul);
  cursor:pointer;
  transition:.3s;
}

.filters button.active,
.filters button:hover{
  background:var(--azul);
  color:#fff;
}

/* CTA FINAL */
.cta-banner{
  background:linear-gradient(135deg,var(--azul),var(--rojo));
  color:#fff;
  text-align:center;
  padding:60px;
  border-radius:16px;
}

.cta-banner h3{
  font-size:28px;
  margin-bottom:10px;
}

.cta-banner button{
  margin-top:20px;
  padding:14px 28px;
  background:linear-gradient(135deg,var(--dorado),var(--naranja));
  border:none;
  border-radius:12px;
  color:#fff;
  font-weight:700;
  cursor:pointer;
  transition:.3s;
  box-shadow:0 10px 25px rgba(0,0,0,.2);
}

.cta-banner button:hover{
  transform:translateY(-3px);
  background:linear-gradient(135deg,var(--rojo),var(--naranja));
}

/* NOSOTROS */
.nosotros p{
  text-align:center;
  max-width:800px;
  margin:0 auto 25px auto;
}

/* ANIMACIONES */
.fade{
  opacity:0;
  transform:translateY(20px);
  transition:.6s;
}

.fade.show{
  opacity:1;
  transform:translateY(0);
}

.hero h1,
.hero p{
  color:#ffffff;
}

.hero > div{
  position:relative;
  z-index:2;
}

.hero-content{
  position:relative;
  z-index:2;
}


#particles-canvas{
  position:fixed; /* 🔥 clave */
  top:0;
  left:0;
  width:100%;
  height:100%;
  z-index:0;
  pointer-events:none;
}

body > *{
  position:relative;
  z-index:1;
}
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.3);
  z-index:1;
}

/* CONTENEDOR DERECHO */
.header-right{
  display:flex;
  align-items:center;
  gap:15px;
  justify-self:end;
}

/* ICONOS HEADER */
.header-social{
  display:flex;
  gap:10px;
}

.header-social a{
  width:32px;
  height:32px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  transition:.3s;
}

.header-social img{
  width:30px;
}

/* HOVER */
.header-social a:hover{
  transform:scale(1.1);
}

/* COLORES AL HOVER */
.header-social a:nth-child(1):hover{
  background: radial-gradient(circle at 30% 30%,
    #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
}

.header-social a:nth-child(2):hover{
  background:#1877f2;
}
/* delays escalonados */
.social:nth-child(1){ transition:.5s ease .2s; }
.social:nth-child(2){ transition:.5s ease .4s; }
.social:nth-child(3){ transition:.5s ease .6s; }


.header::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;

  background:linear-gradient(
    to bottom,
    rgba(255,255,255,0.4),
    rgba(255,255,255,0.05)
  );
}

.header.scrolled{
  background:rgba(214, 214, 214, 0.75);
  backdrop-filter:blur(22px) saturate(200%);
}

/* =========================
   📱 MOBILE OPTIMIZATION
========================= */
@media (max-width: 768px){

  /* HEADER */
  .header-container{
    flex-direction:row;
    justify-content:space-between;
    padding:10px 15px;
  }

  .nav{
    display:none;
  }

  .header-social{
    display:none;
  }

  .header-cta{
    padding:8px 12px;
    font-size:12px;
  }

  .logo img{
    height:100px;
  }

  /* HERO */
  .hero{
    padding:100px 20px 60px;
    text-align:center;
  }

  .hero h1{
    font-size:28px;
    line-height:1.2;
  }

  .hero p{
    font-size:14px;
  }

  .hero button{
    width:100%;
    max-width:280px;
  }

  .kpis{
    flex-direction:column;
    gap:10px;
  }

  /* SECCIONES */
  section{
    padding:60px 20px;
  }

  h2{
    font-size:26px;
    text-align:center;
  }

  /* GRID / CARDS */
  .grid{
    grid-template-columns:1fr;
    gap:15px;
  }

  .card{
    padding:20px;
  }

  /* PRODUCTOS */
  .productos{
    grid-template-columns:1fr;
  }

  .producto{
    max-width:100%;
  }

  .producto img{
    height:180px;
  }

  /* BOTÓN WHATSAPP */
  .wa{
    width:60px;
    height:60px;
    bottom:20px;
    right:15px;
  }

}

/* ===== SHINE DIAGONAL EN AMBOS LOGOS ===== */

/* contenedor */
.logo{
  position: relative;
  display: inline-block;
}

/* capas con overflow controlado */
.logo-base,
.logo-30{
  position: relative;
  overflow: hidden;
}

/* pseudo-elemento para cada capa */
.logo-base::after,
.logo-30::after{
  content:"";
  position:absolute;
  top:0;
  left:-150%;
  width:120%;
  height:100%;
  pointer-events:none;

  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(255,255,255,0.25),
    transparent 70%
  );

  animation: shineDiagonal 8s ease-in-out infinite;
}

/* retraso leve para que no pasen juntos */
.logo-30::after{
  animation-delay: 2s;
}

/* animación */
@keyframes shineDiagonal{
  0%{ left:-150%; }
  55%{ left:150%; }
  100%{ left:150%; }
}

/* 30 (rojo) */
.logo-30{
  position:absolute;
  top:0;
  left:0;
  height:1300px;
  z-index:2;

  animation:
  logoIntro 2.5s cubic-bezier(.22,1,.36,1) forwards,
  blinkRed 3s ease-in-out infinite 2.5s;

  transition: filter .35s ease, opacity .35s ease;
}

/* ===== ENTRADA SUAVE ===== */
@keyframes logoIntro{
  0%{
    opacity:0;
    transform: scale(0.9);
    filter: blur(6px) brightness(0.6);
  }

  60%{
    opacity:1;
    transform: scale(1.03);
    filter: blur(0);
  }

  100%{
    transform: scale(1);
    filter: brightness(1);
  }
}

/* ===== INTERMITENTE FINO (NO TOSCO) ===== */
@keyframes blinkRed{
  0%,100%{
    opacity:1;
    filter: brightness(1.1) saturate(1.3);
  }

  40%{
    opacity:0.55;
    filter: brightness(0.75) saturate(0.9);
  }

  60%{
    opacity:0.85;
    filter: brightness(1.05) saturate(1.2);
  }
}

/* ===== HOVER PRO ===== */
.logo:hover .logo-30{
  animation: none;
  opacity:1;
  filter: brightness(1.35) saturate(1.5)
          drop-shadow(0 0 12px rgba(220,38,38,0.45));
}

/* ===== SHINE SUAVE GLOBAL ===== */
.logo::after{
  content:"";
  position:absolute;
  top:0;
  left:-150%;
  width:120%;
  height:100%;
  pointer-events:none;

  background: linear-gradient(
    120deg,
    transparent,
    rgba(255,255,255,0.2),
    transparent
  );

  animation: shineSlow 9s ease-in-out infinite;
}

@keyframes shineSlow{
  0%{ left:-150%; }
  55%{ left:150%; }
  100%{ left:150%; }
}

/* ===== LOADER PRO ===== */

#loader{
  position:fixed;
  inset:0;
  background:#ffffff;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;

  transition: opacity .6s ease, visibility .6s;
}

#loader.hide{
  opacity:0;
  visibility:hidden;
}

/* LOGO */
.loader-logo{
  position:relative;
  width:200px;
}

/* gris */
.loader-gray{
  width:100%;
  animation: fadeBase 1.5s ease forwards;
}

/* rojo */
.loader-red{
  position:absolute;
  top:0;
  left:0;
  width:100%;

  animation:
    buildRed 2s ease forwards,
    glowLoader 2s ease-in-out infinite;
}

/* ===== ENTRADA BASE ===== */
@keyframes fadeBase{
  from{
    opacity:0;
    filter: blur(6px);
  }
  to{
    opacity:1;
    filter: blur(0);
  }
}

/* ===== "CONSTRUCCIÓN" DEL ROJO ===== */
@keyframes buildRed{
  0%{
    clip-path: inset(0 100% 0 0);
    opacity:0;
  }
  50%{
    opacity:1;
  }
  100%{
    clip-path: inset(0 0 0 0);
  }
}

/* ===== GLOW SUAVE ===== */
@keyframes glowLoader{
  0%,100%{
    filter: drop-shadow(0 0 0 rgba(220,38,38,0));
  }
  50%{
    filter: drop-shadow(0 0 12px rgba(220,38,38,0.4));
  }
}

/* ===== CHAT WIDGET ===== */

#chatWidget{
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: 'Segoe UI', sans-serif;
}

/* BOTÓN */
#chatButton{
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg,#1e3a8a,#dc2626);
  color:#fff;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:22px;
  box-shadow:0 8px 20px rgba(0,0,0,.2);
}

/* CAJA */
#chatBox{
  width: 320px;
  height: 420px;
  background:#fff;
  border-radius:16px;
  box-shadow:0 20px 50px rgba(0,0,0,.25);
  display:none;
  flex-direction:column;
  overflow:hidden;
}

/* HEADER */
#chatHeader{
  background:#0f172a;
  color:#fff;
  padding:12px;
  font-weight:600;
}

/* MENSAJES */
#chatMessages{
  flex:1;
  padding:10px;
  overflow-y:auto;
  font-size:14px;
}

/* INPUT */
#chatInputContainer{
  display:flex;
  border-top:1px solid #eee;
}

#chatInput{
  flex:1;
  border:none;
  padding:10px;
  outline:none;
}

#chatSend{
  background:#1e3a8a;
  color:#fff;
  border:none;
  padding:10px 15px;
  cursor:pointer;
}

/* MENSAJES */
.msg{
  margin-bottom:10px;
}

.user{
  text-align:right;
}

.bot{
  text-align:left;
}

/* ===== POPUP CHAT ===== */

.chat-popup{
  position: fixed;
  bottom: 90px;
  right: 20px;
  background: #0f172a;
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  max-width: 220px;
  opacity: 0;
  transform: translateY(10px);
  transition: .4s;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.chat-popup.show{
  opacity: 1;
  transform: translateY(0);
}

/* ===== WHATSAPP HEADER BLINK ===== */

/* SOLO el tercer icono (WhatsApp) */
.header-social a:nth-child(3){
  animation: waBlinkHeader 2.8s ease-in-out infinite;
}

/* animación */
@keyframes waBlinkHeader{
  0%,100%{
    transform: scale(1);
    opacity:1;
    filter: drop-shadow(0 0 0 rgba(34,197,94,0));
  }

  50%{
    transform: scale(1.15);
    opacity:0.85;
    filter: drop-shadow(0 0 12px rgba(34,197,94,0.6));
  }
}

/* hover (se detiene y queda firme) */
.header-social a:nth-child(3):hover{
  animation:none;
  transform: scale(1.2);
}
/* ===== FOOTER PRIVACIDAD ===== */

.footer{
  text-align:center;
  padding:25px 15px;
  font-size:13px;
  color:#000000;
  background:#cfd1d6;
}

.footer a{
  display:block;
  margin-top:8px;
  color:#0d47cf;
  text-decoration:none;
  font-weight:500;
}

.footer a:hover{
  text-decoration:underline;
}