/* =======================================================================
   MOSAICA PLUS — i18n / language-switcher styles
   ======================================================================= */

/* ---------- Self-hosted ALK Sanet (Georgian display font) ----------
   ALK Sanet is not distributed via Google Fonts, so it is self-hosted
   here from /fonts/ and loaded with @font-face. woff2 -> woff -> ttf so
   modern browsers get the smallest file and older ones still resolve. */
@font-face {
    font-family: "ALK Sanet";
    src: url("../fonts/alk-sanet-webfont.woff2") format("woff2"),
         url("../fonts/alk-sanet-webfont.woff") format("woff"),
         url("../fonts/alk-sanet-webfont.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ---------- Multilingual font stacks ----------
   Plus Jakarta Sans does not cover Cyrillic or Georgian.
   We swap to script-appropriate fonts via the body language class.

   Georgian: ALK Sanet (self-hosted above) with Noto Sans Georgian as a
   fallback for any glyphs ALK Sanet does not cover.

   Russian: Manrope (covers Cyrillic). */

body.lang-ka,
body.lang-ka * {
    font-family: "ALK Sanet", "Noto Sans Georgian", "Plus Jakarta Sans", sans-serif !important;
}

body.lang-ru,
body.lang-ru * {
    font-family: "Manrope", "Plus Jakarta Sans", sans-serif !important;
}

/* Keep icon fonts intact regardless of language */
body.lang-ka .material-symbols-outlined,
body.lang-ru .material-symbols-outlined {
    font-family: "Material Symbols Outlined" !important;
}

body.lang-ka .fa,
body.lang-ka .fas,
body.lang-ka .far,
body.lang-ka .fab,
body.lang-ka .fa-brands,
body.lang-ka .fa-solid,
body.lang-ka .fa-regular,
body.lang-ru .fa,
body.lang-ru .fas,
body.lang-ru .far,
body.lang-ru .fab,
body.lang-ru .fa-brands,
body.lang-ru .fa-solid,
body.lang-ru .fa-regular {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

/* Looser letter-spacing reads better for non-Latin scripts on uppercase nav */
body.lang-ka [class*="tracking-["],
body.lang-ru [class*="tracking-["] {
    letter-spacing: 0.05em;
}

/* Headlines with very wide uppercase tracking break Georgian badly; tighten. */
body.lang-ka h1,
body.lang-ka h2,
body.lang-ka h3 {
    letter-spacing: 0;
}

/* ---------- Language switcher: desktop ---------- */

.lang-switch {
    position: relative;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.lang-toggle:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.lang-toggle .material-symbols-outlined {
    font-size: 18px;
}

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 14px);
    min-width: 170px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.97);
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
    z-index: 60;
}

.lang-menu.lang-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1.1rem;
    color: #111;
    font-size: 0.95rem;
    font-weight: 500;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.lang-option:last-child {
    border-bottom: 0;
}

.lang-option:hover {
    background: #f6f4ee;
}

.lang-option .lang-code {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: #8B8B8B;
    text-transform: uppercase;
}

.lang-option.lang-active {
    background: #0F0F0F;
    color: #fff;
}

.lang-option.lang-active .lang-code {
    color: #C7A66A;
}

.lang-option.lang-active:hover {
    background: #0F0F0F;
}

/* ---------- Language switcher: mobile (inside the mobile menu) ---------- */

.lang-switch-mobile {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.lang-switch-mobile .lang-option-mobile {
    padding: 0.6rem 1.1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: transparent;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}

.lang-switch-mobile .lang-option-mobile:hover {
    background: #fff;
    color: #000;
}

.lang-switch-mobile .lang-option-mobile.lang-active {
    background: #fff;
    color: #000;
}
