/* ═══════════════════════════════════════════════════════
   NexaSmart — Main Stylesheet
   Paleta: #0A0E1A (fondo) · #2D3E50 (slate) · #2B7BD4 (azul) · #FFFFFF
   ═══════════════════════════════════════════════════════ */

:root {
  --dark:      #0A0E1A;
  --dark2:     #111827;
  --slate:     #2D3E50;
  --blue:      #2B7BD4;
  --blue-light:#4A9AEF;
  --blue-glow: rgba(43,123,212,0.35);
  --white:     #FFFFFF;
  --gray:      #8899AA;
  --gray-light:#E8ECEF;
  --success:   #22C55E;
  --font-main: 'Inter', sans-serif;
  --transition: 0.3s ease;
  --radius:    12px;
  --shadow:    0 8px 32px rgba(0,0,0,0.35);
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-main);
  background: var(--dark);
  color: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--blue-light); }

img { max-width: 100%; display: block; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark2); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 3px; }

/* ── Utilidades ── */
.section-pad { padding: 96px 0; }
.section-pad-sm { padding: 64px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.text-blue  { color: var(--blue); }
.text-gray  { color: var(--gray); }
.text-white { color: var(--white); }

.badge-chip {
  display: inline-block;
  background: rgba(43,123,212,0.15);
  color: var(--blue-light);
  border: 1px solid rgba(43,123,212,0.4);
  border-radius: 50px;
  padding: 4px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-title span { color: var(--blue); }

.section-subtitle {
  font-size: 1.05rem;
  color: var(--gray);
  max-width: 600px;
}

.divider-line {
  width: 56px; height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  border-radius: 2px;
  margin: 16px 0 40px;
}
.divider-line.center { margin: 16px auto 40px; }

.btn-primary-ns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--blue), var(--blue-light));
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 20px var(--blue-glow);
}
.btn-primary-ns:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--blue-glow);
  color: var(--white);
}

.btn-outline-ns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--white);
  padding: 13px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-outline-ns:hover {
  border-color: var(--blue);
  color: var(--blue-light);
  background: rgba(43,123,212,0.08);
}

/* ════════════════════════════════
   NAVBAR
   ════════════════════════════════ */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s ease;
}
#navbar.scrolled {
  background: rgba(10,14,26,0.95);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  border-bottom: 1px solid rgba(43,123,212,0.2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo .logo-text {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.nav-logo .logo-text .nexa { color: var(--white); }
.nav-logo .logo-text .smart { color: var(--blue); }
.nav-logo .logo-slogan {
  display: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--blue);
  transition: width var(--transition);
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: 16px; }

.lang-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--white);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.lang-btn:hover { background: rgba(43,123,212,0.25); border-color: var(--blue); }

.nav-cta {
  background: var(--blue);
  color: var(--white);
  padding: 8px 22px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.nav-cta:hover { background: var(--blue-light); transform: translateY(-1px); color: var(--white); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Menú móvil — oculto por defecto en escritorio */
.nav-menu-mobile {
  display: none;
}

/* ════════════════════════════════
   HERO
   ════════════════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 60% 50%, rgba(43,123,212,0.12) 0%, transparent 60%),
              linear-gradient(180deg, var(--dark) 0%, #0D1525 100%);
}
#hero-canvas {
  position: absolute;
  inset: 0;
  opacity: 0.55;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(43,123,212,0.12);
  border: 1px solid rgba(43,123,212,0.35);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-light);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-chip .dot {
  width: 6px; height: 6px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  50%      { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.hero-title .line-blue { color: var(--blue); }
.hero-title .glow {
  text-shadow: 0 0 40px rgba(43,123,212,0.5);
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--gray);
  margin-bottom: 40px;
  max-width: 540px;
  line-height: 1.75;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-stats {
  display: flex;
  gap: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.hero-stat .num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--blue-light);
  line-height: 1;
}
.hero-stat .lbl {
  font-size: 0.78rem;
  color: var(--gray);
  margin-top: 4px;
}

.hero-visual {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 520px;
  opacity: 0.18;
  pointer-events: none;
}

.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gray);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce-scroll 2s infinite;
}
.scroll-indicator .arrow { font-size: 1.2rem; }
@keyframes bounce-scroll {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* ════════════════════════════════
   SERVICIOS
   ════════════════════════════════ */
#servicios { background: var(--dark2); }

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.servicio-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.servicio-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.servicio-card:hover {
  border-color: rgba(43,123,212,0.3);
  background: rgba(43,123,212,0.06);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.servicio-card:hover::before { opacity: 1; }

.serv-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, rgba(43,123,212,0.2), rgba(43,123,212,0.05));
  border: 1px solid rgba(43,123,212,0.3);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  color: var(--blue-light);
  margin-bottom: 20px;
  transition: all var(--transition);
}
.servicio-card:hover .serv-icon {
  background: linear-gradient(135deg, rgba(43,123,212,0.35), rgba(43,123,212,0.1));
  box-shadow: 0 0 20px var(--blue-glow);
}
.serv-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.serv-desc {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.7;
}

/* ════════════════════════════════
   NOSOTROS / WHY US
   ════════════════════════════════ */
#nosotros {
  background: linear-gradient(135deg, var(--dark) 0%, #0D1A2E 100%);
  position: relative;
  overflow: hidden;
}
#nosotros::before {
  content: '';
  position: absolute;
  right: -200px; top: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(43,123,212,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.nosotros-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.nosotros-text p {
  color: var(--gray);
  margin-bottom: 24px;
  font-size: 1rem;
  line-height: 1.8;
}
.features-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; }
.features-list li {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.95rem;
}
.features-list li .check {
  width: 22px; height: 22px;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  color: var(--success);
  flex-shrink: 0;
}

.nosotros-cards { display: flex; flex-direction: column; gap: 16px; }
.nos-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 24px;
  display: flex; align-items: center; gap: 20px;
  transition: all var(--transition);
}
.nos-card:hover {
  border-color: rgba(43,123,212,0.3);
  background: rgba(43,123,212,0.06);
}
.nos-card-icon {
  font-size: 1.8rem;
  color: var(--blue-light);
  flex-shrink: 0;
}
.nos-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.nos-card p  { font-size: 0.82rem; color: var(--gray); margin: 0; }

/* ════════════════════════════════
   GALERÍA
   ════════════════════════════════ */
#galeria { background: var(--dark2); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
}
.gallery-item img,
.gallery-item video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-item:hover img,
.gallery-item:hover video { transform: scale(1.05); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  display: flex; align-items: flex-end;
  padding: 16px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span { font-size: 0.85rem; font-weight: 600; }

.gallery-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 64px;
  color: var(--gray);
}

/* ════════════════════════════════
   CONTACTO
   ════════════════════════════════ */
#contacto {
  background: linear-gradient(180deg, var(--dark) 0%, #0D1525 100%);
}
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-item {
  display: flex; align-items: flex-start; gap: 16px;
}
.contact-item-icon {
  width: 44px; height: 44px;
  background: rgba(43,123,212,0.12);
  border: 1px solid rgba(43,123,212,0.25);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--blue-light);
  flex-shrink: 0;
}
.contact-item-body h4 { font-size: 0.85rem; color: var(--gray); font-weight: 500; margin-bottom: 4px; }
.contact-item-body p, .contact-item-body a { font-size: 0.98rem; color: var(--white); }

.social-links { display: flex; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.social-link {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--gray);
  transition: all var(--transition);
}
.social-link:hover {
  background: rgba(43,123,212,0.2);
  border-color: var(--blue);
  color: var(--blue-light);
  transform: translateY(-2px);
}

.contact-form {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-group label { font-size: 0.82rem; color: var(--gray); font-weight: 500; }
.form-group input,
.form-group textarea,
.form-group select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--white);
  font-size: 0.92rem;
  font-family: var(--font-main);
  transition: border-color var(--transition);
  width: 100%;
}
.form-group select option {
  background: #1a2235;
  color: #ffffff;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(43,123,212,0.05);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-msg {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: none;
}
.form-msg.success { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #86efac; display: block; }
.form-msg.error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; display: block; }

/* ════════════════════════════════
   FOOTER
   ════════════════════════════════ */
#footer {
  background: #060911;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .logo-text { font-size: 1.4rem; font-weight: 800; }
.footer-brand .logo-text .nexa { color: var(--white); }
.footer-brand .logo-text .smart { color: var(--blue); }
.footer-brand p { color: var(--gray); font-size: 0.88rem; margin-top: 12px; line-height: 1.7; max-width: 280px; }

.footer-col h5 { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray); margin-bottom: 20px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { color: rgba(255,255,255,0.6); font-size: 0.88rem; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--blue-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--gray); }
.footer-bottom a { color: var(--blue-light); }

/* WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 56px; height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  color: white;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: all var(--transition);
  animation: float-in 0.5s ease 1s both;
}
.whatsapp-float:hover { transform: scale(1.12); box-shadow: 0 8px 32px rgba(37,211,102,0.5); color: white; }
@keyframes float-in { from { opacity:0; transform:scale(0.5); } to { opacity:1; transform:scale(1); } }

/* ════════════════════════════════
   ANIMACIONES DE ENTRADA
   ════════════════════════════════ */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-left.visible { opacity: 1; transform: translateX(0); }

.fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-right.visible { opacity: 1; transform: translateX(0); }

/* Delays escalonados */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ════════════════════════════════
   RESPONSIVE
   ════════════════════════════════ */
@media (max-width: 992px) {
  .nosotros-grid  { grid-template-columns: 1fr; gap: 48px; }
  .contacto-grid  { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid    { grid-template-columns: 1fr 1fr; }
  .hero-visual    { display: none; }
}

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .hamburger { display: flex; }
  .nav-menu-mobile.open {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(10,14,26,0.97);
    backdrop-filter: blur(12px);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
  }
  .nav-menu-mobile a { font-size: 1.4rem; color: var(--white); font-weight: 600; }
  .nav-menu-mobile .close-menu { position: absolute; top: 24px; right: 24px; font-size: 1.5rem; background: none; border: none; color: var(--white); cursor: pointer; }

  .hero-stats  { gap: 24px; flex-wrap: wrap; }
  .form-row    { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .contact-form { padding: 24px; }
  .section-pad { padding: 64px 0; }
}
