/* ===================================================================
   چندزبانگی: سوییچر زبان، نوار پیشنهاد زبان و فونت هر زبان
   همه‌ی فاصله‌ها منطقی‌اند تا در RTL و LTR بدون قاعده‌ی جدا درست بیفتند.
   =================================================================== */

/* --- فونت هر زبان ---------------------------------------------------
   main.css و main.rtl.css فونت همه‌چیز را از --font-vazir می‌گیرند.
   ترتیب هر پشته: Outfit برای حروف لاتین، وزیرمتن برای هر متن فارسی که
   هنوز ترجمه نشده (تا اندازه‌ی منو و دکمه‌ها با نسخه‌ی فارسی یکی بماند)،
   بعد فونت سیستمیِ خطِ همان زبان. وزیرمتن حروف چینی و سیریلیک ندارد و
   مرورگر برای آن‌ها خودکار سراغ فونت بعدی می‌رود؛ پس مربع خالی نمی‌بینیم. */
html[lang^="zh"] {
    --font-vazir: "Outfit", "Vazirmatn", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
}

html[lang^="ru"] {
    --font-vazir: "Outfit", "Vazirmatn", "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

html[lang^="tr"],
html[lang^="en"] {
    --font-vazir: "Outfit", "Vazirmatn", "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}

html[lang^="ar"] {
    --font-vazir: "Vazirmatn", "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
}

/* --- سوییچر زبان --- */
.lang-switcher__list,
.lang-switcher__menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lang-switcher__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.lang-switcher__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.6;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .2s ease, color .2s ease;
}

.lang-switcher__flag {
    font-size: 15px;
    line-height: 1;
}

.lang-switcher__link:focus-visible,
.lang-switcher__current:focus-visible {
    outline: 2px solid #FF6D45;
    outline-offset: 2px;
}

/* هدر: منوی کشویی با <details> — بدون جاوااسکریپت و قابل استفاده با کیبورد */
.lang-switcher--header {
    position: relative;
    display: inline-block;
    margin-inline: 12px;
}

.lang-switcher--header .lang-switcher__current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f1f4f7;
    color: #0B4654;
    font-size: 13px;
    line-height: 1.6;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.lang-switcher--header .lang-switcher__current::-webkit-details-marker {
    display: none;
}

.lang-switcher--header .lang-switcher__current::after {
    content: '';
    width: 6px;
    height: 6px;
    border-inline-end: 1.5px solid currentColor;
    border-block-end: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-block-start: -3px;
}

.lang-switcher--header[open] .lang-switcher__current::after {
    transform: rotate(-135deg);
    margin-block-start: 3px;
}

.lang-switcher--header .lang-switcher__menu {
    position: absolute;
    inset-block-start: calc(100% + 8px);
    inset-inline-end: 0;
    z-index: 1060;
    min-width: 170px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e3e7ee;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(11, 70, 84, .16);
}

.lang-switcher--header .lang-switcher__menu li {
    display: block;
    margin: 0;
}

.lang-switcher--header .lang-switcher__menu .lang-switcher__link {
    display: flex;
    width: 100%;
    border-radius: 8px;
    color: #0B4654;
}

.lang-switcher--header .lang-switcher__menu .lang-switcher__link:hover {
    background: #f1f4f7;
}

.lang-switcher--header .lang-switcher__menu .lang-switcher__link.is-current {
    background: #fff1ea;
    color: #c2410c;
    font-weight: 600;
}

/* --- نوار باریک بالای هدر ---
   منوی زبان باید روی همه‌ی لایه‌های سایت باز شود: بالاتر از هدر (۱۰۰۰)،
   نوار نرخ (۹۹۹)، نوار پیشنهاد زبان (۱۰۸۰) و ویجت تماس (۱۰۹۰). فقط منوی
   کناری و پرده‌اش که عمداً کل صفحه را می‌پوشانند بالاترند. */
.site-topbar {
    position: relative;
    z-index: 1100;
    background: #0B4654;
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
}

.site-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
}

.site-topbar__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-topbar__contact li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.site-topbar__contact i {
    color: #FF6D45;
}

.site-topbar a {
    color: rgba(255, 255, 255, .9);
    text-decoration: none;
}

.site-topbar a:hover {
    color: #fff;
}

.site-topbar .lang-switcher--header {
    margin-inline: 0;
}

.site-topbar .lang-switcher--header .lang-switcher__current {
    padding: 3px 12px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.site-topbar .lang-switcher__current {
    white-space: nowrap;
}

/* گوشی: فقط تلفن و زبان؛ هم‌وزن .site-topbar__contact li تا واقعاً پنهان شود */
@media (max-width: 575px) {
    .site-topbar__contact .site-topbar__email {
        display: none;
    }
}

/* فوتر: فهرست کامل */
.lang-switcher--footer {
    margin-top: 18px;
}

.lang-switcher--footer .lang-switcher__link {
    color: rgba(255, 255, 255, .85);
    border: 1px solid rgba(255, 255, 255, .25);
}

.lang-switcher--footer .lang-switcher__link:hover,
.lang-switcher--footer .lang-switcher__link:focus-visible {
    color: #fff;
    border-color: rgba(255, 255, 255, .6);
}

.lang-switcher--footer .lang-switcher__link.is-current {
    background: var(--brand-orange-strong, #C84516);
    border-color: var(--brand-orange-strong, #C84516);
    color: #fff;
}

/* --- نوار پیشنهاد زبان: ارتفاع ثابت و بالای صفحه، بدون پوشاندن هدر --- */
.locale-suggest {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 18px;
    padding: 10px 16px;
    background: #fff1ea;
    border-bottom: 1px solid #fcd9c7;
    color: #7a2e12;
    font-size: 14px;
    position: relative;
    z-index: 1080;
}

.locale-suggest__text {
    margin: 0;
    color: #7a2e12;
}

.locale-suggest__actions {
    display: flex;
    gap: 10px;
}

.locale-suggest__switch,
.locale-suggest__stay {
    padding: 5px 14px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    cursor: pointer;
    text-decoration: none;
}

.locale-suggest__switch {
    background: var(--brand-orange-strong, #C84516);
    color: #fff;
    border: 1px solid var(--brand-orange-strong, #C84516);
}

.locale-suggest__switch:hover {
    color: #fff;
    background: #A93A12;
}

.locale-suggest__stay {
    background: transparent;
    color: #7a2e12;
    border: 1px solid #f0b79c;
}

/* --- متن فارسیِ هنوز ترجمه‌نشده در زبان‌های چپ‌چین ---
   تا ترجمه منتشر نشده، متن فارسی جای ترجمه می‌آید. جهت پاراگراف از نخستین حرفش
   تعیین می‌شود تا نقطه‌ی پایان جمله‌ی فارسی سر سطر نیفتد؛ متن انگلیسی دست نمی‌خورد. */
html[dir="ltr"] :is(p, li, h1, h2, h3, h4, h5, h6, dt, dd, blockquote, figcaption, td, th, label, summary) {
    unicode-bidi: plaintext;
}

/* --- اصلاحات نسخه‌ی چپ‌چین ------------------------------------------
   تصویر زمینه‌ی هیروی صفحه‌ی اصلی برای راست‌چین ترکیب شده است (فضای خالی
   سمت راست برای متن). در چپ‌چین متن به چپ می‌آید و روی کشتی و هواپیما
   می‌افتد؛ تصویر آینه می‌شود تا فضای خالی دوباره پشت متن قرار بگیرد. */
html[dir="ltr"] .elementor-element-622b720 {
    background-image: none !important;
    position: relative;
    isolation: isolate;
}

html[dir="ltr"] .elementor-element-622b720::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 30px;
    background: url('/assets/img/img-1-5.webp') center / cover no-repeat;
    transform: scaleX(-1);
}

/* --- هدف‌های لمسی در گوشی (دست‌کم ۴۴×۴۴) ---
   تلفن و دکمه‌ی زبان نوار بالا و دکمه‌های نوار پیشنهاد زبان تک‌اند: ناحیه‌ی لمس
   نامرئی. دکمه‌ی زبان ::after را برای فلش دارد، پس ناحیه‌اش ::before است.
   گزینه‌های منوی زبان و زبان‌های فوتر روی هم یا کنار هم‌اند: خودشان بلندتر
   می‌شوند یا فاصله‌ی ردیفشان بیشتر. */
@media (max-width: 767px) {
    .site-topbar__contact a,
    .site-topbar .lang-switcher__current,
    .locale-suggest__switch,
    .locale-suggest__stay,
    .lang-switcher--footer .lang-switcher__link {
        position: relative;
    }

    .site-topbar__contact a::after,
    .site-topbar .lang-switcher__current::before,
    .locale-suggest__switch::after,
    .locale-suggest__stay::after,
    .lang-switcher--footer .lang-switcher__link::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: max(100%, 44px);
        height: max(100%, 44px);
        transform: translate(-50%, -50%);
    }

    .site-topbar .lang-switcher__menu .lang-switcher__link {
        min-height: 44px;
    }

    /* زبان‌های فوتر ۳۰ پیکسل‌اند؛ فاصله‌ی ردیف ۱۴ تا ناحیه‌ی ۴۴ پیکسلی‌شان روی هم نیفتد */
    .lang-switcher--footer .lang-switcher__list {
        row-gap: 14px;
    }
}
