/* ============================================================
   lang.css — Selector de idioma
   ============================================================ */

.lang-switcher {
  position: relative;
  display: inline-block;
}

/* Botón principal */
.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark, #1d293d);
  background: transparent;
  border: 1px solid rgba(29, 41, 61, 0.12);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lang-switcher__btn:hover {
  background: rgba(0, 153, 94, 0.08);
  border-color: rgba(0, 153, 94, 0.3);
}

.lang-switcher__btn i {
  font-size: 1rem;
  color: var(--primary-color, #00995e);
}

.lang-switcher__caret {
  font-size: 1rem !important;
  color: var(--text-light, #62748e) !important;
  transition: transform 0.2s ease;
}

.lang-switcher.open .lang-switcher__caret {
  transform: rotate(180deg);
}

.lang-switcher__current {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Menú dropdown */
.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 160px;
  padding: 0.35rem;
  margin: 0;
  list-style: none;
  background: #ffffff;
  border: 1px solid rgba(29, 41, 61, 0.08);
  border-radius: 0.75rem;
  box-shadow: 0 12px 28px rgba(29, 41, 61, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, visibility 0.2s ease,
    transform 0.2s ease;
  z-index: 60;
}

.lang-switcher.open .lang-switcher__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switcher__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark, #1d293d);
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}

.lang-switcher__item:hover {
  background: rgba(0, 153, 94, 0.08);
}

.lang-switcher__item.active {
  background: rgba(0, 153, 94, 0.12);
  color: var(--primary-color, #00995e);
  font-weight: 700;
}

.lang-switcher__flag {
  font-size: 1.1rem;
  line-height: 1;
}

/* En el nav mobile se alinea a la izquierda */
.nav__mobile .lang-switcher,
.navbar__mobile .lang-switcher {
  display: block;
  margin-top: 0.5rem;
}

.nav__mobile .lang-switcher__menu,
.navbar__mobile .lang-switcher__menu {
  position: static;
  opacity: 1;
  visibility: visible;
  transform: none;
  box-shadow: none;
  border: none;
  padding: 0;
  margin-top: 0.35rem;
  background: transparent;
}

/* Modo RTL para hebreo */
[dir="rtl"] .lang-switcher__menu {
  right: auto;
  left: 0;
}

[dir="rtl"] .lang-switcher__item {
  text-align: right;
}