/* Importamos una fuente moderna */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #F8F9FA;
    color: #333;
}

header {
  position: relative;
  width: 100%;
  height: 460px; /* Ajusta la altura según sea necesario */
  overflow: hidden;
  background: #0e3e61;
}

.header-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 30%;
}

.logo-container {
  position: absolute;
  bottom: 14px;
  left: 20px;
  z-index: 2;
  background: #051e2b54;
  border-radius: 5px;
  border: 1px solid #d1f70b1f;
  padding: 8px;
}

.company-logo {
  width: 200px; /* Ajusta el tamaño del logo según sea necesario */
  height: auto;
}

header h1 {
  position: relative;
  color: #d1f70b;
  font-weight: 700;
  text-align: center;
  margin: 0;
  z-index: 1;
  height: 100%;
  align-content: center;
  font-size: 3em;
}

header h1 {
  transition: opacity 0.5s ease-in-out;
}

header h1.fade-out {
  opacity: 0;
}

header h1.fade-in {
  opacity: 1;
}

nav {
  position: sticky;
  background-color: #1a77a1db;
  padding: 0;
  z-index: 1;
  bottom: 0;
  line-height: 50px;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

nav ul li {
  display: inline;
  margin: 0 15px;
}

nav a {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #e8b02f; /* Cambia el color al pasar el ratón */
}

section {
    padding: 100px 80px;
    max-width: 1200px;
    height: 90%;
    margin: 0 auto;
    text-align: left;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section.show {
    opacity: 1;
    transform: translateY(0);
}

section img {
  width: 100%;
  height: auto;
  display: block;
  margin: 20px auto; /* Centrar la imagen */
  border-radius: 10px; /* Añadir bordes redondeados */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Añadir sombra */
}

#inicio {
    background-color: #F1FAEE;
}

#servicios {
    background-color: #e9c46a4a;
}

#productos {
    background-color: #f4a2614a;
}

#contacto {
    background-color: #1a77a1db;
    color: white;
}
#contacto a {
  text-decoration: none;
  color: #d9f435;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

form input, form textarea {
    width: 90%;
    max-width: 800px;
    padding: 10px;
    margin: 10px 0;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

button {
    background-color: #1D3557;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #457B9D;
}

footer {
  text-align: center;
  padding: 5px;
  background-color: #d1f70b;
  color: #1D3557;
  font-size: 12px;
}

footer a {
  color: #1D3557;
  text-decoration: none;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #032331; /* Fondo blanco, puedes cambiarlo según tu diseño */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease-out; /* Añadir transición para la opacidad */
}

#preloader.hidden {
  opacity: 0;
}

#preloader img {
  width: 200px; /* Ajusta el tamaño del logo según sea necesario */
  animation: zoomInOut 2s ease-in-out; /* Añadir animación de zoom in y zoom out */
}

@keyframes zoomInOut {
  0% {
    transform: scale(1);
  }
  75% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(4);
  }
}

.message {
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  text-align: center;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
}

/* Responsive Design */
@media (max-width: 768px) {
  header {
    height: 300px; /* Ajusta la altura para pantallas más pequeñas */
  }

  .company-logo {
    width: 200px; /* Ajusta el tamaño del logo */
  }

  .logo-container {
    position: absolute;
    bottom: 4px;
    left: 8px;
    text-align: center;
    padding: 1px 0px;
  }

  header h1 {
      font-size: 35px;
      margin: 20px;
  }

  nav ul li {
    display: block;
    margin: 10px 0;
  }

  section {
    padding: 50px 40px;
  }

  form input, form textarea {
    width: 100%;
  }

  button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  header {
    height: 300px; /* Ajusta la altura para pantallas más pequeñas */
  }

  header h1 {
    font-size: 20px;
  }

  .company-logo {
    width: 200px; /* Ajusta el tamaño del logo */
  }

  nav ul li {
    margin: 5px 0;
  }

  section {
    padding: 30px 40px;
  }

  form input, form textarea {
    width: 100%;
  }

  button {
    width: 100%;
  }
}

/* Burger icon styles */
.burger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  position: absolute;
  bottom: 6px;
  right: 13px;
  z-index: 2;
  background: #132d4b91;
  padding: 8px;
  border-radius: 5px;
}

.burger div {
  width: 30px;
  height: 3px;
  background-color: #fff;
  border-radius: 5px;
  transition: all 0.3s ease;
}

/* Hide the menu on smaller screens */
@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: #032331bf;
    position: absolute;
    bottom: 0;
    left: 0;
  }

  nav ul li {
    display: block;
    margin: 10px 0;
  }

  .burger {
    display: flex;
  }
}

/* Toggle menu visibility */
nav ul.active {
  display: flex;
}