/* ============================================
   ESTILOS.CSS — JB Tecnología e Informática
   Tema: Cyberpunk / Tech / Futurista
   Colores: Rojo #e01c1c + Negro + Gris oscuro
============================================ */

/* ===== VARIABLES GLOBALES ===== */
:root {
  --rojo:        #e01c1c;
  --rojo-dark:   #b01010;
  --rojo-glow:   rgba(224, 28, 28, 0.4);
  --rojo-suave:  rgba(224, 28, 28, 0.1);
  --bg:          #0a0a0f;
  --bg2:         #0f0f1a;
  --bg3:         #13131f;
  --card:        #12121e;
  --card2:       #1a1a2e;
  --borde:       rgba(224, 28, 28, 0.2);
  --borde2:      rgba(255, 255, 255, 0.06);
  --texto:       #e8e8f0;
  --texto2:      #9090b0;
  --texto3:      #5a5a7a;
  --verde:       #25d366;
  --font-titulo: 'Orbitron', sans-serif;
  --font-cuerpo: 'Exo 2', sans-serif;
  --nav-alto:    70px;
  --radio:       12px;
  --sombra:      0 8px 32px rgba(0, 0, 0, 0.6);
}

/* ===== RESET GENERAL ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  background: var(--bg);
  color: var(--texto);
  font-family: var(--font-cuerpo);
  overflow-x: hidden;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea { font-family: inherit; }
::selection { background: var(--rojo); color: #fff; }

/* ===== SCROLLBAR PERSONALIZADA ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--rojo); border-radius: 3px; }

/* ===== PRELOADER ===== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s, visibility 0.6s;
}
#preloader.oculto {
  opacity: 0;
  visibility: hidden;
}
.preloader-contenido { text-align: center; }
.preloader-logo {
  font-family: var(--font-titulo);
  font-size: 5rem;
  font-weight: 900;
  color: var(--rojo);
  text-shadow: 0 0 40px var(--rojo-glow);
  animation: pulsar 1s infinite;
}
.preloader-barra {
  width: 200px;
  height: 3px;
  background: var(--bg3);
  border-radius: 2px;
  margin: 1rem auto 0.5rem;
  overflow: hidden;
}
.preloader-progreso {
  height: 100%;
  background: var(--rojo);
  width: 0;
  animation: cargar 2s ease forwards;
}
.preloader-texto {
  color: var(--texto2);
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}
@keyframes cargar { to { width: 100%; } }
@keyframes pulsar { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ===== CANVAS PARTÍCULAS ===== */
#canvas-particulas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ===== GRID OVERLAY (fondo cuadriculado) ===== */
.hero-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(224, 28, 28, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(224, 28, 28, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ===== NAVBAR ===== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-alto);
  z-index: 1000;
  background: transparent;
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}
#navbar.scrolled {
  background: rgba(10, 10, 15, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--borde);
}
.nav-contenedor {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* ===== LOGO NAVBAR ===== */
.nav-logo {
  font-family: var(--font-titulo);
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-jb {
  color: var(--rojo);
  text-shadow: 0 0 20px var(--rojo-glow);
  font-size: 1.6rem;
  line-height: 1;
}
.logo-nombre {
  color: var(--texto);
  font-size: 0.72rem;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-link {
  color: var(--texto2);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: all 0.2s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 2px;
  background: var(--rojo);
  transition: all 0.3s;
}
.nav-link:hover { color: var(--texto); }
.nav-link:hover::after,
.nav-link.activo::after { left: 10%; right: 10%; }
.nav-link.activo { color: var(--rojo); }

.nav-acciones {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.btn-idioma {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg3);
  border: 1px solid var(--borde2);
  color: var(--texto2);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  transition: all 0.2s;
}
.btn-idioma:hover { border-color: var(--rojo); color: var(--rojo); }
.btn-admin {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--borde);
  color: var(--texto2);
  font-size: 0.8rem;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  transition: all 0.2s;
}
.btn-admin:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: #fff;
}
.nav-hamburguesa {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid var(--borde2);
  background: var(--bg3);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-hamburguesa span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--texto);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-hamburguesa.abierto { border-color: var(--rojo); background: rgba(224,28,28,0.1); }
.nav-hamburguesa.abierto span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); background: var(--rojo); }
.nav-hamburguesa.abierto span:nth-child(2) { opacity: 0; }
.nav-hamburguesa.abierto span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); background: var(--rojo); }

/* ===== BOTONES GLOBALES ===== */
.btn-primario {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--rojo);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px var(--rojo-glow);
  position: relative;
  overflow: hidden;
}
.btn-primario::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-primario:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--rojo-glow);
}
.btn-primario:hover::before { opacity: 1; }
.btn-secundario {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1.5px solid var(--borde);
  color: var(--texto);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.8rem;
  border-radius: 8px;
  transition: all 0.3s;
}
.btn-secundario:hover { border-color: var(--rojo); color: var(--rojo); }
.btn-full { width: 100%; justify-content: center; }
.texto-acento { color: var(--rojo); }

/* ===== SECCIONES COMUNES ===== */
.seccion {
  position: relative;
  z-index: 1;
  padding: 100px 0;
}
.seccion-oscura { background: var(--bg2); }
.seccion-contenedor {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}
.seccion-header {
  text-align: center;
  margin-bottom: 4rem;
}
.seccion-tag {
  display: inline-block;
  color: var(--rojo);
  font-family: var(--font-titulo);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 4px;
  background: rgba(224, 28, 28, 0.1);
  border: 1px solid rgba(224, 28, 28, 0.3);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}
.seccion-header h2 {
  font-family: var(--font-titulo);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.seccion-header p { color: var(--texto2); max-width: 500px; margin: 0 auto; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  padding: var(--nav-alto) 2rem 2rem;
  display: grid;
  position: relative;
  overflow: hidden;
}
.hero-contenedor {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  z-index: 1;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(224, 28, 28, 0.1);
  border: 1px solid rgba(224, 28, 28, 0.3);
  color: var(--rojo);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  animation: fadeArriba 0.6s ease both;
}
.hero-titulo {
  font-family: var(--font-titulo);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fadeArriba 0.6s 0.1s ease both;
}
.titulo-jb {
  display: block;
  color: var(--rojo);
  text-shadow: 0 0 60px var(--rojo-glow);
  font-size: 1.3em;
}
.titulo-sub {
  display: block;
  color: var(--texto);
  font-size: 0.45em;
  letter-spacing: 2px;
}
.ampersand { color: var(--rojo); margin: 0 0.3em; }

/* ===== EFECTO GLITCH ===== */
.glitch { position: relative; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  font-family: var(--font-titulo);
  font-weight: 900;
  color: var(--rojo);
  font-size: inherit;
}
.glitch::before {
  text-shadow: 2px 0 #0ff;
  animation: glitch1 3s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}
.glitch::after {
  text-shadow: -2px 0 #f0f;
  animation: glitch2 3s infinite;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}
@keyframes glitch1 {
  0%, 88%, 100% { transform: translate(0); }
  90% { transform: translate(-4px, 1px); }
  94% { transform: translate(4px, -1px); }
  97% { transform: translate(-2px, 2px); }
}
@keyframes glitch2 {
  0%, 88%, 100% { transform: translate(0); }
  91% { transform: translate(4px, 1px); }
  95% { transform: translate(-4px, -1px); }
  98% { transform: translate(2px, -2px); }
}
.glitch-activo::before {
  animation: glitch1 0.25s infinite !important;
  text-shadow: 5px 0 #0ff !important;
}
.glitch-activo::after {
  animation: glitch2 0.25s infinite !important;
  text-shadow: -5px 0 #f0f !important;
}

.hero-descripcion {
  color: var(--texto2);
  font-size: 1.05rem;
  max-width: 480px;
  margin-bottom: 2rem;
  line-height: 1.8;
  animation: fadeArriba 0.6s 0.2s ease both;
}
.hero-botones {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeArriba 0.6s 0.3s ease both;
}
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  animation: fadeArriba 0.6s 0.4s ease both;
}
.stat { text-align: center; }
.stat-numero {
  display: block;
  font-family: var(--font-titulo);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--rojo);
}
.stat-plus { color: var(--rojo); font-weight: 700; }
.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--texto3);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.stat-divisor {
  width: 1px;
  height: 40px;
  background: var(--borde2);
}

/* ===== HERO VISUAL ===== */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  animation: fadeArriba 0.6s 0.2s ease both;
}
.circulo-externo {
  width: 320px; height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(224, 28, 28, 0.2);
  display: flex; align-items: center; justify-content: center;
  animation: rotar 20s linear infinite;
  position: relative;
}
.circulo-medio {
  width: 240px; height: 240px;
  border-radius: 50%;
  border: 1px dashed rgba(224, 28, 28, 0.3);
  display: flex; align-items: center; justify-content: center;
  animation: rotar 15s linear infinite reverse;
}

/* ===== CÍRCULO INTERNO — PORTAL DIMENSIONAL ===== */
.circulo-interno {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(224,28,28,0.12), #0a0a0f 70%);
  border: 1.5px solid rgba(224,28,28,0.5);
  box-shadow:
    0 0 30px var(--rojo-glow),
    inset 0 0 30px rgba(224,28,28,0.08);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  animation: portal-breathe 3s ease-in-out infinite !important;
  transform-style: preserve-3d;
  overflow: visible;
}

.portal-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.pr1 {
  width: 148px; height: 148px;
  border: 1.5px solid rgba(224,28,28,0.75);
  animation: portal-spin 3s linear infinite;
}
.pr2 {
  width: 122px; height: 122px;
  border: 1.5px dashed rgba(224,28,28,0.45);
  animation: portal-spin 4.5s linear infinite reverse;
}
.pr3 {
  width: 96px; height: 96px;
  border: 1px solid rgba(224,28,28,0.25);
  animation: portal-spin 6s linear infinite;
}

.portal-spark {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rojo);
  box-shadow: 0 0 8px var(--rojo), 0 0 16px var(--rojo-glow);
  pointer-events: none;
  top: 50%; left: 50%;
  margin: -3px 0 0 -3px;
}
.ps1 { animation: portal-orbit 2s linear infinite 0s; }
.ps2 { animation: portal-orbit 2s linear infinite 0.5s; }
.ps3 { animation: portal-orbit 2s linear infinite 1s; }
.ps4 { animation: portal-orbit 2s linear infinite 1.5s; }

@keyframes portal-orbit {
  0%   { transform: rotate(0deg)   translateX(72px) scale(1);   opacity: 1; }
  48%  { opacity: 1; }
  49%  { opacity: 0; transform: rotate(176deg) translateX(72px) scale(0.5); }
  51%  { opacity: 0; }
  52%  { opacity: 1; transform: rotate(184deg) translateX(72px) scale(0.5); }
  100% { transform: rotate(360deg) translateX(72px) scale(1);   opacity: 1; }
}

.portal-center {
  position: absolute;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224,28,28,0.2) 0%, transparent 70%);
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
}

.logo-central {
  font-family: var(--font-titulo);
  font-size: 1.9rem;
  font-weight: 900;
  color: #fff;
  text-shadow:
    0 0 20px var(--rojo),
    0 0 40px var(--rojo-glow),
    0 0 70px rgba(224,28,28,0.3);
  animation: portal-jb-appear 6s ease-in-out infinite;
  position: relative; z-index: 3;
  display: block;
  transform-origin: center center;
}

@keyframes portal-breathe {
  0%, 100% {
    box-shadow: 0 0 30px var(--rojo-glow), inset 0 0 30px rgba(224,28,28,0.08);
  }
  50% {
    box-shadow: 0 0 60px var(--rojo-glow), inset 0 0 50px rgba(224,28,28,0.15),
                0 0 100px rgba(224,28,28,0.2);
  }
}
@keyframes portal-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes portal-jb-appear {
  0%,  8%  { opacity: 1;   transform: scale(1);   filter: none; }
  35%, 65% { opacity: 0;   transform: scale(0.2); filter: blur(6px); }
  50%       { opacity: 0; }
  92%, 100% { opacity: 1;   transform: scale(1);   filter: none; }
}

@keyframes rotar {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.orbita {
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.orbita-1 { width: 360px; height: 360px; animation: rotar 8s linear infinite; }
.orbita-2 { width: 420px; height: 420px; animation: rotar 12s linear infinite reverse; }
.orbita-3 { width: 480px; height: 480px; animation: rotar 16s linear infinite; }
.orbita-punto {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--card2);
  border: 1px solid var(--borde);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-top: -18px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  animation: contra-rotar 8s linear infinite;
}
.orbita-2 .orbita-punto { animation-duration: 12s; }
.orbita-3 .orbita-punto { animation-duration: 16s; }
@keyframes contra-rotar {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

.scroll-indicador {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem;
  color: var(--texto3);
  font-size: 0.75rem; letter-spacing: 2px;
  animation: rebotar 2s infinite;
  z-index: 1;
}
.scroll-mouse {
  width: 22px; height: 34px;
  border: 1.5px solid var(--texto3);
  border-radius: 11px;
  display: flex; justify-content: center;
  padding-top: 6px;
}
.scroll-rueda {
  width: 3px; height: 6px;
  background: var(--rojo);
  border-radius: 2px;
  animation: bajar 1.5s infinite;
}
@keyframes bajar {
  0%  { transform: translateY(0);    opacity: 1; }
  100%{ transform: translateY(10px); opacity: 0; }
}
@keyframes rebotar {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-6px); }
}

/* ===== NOSOTROS ===== */
.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 5rem;
  align-items: center;
}
.nosotros-visual {
  position: relative;
  display: flex;
  justify-content: center;
  /* Evita que los badges flotantes invadan la columna del texto */
  overflow: visible;
  min-width: 0;
}
/* Contenedor interno que acota los badges */
.nosotros-logo-wrap {
  position: relative;
}
.nosotros-logo-wrap {
  width: 260px; height: 260px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.nosotros-logo-big {
  font-family: var(--font-titulo);
  font-size: 5rem; font-weight: 900;
  color: var(--rojo);
  text-shadow: 0 0 50px var(--rojo-glow);
  z-index: 2; position: relative;
}
.nosotros-anillo {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(224, 28, 28, 0.25);
  animation: rotar 10s linear infinite;
}
.nosotros-anillo-2 {
  inset: -30px;
  border-color: rgba(224, 28, 28, 0.12);
  animation-duration: 15s;
  animation-direction: reverse;
}
.nosotros-glow {
  position: absolute; inset: -40px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(224,28,28,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.badge-flotante {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; font-weight: 600;
  color: var(--texto);
  box-shadow: var(--sombra);
  white-space: nowrap;
  animation: flotar 3s ease-in-out infinite;
}
.badge-f1 { top: 5%;     right: -10%; animation-delay: 0s; }
.badge-f2 { bottom: 25%; right: -12%; animation-delay: 0.5s; }
.badge-f3 { bottom: 5%;  left: -5%;   animation-delay: 1s; }
@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.nosotros-contenido .seccion-tag { display: inline-block; }
.nosotros-contenido h2 {
  font-family: var(--font-titulo);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin: 1rem 0 1.5rem;
  line-height: 1.3;
}
.nosotros-contenido > p {
  color: var(--texto2);
  margin-bottom: 2rem;
  line-height: 1.8;
}
.valores-lista { display: flex; flex-direction: column; gap: 1.25rem; }
.valor-item {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem; border-radius: 10px;
  border: 1px solid var(--borde2);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.3s;
}
.valor-item:hover { border-color: var(--borde); }
.valor-icono { font-size: 1.5rem; flex-shrink: 0; }
.valor-item h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.valor-item p  { font-size: 0.85rem; color: var(--texto2); }

/* ===== SERVICIOS ===== */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.servicio-card {
  background: var(--card);
  border: 1px solid var(--borde2);
  border-radius: var(--radio);
  padding: 2rem;
  position: relative; overflow: hidden;
  transition: all 0.3s;
}
.servicio-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--rojo), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.servicio-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(224,28,28,0.06), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.servicio-card:hover {
  border-color: var(--borde);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.servicio-card:hover::before,
.servicio-card:hover::after { opacity: 1; }
.servicio-icono-wrap {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(224, 28, 28, 0.1);
  border: 1px solid rgba(224, 28, 28, 0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}
.servicio-card h3 {
  font-family: var(--font-titulo);
  font-size: 1rem; font-weight: 700;
  margin-bottom: 0.75rem;
}
.servicio-card p {
  font-size: 0.88rem; color: var(--texto2);
  line-height: 1.7; margin-bottom: 1rem;
}
.servicio-etiquetas { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.servicio-etiquetas span {
  font-size: 0.72rem;
  background: rgba(224, 28, 28, 0.08);
  border: 1px solid rgba(224, 28, 28, 0.2);
  color: var(--rojo);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

/* ===== TECNOLOGÍAS ===== */
.tecnologias-categorias {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
.tech-categoria {
  background: var(--card);
  border: 1px solid var(--borde2);
  border-radius: var(--radio);
  padding: 1.75rem;
  transition: border-color 0.3s;
}
.tech-categoria:hover { border-color: var(--borde); }
.tech-categoria h4 {
  font-family: var(--font-titulo);
  font-size: 0.85rem;
  color: var(--rojo);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.tech-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.tech-pill {
  display: flex; align-items: center; gap: 0.4rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--borde2);
  color: var(--texto);
  font-size: 0.83rem; font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  transition: all 0.2s; cursor: default;
}
.tech-pill:hover {
  background: rgba(224, 28, 28, 0.08);
  border-color: rgba(224, 28, 28, 0.3);
  color: var(--rojo);
  transform: translateY(-2px);
}

/* ===== PORTAFOLIO ===== */
.portafolio-filtros {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: center; margin-bottom: 3rem;
}
.filtro-btn {
  background: var(--card);
  border: 1px solid var(--borde2);
  color: var(--texto2);
  font-size: 0.85rem; font-weight: 600;
  padding: 0.5rem 1.2rem;
  border-radius: 25px;
  transition: all 0.2s;
}
.filtro-btn.activo,
.filtro-btn:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: #fff;
}
.portafolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.portafolio-card {
  border-radius: var(--radio); overflow: hidden;
  background: var(--card);
  border: 1px solid var(--borde2);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}
.portafolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  border-color: var(--borde);
}
.portafolio-img {
  height: 200px; position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.portafolio-img-web  { background: linear-gradient(135deg, #0d1b2a, #1a3a5c); }
.portafolio-img-auto { background: linear-gradient(135deg, #1a1a0a, #3a3a1a); }
.portafolio-img-qr   { background: linear-gradient(135deg, #2a0a0a, #5a1a1a); }
.portafolio-img::before {
  content: '⟨/⟩';
  font-family: var(--font-titulo);
  font-size: 3rem;
  color: rgba(255,255,255,0.08);
  position: absolute;
  z-index: 0;
}
/* Cuando hay imagen real, ocultar el símbolo ⟨/⟩ */
.portafolio-img img ~ ::before,
.portafolio-img:has(img)::before { display: none; }
.portafolio-overlay {
  position: absolute; inset: 0;
  background: rgba(10,10,15,0.92);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 1.5rem; text-align: center;
  opacity: 0; transition: opacity 0.3s;
  z-index: 2;
}
.portafolio-card:hover .portafolio-overlay { opacity: 1; }
.portafolio-overlay h4 {
  font-family: var(--font-titulo);
  font-size: 0.95rem; margin-bottom: 0.5rem;
}
.portafolio-overlay p {
  font-size: 0.8rem; color: var(--texto2); margin-bottom: 1rem;
}
.btn-ver-proyecto {
  background: var(--rojo); color: #fff;
  font-size: 0.8rem; font-weight: 600;
  padding: 0.4rem 1rem; border-radius: 6px;
  transition: all 0.2s;
}
.btn-ver-proyecto:hover { background: var(--rojo-dark); }

/* ===== PORTAFOLIO — Bloque Problema / Solución ===== */
.port-problema-solucion {
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--borde2);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: rgba(0,0,0,0.15);
  flex: 1;
}
.port-ps-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.port-ps-label {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.port-ps-problema .port-ps-label { color: #ff6b6b; }
.port-ps-solucion .port-ps-label { color: var(--verde); }
.port-ps-texto {
  font-size: 0.8rem;
  color: var(--texto2);
  line-height: 1.5;
}

/* Info inferior de la card */
.portafolio-info {
  padding: 0.85rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--borde2);
  flex-shrink: 0;
}
.portafolio-info h4 { font-size: 0.9rem; font-weight: 600; }
.port-categoria {
  font-size: 0.72rem;
  background: rgba(224,28,28,0.1);
  border: 1px solid rgba(224,28,28,0.2);
  color: var(--rojo);
  padding: 0.2rem 0.7rem; border-radius: 20px;
}

/* ===== CONTACTO ===== */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem; align-items: start;
}
.contacto-info { display: flex; flex-direction: column; gap: 1.5rem; }
.contacto-item {
  display: flex; gap: 1rem; align-items: center;
  padding: 1.25rem; border-radius: 10px;
  background: var(--card); border: 1px solid var(--borde2);
  transition: border-color 0.3s;
}
.contacto-item:hover { border-color: var(--borde); }
.contacto-icono {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(224, 28, 28, 0.1);
  border: 1px solid rgba(224, 28, 28, 0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--rojo); flex-shrink: 0;
}
.contacto-item h4 {
  font-size: 0.8rem; color: var(--texto3);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.2rem;
}
.contacto-item a {
  font-size: 0.95rem; color: var(--texto);
  transition: color 0.2s;
}
.contacto-item a:hover { color: var(--rojo); }
.btn-whatsapp {
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  background: #25D366; color: #fff;
  font-size: 0.95rem; font-weight: 600;
  padding: 0.85rem 1.5rem; border-radius: 10px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}
.contacto-form {
  background: var(--card);
  border: 1px solid var(--borde2);
  border-radius: var(--radio);
  padding: 2.5rem;
}
.form-fila { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grupo { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.form-grupo label { font-size: 0.85rem; font-weight: 600; color: var(--texto2); }
.form-grupo input,
.form-grupo textarea,
.form-grupo select {
  background: var(--bg3);
  border: 1px solid var(--borde2);
  border-radius: 8px;
  color: var(--texto); font-size: 0.9rem;
  padding: 0.75rem 1rem;
  outline: none; resize: vertical;
  transition: border-color 0.2s;
  width: 100%;
  font-family: var(--font-cuerpo);
}
.form-grupo input:focus,
.form-grupo textarea:focus,
.form-grupo select:focus {
  border-color: var(--rojo);
  box-shadow: 0 0 0 3px rgba(224, 28, 28, 0.1);
}
.form-grupo input::placeholder,
.form-grupo textarea::placeholder { color: var(--texto3); }
/* Select: quitar flecha nativa y agregar personalizada */
.form-grupo select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23e01c1c' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
.form-grupo select option {
  background: var(--bg3);
  color: var(--texto);
}
.form-grupo select option:disabled {
  color: var(--texto3);
}
.form-mensaje {
  margin-top: 1rem; padding: 0.75rem 1rem;
  border-radius: 8px; font-size: 0.85rem; display: none;
}
.form-mensaje.exito {
  background: rgba(37,211,102,0.1);
  border: 1px solid rgba(37,211,102,0.3);
  color: #25D366; display: block;
}
.form-mensaje.error {
  background: rgba(224,28,28,0.1);
  border: 1px solid rgba(224,28,28,0.3);
  color: var(--rojo); display: block;
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg);
  border-top: 1px solid var(--borde2);
  padding: 4rem 0 0;
  position: relative; z-index: 1;
}
.footer-contenedor {
  max-width: 1200px; margin: 0 auto;
  padding: 0 2rem 3rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-logo {
  font-family: var(--font-titulo);
  font-size: 1.5rem; font-weight: 900;
  color: var(--texto); margin-bottom: 0.75rem;
}
.footer-logo span { color: var(--rojo); }
.footer-marca p { color: var(--texto2); font-size: 0.9rem; max-width: 260px; }
.footer-nav h5,
.footer-servicios h5,
.footer-social h5 {
  font-family: var(--font-titulo);
  font-size: 0.75rem; color: var(--rojo);
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.footer-nav { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-nav a { color: var(--texto2); font-size: 0.88rem; transition: color 0.2s; }
.footer-nav a:hover { color: var(--rojo); }
.footer-servicios { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-servicios span { color: var(--texto2); font-size: 0.88rem; }
.social-iconos { display: flex; gap: 0.75rem; }
.social-icono {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--card); border: 1px solid var(--borde2);
  display: flex; align-items: center; justify-content: center;
  color: var(--texto2); transition: all 0.3s; font-size: 1.1rem;
}
.social-icono:hover { transform: translateY(-3px); }
.social-icono.whatsapp:hover { background: #25D366; border-color: #25D366; color: #fff; }
.social-icono.instagram:hover {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  border-color: transparent; color: #fff;
}
.footer-bottom {
  border-top: 1px solid var(--borde2);
  padding: 1.5rem 2rem;
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 0.5rem;
  font-size: 0.82rem; color: var(--texto3);
}

/* ===== BOTONES FLOTANTES REDES ===== */
.flotantes-social {
  position: fixed;
  right: 1.5rem;
  bottom: 6rem;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.flotante-btn {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.3rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  transition: transform 0.3s;
}
.flotante-btn:hover { transform: scale(1.1); }
.flotante-wa { background: #25D366; }
.flotante-ig {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* ===== CHATBOT ===== */
.chatbot-wrap {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 1001;
}
.chatbot-toggle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--rojo); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 20px var(--rojo-glow);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}
.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px var(--rojo-glow);
}
.chatbot-notif {
  position: absolute; top: -4px; right: -4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--verde); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  animation: notif-pulsar 2s infinite;
}
@keyframes notif-pulsar {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.2); }
}
.chatbot-caja {
  position: absolute; bottom: 70px; left: 0;
  width: 320px;
  background: var(--card2);
  border: 1px solid var(--borde);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.chatbot-caja.abierto { display: flex; }
.chatbot-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, var(--rojo-dark), var(--rojo));
}
.chatbot-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-titulo); font-size: 0.75rem;
  font-weight: 700; color: #fff; flex-shrink: 0;
}
.chatbot-header-info strong { color: #fff; font-size: 0.9rem; display: block; }
.chatbot-estado { color: rgba(255,255,255,0.8); font-size: 0.72rem; }
.chatbot-cerrar {
  margin-left: auto; color: rgba(255,255,255,0.8);
  font-size: 1rem; transition: color 0.2s;
}
.chatbot-cerrar:hover { color: #fff; }
.chatbot-mensajes {
  flex: 1; padding: 1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  max-height: 280px; overflow-y: auto;
}
.chat-msg {
  max-width: 80%; padding: 0.65rem 0.9rem;
  border-radius: 12px; font-size: 0.85rem; line-height: 1.5;
}
.chat-msg.bot {
  background: var(--bg3); border: 1px solid var(--borde2);
  align-self: flex-start; border-bottom-left-radius: 4px;
}
.chat-msg.usuario {
  background: var(--rojo); color: #fff;
  align-self: flex-end; border-bottom-right-radius: 4px;
}
.chat-escribiendo {
  display: flex; gap: 4px; align-items: center;
  padding: 0.65rem 0.9rem;
  background: var(--bg3); border: 1px solid var(--borde2);
  border-radius: 12px; border-bottom-left-radius: 4px;
  align-self: flex-start; width: fit-content;
}
.chat-escribiendo span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--texto3); animation: escribir 1.2s infinite;
}
.chat-escribiendo span:nth-child(2) { animation-delay: 0.2s; }
.chat-escribiendo span:nth-child(3) { animation-delay: 0.4s; }
@keyframes escribir {
  0%, 60%, 100% { transform: translateY(0); }
  30%            { transform: translateY(-6px); }
}
.chat-botones-rapidos { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chat-btn-rapido {
  background: rgba(224,28,28,0.1);
  border: 1px solid rgba(224,28,28,0.2);
  color: var(--rojo); font-size: 0.78rem; font-weight: 600;
  padding: 0.35rem 0.7rem; border-radius: 20px;
  transition: all 0.2s;
}
.chat-btn-rapido:hover { background: var(--rojo); color: #fff; border-color: var(--rojo); }
.chatbot-input-wrap {
  display: flex; gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--borde2);
}
.chatbot-input-wrap input {
  flex: 1; background: var(--bg3);
  border: 1px solid var(--borde2);
  border-radius: 8px; color: var(--texto);
  font-size: 0.85rem; padding: 0.55rem 0.75rem;
  outline: none; transition: border-color 0.2s;
}
.chatbot-input-wrap input:focus { border-color: var(--rojo); }
#chatEnviar {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--rojo); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; flex-shrink: 0;
}
#chatEnviar:hover { background: var(--rojo-dark); }

/* ===== SPINNER DE CARGA ===== */
.cargando-spinner {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem; color: var(--texto2); padding: 3rem;
}

/* ===== ANIMACIONES DE ENTRADA ===== */
@keyframes fadeArriba {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
[data-anim] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s, transform 0.6s;
}
[data-anim].visible { opacity: 1; transform: translateY(0); }

/* ===== OCULTAR CHATBOT CUANDO MENÚ ABIERTO ===== */
.chatbot-oculto {
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Cuando el menú móvil está abierto, el navbar siempre tiene fondo sólido */
body.menu-abierto #navbar {
  background: rgba(10, 10, 15, 0.98) !important;
  backdrop-filter: blur(20px) !important;
  box-shadow: 0 1px 0 var(--borde) !important;
}

/* Admin en menú móvil — oculto en escritorio */
.nav-item-admin-movil { display: none; }

/* ==========================================================
   RESPONSIVE
========================================================== */

/* ===== ESCRITORIO — Forzar Admin visible, hamburguesa oculta ===== */
@media (min-width: 769px) {
  .btn-admin            { display: flex !important; }
  .nav-item-admin-movil { display: none  !important; }
  .nav-hamburguesa      { display: none  !important; }
}

/* ===== TABLET (max 1024px) ===== */
@media (max-width: 1024px) {
  .hero-contenedor {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
    padding-top: 1rem;
  }
  .hero-visual { order: -1; justify-content: center; height: 320px; overflow: visible; }
  .titulo-jb { display: none; }
  .titulo-sub { font-size: 0.55em; text-align: center; }
  .hero-titulo { text-align: center; }
  .hero-descripcion { margin: 0 auto 2rem; max-width: 500px; }
  .hero-botones { justify-content: center; }
  .hero-stats  { justify-content: center; }
  .scroll-indicador { display: none; }
  .nosotros-grid { grid-template-columns: 1fr; gap: 3rem; }
  .nosotros-visual { order: -1; }
  .servicios-grid { grid-template-columns: repeat(2, 1fr); }
  .portafolio-grid { grid-template-columns: repeat(2, 1fr); }
  .tecnologias-categorias { grid-template-columns: 1fr; }
  .contacto-grid { grid-template-columns: 1fr; }
  .footer-contenedor { grid-template-columns: 1fr 1fr; }
  .badge-flotante { display: none; }
  .hero { overflow-x: hidden; padding: var(--nav-alto) 1.5rem 2rem; }
}

/* ===== MÓVIL (max 768px) ===== */
@media (max-width: 768px) {
  :root { --nav-alto: 60px; }

  .nav-contenedor { padding: 0 1rem; gap: 0.5rem; justify-content: space-between; }
  .nav-logo { flex: 1; }
  .nav-acciones { gap: 0.5rem; }
  .btn-admin { display: none !important; }
  .nav-hamburguesa { display: flex; }

  /* ── OVERLAY NEGRO que tapa TODO el contenido ── */
  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    width: 100vw;
    background: #0a0a0f;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    display: none;
    z-index: 9998;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .nav-links.abierto {
    display: flex;
  }

  /* Espacio para el navbar en la parte superior */
  .nav-links::before {
    content: '';
    display: block;
    height: var(--nav-alto);
    flex-shrink: 0;
  }

  /* Navbar siempre encima del overlay */
  #navbar {
    z-index: 9999 !important;
  }

  /* Cuando menú abierto, navbar fondo sólido siempre */
  body.menu-abierto #navbar {
    background: #0a0a0f !important;
    backdrop-filter: none !important;
    box-shadow: 0 1px 0 rgba(224,28,28,0.2) !important;
  }

  /* Items del menú */
  .nav-links li {
    width: 100%;
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
  }
  .nav-links li:first-child { margin-top: 1.5rem; }

  /* Botones del menú */
  .nav-link {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.5rem;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    width: 100%;
    background: rgba(255,255,255,0.04);
    color: #e8e8f0;
    text-align: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
  }
  /* Quitar línea animada roja en móvil */
  .nav-link::after { display: none !important; }
  .nav-link:hover,
  .nav-link.activo {
    background: rgba(224,28,28,0.12);
    border-color: rgba(224,28,28,0.4);
    color: #e01c1c;
  }

  /* Botón Admin en menú móvil */
  .nav-item-admin-movil { display: block; width: 100%; padding: 0 1.5rem; margin-top: 0.5rem; }
  .nav-link-admin {
    color: #e01c1c !important;
    border-color: rgba(224,28,28,0.3) !important;
    background: rgba(224,28,28,0.06) !important;
  }
  .nav-link-admin:hover {
    background: #e01c1c !important;
    color: #fff !important;
    border-color: #e01c1c !important;
  }

  .hero { overflow: hidden; padding: var(--nav-alto) 1rem 2rem; }
  .hero-visual { height: 260px; overflow: visible; flex-shrink: 0; margin-bottom: 0.5rem; }
  .hero-titulo { font-size: 1.6rem; }
  .hero-descripcion { font-size: 0.95rem; }
  .hero-botones { flex-direction: column; align-items: center; gap: 0.75rem; }
  .btn-primario, .btn-secundario { width: 100%; justify-content: center; }
  .hero-stats { gap: 1.2rem; flex-wrap: wrap; }
  .stat-numero { font-size: 1.5rem; }

  .circulo-externo { width: 200px; height: 200px; }
  .circulo-medio   { width: 148px; height: 148px; }
  .circulo-interno { width: 100px; height: 100px; }
  .pr1 { width: 92px;  height: 92px;  }
  .pr2 { width: 76px;  height: 76px;  }
  .pr3 { width: 60px;  height: 60px;  }
  .portal-center { width: 46px; height: 46px; }
  .logo-central  { font-size: 1.1rem; }
  .orbita-1 { width: 240px; height: 240px; }
  .orbita-2 { width: 285px; height: 285px; }
  .orbita-3 { width: 330px; height: 330px; }

  .seccion { padding: 70px 0; }
  .servicios-grid  { grid-template-columns: 1fr; }
  .portafolio-grid { grid-template-columns: 1fr; }
  .tecnologias-categorias { grid-template-columns: 1fr; }
  .footer-contenedor { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem 1rem 2rem;
    gap: 0.5rem;
  }
  .form-fila { grid-template-columns: 1fr; }

  .flotantes-social { right: 0.75rem; bottom: 4.5rem; gap: 0.5rem; }
  .flotante-btn { width: 44px; height: 44px; font-size: 1.2rem; }
  .chatbot-wrap {
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 1002;
  }
  .chatbot-toggle { width: 50px; height: 50px; font-size: 1.2rem; }
  .chatbot-caja { width: 290px; }
}

/* ===== MÓVIL PEQUEÑO (max 480px) ===== */
@media (max-width: 480px) {
  .logo-jb { font-size: 1.2rem; }
  .logo-nombre { font-size: 0.6rem; }
  .btn-idioma { padding: 0.3rem 0.5rem; font-size: 0.72rem; }
  .hero-visual { height: 230px; }
  .circulo-externo { width: 170px; height: 170px; }
  .circulo-medio   { width: 126px; height: 126px; }
  .circulo-interno { width: 84px;  height: 84px;  }
  .pr1 { width: 78px; height: 78px; }
  .pr2 { width: 64px; height: 64px; }
  .pr3 { width: 50px; height: 50px; }
  .portal-center { width: 38px; height: 38px; }
  .logo-central  { font-size: 0.95rem; }
  .orbita-1 { width: 200px; height: 200px; }
  .orbita-2 { width: 238px; height: 238px; }
  .orbita-3 { width: 276px; height: 276px; }
  .hero-titulo { font-size: 1.4rem; }
  .seccion { padding: 60px 0; }
  .stat-numero { font-size: 1.3rem; }
  .hero-stats { gap: 0.75rem; }
  .chatbot-caja { width: 270px; }
}

/* ===== MÓVIL MUY PEQUEÑO (max 360px) ===== */
@media (max-width: 360px) {
  .logo-jb { font-size: 1rem; }
  .logo-nombre { font-size: 0.55rem; }
  .btn-idioma { display: none; }
  .hero-visual { height: 200px; }
  .circulo-externo { width: 150px; height: 150px; }
  .circulo-medio   { width: 110px; height: 110px; }
  .circulo-interno { width: 74px;  height: 74px;  }
  .pr1 { width: 68px; height: 68px; }
  .pr2 { width: 56px; height: 56px; }
  .pr3 { width: 44px; height: 44px; }
  .portal-center { width: 34px; height: 34px; }
  .logo-central  { font-size: 0.85rem; }
  .orbita-1 { width: 175px; height: 175px; }
  .orbita-2 { width: 208px; height: 208px; }
  .orbita-3 { width: 241px; height: 241px; }
  .hero-titulo { font-size: 1.2rem; }
  .seccion-contenedor { padding: 0 1rem; }
  .hero-stats { gap: 0.5rem; }
  .stat-numero { font-size: 1.1rem; }
  .stat-label { font-size: 0.65rem; }
  .chatbot-toggle { width: 44px; height: 44px; font-size: 1rem; }
  .chatbot-caja { width: calc(100vw - 2rem); left: 0; }
  .flotante-btn { width: 38px; height: 38px; font-size: 1rem; }
  .flotantes-social { right: 0.5rem; bottom: 4rem; }
  .chatbot-wrap { bottom: 0.5rem; left: 0.5rem; }
}

/* ===== GALAXY Z FOLD (max 380px) ===== */
@media (max-width: 380px) {
  .btn-idioma { display: none; }
  .logo-jb { font-size: 1rem; }
  .logo-nombre { font-size: 0.55rem; }
  .nav-contenedor { padding: 0 0.75rem; gap: 0.4rem; }
  .hero { padding: var(--nav-alto) 0.75rem 1.5rem; }
  .hero-visual { height: 210px; }
  .circulo-externo { width: 155px; height: 155px; }
  .circulo-medio   { width: 115px; height: 115px; }
  .circulo-interno { width: 77px;  height: 77px;  }
  .pr1 { width: 71px; height: 71px; }
  .pr2 { width: 58px; height: 58px; }
  .pr3 { width: 46px; height: 46px; }
  .portal-center { width: 35px; height: 35px; }
  .logo-central  { font-size: 0.8rem; }
  .orbita-1 { width: 182px; height: 182px; }
  .orbita-2 { width: 216px; height: 216px; }
  .orbita-3 { width: 250px; height: 250px; }
  .hero-titulo { font-size: 1.1rem; }
  .titulo-sub  { font-size: 0.5em; letter-spacing: 1px; }
  .hero-descripcion { font-size: 0.88rem; padding: 0 0.5rem; }
  .hero-badge { font-size: 0.75rem; padding: 0.3rem 0.7rem; }
  .hero-stats { gap: 0.4rem; justify-content: center; }
  .stat-numero { font-size: 1.1rem; }
  .stat-label  { font-size: 0.6rem; letter-spacing: 0; }
  .stat-divisor { height: 28px; }
  .hero-botones { gap: 0.5rem; padding: 0 0.25rem; }
  .btn-primario, .btn-secundario { width: 100%; justify-content: center; font-size: 0.88rem; padding: 0.65rem 1rem; }
  .seccion { padding: 50px 0; }
  .seccion-contenedor { padding: 0 0.75rem; }
  .seccion-header h2 { font-size: 1.3rem; }
  .seccion-header p  { font-size: 0.82rem; }
  .seccion-tag { font-size: 0.6rem; letter-spacing: 2px; padding: 0.25rem 0.75rem; }
  .servicios-grid  { grid-template-columns: 1fr; gap: 1rem; }
  .portafolio-grid { grid-template-columns: 1fr; gap: 1rem; }
  .tecnologias-categorias { grid-template-columns: 1fr; gap: 1rem; }
  .servicio-card { padding: 1.25rem; }
  .contacto-grid { gap: 2rem; }
  .contacto-form { padding: 1.5rem; }
  .form-fila { grid-template-columns: 1fr; gap: 0.75rem; }
  .footer-contenedor { padding: 0 0.75rem 2rem; gap: 1.5rem; }
  .footer-logo { font-size: 1.2rem; }
  .chatbot-toggle { width: 44px; height: 44px; font-size: 1rem; }
  .chatbot-caja { width: calc(100vw - 1.5rem); }
  .flotante-btn { width: 40px; height: 40px; font-size: 1.1rem; }
  .flotantes-social { right: 0.5rem; bottom: 4rem; gap: 0.4rem; }
  .chatbot-wrap { bottom: 0.5rem; left: 0.5rem; }
  .nav-link { font-size: 1.1rem; padding: 0.85rem 1.5rem; }
}

/* =============================================
   COOKIES — Tarjeta flotante centrada
============================================= */

/* Overlay oscuro de fondo */
.cookie-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 99988;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.cookie-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* Tarjeta flotante centrada */
.cookie-banner {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: calc(100% - 2rem);
  max-width: 600px;
  background: #12121e;
  border: 1px solid rgba(224, 28, 28, 0.35);
  border-radius: 16px;
  padding: 1.5rem;
  z-index: 99990;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.8),
    0 0 40px rgba(224,28,28,0.08);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.cookie-banner::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #e01c1c, transparent);
}
.cookie-banner.cookie-visible  { transform: translateX(-50%) translateY(0); }
.cookie-banner.cookie-ocultar  { transform: translateX(-50%) translateY(120%); }

/* Encabezado de la tarjeta */
.cookie-header {
  display: flex; align-items: center; gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.cookie-icono { font-size: 1.5rem; }
.cookie-titulo {
  font-family: var(--font-titulo);
  font-size: 0.85rem; font-weight: 700;
  color: var(--texto); letter-spacing: 1px;
  text-transform: uppercase;
}

/* Texto */
.cookie-texto p {
  font-size: 0.84rem; color: var(--texto2);
  line-height: 1.6; margin: 0 0 1.25rem;
}
.cookie-link {
  color: var(--rojo); text-decoration: none; font-weight: 600;
  border-bottom: 1px dashed rgba(224,28,28,0.4);
  transition: border-color 0.2s;
}
.cookie-link:hover { border-color: var(--rojo); }

/* Botones */
.cookie-botones {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
  justify-content: flex-end;
}
.cookie-btn {
  font-family: var(--font-cuerpo); font-size: 0.82rem;
  font-weight: 600; padding: 0.6rem 1.25rem;
  border-radius: 8px; cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.cookie-aceptar {
  background: var(--rojo); color: #fff; border: none;
  box-shadow: 0 3px 15px rgba(224,28,28,0.4);
}
.cookie-aceptar:hover {
  background: #c01515; transform: translateY(-1px);
  box-shadow: 0 5px 20px rgba(224,28,28,0.6);
}
.cookie-rechazar {
  background: transparent; color: var(--texto2);
  border: 1px solid rgba(255,255,255,0.1);
}
.cookie-rechazar:hover {
  border-color: rgba(255,255,255,0.25); color: var(--texto);
}
.cookie-info {
  background: rgba(224,28,28,0.08); color: var(--texto);
  border: 1px solid rgba(224,28,28,0.2);
}
.cookie-info:hover {
  background: rgba(224,28,28,0.15);
  border-color: rgba(224,28,28,0.45);
}

/* Modal política */
.cookie-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 99991;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
}
.cookie-modal-overlay.cookie-modal-visible {
  opacity: 1;
  pointer-events: all;
}
.cookie-modal {
  background: var(--card);
  border: 1px solid rgba(224,28,28,0.25);
  border-radius: 16px;
  width: 100%; max-width: 520px;
  max-height: 85vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.8);
  transform: translateY(20px);
  transition: transform 0.3s;
  position: relative;
}
.cookie-modal-overlay.cookie-modal-visible .cookie-modal {
  transform: translateY(0);
}
.cookie-modal::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #e01c1c, transparent);
}
.cookie-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid var(--borde2);
  flex-shrink: 0;
}
.cookie-modal-header h3 {
  font-family: var(--font-titulo);
  font-size: 0.95rem; font-weight: 700;
  color: var(--texto); letter-spacing: 1px;
}
.cookie-modal-cerrar {
  background: none; border: none; color: var(--texto2);
  font-size: 1rem; cursor: pointer; padding: 0.25rem 0.5rem;
  border-radius: 6px; transition: all 0.2s; line-height: 1;
}
.cookie-modal-cerrar:hover { background: rgba(224,28,28,0.1); color: var(--rojo); }

.cookie-modal-body {
  padding: 1.5rem; overflow-y: auto;
  flex: 1; min-height: 0;
}
.cookie-modal-body > div > p {
  font-size: 0.88rem; color: var(--texto2);
  line-height: 1.6; margin-bottom: 1rem;
}
.cookie-tipo {
  background: var(--bg2);
  border: 1px solid var(--borde2);
  border-left: 3px solid rgba(224,28,28,0.4);
  border-radius: 0 8px 8px 0;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
}
.cookie-tipo h4 {
  font-size: 0.85rem; font-weight: 700;
  color: var(--texto); margin-bottom: 0.3rem;
}
.cookie-tipo p { margin: 0; font-size: 0.8rem; color: var(--texto2); }

.cookie-modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--borde2);
  display: flex; gap: 0.75rem; justify-content: flex-end;
  flex-shrink: 0; flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 640px) {
  .cookie-banner { bottom: 1rem; padding: 1.25rem; }
  .cookie-botones { justify-content: stretch; }
  .cookie-btn { flex: 1; text-align: center; }
  .cookie-modal-footer { flex-direction: column; }
  .cookie-modal-footer .cookie-btn { width: 100%; text-align: center; }
}
