/* NAV — origen: sections/nav.html
   Fase 2: fondo verde que aparece con fundido, header que se esconde al bajar y vuelve al subir,
   íconos con sombra sutil (se leen sobre el video claro) y menú con entrada animada + hojas.
   Todas las animaciones las hace js/nav.js con GSAP (sin transiciones CSS en esos elementos). */
:root {
  --mose-verde-img: url('../assets/img/sitio/fondo-verde.webp');
}

.mose-custom-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
}

/* Fondo al hacer scroll: capa propia para poder hacer fundido (GSAP anima su opacity) */
.nav-bg {
  position: absolute; inset: 0;
  background-image: var(--mose-verde-img);
  background-size: cover;
  box-shadow: 0 4px 20px rgba(0,0,0,0.45);
  opacity: 0;
}

.nav-container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.simple-logo-img {
  width: 120px;
  height: auto;
  filter: brightness(0) invert(1) drop-shadow(0 1px 6px rgba(0,0,0,0.35));
  transition: transform 0.3s ease;
}
.nav-logo-simple:hover .simple-logo-img { transform: scale(1.05); }

/* BOTÓN HAMBURGUESA */
.mobile-toggle {
  display: flex; flex-direction: column; gap: 7px;
  cursor: pointer; background: none; border: 0; padding: 8px 0;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.45));
}
.mobile-toggle span { display: block; width: 30px; height: 1.5px; background-color: var(--mose-crema); }

/* MENÚ OVERLAY (oculto hasta que nav.js lo abre) */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  background-image: var(--mose-verde-img);
  background-size: cover;
  z-index: 10000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden;
  visibility: hidden;
}

.menu-leaves { position: absolute; inset: 0; pointer-events: none; }
.menu-leaves .leaf-group--izq  { left: 0; top: 0; width: clamp(120px, 17vw, 240px); }
.menu-leaves .leaf-group--der  { right: 0; top: 28%; width: clamp(90px, 12vw, 180px); }
.menu-leaves .leaf-group--ramo { --rw: min(clamp(280px, 52vw, 640px), 62vh); left: 50%; bottom: 0; width: var(--rw); margin-left: calc(var(--rw) / -2); }
/* Pantallas bajas: las hojas laterales suben para no tocar los links */
@media (max-height: 720px) {
  .menu-leaves .leaf-group--izq { top: -22%; }
  .menu-leaves .leaf-group--der { top: 42%; }
}

.mobile-links {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  width: 80%; max-width: 400px; max-height: 90vh; overflow-y: auto;
}

.menu-item-wrapper {
  width: 100%; text-align: center;
  border-bottom: 1px solid rgba(212, 197, 165, 0.2);
  padding: 12px 0;
}
.menu-item-wrapper:last-child { border-bottom: none; }

.mobile-links a {
  text-decoration: none; color: var(--mose-crema);
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem; font-weight: 300;
  text-transform: uppercase; letter-spacing: 0.25em;
  transition: color 0.4s ease, transform 0.4s ease, letter-spacing 0.4s ease; display: inline-block;
}
.mobile-links a:hover { color: var(--mose-dorado); transform: translateX(10px); letter-spacing: 0.35em; }
.mobile-links a.highlight { color: var(--mose-dorado); font-weight: 400; }

.close-btn {
  position: absolute; top: 30px; right: 40px; z-index: 2;
  font-size: 2.5rem; line-height: 1; cursor: pointer; color: var(--mose-crema);
  font-weight: 200; background: none; border: 0; padding: 0;
  font-family: 'Outfit', sans-serif;
}

@media (max-width: 900px) {
  .nav-container { padding: 15px 25px; }
  .simple-logo-img { width: 100px; }
  .close-btn { top: 22px; right: 25px; }
}
