/* ============================================================
   WildXexplore — Selector de idioma (ES / EN / FR / PT / DE)
   Lo usan todas las paginas. No necesita JavaScript: es un
   <details> que se abre y se cierra solo.
   ============================================================ */
.lang {
  position: relative; flex-shrink: 0;
  margin-left: clamp(1rem, 2.5vw, 2rem);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  z-index: 1001;
}
.lang summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.42rem 0.7rem;
  border: 1px solid rgba(255,255,255,0.16); border-radius: 999px;
  color: #F5F5F0; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em;
  background: rgba(8,8,8,0.35);
  transition: border-color 0.25s ease, color 0.25s ease;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after {
  content: ""; width: 6px; height: 6px; margin-left: 0.1rem;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform 0.25s ease;
}
.lang[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.lang summary:hover,
.lang[open] summary { border-color: #FF6B35; color: #FF6B35; }
.lang summary svg { width: 15px; height: 15px; flex-shrink: 0; }

.lang ul {
  position: absolute; right: 0; top: calc(100% + 0.5rem);
  min-width: 170px; list-style: none; margin: 0; padding: 0.35rem;
  background: rgba(15,15,15,0.98); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,107,53,0.22); border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}
.lang li a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.55rem 0.75rem; border-radius: 8px;
  color: rgba(245,245,240,0.78); text-decoration: none;
  font-size: 0.9rem; font-weight: 500; letter-spacing: 0;
  text-transform: none;
}
.lang li a span { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; opacity: 0.55; }
.lang li a:hover { background: rgba(255,107,53,0.1); color: #F5F5F0; }
.lang li a[aria-current="true"] { color: #FF6B35; }
.lang li a[aria-current="true"] span { opacity: 1; }

/* Portada: en movil el menu de enlaces se oculta y queda la
   hamburguesa; el selector se coloca justo antes de ella. */
@media (max-width: 768px) {
  .nav .lang { margin-left: auto; }
  .nav .lang + .nav-burger { margin-left: 0.8rem; }
}
/* Paginas interiores: la marca ocupa el hueco central */
.l-nav .lang, .nav-brand + .lang { margin-left: 1rem; }

/* Por si alguna palabra larga (aleman, frances) no cabe en un titulo en movil */
.section-title, .l-h2, .l-title { overflow-wrap: break-word; }
