/* ===============================
   RESET GENERAL Y ESTILOS BASE
   =============================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Evita que el padding y border aumenten el tamaño */
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Fuente base */
  line-height: 1.6; /* Espaciado entre líneas */
  background: #f9f9f9; /* Color de fondo general */
  color: #222; /* Color de texto general */
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto; /* Centra el contenido */
}

/* ===============================
   HEADER Y NAVEGACIÓN
   =============================== */
.header {
  background: #0e1a2b; /* Fondo oscuro */
  height: 120px;
  padding: 0;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Sombra inferior */
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: hidden;
  transition: all 0.3s ease; /* Animación suave */
}

.header.scrolled {
  height: 80px; /* Reduce altura al hacer scroll */
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-flex {
  display: flex;
  justify-content: space-between; /* Espacio entre logo y menú */
  align-items: center; /* Centra verticalmente */
  height: 100%;
  padding: 0 2rem;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
}

.logo {
  height: 200px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1); /* Logo blanco */
  padding-top: 10px;
  transition: height 0.3s ease;
}

.header.scrolled .logo {
  height: 80px;
  margin-top: -10px; /* Ajuste visual */
}

/* Botón hamburguesa */
.menu-toggle {
  display: none;
  font-size: 2rem; /* Tamaño del ícono */
  background: none;
  color: white;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar ul {
  list-style: none;
  display: flex;
  gap: 2rem; /* Espacio entre enlaces */
}

@media (min-width: 769px) {
  .navbar ul {
    opacity: 0;
    transform: translateY(-20px); /* Efecto fade desde arriba */
    animation: navFadeIn 0.8s ease-out forwards;
    animation-delay: 0.4s;
  }
}

@keyframes navFadeIn {
  to {
    opacity: 1;
    transform: translateY(0); /* Fin de la animación */
  }
}

.navbar a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.navbar a:hover {
  background-color: #ffffff;
  color: #0e1a2b;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

/* ===============================
   SECCIÓN PRINCIPAL (HERO)
   =============================== */
.hero {
  background: linear-gradient(to right, rgba(14, 26, 43, 0.4), rgba(28, 61, 90, 0.4)),
              url('../images/fondo-header-2.png') center/cover no-repeat; /* Imagen de fondo */
  color: white;
  text-align: center;
  padding: 6rem 2rem; /* Espaciado interno */
  animation: fadeIn 1.5s ease;
  backdrop-filter: brightness(1.3);
}

.hero h1 {
  font-size: 3rem; /* Tamaño de título principal */
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.6); /* Sombra para legibilidad */
}

.hero p {
  font-size: 1.2rem; /* Tamaño del subtítulo */
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.btn {
  background: #00bcd4;
  color: white;
  padding: 0.8rem 2rem; /* Tamaño del botón */
  border: none;
  border-radius: 25px; /* Bordes redondeados */
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.3s ease;
  cursor: pointer;
}

.btn:hover {
  background: #0097a7; /* Color al pasar el cursor */
}

/* ===============================
   SECCIONES DEL SITIO
   =============================== */
section {
  padding: 4rem 2rem; /* Espaciado de sección */
  animation: fadeIn 1s ease;
}

.services, .about, .contact {
  background: white;
  border-top: 1px solid #e0e0e0; /* Separador sutil */
}

.services h2,
.about h2,
.contact h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #0e1a2b;
}

.service-item {
  margin-bottom: 2rem;
  text-align: center;
  padding: 1rem;
}

.service-item h3 {
  margin-bottom: 0.5rem;
  color: #00bcd4; /* Color destacado */
}

/* ===============================
   FORMULARIO DE CONTACTO
   =============================== */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

input, textarea {
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem; /* Tamaño del texto */
}

button[type="submit"] {
  background: #0e1a2b; /* Color principal */
  color: white !important; /* Asegura que el texto sea blanco */
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 1rem; /* Texto del botón */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 500;
}

button[type="submit"]:hover {
  background: #1c3d5a;
}

/* === MENSAJES DE VALIDACIÓN Y CONFIRMACIÓN === */
.form-message {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 6px;
}

.form-message.success {
  background-color: #d4edda; /* Verde claro */
  color: #155724; /* Verde oscuro */
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background-color: #f8d7da; /* Rojo claro */
  color: #721c24; /* Rojo oscuro */
  border: 1px solid #f5c6cb;
}

input,
textarea,
button[type="submit"] {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #222; /* Color del texto */
}

input::placeholder,
textarea::placeholder {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #666; /* Color más claro para placeholder */
}

/* ===============================
   PIE DE PÁGINA (FOOTER)
   =============================== */
.footer {
  background: #0e1a2b;
  color: white;
  text-align: center;
  padding: 1.5rem 0; /* Espaciado interno */
}

/* ===============================
   ANIMACIONES
   =============================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 1s ease both;
}

/* ===============================
   RESPONSIVE (AJUSTES PARA MÓVILES)
   =============================== */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    align-self: center;
    position: relative;
  }

  .navbar {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #0e1a2b;
    padding: 1rem 0;
    z-index: 999;
  }

  .navbar.open {
    display: block;
  }

  .navbar ul {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0;
  }

  .navbar a {
    display: block;
    padding: 1rem;
    width: 100%;
    text-align: center;
  }

  .header-flex {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    position: relative;
  }

  .hero h1 {
    font-size: 2.2rem; /* Menor tamaño en móvil */
  }

  .btn {
    font-size: 0.9rem; /* Ajuste en móvil */
    padding: 0.6rem 1.5rem;
  }

  section {
    padding-top: 5rem; /* Espacio extra en móvil */
  }

  /* FORMULARIO RESPONSIVE */
  form {
    padding: 0 1rem;
  }

  input,
  textarea,
  button[type="submit"] {
    font-size: 0.95rem; /* Ligeramente más pequeño */
  }
}







