/* ------------------ ESTILOS BASE ------------------ */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

header {
  background-color: white;
  padding: 5px 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 120px;
}

header img {
  height: 110px;
}

nav {
  display: flex;
  gap: 20px;
}

nav a {
  text-decoration: none;
  color: #0056b3;
  font-weight: bold;
  transition: color 0.3s ease;
}

nav a:hover {
  color: red;
}

nav button {
  background: none;
  border: none;
  color: #0056b3;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav button:hover {
  color: red;
}

/* ------------------ BÚSQUEDA ------------------ */
form.busqueda {
  display: flex;
  gap: 10px;
}

form.busqueda input {
  padding: 6px 12px;
  border: 2px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

form.busqueda button {
  background-color: #0056b3;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

form.busqueda button:hover {
  background-color: red;
}

/* ------------------ BANNER ------------------ */
.banner-slider {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
}

.banner-slider .slide {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.banner-slider .slide.active {
  opacity: 1;
  z-index: 1;
}

.banner-text {
  position: absolute;
  width: 100%;
  text-align: center;
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
  top: 45%;
  transform: translateY(-50%);
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
  z-index: 2;
}

/* ------------------ SERVICIOS ------------------ */
.servicios-grid {
  padding: 60px 30px;
  background-color: #f8f8f8;
  text-align: center;
}

.servicios-grid h2 {
  color: #0056b3;
  font-size: 2rem;
  margin-bottom: 40px;
}

.servicios-grid .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
  max-width: 500px;
  margin: 0 auto;
}

.servicio {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 2px solid #000;
  transition: transform 0.2s ease;
}

.servicio:hover {
  transform: translateY(-5px);
}

.servicio img {
  width: 60px;
  height: 60px;
  margin-bottom: 15px;
}

.servicio h3 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 10px;
}

.servicio p {
  font-size: 0.95rem;
  color: #555;
}

.quienes-somos {
  padding: 60px 30px;
  background-color: #f5f5f5;
}

.qs-contenedor {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

/* INTRO BOX */
.qs-intro-box {
  background-color: #d6ecff;
  padding: 30px 40px;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  max-width: 1000px;
}

.qs-intro-box h2 {
  color: #0056b3;
  font-size: 2rem;
  margin-bottom: 15px;
}

.qs-intro-box p {
  font-size: 1rem;
  color: #003366;
  margin-bottom: 10px;
}

/* IMAGEN CENTRADA */
.qs-imagen {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 10px;
}

.qs-imagen img {
  width: 500px;
  max-width: 100%;
}

/* BLOQUES AZULES */
.qs-info-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin-top: 10px;
  width: 100%;
}

.qs-info-boxes .box {
  background-color: #d6ecff;
  border-radius: 16px;
  padding: 30px;
  flex: 1;
  min-width: 280px;
  max-width: 480px;
  font-weight: bold;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.qs-info-boxes .box:hover {
  transform: translateY(-5px);
}

.qs-info-boxes .box p {
  margin: 12px 0;
  color: #003366;
}

.qs-info-boxes .box ul {
  list-style: none;
  padding: 0;
}

.qs-info-boxes .box ul li {
  margin: 10px 0;
  color: #003366;
  font-weight: normal;
}

/* ------------------ FOOTER ------------------ */
footer {
  background-image: url('/frontend/img/footer.png');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 40px 30px;
}

footer p {
  margin: 5px 0;
  text-align: center;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

/* ------------------ STICKY FOOTER ------------------ */
html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1;
}

/* ------------------ CARRUSEL DE PROYECTOS ------------------ */
.carrusel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

#carrusel {
  overflow: hidden;
  width: 100%;
}

.flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease;
  border-radius: 6px;
}

.flecha.izquierda {
  left: -50px;
}

.flecha.derecha {
  right: -50px;
}

.flecha:hover {
  background: rgba(0, 0, 0, 0.6);
}

/* ------------------ IMÁGENES EN PROYECTOS REALIZADOS ------------------ */
.imagenes-servicio img {
  max-width: 480px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ------------------ RESPONSIVE ------------------ */
@media (max-width: 1024px) {
  nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  nav {
    text-align: center;
  }

  nav a {
    display: block;
    margin: 8px 0;
  }

  .banner-text {
    font-size: 1.5rem;
    top: 40%;
  }

  .servicios-grid .grid {
    grid-template-columns: 1fr;
  }

  .servicio img {
    width: 50px;
    height: 50px;
  }

  .servicio h3 {
    font-size: 1rem;
  }

  .servicio p {
    font-size: 0.9rem;
  }

  .info-boxes {
    flex-direction: column;
    align-items: center;
  }

  .intro-box {
    padding: 20px;
    text-align: center;
  }

  .intro-box h2 {
    font-size: 1.6rem;
  }

  footer {
    padding: 20px;
  }

  footer p {
    font-size: 0.9rem;
  }

  .imagenes-servicio {
    flex-direction: column;
  }

  .imagenes-servicio img {
    max-width: 90%;
  }
}
