/* ============================================================
   lang-menu.css — selector de idioma con banderas (5 idiomas) y
   tipografías de respaldo para chino y hindi.
   ============================================================ */
.lang-switcher[data-lang-menu] { position: relative; padding: 0; gap: 0; background: transparent; border: 0; }

/* Botón de cuenta (portal de soporte) y separador del submenú Soporte.
   (El portal de clientes ahora es billing.valladares.org.) */
.nav-account { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin-left: 8px; border-radius: 10px; color: #e2e8f0; background: rgba(255,255,255,.05); border: 1px solid var(--border, rgba(255,255,255,.12)); transition: border-color .2s, background .2s, color .2s; flex: none; }
.nav-account:hover { color: #fff; border-color: rgba(129,140,248,.6); background: rgba(99,102,241,.12); }
.products-menu .nav-sep { height: 1px; margin: 6px 8px; background: rgba(255,255,255,.08); }
@media (max-width: 768px) { .nav-account { margin-left: 0; margin-right: 8px; } }
.lang-switcher .lang-current {
    display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 11px;
    border-radius: 10px; cursor: pointer; font: 700 .78rem/1 var(--font-mono, monospace); letter-spacing: .5px;
    color: #e2e8f0; background: rgba(255,255,255,.05); border: 1px solid var(--border, rgba(255,255,255,.12));
    transition: border-color .2s, background .2s;
}
.lang-switcher .lang-current:hover, .lang-switcher.is-open .lang-current { border-color: rgba(129,140,248,.6); background: rgba(99,102,241,.12); }
.lang-switcher .flag { display: inline-flex; width: 22px; height: 15px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.18); flex: none; font-size: 0; }
.lang-switcher .flag svg { width: 100%; height: 100%; display: block; }
.lang-caret { opacity: .7; transition: transform .2s; }
.lang-switcher.is-open .lang-caret { transform: rotate(180deg); }
.lang-menu {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 1100; min-width: 214px;
    margin: 0; padding: 6px; list-style: none; border-radius: 14px;
    background: rgba(11, 16, 32, .97); border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 24px 50px -12px rgba(0,0,0,.8); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.lang-menu[hidden] { display: none; }
.lang-menu button {
    display: flex !important; align-items: center; gap: 11px; width: 100%; padding: 10px 12px !important;
    border-radius: 9px; border: 0; cursor: pointer; text-align: left;
    font: 600 .92rem/1.2 var(--font-sans, system-ui, sans-serif) !important; letter-spacing: 0 !important;
    color: #cbd5e1 !important; background: transparent !important; box-shadow: none !important;
}
.lang-menu button:hover { background: rgba(255,255,255,.07) !important; color: #fff !important; }
.lang-menu button.active { color: #fff !important; background: linear-gradient(135deg, rgba(34,211,238,.18), rgba(168,85,247,.22)) !important; }
.lang-menu button.active::after { content: "✓"; margin-left: auto; color: #67e8f9; }

/* Tipografías: Inter no trae ideogramas ni devanagari; se usan las del sistema. */
html[data-lang="zh"] body, html[lang="zh-CN"] body {
    font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}
html[data-lang="hi"] body, html[lang="hi"] body {
    font-family: "Inter", "Noto Sans Devanagari", "Kohinoor Devanagari", "Nirmala UI", "Mangal", sans-serif;
}
/* El interletrado negativo de los titulares apelmaza el chino y el hindi. */
html[data-lang="zh"] :is(h1, h2, h3, .sh-title, .xh-title, .xh-h2),
html[data-lang="hi"] :is(h1, h2, h3, .sh-title, .xh-title, .xh-h2) { letter-spacing: 0 !important; }
html[data-lang="hi"] :is(h1, h2, .sh-title, .xh-title) { line-height: 1.25 !important; }
html[data-lang="zh"] :is(.sh-title, .xh-title) { line-height: 1.18 !important; }
/* Etiquetas en mayúsculas: en chino/hindi no hay mayúsculas, se quita el espaciado. */
html[data-lang="zh"] :is(.studio-kicker, .work-eyebrow, .ext-tile-kicker, .sh-stats dt),
html[data-lang="hi"] :is(.studio-kicker, .work-eyebrow, .ext-tile-kicker, .sh-stats dt) { letter-spacing: .02em !important; }

@media (max-width: 560px) {
    .lang-switcher .lang-current { height: 34px; padding: 0 9px; gap: 6px; }
    .lang-menu { right: -48px; }
}

/* Botón: globo + bandera + nombre del idioma (en pantallas angostas, código) */
.lang-switcher .lang-globe { color: #a5b4fc; flex: none; }
.lang-switcher .lang-label { font-family: var(--font-sans, system-ui, sans-serif); font-weight: 600; font-size: .84rem; letter-spacing: 0; }
.lang-switcher .lang-code { display: none; }
@media (max-width: 1180px) { .lang-switcher .lang-label { display: none; } .lang-switcher .lang-code { display: inline; } }
@media (max-width: 400px) { .lang-switcher .lang-globe { display: none; } }

/* Aviso de la primera visita */
.lang-hint {
    position: absolute; right: 0; top: calc(100% + 12px); z-index: 1101; width: 268px;
    padding: 16px 16px 14px; border-radius: 16px; text-align: left;
    background: linear-gradient(160deg, rgba(30,27,75,.98), rgba(11,16,32,.98));
    border: 1px solid rgba(129,140,248,.5);
    box-shadow: 0 24px 50px -12px rgba(0,0,0,.85), 0 0 30px -8px rgba(99,102,241,.6);
    opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .3s; pointer-events: none;
}
.lang-hint.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.lang-hint::before { content: ""; position: absolute; top: -7px; right: 26px; width: 12px; height: 12px; transform: rotate(45deg); background: #1e1b4b; border-left: 1px solid rgba(129,140,248,.5); border-top: 1px solid rgba(129,140,248,.5); }
.lang-hint b { display: block; color: #fff; font-size: .98rem; margin-bottom: 4px; padding-right: 22px; }
.lang-hint p { margin: 0 0 12px; color: #cbd5e1; font-size: .84rem; line-height: 1.45; }
.lang-hint-x { position: absolute; top: 8px; right: 10px; width: 26px; height: 26px; border: 0; border-radius: 8px; cursor: pointer; font-size: 1.2rem; line-height: 1; color: #94a3b8; background: transparent; }
.lang-hint-x:hover { color: #fff; background: rgba(255,255,255,.08); }
.lang-hint-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.lang-hint-flag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 9px; cursor: pointer; font: 700 .72rem/1 var(--font-mono, monospace); color: #e2e8f0; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.lang-hint-flag:hover, .lang-hint-flag.active { border-color: #67e8f9; background: rgba(34,211,238,.14); color: #fff; }
.lang-hint .flag { display: inline-flex; width: 20px; height: 14px; border-radius: 3px; overflow: hidden; }
.lang-hint .flag svg { width: 100%; height: 100%; }
@media (max-width: 560px) { .lang-hint { right: -56px; width: min(268px, calc(100vw - 32px)); } .lang-hint::before { right: 82px; } }

/* Fila de idiomas en el pie */
.footer-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 18px 0; margin-top: 8px; border-top: 1px solid rgba(255,255,255,.06); }
.footer-langs-label { display: inline-flex; align-items: center; gap: 8px; color: #94a3b8; font-size: .86rem; }
.footer-langs-list { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-choice { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px; cursor: pointer; font: 600 .84rem/1 var(--font-sans, system-ui, sans-serif); color: #cbd5e1; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); transition: border-color .2s, background .2s, color .2s; }
.lang-choice:hover { color: #fff; border-color: rgba(129,140,248,.55); }
.lang-choice.active { color: #fff; border-color: rgba(34,211,238,.6); background: rgba(34,211,238,.1); }
.lang-choice .flag { display: inline-flex; width: 20px; height: 14px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.lang-choice .flag svg { width: 100%; height: 100%; }
@media (prefers-reduced-motion: reduce) { .lang-hint { transition: none; } }
