/* Selector de idioma — sitio Aldo Frías */
.aldo-lang-selector {
  position: relative;
  z-index: 110;
}

.aldo-lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: var(--l, #f8fafc);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  max-width: min(180px, 42vw);
}

.aldo-lang-trigger:hover,
.aldo-lang-selector.is-open .aldo-lang-trigger {
  border-color: var(--p, #6366f1);
  background: rgba(99, 102, 241, 0.15);
}

.aldo-lang-trigger:focus-visible {
  outline: 2px solid var(--p, #6366f1);
  outline-offset: 2px;
}

.aldo-lang-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aldo-lang-arrow {
  font-size: 0.55rem;
  opacity: 0.7;
  flex-shrink: 0;
}

.aldo-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.aldo-flag-img {
  width: 20px;
  height: auto;
  border-radius: 2px;
  object-fit: cover;
  display: block;
}

.aldo-flag-emoji {
  font-size: 1rem;
  line-height: 1;
}

.aldo-lang-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 200px;
  max-width: min(280px, 92vw);
  max-height: min(320px, 60vh);
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.aldo-lang-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--l, #f8fafc);
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.aldo-lang-option:hover,
.aldo-lang-panel [role="option"].is-selected .aldo-lang-option {
  background: rgba(99, 102, 241, 0.2);
}

.aldo-lang-option:focus-visible {
  outline: 2px solid var(--p, #6366f1);
  outline-offset: 1px;
}

.nav-lang-item {
  display: flex;
  align-items: center;
}

html, body {
  overflow-x: hidden;
}

body.aldo-rtl .legal-content ul {
  margin-right: 1.5rem;
  margin-left: 0;
}

body.aldo-rtl .header-row,
body.aldo-rtl .nav-l,
body.aldo-rtl .about-highlights,
body.aldo-rtl .hero-cta,
body.aldo-rtl .stats,
body.aldo-rtl .contact-g,
body.aldo-rtl .legal-links,
body.aldo-rtl .footer-logo,
body.aldo-rtl .soc {
  direction: rtl;
}

body.aldo-rtl .aldo-lang-panel {
  left: 0;
  right: auto;
}

.legal-disclaimer {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(99, 102, 241, 0.08);
  border-radius: 0.5rem;
  color: var(--m, #94a3b8);
  font-size: 0.85rem;
  font-style: italic;
}

@media (max-width: 768px) {
  .nav-lang-item {
    width: 100%;
    justify-content: center;
    padding-top: 0.25rem;
  }

  .aldo-lang-selector {
    width: 100%;
  }

  .aldo-lang-trigger {
    width: 100%;
    justify-content: center;
    max-width: none;
  }

  .aldo-lang-panel {
    left: 0;
    right: 0;
    min-width: unset;
  }
}
