﻿/* =========================
   INV CORE (shared)
   Fonts + Theme + Base + Header + Footer + Shared UI
   ========================= */

/* ===== Font (IRANSans) ===== */
@font-face {
    font-family: IranSans;
    font-style: normal;
    font-weight: bold;
    src: url('../fonts/eot/IRANSansWeb(FaNum)_Bold.eot');
    src: url('../fonts/eot/IRANSansWeb(FaNum)_Bold.eot?#iefix') format('embedded-opentype'), url('../fonts/woff/IRANSansWeb(FaNum)_Bold.woff') format('woff'), url('../fonts/ttf/IRANSansWeb(FaNum)_Bold.ttf') format('truetype');
}

@font-face {
    font-family: IranSans;
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/eot/IRANSansWeb(FaNum)_Medium.eot');
    src: url('../fonts/eot/IRANSansWeb(FaNum)_Medium.eot?#iefix') format('embedded-opentype'), url('../fonts/woff/IRANSansWeb(FaNum)_Medium.woff') format('woff'), url('../fonts/ttf/IRANSansWeb(FaNum)_Medium.ttf') format('truetype');
}

@font-face {
    font-family: IranSans;
    font-style: normal;
    font-weight: 300;
    src: url('../fonts/eot/IRANSansWeb(FaNum)_Light.eot');
    src: url('../fonts/eot/IRANSansWeb(FaNum)_Light.eot?#iefix') format('embedded-opentype'), url('../fonts/woff/IRANSansWeb(FaNum)_Light.woff') format('woff'), url('../fonts/ttf/IRANSansWeb(FaNum)_Light.ttf') format('truetype');
}

@font-face {
    font-family: IranSans;
    font-style: normal;
    font-weight: 200;
    src: url('../fonts/eot/IRANSansWeb(FaNum)_UltraLight.eot');
    src: url('../fonts/eot/IRANSansWeb(FaNum)_UltraLight.eot?#iefix') format('embedded-opentype'), url('../fonts/woff/IRANSansWeb(FaNum)_UltraLight.woff') format('woff'), url('../fonts/ttf/IRANSansWeb(FaNum)_UltraLight.ttf') format('truetype');
}

@font-face {
    font-family: IranSans;
    font-style: normal;
    font-weight: normal;
    src: url('../fonts/eot/IRANSansWeb(FaNum).eot');
    src: url('../fonts/eot/IRANSansWeb(FaNum).eot?#iefix') format('embedded-opentype'), url('../fonts/woff/IRANSansWeb(FaNum).woff') format('woff'), url('../fonts/ttf/IRANSansWeb(FaNum).ttf') format('truetype');
}

/* ===== Theme Variables ===== */
:root {
    --radius: 18px;
    --shadow: 0 20px 60px rgba(0,0,0,.35);
}

/* ===== Theme (Dark/Light) ===== */
body.inv-body[data-theme="dark"] {
    --bg: #0b1220;
    --panel: #0f1a2e;
    --card: #0e1730;
    --text: #e8eefc;
    --muted: #a8b4d6;
    --line: rgba(255,255,255,.10);
    --accent: #7c3aed;
    --accent2: #22c55e;
    --blue: #38bdf8;
    background-color: #070c16;
    background-image: radial-gradient(900px 520px at 80% -10%, rgba(124,58,237,.18), transparent 60%), radial-gradient(780px 460px at 15% 0%, rgba(34,197,94,.14), transparent 62%), linear-gradient(180deg, #050a14 0%, #070d1a 45%, #050a14 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

body.inv-body[data-theme="light"] {
    --bg: #f7f9ff;
    --panel: #ffffff;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --line: rgba(15,23,42,.10);
    --accent: #6d28d9;
    --accent2: #16a34a;
    --blue: #0284c7;
    background-color: #f7f9ff;
    background-image: radial-gradient(900px 520px at 80% -10%, rgba(109,40,217,.10), transparent 60%), radial-gradient(780px 460px at 15% 0%, rgba(22,163,74,.08), transparent 62%), linear-gradient(180deg, #f7f9ff 0%, #eef2ff 50%, #f7f9ff 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

/* ===== Base ===== */
* {
    box-sizing: border-box;
    font-family: IranSans, Tahoma, Arial, sans-serif;
}

html, body {
    height: 100%;
}

    body.inv-body {
        margin: 0;
        color: var(--text);
        direction: rtl;
    }

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.wrapx {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== Shared blocks ===== */
.section {
    padding: 22px 0;
}

.section__head {
    margin-bottom: 14px !important;
}

.section__head--row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.section__title {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
}

.section__sub {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
}

.seeall {
    padding: 10px 12px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel) 55%, transparent);
    border: 1px solid var(--line);
    color: var(--muted);
    font-weight: 900;
    font-size: 13px;
}

    .seeall:hover {
        color: var(--text);
        border-color: color-mix(in srgb, var(--accent) 22%, transparent);
    }

/* Chips */
.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chipx {
    padding: 8px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel) 55%, transparent);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.chipx--green {
    background: color-mix(in srgb, var(--accent2) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent2) 22%, transparent);
    color: color-mix(in srgb, var(--accent2) 85%, var(--text));
}

/* ===== Buttons / Inputs ===== */
.btnx {
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 13px;
    white-space: nowrap;
    background: color-mix(in srgb, var(--panel) 60%, transparent);
}

.btnx--primary {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, transparent), color-mix(in srgb, var(--accent) 55%, transparent));
    border-color: color-mix(in srgb, var(--accent) 25%, transparent);
    color: #fff;
}

.btnx--ghost {
    color: var(--text);
}

.btnx:hover {
    filter: brightness(1.03);
}

.btn {
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    padding: 0 14px;
    cursor: pointer;
    font-weight: 900;
    font-size: 14px;
    background: color-mix(in srgb, var(--panel) 60%, transparent);
    color: var(--text);
    text-align: center;
    line-height: 3;
}

.btn--primary {
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 92%, transparent), color-mix(in srgb, var(--accent) 55%, transparent));
    border-color: color-mix(in srgb, var(--accent) 25%, transparent);
    color: #fff;
}

.btn--ghost {
    background: color-mix(in srgb, var(--panel) 55%, transparent);
}

.btn:hover {
    filter: brightness(1.03);
}

.input, .select {
    width: 100%;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 55%, transparent);
    color: var(--text);
    padding: 0 12px;
    outline: none;
    margin-bottom:10px;
}

    .input::placeholder {
        color: color-mix(in srgb, var(--muted) 70%, transparent);
    }

.select {
    padding: 0 10px;
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 14px !important;
    flex-wrap: wrap;
}

.tabbtn {
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 60%, transparent);
    font-weight: 900;
    cursor: pointer;
    color: var(--text);
}

    .tabbtn.is-active,
    .tabbtn.active {
        background: color-mix(in srgb, var(--accent) 18%, transparent);
        border-color: color-mix(in srgb, var(--accent) 22%, transparent);
    }

.tabpanel {
    display: none;
}

    .tabpanel.active {
        display: block;
    }

/* ===== Fix: tabbtn contrast in Dark ===== */
body.inv-body[data-theme="dark"] .tabbtn {
    color: rgba(232,238,252,.88) !important;
    background: rgba(255,255,255,.04) !important;
    border: 1px solid rgba(255,255,255,.12) !important;
}

    body.inv-body[data-theme="dark"] .tabbtn:hover {
        color: rgba(232,238,252,.98) !important;
        background: rgba(255,255,255,.06) !important;
        border-color: rgba(255,255,255,.18) !important;
    }

    body.inv-body[data-theme="dark"] .tabbtn.is-active,
    body.inv-body[data-theme="dark"] .tabbtn.active {
        color: #fff !important;
        background: rgba(124,58,237,.30) !important;
        border-color: rgba(124,58,237,.42) !important;
        box-shadow: 0 10px 28px rgba(124,58,237,.18) !important;
    }

/* ===== Cards grid (shared) ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cards--featured {
    grid-template-columns: repeat(2, 1fr);
}

.cards--grid3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Featured card (cardx) */
.cardx {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 55%, transparent);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

    .cardx:hover {
        transform: translateY(-3px);
        border-color: color-mix(in srgb, var(--accent) 22%, transparent);
    }

.cardx--featured .cardx__media {
    height: 240px;
}

.cardx__media {
    position: relative;
    height: 190px;
    overflow: hidden;
}

    .cardx__media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.badge-top {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 8px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent2) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent2) 26%, transparent);
    font-size: 12px;
    font-weight: 900;
}

.badge-top--blue {
    background: color-mix(in srgb, var(--blue) 14%, transparent);
    border-color: color-mix(in srgb, var(--blue) 26%, transparent);
}

.cardx__body {
    padding: 12px;
}

.cardx__title {
    font-weight: 900;
    line-height: 1.9;
    max-height: 64px;
    overflow: hidden;
}

.cardx__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chip {
    padding: 7px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
    font-size: 12px;
    font-weight: 900;
}

.chip--muted {
    background: color-mix(in srgb, var(--panel) 55%, transparent);
    border-color: var(--line);
    color: var(--muted);
}

.cardx__foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.price {
    font-weight: 900;
}

    .price span {
        color: var(--muted);
        font-size: 12px;
        margin-right: 6px;
    }

.more {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
}

/* Latest card (recard) */
.recard {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 55%, transparent);
    transition: transform .18s ease, border-color .18s ease;
}

    .recard:hover {
        transform: translateY(-3px);
        border-color: color-mix(in srgb, var(--accent) 22%, transparent);
    }

.recard__img {
    position: relative;
    height: 243px;
    overflow: hidden;
}

    .recard__img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.recard__type {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 8px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
    font-size: 12px;
    font-weight: 900;
}

.recard__type--blue {
    background: color-mix(in srgb, var(--blue) 14%, transparent);
    border-color: color-mix(in srgb, var(--blue) 22%, transparent);
}

.recard__type--green {
    background: color-mix(in srgb, var(--accent2) 14%, transparent);
    border-color: color-mix(in srgb, var(--accent2) 22%, transparent);
}

.recard__body {
    padding: 12px;
}

.recard__title {
    font-weight: 900;
    line-height: 1.9;
    min-height: 56px;
}

.recard__row {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.recard__price {
    color: var(--text);
}

.recard__props {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

    .recard__props span {
        flex: 1 1 0; /* هرکدام سهم مساوی */
        text-align: center; /* متن وسط برای زیبایی */
        padding: 7px 10px;
        border-radius: 999px;
        border: 1px solid var(--line);
        background: color-mix(in srgb, var(--panel) 60%, transparent);
    }

.recard__agent {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.agent__avatar {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
    font-weight: 900;
    padding:1px;
}
    .agent__avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* بدون کشیدگی */
        display: block;
        border-radius: 12px;
    }

.special {
    position: absolute;
    top: 14px;
    left: -38px; /* به جای right */
    width: 120px;
    text-align: center;
    padding: 6px 0;
    background: #7c3aed;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    transform: rotate(-45deg); /* زاویه معکوس شد */
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
    z-index: 5;
}
.agent__name {
    color: var(--muted);
    font-weight: 900;
    font-size: 12px;
    flex: 1;
}

.agent__more {
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 60%, transparent);
    color: var(--muted);
    font-weight: 900;
    font-size: 12px;
}

/* ===== Fix: property type badge contrast in dark ===== */
body.inv-body[data-theme="dark"] .recard__type {
    color: #e6e9ff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.55);
    backdrop-filter: blur(6px);
}

    body.inv-body[data-theme="dark"] .recard__type:not(.recard__type--blue):not(.recard__type--green) {
        background: rgba(124,58,237,.42) !important;
        border-color: rgba(124,58,237,.60) !important;
    }

body.inv-body[data-theme="dark"] .recard__type--blue {
    color: #eaf6ff !important;
    background: rgba(2,132,199,.46) !important;
    border-color: rgba(56,189,248,.70) !important;
    box-shadow: 0 4px 18px rgba(2,132,199,.28);
}

body.inv-body[data-theme="dark"] .recard__type--green {
    color: #ecfff3 !important;
    background: rgba(22,163,74,.46) !important;
    border-color: rgba(34,197,94,.70) !important;
    box-shadow: 0 4px 18px rgba(22,163,74,.28);
}

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 65%, transparent);
    /*backdrop-filter: blur(14px);*/
    border-bottom: 1px solid var(--line);
    isolation: isolate;
}


.header__row {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 240px;
}

.brand__logo {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
    font-weight: 900;
}

.brand__logo--sm {
    width: 38px;
    height: 38px;
    border-radius: 14px;
}

body.inv-body[data-theme="dark"] .brand__logo {
    background: color-mix(in srgb, #ffffff 98%, transparent);
}

.brand__name {
    font-weight: 900;
    font-size: 15px;
    line-height: 1.2;
}

.brand__tag {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 3px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--panel) 55%, transparent);
    border: 1px solid var(--line);
}

.nav__link {
    padding: 10px 12px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
    transition: background .18s ease, color .18s ease;
}

    .nav__link:hover {
        background: color-mix(in srgb, var(--panel) 70%, transparent);
        color: var(--text);
    }

.header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btnTheme__ico {  
    font-weight: 900;
}

.btnTheme__txt {
    font-weight: 900;
    margin-right: 8px;
}

.burger {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 60%, transparent);
    display: none;
    cursor: pointer;
}

    .burger span {
        display: block;
        width: 18px;
        height: 2px;
        background: color-mix(in srgb, var(--text) 85%, transparent);
        margin: 5px auto;
        border-radius: 2px;
    }

/* Drawer */
.drawer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9999;
}

.drawer__panel {
    position: absolute;
    right: 0;
    top: 0;
    width: min(320px, 92vw);
    height: 100%;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: none;
    border-left: 1px solid var(--line);
    backdrop-filter: blur(14px);
    padding: 16px;
}

.drawer__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.drawer__title {
    font-weight: 900;
}

.drawer__close {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 60%, transparent);
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
}

.drawer__links a {
    display: block;
    padding: 12px 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 60%, transparent);
    margin-bottom: 10px;
    color: var(--muted);
    font-weight: 800;
}

    .drawer__links a:hover {
        color: var(--text);
        border-color: color-mix(in srgb, var(--accent) 22%, transparent);
    }

/* =========================
   Legacy Login Popup -> New Skin
========================= */

.container-popup {
    position: fixed;
    inset: 0;
    display: none; /* login.js کنترل می‌کند */
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.55);
    z-index: 9999;
    padding: 14px;
}

    .container-popup .popup {
        width: min(420px, 92vw);
        border-radius: 22px;
        border: 1px solid var(--line);
        background: color-mix(in srgb, var(--bg) 88%, transparent);
        backdrop-filter: blur(14px);
        overflow: hidden;
        box-shadow: var(--shadow);
    }

    .container-popup .popup-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 14px 14px 10px;
        border-bottom: 1px solid var(--line);
    }

    .container-popup #popup_haeder {
        font-weight: 900;
        font-size: 14px;
        color: var(--text);
    }

    .container-popup .hclosed {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        border: 1px solid var(--line);
        background: color-mix(in srgb, var(--panel) 60%, transparent);
        cursor: pointer;
        position: relative;
    }

        .container-popup .hclosed::before {
            content: "×";
            position: absolute;
            inset: 0;
            display: grid;
            place-items: center;
            font-size: 24px;
            color: var(--text);
        }

    /* بدنه */
    .container-popup .popup-content {
        padding: 14px;
    }

    /* input های قدیمی -> شبیه input */
    .container-popup .txt {
        width: 100%;
        height: 44px;
        border-radius: 14px;
        border: 1px solid var(--line);
        background: color-mix(in srgb, var(--panel) 55%, transparent);
        color: var(--text);
        padding: 0 12px;
        outline: none;
    }

        .container-popup .txt::placeholder {
            color: color-mix(in srgb, var(--muted) 70%, transparent);
        }

    /* دکمه‌ها */
    .container-popup .btn {
        height: 44px;
        border-radius: 14px;
        border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
        background: linear-gradient( 135deg, color-mix(in srgb, var(--accent) 92%, transparent), color-mix(in srgb, var(--accent) 55%, transparent) );
        color: #fff;
        font-weight: 900;
        cursor: pointer;
        margin-top: 10px;
        width: 100%;
    }

    /* لینک‌های داخل پاپ‌آپ */
    .container-popup a {
        color: color-mix(in srgb, var(--accent) 85%, var(--text));
        font-weight: 900;
    }

        .container-popup a:hover {
            color: var(--text);
        }

    /* پیام خطا */
    .container-popup .error-message {
        margin-top: 10px;
        padding: 10px 12px;
        border-radius: 14px;
        border: 1px solid color-mix(in srgb, #ef4444 35%, transparent);
        background: color-mix(in srgb, #ef4444 12%, transparent);
        color: #fecaca;
        font-weight: 800;
    }

body[data-theme="light"] .container-popup .error-message {
    color: #d32f2f; /* قرمز استاندارد و خوانا */
}

/* ===== Fix: center legacy login popup ===== */

.form .container-popup {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: none; /* login.js کنترل می‌کند */

    justify-content: center !important; /* وسط افقی */
    align-items: flex-start !important; /* بالا */

    padding-top: 60px !important; /* فاصله از بالا */
    background: rgba(0,0,0,.55) !important;
    z-index: 9999 !important;
}


    /* وقتی login.js نمایش می‌دهد (ممکنه block کند) */
    .form .container-popup[style*="display: block"],
    .form .container-popup[style*="display:block"],
    .form .container-popup.is-open {
        display: flex !important; /* مهم: block را به flex تبدیل می‌کنیم */
    }

    /* خود باکس پاپ‌آپ */
    .form .container-popup .popup {
        width: min(420px, 92vw) !important;
        margin: 0 auto !important;
    }

/* اگر والدها transform داشته باشند، fixed را خراب می‌کند */
.form, .form * {
    transform: none !important;
}



/* ===== Footer ===== */
.site-footer {
    margin-top: 18px;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg) 65%, transparent);
    backdrop-filter: blur(14px);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr .8fr 1fr;
    gap: 14px;
    padding: 22px 16px;
}

.foot__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.foot__title {
    font-weight: 900;
    font-size: 15px;
}

.foot__sub {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.foot__desc {
    margin-top: 10px;
    color: var(--muted);
    line-height: 2;
    font-size: 13px;
}

.foot .foot__title {
    margin-bottom: 10px;
}

.foot__link {
    display: block;
    padding: 10px 10px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 55%, transparent);
    color: var(--muted);
    font-weight: 800;
    margin-bottom: 8px;
}

    .foot__link:hover {
        color: var(--text);
        border-color: color-mix(in srgb, var(--accent) 22%, transparent);
    }

.foot__stats {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.fstat {
    flex: 1;
    padding: 12px 12px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 55%, transparent);
    border: 1px solid var(--line);
}

.fstat__n {
    font-weight: 900;
    font-size: 18px;
}

.fstat__t {
    color: var(--muted);
    font-size: 12px;
    margin-top: 6px;
}

.foot__contact {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 8px 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 55%, transparent);
    color: var(--muted);
    font-size: 13px;
}

    .foot__contact .k {
        font-weight: 900;
        color: color-mix(in srgb, var(--text) 85%, transparent);
    }

.foot__cta {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer__bottom {
    border-top: 1px solid var(--line);
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
}

.footer__mini a {
    color: var(--muted);
    font-weight: 800;
}

    .footer__mini a:hover {
        color: var(--text);
    }

.footer__mini span {
    margin: 0 8px;
    opacity: .7;
}

/* ===== Responsive ===== */
@media (max-width: 1040px) {
    .nav {
        display: none;
    }

    .burger {
        display: inline-block;
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 980px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .cards--featured {
        grid-template-columns: 1fr;
    }

    .cards--grid3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .btnx {
        padding:0 9px;
        font-size:11px;
    }
}

@media (max-width: 560px) {
    .header__actions .btnx--ghost:not(#btnTheme),
    .btnTheme__txt,
    .header__actions .btnx--primary {
        display: none;
    }

    .brand__logo{
        width:44px;
        height:44px;
    }
    .header__row {
        height:auto;
        padding:5px;
    }
    .brand{
        min-width:180px;
    }

    .brand__name {
        font-size: 12px;
    }
    .brand__tag{
        font-size:10px;
    }
    .cards, .cards--grid3 {
        grid-template-columns: 1fr;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 10px;
    }
    
}

.Loader {
    position: fixed;
    z-index: 999;
    height: 100%;
    width: 100%;
    top: 0;
    background: rgba(0, 0, 0, .5);
}

    .Loader .center {
        z-index: 1000;
        margin: 20vh auto;
        padding: 5px;
        width: 150px;
        height: 135px;
        background-color: White;
        border-radius: 10px;
        filter: alpha(opacity=90);
        opacity: .9;
        -moz-opacity: .9;
    }

        .Loader .center img {
            opacity: .9;
            /*width: 150px;
            height: 135px;*/
        }
/* Go up button (if you use it) */
.go-up {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--panel) 65%, transparent);
    backdrop-filter: blur(10px);
    display: none;
    cursor: pointer;
    z-index: 60;
}

    /* فلش کاملاً وسط */
    .go-up::before {
        content: "↑";
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -52%); /* سنتر واقعی اپتیکال */
        font-size: 20px;
        line-height: 1;
        color: var(--text);
        transition: transform .15s ease;
    }

    /* هاور */
    .go-up:hover::before {
        transform: translate(-50%, -60%);
    }

.sold {
    position: absolute;
    top: 18%;
    left: 0;
    width: 100%;
    text-align: center;
    background: linear-gradient(90deg,#1c3867,#2e5cb8);
    color: #fff;
    padding: 5px 0px;
    font-size: 3em;
    opacity: .6;
    z-index: 2;
}



/* =========================
   Pages
========================= */
/* wrapper like new pages */
.wrapx {
    width: min(1200px, calc(100% - 24px));
    margin: 0 auto;
}

/* page container */
.inv-page {
    padding: 18px 0 28px;
}

.inv-article {
    background: color-mix(in srgb, var(--card) 92%, transparent);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px 16px 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.inv-article__head {
    margin-bottom: 10px;
}

    .inv-article__head h1 {
        margin: 0;
        font-size: 20px;
        line-height: 1.7;
        position: relative;
        display: inline-block; /* مهم برای اینکه عرض افتر محدود به متن شود */
        padding-bottom: 6px; /* فاصله برای خط زیر */
    }

        .inv-article__head h1::after {
            content: "";
            position: absolute;
            right: 0;
            bottom: -4px;
            width: 60px;
            height: 2px;
            border-radius: 2px;
            background: linear-gradient( -90deg, var(--accent, #4f7cff), transparent );
            opacity: .8;
        }

.inv-article__content {
    line-height: 2.05;
    font-size: 15px;
    margin-right:8px;
}

    .inv-article__content img, .inv-article__content video {
        max-width: 100%;
        height: auto;
        border-radius: 14px;
    }

.inv-divider {
    height: 1px;
    background: var(--line);
    margin: 14px 0;
}

/* contact form card */
.inv-form {
    background: color-mix(in srgb, var(--bg) 70%, transparent);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
}

.inv-form__title {
    font-size: 16px;
    margin: 0 0 8px;
}

.inv-form .txt {
    width: 100%;
    box-sizing: border-box;
}

.inv-form .btn {
    width: 100%;
    border-radius: 12px;
    padding: 10px 12px;
}

.error-message, .success-message {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.error-message {
    background: rgba(255, 71, 87, .12);
    border: 1px solid rgba(255, 71, 87, .25);
}

.success-message {
    background: rgba(46, 213, 115, .12);
    border: 1px solid rgba(46, 213, 115, .25);
}

/* keywords + telegram */
.inv-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.divkeyword {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

    .divkeyword img {
        width: 16px;
        height: 16px;
    }

.telegram {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    text-decoration: none;
}

    .telegram img {
        width: 16px;
        height: 16px;
    }

/* 404 */
.inv-404 {
    background: color-mix(in srgb, var(--card) 92%, transparent);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

    .inv-404 h1 {
        margin: 0 0 8px;
        font-size: 22px;
    }

    .inv-404 img {
        width: 100%;
        height: auto;
        border-radius: 14px;
        display: block;
        margin-top: 10px;
    }

/* make old columns not break layout */
.maincolumn, .mCenter {
    float: none !important;
    width: 100% !important;
    margin: 0 auto !important;
}

.wrap {
    width: auto !important;
}
/* =========================
   END Pages
========================= */
/* ===== Title panel (h1 + views badge) ===== */
/* فقط پنلی که داخلش h1 و #lblViews کنار هم هستند */
.inv-panel__body:has(h1):has(#lblViews) {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

    /* عنوان */
    .inv-panel__body:has(h1):has(#lblViews) h1 {
        margin: 0;
        font-size: 18px;
        line-height: 1.9;
        font-weight: 900;
        flex: 1 1 auto;
        min-width: 0;
    }

    /* badge بازدید */
    .inv-panel__body:has(h1):has(#lblViews) #lblViews.inv-bq {
        flex: 0 0 auto;
        white-space: nowrap;
    }

/* موبایل */
@media (max-width:560px) {
    .inv-panel__body:has(h1):has(#lblViews) {
        flex-direction: column;
        align-items: stretch;
    }

        .inv-panel__body:has(h1):has(#lblViews) #lblViews.inv-bq {
            align-self: flex-start;
        }
}

