:root {
  /* Colores */
  --primary: #6e6ef1;
  --primary-dark: #FFA000;
  --dark: #1E1E1E;
  --darker: #121212;
  --light: #F5F5F5;
  --gray: #2D2D2D;
  --light-gray: #E0E0E0;
  
  /* Espaciado */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  
  /* Tipografía */
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  
  /* Bordes */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
  
  /* Transiciones */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* Reset y estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--darker);
  color: white;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
button, input, textarea,
.navbar, .btn-primary {
  font-family: 'Montserrat', sans-serif;
}


a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--light);
  padding: var(--space-md) var(--space-lg);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}



.logo-container {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo-container:hover {
  transform: scale(1.05);
}

.logo-img {
  height: 40px;
  border-radius: var(--radius-sm);
}

.logo-text {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary);
}

/* Navegación */
.nav-links {
  display: flex;
  flex-wrap: wrap; /* 🔹 Esto es clave */
  gap: var(--space-lg);
  list-style: none;
  align-items: center;
  color: black;
}

.nav-links li a {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 500;
  transition: var(--transition-fast);
  padding: var(--space-sm) 0;
  position: relative;
}

.nav-links li a:hover {
  color: var(--primary);
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;

  transition: var(--transition-normal);
}

.nav-links li a:hover::after {
  width: 100%;
}

.nav-links li a i {
  font-size: var(--text-lg);
}

.menu-title {
  display: none;
  font-weight: 700;
  font-size: var(--text-lg);
  padding: var(--space-md) 0;
  color: black;
}

/* Submenú de servicios */
.has-submenu {
  position: relative;
}

.submenu {
  position: absolute;
  list-style: none;
  padding-left: 1rem; /* o usa 16px */
  top: 100%;
  left: 0; /* puede ajustarse a 10px o más si quieres separarlo más */
  transform: translateX(10%); /* Desplaza el submenú hacia la derecha */
  background: var(--light);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
}


.has-submenu:hover .submenu {
  opacity: 1;
  visibility: visible;
}

.submenu li {
  padding: 0;
}

.submenu a {
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: all 0.2s ease;
}

.submenu a:hover {
  background: white;
  padding-left: var(--space-lg);
}

.submenu-icon {
  margin-left: auto;
  transition: transform 0.3s ease;
  font-size: var(--text-sm);
}

.has-submenu:hover .submenu-icon {
  transform: rotate(180deg);
}

/* Menú hamburguesa */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 22px;
  cursor: pointer;
  z-index: 1100;
  color: black;
  margin-left: 300px;
}

.menu-toggle .bar {
  height: 3px;
  width: 100%;
  background: black;
  border-radius: 3px;
  transition: var(--transition-normal);
}

.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Evitar scroll cuando el menú está abierto */
body.no-scroll {
  overflow: hidden;
}

/* Versión móvil */
@media (max-width: 768px) {
  .logo-container {
    flex: 1;
    justify-content: flex-start;}
  .menu-toggle {
  display: flex;
  margin-left: 0;
  }
  
   .logo-img {
    height: 32px; /* más pequeño para móviles */
  }

  .logo-text {
    font-size: var(--text-md);
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -80%;
    width: 80%;
    height: 100vh;
    backdrop-filter: blur(10px);
    background: rgba(245, 240, 245, 0.6);
    flex-direction: column;
    padding: 100px var(--space-lg) var(--space-xl);
    gap: var(--space-md);
    transition: right 0.4s ease;
    z-index: 1050;
    box-shadow: -5px 0 15px rgba(30,30,30,0.5);
  }
  
  .nav-links.show {
    right: 0;
    color: black;
    
  }
  
  .submenu {
    position: static;
    width: 100%;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 var(--space-md);
    opacity: 1;
    visibility: visible;
  }
  
  .has-submenu.active .submenu {
    max-height: 500px;
    padding: var(--space-sm) var(--space-md);
  }
  
  .has-submenu.active .submenu-icon {
    transform: rotate(180deg);
  }
  
  .menu-title {
    display: block;
  }
}
