/* ============================================================
   VILLA ESPERANZA — nav.css
   Barra de navegación + selector de idioma con banderas
============================================================ */

#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 900;
  transition: background 0.4s, box-shadow 0.4s;
}
#nav.scrolled {
  background: rgba(26, 74, 90, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.2);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Logo */
.nav-logo {
  font-family: var(--ff-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.02em;
  line-height: 1;
  flex-shrink: 0;
}
.nav-logo em {
  display: block;
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.2em;
  font-family: var(--ff-body);
  color: var(--turq-lt);
  font-weight: 300;
  margin-top: 2px;
}

/* Links */
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0 auto;
}
.nav-links a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 100%;
  height: 1px;
  background: var(--turq);
  transition: right 0.3s ease;
}
.nav-links a:hover             { color: var(--white); }
.nav-links a:hover::after      { right: 0; }

/* CTA button in nav */
.nav-cta {
  background: var(--gold) !important;
  color: var(--ink) !important;
  padding: 9px 20px !important;
  border-radius: 2px;
  font-weight: 600 !important;
  font-size: 12px !important;
  letter-spacing: 0.14em !important;
  transition: background 0.2s !important;
}
.nav-cta::after   { display: none !important; }
.nav-cta:hover    { background: var(--gold-lt) !important; }

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid transparent;
  border-radius: 4px;
  padding: 5px 8px 5px 5px;
  cursor: pointer;
  font-family: var(--ff-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  transition: all 0.2s;
  white-space: nowrap;
}
.lang-btn .flag   { font-size: 16px; line-height: 1; }
.lang-btn:hover   { background: rgba(255,255,255,0.15); color: var(--white); border-color: rgba(255,255,255,0.2); }
.lang-btn.active  { background: rgba(255,255,255,0.14); color: var(--white); border-color: var(--turq); }

/* Hamburger */
#nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
}
#nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: all 0.3s;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  #nav-toggle { display: flex; }

  /* Flag-only on mobile: hide text label */
  .lang-btn { font-size: 0; padding: 5px 6px; gap: 0; }
  .lang-btn .flag { font-size: 20px; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(26, 74, 90, 0.98);
    backdrop-filter: blur(12px);
    padding: 20px var(--gutter);
    gap: 18px;
  }
}
