/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  position: relative;
  height: 100vh;
  background-image: url("../img/inicio.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #333;
  background-position: center 90px; /* Mueve la imagen 60px hacia abajo */
}

/* Menú */
.menu {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: whitesmoke;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  z-index: 1000;
}

.menu-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeInDown 0.8s ease-out forwards;
}

.logo img {
  height: 70px;
  width: auto;
  opacity: 0;
  animation: fadeInDown 1s ease-out forwards;
  animation-delay: 0.2s;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: green;
}

/* Contenido principal */
.content {
  max-width: 900px;
  margin: 100px auto 40px;
  padding: 0 20px;
  text-align: center;
  align-items: center;
}

.nav-links a.active {
  color: green;
  font-weight: bold;
  border-bottom: 2px solid green;
  transition: all 0.3s ease;
}

.localizacion-contenido {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.imagen-local img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.mapa-container {
  width: 100%;
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.problemas-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 20px;
}

.problema-card {
  background-color: #f5f5f5;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.problema-card:hover {
  transform: translateY(-4px);
}

.problema-card h2 {
  margin-bottom: 15px;
  color: #333;
  font-size: 1.2rem;
}

.problema-card p {
  color: #555;
  line-height: 1.6;
}

#inicio {
  padding-top: 80px; /* Ajusta según la altura de tu menú */
}

#body .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.1); /* Capa oscura semitransparente */
  z-index: 1;
}

#body .text-content {
  position: relative;
  z-index: 2;
  color: white;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
}

/* Responsive */
@media (min-width: 768px) {
  .problemas-grid {
    flex-direction: row;
  }

  .problema-card {
    flex: 1;
  }

  .localizacion-contenido {
    flex-direction: row;
    justify-content: space-between;
  }

  .imagen-local,
  .mapa-container {
    flex: 1;
  }

  .imagen-local {
    margin-right: 20px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    gap: 20px;
    font-size: 14px;
  }

  .logo img {
    height: 70px;
  }
}

/* Fade-in animation */
@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade-in desde abajo */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Clase para aplicar la animación al contenido */
.fade-in-section {
  opacity: 0;
  animation: fadeInUp 1s ease-out forwards;
  animation-delay: 0.5s;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}
