/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* LOGO */
.logo-container {
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
  background-color: transparent;
}

.logo-img {
  height: auto;
  max-height: 50px;
  margin-top: 0.5rem;
}

/* NAVBAR */
.navbar {
  background-color: #fdfdf4;
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  position: relative;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* NAV LINKS (DESKTOP) */
.nav-links {
  max-width: 100%;
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 3em;
  transition: all 1s ease;
}

#nav-links a.active {
  border-bottom: 3px solid #a3b18a;
  font-weight: bold;
  color: #344e41;
}

.nav-links li a {
  text-decoration: none;
  color: rgb(99, 101, 93);
  font-weight: 500;
}

/* HAMBURGUESA */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
  padding: 0.5rem;
  align-self: flex-end;
  margin-bottom: 0.5rem;
  margin-right: 0.5rem;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: rgb(0, 0, 0);
  border-radius: 2px;
  transition: all 0.5s ease;
}

/* ----------- RESPONSIVE: MOBILE ----------- */
@media (max-width: 768px) {
  body.menu-open {
  overflow: hidden;
}
  .menu-toggle {
    display: flex;
  }

  .nav-links {
  position: fixed;
  top: 0;
  right: -100%;
  left: auto; 
  height: 100vh;
  overflow-y: auto;
  width: 70%;
  background-color: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(6px);
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 3.5em 1.5em;
  transition: right 0.3s ease;
  z-index: 9999;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
  text-align: center;
  }

  .nav-links.active {
  right: 0;
  top: 0;
  left: auto;
  position: fixed;
  border-bottom: 3px solid #a3b18a;
  font-weight: bold;
  }

  .nav-links.closing {
    animation: slideOut 0.3s ease forwards;
  }

  .nav-links li {
    width: 100%;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .nav-links.active li {
    opacity: 1;
    transform: translateX(0);
  }

  .nav-links li a {
    color: #344e41; /* ✅ legible en fondo claro */
    font-size: 1.1em;
    font-weight: 500;
    display: block;
    width: 100%;
    padding: 15px 20px;
    transition: background-color 0.7s ease, color 0.7s ease, padding-left 0.5s ease;
  }

  .nav-links li:hover a {
    background-color: rgba(163, 177, 138, 0.1); /* ✅ verde suave */
    color: #000;
    padding-left: 18%;
  }

  .close-btn-wrapper {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
  }

  .close-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #344e41;
    font-size: xx-large;
    z-index: 1002;
  }

  .close-menu svg {
    width: 32px;
    height: 32px;
    stroke: #344e41;
    transition: transform 0.3s ease, stroke 0.3s ease;
  }

  .close-menu:hover svg {
    transform: rotate(90deg);
    stroke: #ff6961;
  }

  .logo-img {
    max-height: 50px;
    margin-top: 0.5rem;
  }
}

/* ----------- FORZAR OCULTAR BOTÓN "✕" EN DESKTOP ----------- */
@media (min-width: 769px) {
  .close-btn-wrapper {
    display: none;
  }

  .nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3em;
    list-style: none;
    
  }
}

/* ANIMACIONES DE MENÚ */
@keyframes slideIn {
  from {
    right: -100%;
    opacity: 0;
  }
  to {
    right: 0;
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    right: 0;
    opacity: 1;
  }
  to {
    right: -100%;
    opacity: 0;
  }
}

/* BLOQUEAR SCROLL DEL FONDO CUANDO EL MENÚ ESTÁ ABIERTO */
body.menu-open {
  overflow: hidden;
}
