/* ============ CONFIGURACIÓN GENERAL ============ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #0b1c36;
  color: white;
  line-height: 1.6;
}

/* ============ ENCABEZADO ============ */
header {
  display: flex;
  justify-content: space-between; /* Esto empuja los extremos: logo a la izquierda, nav (que contiene el botón y el menú) a la derecha */
  align-items: center;
  padding: 10px 30px;
  background-color: #0b1c36;
  flex-wrap: wrap; /* Permite que los elementos se envuelvan en pantallas más pequeñas */
}

.logo-area {
  display: flex;
  align-items: center;
}

.logo-circle {
  background-color: #122647;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  overflow: hidden;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.4rem;
  font-weight: bold;
}

.logo-subtitle {
  font-size: 0.7rem;
  color: #d0d0d0;
  letter-spacing: 1px;
}

/* ============ NAVEGACIÓN ============ */
/* Por defecto, el menú de navegación completo se muestra en pantallas grandes */
.nav-menu {
  list-style: none;
  display: flex; /* Asegura que los elementos del menú estén en línea */
  gap: 20px;
}

.nav-menu li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-menu li a:hover {
  color: #8fd8ff;
}

.menu-toggle {
  /* Por defecto, ocultar el botón hamburguesa en pantallas grandes */
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease-in-out; /* Suaviza la transición de la transformación */
  /* Aseguramos que el botón se alinee a la derecha dentro de su contenedor flex */
  margin-left: auto; /* Esto empuja el botón a la derecha si es el único elemento visible en nav */
}
.menu-toggle:hover {
  transform: scale(1.1); /* Aumenta el tamaño un 10% al pasar el ratón */
}

.menu-toggle:active {
  transform: scale(0.9); /* Ligeramente más pequeño al hacer clic */
}

/* ---------------------------------------------------- */

/* Media Query para pantallas más pequeñas (ej. 768px o menos) */
@media (max-width: 768px) {
  /* En pantallas pequeñas, el botón hamburguesa se muestra */
  .menu-toggle {
    display: block; /* O 'flex' si necesitas centrar el ícono dentro del botón */
    order: 2; /* Asegura que el botón se coloque a la derecha del logo si el header es flex-wrap */
  }

  /* En pantallas pequeñas, el menú completo se oculta por defecto */
  .nav-menu {
    display: none;
    flex-direction: column; /* Apila los elementos del menú verticalmente cuando se muestra */
    width: 100%; /* El menú desplegado ocupa todo el ancho */
    text-align: center;
    background-color: #0b1c36; /* Color de fondo del menú desplegado */
    position: absolute; /* Para que el menú se superponga al contenido */
    top: 90px; /* Ajustar según la altura real de tu header */
    left: 0;
    z-index: 1000;
    padding: 20px 0; /* Espaciado interno para los ítems del menú */
  }

  /* Clase JavaScript para mostrar el menú cuando se hace clic en la hamburguesa */
  .nav-menu.active {
    display: flex; /* O 'block' si no necesitas flexbox para los ítems internos */
  }

  /* Ajustes para el nav en pantallas pequeñas para asegurar el posicionamiento correcto */
  nav {
    display: flex; /* Aseguramos que nav también sea un contenedor flex */
    width: auto; /* Permite que nav ocupe solo el espacio necesario */
    /* Aseguramos que el botón hamburguesa esté a la derecha del logo dentro del header */
    margin-left: auto; /* Empuja nav (y por lo tanto el botón) a la derecha */
  }
}

/* HERO COMPLETO */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-top: 100px;
}

/* Fondo con imagen transparente */
.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4; /* Controla la transparencia */
}

/* Capa oscura superpuesta */
.hero-background::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2));
  z-index: 1;
}

/* Contenido encima de la imagen */
.hero-overlay {
  position: relative;
  z-index: 2;
  max-width: 800px;
  text-align: left;
  color: white;
  padding: 0 5%;
  animation: slideInLeft 1s ease-out forwards;
}

/* Títulos y párrafos */
.hero-overlay h1 {
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 20px;
}

.hero-overlay p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

/* Botón */
.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: #00bcd4;
  color: #fff;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #0097a7;
}

/* Animación */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}


/* ============ BOTONES ============ */
.btn, .btn-detalles {
  background-color: white;
  color: blue;
  border: 2px solid blue;
  padding: 10px 20px;
  font-size: 1rem;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
}

.btn:hover, .btn-detalles:hover {
  background-color: blue;
  color: white;
}

/* ============ SERVICIOS ============ */
.servicios {
  padding: 60px 5%;
  text-align: center;
}

.servicios h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: #f1f5f9;
}

.grid-servicios {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.tarjeta {
  background-color: #f5faff;
  border-radius: 12px;
  padding: 25px;
  min-height: 280px; /* asegura que todas las tarjetas tengan la misma altura */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  
}

.tarjeta:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  background-color: #0077b6;
  color: white;
}

.tarjeta i {
  font-size: 30px;
  color: #0077b6;
  margin-bottom: 15px;
}

.tarjeta h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #003366;
  /* NUEVO: aseguramos altura pareja y alineación */
  min-height: 48px; /* ajustá según el tamaño de tus títulos */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tarjeta p {
  font-size: 0.95rem;
  color: #333;
}

/* Hover icons and text white */
.tarjeta:hover i,
.tarjeta:hover h3,
.tarjeta:hover p {
  color: white;
}

/* ============ TECNOLOGÍAS ============ */
.scope-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 50px 5%;
  background-color: white;
}

.logos {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  justify-items: center;
  max-width: 500px;
}

.logos img {
  width: 100px;
  filter: grayscale(100%);
  transition: all 0.3s ease;
}

.logos img:hover {
  filter: grayscale(0%);
  transform: scale(1.1);
}

.scope-text {
  flex: 1;
  padding: 20px;
}

.scope-text h2 {
  color: #222;
  font-size: 40px;
}

.scope-text strong {
  display: block;
  margin: 10px 0;
  color: #333;
}

.scope-text p {
  color: #555;
  margin-bottom: 20px;
}

/* ============ FORMULARIO ============ */
.contact-form {
  display: grid;
  max-width: 600px;
  width: 90%;
  margin: auto;
  gap: 1rem;
  padding: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form button {
  background-color: #333;
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 auto 40px;
  display: block;
  font-size: 1rem;
}

/* ============ FOOTER ============ */
footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

/* ============ RESPONSIVE DESIGN ============ */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }

  h1 {
    font-size: 2rem;
  }

  .scope-section {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  footer {
    flex-direction: column;
    text-align: center;
  }

  .logos {
    grid-template-columns: repeat(2, 1fr);
  }
}
