/* Estilo del selector de idioma (compartido por todas las páginas). */
.am-lang {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 18px;
  vertical-align: middle;
}

/* Icono de globo a la izquierda */
.am-lang::before {
  content: "🌐";
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}

.am-lang-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  position: relative;
  z-index: 1;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background-color: var(--soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 34px 8px 36px;
  cursor: pointer;
  /* Flecha (chevron) personalizada */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239aa39e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 10px 6px;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}

.am-lang-select:hover {
  border-color: var(--primary);
  background-color: var(--surface);
}

.am-lang-select:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}

/* Las opciones nativas siempre legibles */
.am-lang-select option {
  color: #16201f;
  background: #ffffff;
}

@media (max-width: 540px) {
  .am-lang { margin-left: 12px; }
  .am-lang-select { padding: 7px 30px 7px 32px; font-size: 12.5px; }
}
