/* ============================================================
   Dhivehi / Thaana Language Support
   Font: Faruma (bundled in assets/fonts/Faruma.ttf)
   ============================================================ */

@font-face {
    font-family: 'Faruma';
    src: url('../fonts/Faruma.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Applied to individual translated nodes — does NOT flip the whole layout.
   Thaana glyphs render visually smaller than Latin at the same font-size,
   so we give Dhivehi text a small readability boost everywhere, and a
   bigger boost inside the public navigation where spacing is tight. */
.dv-text {
    font-family: 'Faruma', 'MV Boli', serif !important;
    direction: rtl;
    unicode-bidi: embed;
    letter-spacing: 0 !important;
    font-size: 1.08em;
    line-height: 1.65;
}

/* Slight overall readability bump across the page when Dhivehi is active */
body.lang-dv {
    font-size: 1.04rem;
}
body.lang-dv p,
body.lang-dv li,
body.lang-dv .card-text,
body.lang-dv .testi-text,
body.lang-dv .section-lead,
body.lang-dv .hero-sub {
    line-height: 1.75;
}

/* Bigger boost for Dhivehi text inside the public navigation */
.public-navbar-header .navbar-nav .nav-link .dv-text,
.public-navbar-header .navbar-nav .nav-link.dv-text {
    font-size: 1.35em;
    letter-spacing: 0 !important;
    line-height: 1.3;
    vertical-align: -0.08em;
}

/* Language toggle: make the ދިވެހި label larger too so it's clearly legible */
#lang-toggle-btn .dv-text {
    font-size: 1.15rem;
    line-height: 1;
}

/* Language toggle button */
#lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9) !important;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
    letter-spacing: 0.03em;
    line-height: 1.4;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
#lang-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.75);
    color: #fff !important;
}
#lang-toggle-btn:active {
    background: rgba(255, 255, 255, 0.28);
}
#lang-toggle-btn .lang-divider {
    opacity: 0.35;
    font-weight: 300;
    font-size: 0.7rem;
    margin: 0 0.1rem;
}
#lang-toggle-btn .dv-text {
    font-size: 0.85rem;
    direction: rtl;
    opacity: 0.85;
}

/* When Dhivehi is active, render the page font in Faruma for
   the body text only (not inputs/code) so tour names &
   descriptions typed in Thaana display correctly */
body.lang-dv {
    font-family: 'Faruma', 'MV Boli', serif;
}
body.lang-dv input,
body.lang-dv textarea,
body.lang-dv select,
body.lang-dv code,
body.lang-dv pre {
    font-family: inherit;
}
