/*
  Hoja de estilos principal para el sitio de Eje Tres Comex.
  Utiliza variables CSS para facilitar el ajuste de colores y aspectos visuales.
*/

:root {
  /* Paleta de colores inspirada en tonalidades de azul y detalles dorados */
  --primary: #0a2e59; /* Azul profundo para títulos y elementos destacados */
  --secondary: #045fae; /* Azul vibrante para botones y enlaces activos */
  --accent: #f2c037; /* Dorado suave para llamados a la acción */
  --light: #f7f9fc; /* Fondo claro para secciones */
  --dark: #0c2340; /* Fondo oscuro para el pie de página y barra de navegación */
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--light);
}

/* Contenedor general para alinear elementos en la navegación */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Barra de navegación */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(12, 35, 64, 0.9);
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

/* Logo de la empresa en texto estilizado */
.logo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
  color: #fff;
}

/* Partes del logo de texto */
.logo-main {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.logo-sub {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 2px;
}

nav {
  position: relative;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.nav-links li a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

.nav-links li a:hover {
  color: var(--accent);
}

/* Menú hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Sección hero */
#hero {
  height: 100vh;
  background: url('images/hero-bg.png') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 70px; /* espacio para la barra de navegación */
}

/*
  Destellos animados en el fondo del hero
  Estos elementos están diseñados para imitar los puntos brillantes del gráfico de red del hero.
  Utilizamos un contenedor absoluto y varios <span> con diferentes demoras de animación
  para crear un efecto de parpadeo alternado sin saturar el diseño.
*/
.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* evita interacciones del ratón sobre los destellos */
  overflow: hidden;
  z-index: 1;
}

/* Animación para el destello de cada punto */
@keyframes blink {
  0%, 20%, 50%, 80%, 100% {
    opacity: 0;
  }
  10%, 40%, 70% {
    opacity: 1;
  }
}

/*
  Cada destello es un círculo ligeramente más grande con un resplandor más intenso.
  La animación es más lenta para que el parpadeo sea calmado y elegante.
*/
.stars span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 0 20px 6px rgba(255, 255, 255, 0.6);
  animation-name: blink;
  animation-duration: 12s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 21, 44, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  text-align: center;
}

.hero-content h1 {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.2rem;
  color: #e4eaf3;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--dark);
  padding: 0.8rem 1.6rem;
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease;
}

.btn:hover {
  background: var(--secondary);
  color: #fff;
}

/* Variación de botón más pequeño para enlaces de CV */
.btn-small {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
}

/* Secciones generales */
section {
  padding: 4rem 1.5rem;
}

section h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--primary);
}

/* Sobre nosotros */
#about {
  background: var(--light);
  color: var(--dark);
  text-align: center;
}

#about p {
  max-width: 900px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Servicios */
#services {
  background: #fff;
}

.services-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.service {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 2rem 1.5rem;
  max-width: 280px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.service img {
  width: 50px;
  height: 50px;
  margin-bottom: 1rem;
}

.service h3 {
  margin-bottom: 0.8rem;
  color: var(--primary);
  font-size: 1.2rem;
}

.service p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
}

/* Equipo */
#team {
  background: var(--light);
}

.team-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.team-member {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 2rem 1.5rem;
  max-width: 280px;
  text-align: center;
}

.team-member img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.team-member h4 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.team-member .role {
  font-weight: 600;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.team-member .desc {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}

/* Contacto */
#contact {
  background: var(--dark);
  color: #fff;
  text-align: center;
}

#contact .contact-info p {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

#contact-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

#contact-form input,
#contact-form textarea {
  padding: 0.9rem;
  border: none;
  border-radius: 5px;
  font-size: 0.95rem;
}

#contact-form input:focus,
#contact-form textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

#contact-form button {
  background: var(--accent);
  color: var(--dark);
  border: none;
  padding: 0.9rem;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

#contact-form button:hover {
  background: var(--secondary);
  color: #fff;
}

/* Pie de página */
footer {
  background: var(--dark);
  color: #fff;
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
}

/* Adaptaciones para pantallas pequeñas */
@media (max-width: 768px) {
  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    background: rgba(12, 35, 64, 0.95);
    flex-direction: column;
    width: 220px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 1rem;
    gap: 1rem;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .hamburger {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2.2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  section h2 {
    font-size: 1.8rem;
  }

  .services-container {
    flex-direction: column;
    align-items: center;
  }

  .team-container {
    flex-direction: column;
    align-items: center;
  }
}