/* Reset y base */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f8f9fa;
  color: #333;
  line-height: 1.6;
}
header {
  background: #004a99;
  color: #fff;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}
header h1 {
  margin: 0;
  font-weight: 700;
  letter-spacing: 2px;
}
header p {
  margin: 0.3rem 0 1rem;
  font-size: 1.2rem;
  font-weight: 500;
  font-style: italic;
}
nav a {
  color: #cfe3ff;
  margin: 0 1.2rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}
nav a:hover {
  color: #fff;
}

/* Slider */
.slider {
  position: relative;
  overflow: hidden;
  height: 400px;
  max-width: 1000px;
  margin: 2rem auto;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
.slides {
  display: flex;
  width: 300%;
  animation: slide 12s infinite;
}
.slides img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 10px;
}
@keyframes slide {
  0% { transform: translateX(0); }
  33% { transform: translateX(-100%); }
  66% { transform: translateX(-200%); }
  100% { transform: translateX(0); }
}

/* Secciones */
section {
  background: #fff;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem 2.5rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease;
}
section:hover {
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}
section h2 {
  text-align: center;
  color: #004a99;
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  letter-spacing: 1.2px;
}

/* Grid servicios */
.grid {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
  justify-content: center;
}
.grid > div {
  flex: 1 1 280px;
  background: #f0f5fa;
  border-radius: 10px;
  padding: 1.8rem 1.5rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.grid > div:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}
.grid h3 {
  color: #003366;
  margin-bottom: 0.8rem;
}
.grid p {
  color: #555;
  font-size: 1rem;
}

/* Grid imagenes proyectos */
.grid-img {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(280px,1fr));
  gap: 1.4rem;
}
.grid-img img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.4s ease;
  cursor: pointer;
}
.grid-img img:hover {
  transform: scale(1.05);
}

/* Contacto */
#contacto p {
  font-size: 1.1rem;
  color: #444;
  text-align: center;
  margin-bottom: 1rem;
}

/* Mapa */
iframe {
  border-radius: 12px;
  margin-top: 1.5rem;
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
}

/* Botón WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 3px 8px rgba(37, 211, 102, 0.6);
  cursor: pointer;
  transition: background-color 0.3s ease;
  animation: bounceInRight 1s ease forwards;
  z-index: 1000;
}

.whatsapp-float:hover {
  background-color: #1ebe57;
}

.whatsapp-float img {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 0 1px rgba(0,0,0,0.2));
}


/* Animación mensaje que entra */
@keyframes bounceInRight {
  0% {
    opacity: 0;
    transform: translateX(150%) scale(0.8);
  }
  60% {
    opacity: 1;
    transform: translateX(-10%) scale(1.05);
  }
  80% {
    transform: translateX(5%) scale(0.95);
  }
  100% {
    transform: translateX(0) scale(1);
  }
}

/* Footer */
footer {
  background: #004a99;
  color: white;
  text-align: center;
  padding: 1.3rem 1rem;
  font-weight: 500;
  letter-spacing: 1px;
  margin-top: 4rem;
  user-select: none;
}

/* Responsividad básica */
@media (max-width: 768px) {
  .grid {
    flex-direction: column;
    gap: 1.5rem;
  }
  nav a {
    margin: 0 0.8rem;
  }
  section {
    padding: 1.5rem 1.5rem;
    margin: 1rem;
  }
  .slider {
    height: 250px;
  }
  .slides img {
    height: 250px;
  }
}
