/* ==========================================================================
   VARIABLES & DESIGN SYSTEM
   ========================================================================== */
:root {
  --bg-dark: #0f0f1a;
  --bg-card: rgba(26, 26, 46, 0.6);
  --border-color: rgba(168, 85, 247, 0.2);

  --primary-purple: #8a2be2;
  --neon-purple: #a855f7;
  --electric-blue: #00d2ff;

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;

  --font-family: "Inter", sans-serif;
  --transition-fast: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* ==========================================================================
   AMBIENT GLOW EFFECTS
   ========================================================================== */
.bg-glow {
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
}

.blob-1 {
  top: -100px;
  left: -100px;
  background: var(--primary-purple);
}

.blob-2 {
  bottom: 10%;
  right: -100px;
  background: var(--electric-blue);
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.gradient-text {
  background: linear-gradient(135deg, var(--electric-blue), var(--neon-purple));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glass {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 800;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  border-radius: 30px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
  cursor: pointer;
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-purple),
    var(--neon-purple)
  );
  color: #fff;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(168, 85, 247, 0.7);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}

.btn-outline {
  border: 1px solid var(--neon-purple);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--neon-purple);
  box-shadow: 0 0 15px var(--neon-purple);
}

/* ==========================================================================
   HEADER & NAV (Alineado a la derecha)
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.2rem 2rem;
  transition: var(--transition-fast);
}

.header.scrolled {
  background: rgba(15, 15, 26, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1002;
}

.logo span {
  color: var(--neon-purple);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
  margin-left: auto; /* Empuja los enlaces hacia la derecha */
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-main);
  text-shadow: 0 0 8px var(--neon-purple);
}

/* Botón Hamburguesa Oculto por defecto en Escritorio */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1002;
}

/* ==========================================================================
   1. HERO SECTION
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1.5rem 4rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.badge {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--border-color);
  color: var(--neon-purple);
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto 2.5rem auto;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   2. SERVICIOS & GENERAL GRIDS
   ========================================================================== */
section {
  padding: 6rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}

.card {
  padding: 2.5rem 2rem;
  transition: var(--transition-fast);
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--neon-purple);
  box-shadow: 0 10px 30px rgba(168, 85, 247, 0.2);
}

.icon-box {
  width: 60px;
  height: 60px;
  background: rgba(0, 210, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--electric-blue);
  margin-bottom: 1.5rem;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   3. TECNOLOGÍAS
   ========================================================================== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
}

.tech-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 2rem 1rem;
  text-align: center;
  transition: var(--transition-fast);
}

.tech-card i {
  font-size: 2.5rem;
  color: var(--neon-purple);
  margin-bottom: 0.8rem;
  display: block;
}

.tech-card span {
  font-weight: 600;
  font-size: 0.95rem;
}

.tech-card:hover {
  background: rgba(168, 85, 247, 0.08);
  border-color: var(--neon-purple);
  transform: scale(1.05);
}

/* ==========================================================================
   4. CLIENTES / CARRUSEL INFINITO DE LOGOS
   ========================================================================== */
.carousel-container {
  overflow: hidden;
  padding: 2rem 0;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.carousel-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: scrollLogos 30s linear infinite;
  will-change: transform;
  transform: translateZ(0);
}

.carousel-container:hover .carousel-track {
  animation-play-state: paused;
}

.carousel-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 2rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.carousel-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: var(--transition-fast);
}

.carousel-item span {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
}

.carousel-item:hover {
  border-color: var(--neon-purple);
  background: rgba(168, 85, 247, 0.08);
  transform: translateY(-3px);
}

.carousel-item:hover .carousel-logo-img {
  transform: scale(1.08);
}

@keyframes scrollLogos {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   SECCIÓN: 100% RESPONSIVE Y ESCALABLE
   ========================================================================== */
.scale-box {
  padding: 4rem 3rem;
  background: linear-gradient(
    135deg,
    rgba(26, 26, 46, 0.8),
    rgba(15, 15, 26, 0.9)
  );
  border: 1px solid var(--border-color);
  box-shadow: 0 0 40px rgba(0, 210, 255, 0.05);
}

.scale-content h2 {
  font-size: 2.3rem;
  margin-bottom: 1rem;
  text-align: center;
}

.scale-content > p {
  text-align: center;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 3rem auto;
}

.scale-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.scale-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.scale-item i {
  font-size: 2.2rem;
  color: var(--electric-blue);
  background: rgba(0, 210, 255, 0.1);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 210, 255, 0.2);
}

.scale-item h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.scale-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   5. BENEFICIOS
   ========================================================================== */
.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.benefit-item i {
  font-size: 1.8rem;
  color: var(--electric-blue);
  margin-top: 0.2rem;
}

.benefit-item h4 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.benefit-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ==========================================================================
   6. CALL TO ACTION (CTA)
   ========================================================================== */
.cta-box {
  padding: 4rem 2rem;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.cta-box h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.cta-box p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem auto;
}

.cta-btns {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-color);
  background: rgba(10, 10, 18, 0.9);
  padding: 4rem 1.5rem 2rem 1.5rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  max-width: 320px;
  margin-top: 0.8rem;
  font-size: 0.9rem;
}

.footer-contact h4 {
  margin-bottom: 0.8rem;
}

.footer-contact p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ==========================================================================
   CUSTOM LOGO STYLES
   ========================================================================== */
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: var(--transition-fast);
}

.logo-img:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
}

/* ==========================================================================
   ANIMATIONS & RESPONSIVE DESIGN (MÓVILES & MENÚ HAMBURGUESA)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVE DESIGN & MENÚ HAMBURGUESA
   ========================================================================== */
/* ==========================================================================
   RESPONSIVE DESIGN & MENÚ HAMBURGUESA CORREGIDO
   ========================================================================== */

/* Escritorio: Forzar que SIEMPRE se muestre el menú y NUNCA el botón hamburguesa */
@media (min-width: 1025px) {
  .menu-toggle {
    display: none !important;
  }

  .nav-links {
    display: flex !important;
    position: static !important;
    height: auto !important;
    width: auto !important;
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    right: auto !important;
    gap: 1.5rem !important; /* Reduce un poco el espacio entre enlaces para que no salten */
  }
}

/* Tablets y Móviles: Activar el menú hamburguesa */
@media (max-width: 1024px) {
  .menu-toggle {
    display: block !important;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 300px;
    height: 100vh;
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(15px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: right 0.4s ease-in-out;
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    margin-left: 0;
    display: flex;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.2rem;
  }
}
