/* ═══════════════════════════════════════════════════════════
   Melk Applied — International real-estate collaboration
   Architectural luxury: deeper & more refined than HVAC/Shop
   Fonts: loaded once from templates/melk-page.php (do not @import —
   duplicate Google CSS blocked parse and doubled remote font downloads).
═══════════════════════════════════════════════════════════ */

:root {
    --ma-navy: #071525;
    --ma-ink: #0E1C2E;
    --ma-slate: #243447;
    --ma-muted: #6B7A8D;
    --ma-line: #D8E0EA;
    --ma-paper: #FFFFFF;
    --ma-mist: #F3F6FA;
    --ma-gold: #C9A24D;
    --ma-gold-soft: #F7F0DE;
    --ma-sky: #3A7CA5;
    --ma-shadow: 0 28px 70px rgba(7, 21, 37, .12);
    --ma-font: 'Vazirmatn', 'Outfit', system-ui, sans-serif;
    --ma-display: 'Cormorant Garamond', 'Vazirmatn', Georgia, serif;
    --ma-ui: 'Outfit', 'Vazirmatn', system-ui, sans-serif;
}

body.melk-body {
    margin: 0;
    background: var(--ma-paper);
    font-family: var(--ma-font);
    color: var(--ma-ink);
}

.melk-app.melk-app--landing.lp-wrap,
.melk-app.ma-applied {
    min-height: 100vh;
    background: var(--ma-paper);
    color: var(--ma-ink);
}

/* فوترِ لندینگ به کفِ صفحه می‌چسبد.
   بدونِ این، قالب یک بلوکِ `min-height:100vh` بود و فوتر بلافاصله بعد از
   محتوا می‌نشست؛ با محتوای کوتاه، فوتر «وسطِ صفحه» رها می‌شد و زیرش نوارِ
   خالیِ بلندی می‌ماند — دقیقاً همان خطِ سیاهِ اضافیِ وسطِ صفحه. ستون‌کردنِ
   قالب و `margin-top:auto` روی فوتر، همان را به کف می‌برد. */
.melk-app.melk-app--landing.lp-wrap {
    display: flex;
    flex-direction: column;
}
.melk-app--landing > .ma-footer { margin-top: auto; }

/* Override old purple landing when applied is present */
.ma-applied .melk-hero,
.ma-applied .em-portal-hero { display: none !important; }
.ma-applied .melk-features { display: none !important; }
.ma-applied .melk-header:not(.ma-header) { display: none !important; }

/* ── Utility ── */
.ma-util {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    padding: 9px 48px;
    background: var(--ma-navy);
    color: rgba(255,255,255,.55);
    font-size: .74rem;
    letter-spacing: .02em;
}
.ma-util a {
    color: rgba(255,255,255,.62);
    text-decoration: none;
    transition: color .2s;
}
.ma-util a:hover { color: var(--ma-gold); }
.ma-util__gold { color: var(--ma-gold) !important; font-weight: 700; }

/* ── Header ── */
.ma-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 10px 32px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid transparent;
    transition: box-shadow .3s, border-color .3s;
}
.ma-header--scrolled {
    box-shadow: 0 10px 40px rgba(7, 21, 37, .08);
    border-bottom-color: var(--ma-line);
}
.ma-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}
.ma-brand__mark {
    width: 36px; height: 36px;
    border-radius: 10px;
    background:
        linear-gradient(145deg, var(--ma-navy) 0%, var(--ma-slate) 60%, #1a3048 100%);
    color: var(--ma-gold);
    display: grid; place-items: center;
    font-family: var(--ma-display);
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 8px 20px rgba(7, 21, 37, .24);
    border: 1px solid rgba(201, 162, 77, .35);
}
.ma-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.ma-brand__name {
    font-family: var(--ma-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -.02em;
}
.ma-brand__name em {
    font-style: italic;
    color: var(--ma-gold);
    font-weight: 600;
}
.ma-brand__sub {
    font-family: var(--ma-ui);
    font-size: .58rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ma-muted);
    font-weight: 600;
    margin-top: 2px;
}
.ma-nav {
    display: flex; align-items: center; gap: 2px;
    margin-right: auto;
}
.ma-nav a, .ma-nav button {
    color: var(--ma-ink);
    text-decoration: none;
    font-size: .84rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    background: none; border: none;
    cursor: pointer; font-family: inherit;
    transition: background .2s, color .2s;
}
.ma-nav a:hover, .ma-nav button:hover {
    background: var(--ma-mist);
    color: var(--ma-sky);
}
.ma-header__cta {
    display: inline-flex;
    padding: 8px 16px;
    background: var(--ma-navy);
    color: #fff !important;
    border: none; border-radius: 4px;
    font-weight: 700; font-size: .82rem;
    cursor: pointer; font-family: inherit;
    box-shadow: 0 8px 20px rgba(7, 21, 37, .22);
    transition: transform .2s, background .2s;
}
.ma-header__cta:hover {
    background: #0f2740;
    transform: translateY(-1px);
}
.ma-header__cta--gold {
    background: linear-gradient(135deg, #D4AF61, var(--ma-gold));
    color: var(--ma-navy) !important;
    box-shadow: 0 8px 20px rgba(201, 162, 77, .32);
}

/* ── Hero — compact landing band ── */
.ma-hero {
    position: relative;
    min-height: min(40vh, 320px);
    display: grid;
    align-content: end;
    overflow: hidden;
    background: var(--ma-navy);
}
.ma-hero__media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(7,21,37,.88) 0%, rgba(7,21,37,.55) 42%, rgba(7,21,37,.25) 100%),
        linear-gradient(180deg, transparent 40%, rgba(7,21,37,.92) 100%),
        url('/acc-engine/assets/img/portals/melk/hero-skyline.jpg') center 30%/cover no-repeat;
}
.ma-hero__grain {
    position: absolute; inset: 0; pointer-events: none; z-index: 1;
    opacity: .04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.ma-hero__content {
    position: relative;
    z-index: 2;
    padding: 28px 48px 36px;
    max-width: 720px;
    animation: ma-rise 1s cubic-bezier(.22,1,.36,1) both;
}
@keyframes ma-rise {
    from { opacity: 0; transform: translateY(36px); }
    to   { opacity: 1; transform: none; }
}
.ma-hero__brand {
    font-family: var(--ma-display);
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -.03em;
    line-height: 1;
}
.ma-hero__brand span { color: var(--ma-gold); font-style: italic; }
.ma-hero h1 {
    margin: 0 0 8px;
    font-family: var(--ma-display);
    font-size: clamp(1.25rem, 2.8vw, 1.85rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -.02em;
}
.ma-hero h1 em {
    font-style: italic;
    color: var(--ma-gold);
}
.ma-hero__lead {
    margin: 0 0 16px;
    max-width: 480px;
    font-size: .92rem;
    line-height: 1.6;
    color: rgba(255,255,255,.72);
}
.ma-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* شبکهٔ کاشیِ دسترسیِ سریع — هم‌الگویِ ha-apps پورتالِ خدمات، برایِ
   جمع‌وجورشدنِ اولین صفحه. */
.ma-apps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    max-width: 1200px;
    margin: 32px auto 40px;
    padding: 0 24px;
}
.ma-app {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 7px; min-height: 84px; padding: 12px 6px;
    border-radius: 16px; border: 1px solid var(--ma-line);
    background: var(--ma-paper); text-decoration: none; color: var(--ma-ink);
    font-family: inherit; transition: transform .12s ease, box-shadow .12s ease;
}
.ma-app:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 23, 42, .1); }
.ma-app:active { transform: translateY(0); }
.ma-app__icon {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 13px; font-size: 1.3rem; line-height: 1;
}
.ma-app__label { font-size: .74rem; font-weight: 700; text-align: center; line-height: 1.4; }
.ma-app--blue  .ma-app__icon { background: #E0F2FE; }
.ma-app--green .ma-app__icon { background: #DCFCE7; }
.ma-app--gold  .ma-app__icon { background: var(--ma-gold-soft); }
.ma-app--aux   .ma-app__icon { background: #F1F5F9; }
@media (max-width: 560px) {
    .ma-apps { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 12px; gap: 8px; }
    .ma-app__icon { width: 38px; height: 38px; font-size: 1.2rem; }
}

/* لندینگ فقط دکمه‌ها: بخش‌هایِ زیرِ شبکهٔ کاشی پنهان‌اند تا کاربر با یک
   کاشی خودش انتخاب کند کدام‌یک را ببیند — نه حذف، چون هر بخش فرمِ
   واقعی دارد. */
.ma-panel { display: none; }
.ma-panel.is-active { display: block; }
/* ma-reveal با اسکرول محقق می‌شود؛ داخلِ پنلی که تازه نمایان شده هنوز
   دیده نشده، پس بدونِ این override نامرئی می‌ماند. */
.ma-panel.is-active .ma-reveal { opacity: 1 !important; transform: none !important; }
.ma-panel-back { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.ma-panel-back[hidden] { display: none; }

.ma-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: 4px;
    font-family: inherit; font-weight: 700; font-size: .88rem;
    cursor: pointer; border: none; text-decoration: none;
    transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.ma-btn--gold {
    background: linear-gradient(135deg, #E0C070, var(--ma-gold));
    color: var(--ma-navy);
    box-shadow: 0 12px 32px rgba(201, 162, 77, .4);
}
.ma-btn--gold:hover { transform: translateY(-2px); }
.ma-btn--ghost {
    background: rgba(255,255,255,.08);
    color: #fff;
    border: 1px solid rgba(255,255,255,.35);
    backdrop-filter: blur(8px);
}
.ma-btn--ghost:hover {
    background: rgba(255,255,255,.16);
    transform: translateY(-2px);
}
.ma-btn--dark {
    background: var(--ma-navy);
    color: #fff;
}
.ma-btn--outline {
    background: transparent;
    color: var(--ma-ink);
    border: 1.5px solid var(--ma-line);
}
.ma-btn--outline:hover {
    border-color: var(--ma-sky);
    color: var(--ma-sky);
}

/* ── Sections ── */
.ma-section { padding: 80px 48px; }
.ma-section--mist { background: var(--ma-mist); }
.ma-section--navy {
    background: linear-gradient(160deg, #071525 0%, #12263a 55%, #071525 100%);
    color: #fff;
}
.ma-section__head { max-width: 700px; margin: 0 0 44px; }
.ma-kicker {
    display: inline-block;
    font-family: var(--ma-ui);
    font-size: .68rem; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase;
    color: var(--ma-gold); margin-bottom: 12px;
}
.ma-section--mist .ma-kicker,
.ma-section:not(.ma-section--navy) .ma-kicker { color: var(--ma-sky); }
.ma-section__head h2 {
    margin: 0 0 12px;
    font-family: var(--ma-display);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.15;
}
.ma-section__head p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--ma-muted);
}
.ma-section--navy .ma-section__head p { color: rgba(255,255,255,.65); }

/* Pillars */
.ma-pillars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--ma-line);
    border-radius: 2px;
    overflow: hidden;
    background: #fff;
}
.ma-pillar {
    padding: 36px 28px;
    border-left: 1px solid var(--ma-line);
    transition: background .3s;
    position: relative;
}
.ma-pillar:first-child { border-left: none; }
.ma-pillar::before {
    content: '';
    position: absolute; top: 0; right: 0; left: 0; height: 3px;
    background: var(--ma-gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .35s ease;
}
.ma-pillar:hover { background: var(--ma-gold-soft); }
.ma-pillar:hover::before { transform: scaleX(1); }
.ma-pillar__num {
    font-family: var(--ma-display);
    font-size: 2rem;
    color: var(--ma-gold);
    font-weight: 700;
    display: block; margin-bottom: 12px;
}
.ma-pillar strong {
    display: block; margin-bottom: 8px;
    font-size: 1.1rem; font-weight: 700;
}
.ma-pillar span { font-size: .92rem; color: var(--ma-muted); line-height: 1.6; }

/* Stats band */
.ma-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}
.ma-stat { text-align: center; }
.ma-stat strong {
    display: block;
    font-family: var(--ma-display);
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 700;
    color: var(--ma-gold);
    letter-spacing: -.03em;
}
.ma-stat span {
    font-size: .88rem;
    color: rgba(255,255,255,.6);
    letter-spacing: .04em;
}

/* Access portals */
.ma-portals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 1180px;
    margin: 0 auto;
}
.ma-portal {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 8px; padding: 26px 22px;
    background: #fff;
    border: 1px solid var(--ma-line);
    border-radius: 2px;
    cursor: pointer; text-align: right;
    font-family: inherit; color: inherit;
    transition: border-color .25s, transform .25s, box-shadow .3s;
    position: relative; overflow: hidden;
}
.ma-portal::after {
    content: '';
    position: absolute; inset: auto 0 0 0; height: 2px;
    background: linear-gradient(90deg, var(--ma-gold), var(--ma-sky));
    transform: scaleX(0); transform-origin: right;
    transition: transform .35s;
}
.ma-portal:hover {
    border-color: var(--ma-sky);
    transform: translateY(-4px);
    box-shadow: var(--ma-shadow);
}
.ma-portal:hover::after { transform: scaleX(1); }
.ma-portal__tag {
    font-size: .65rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--ma-sky);
}
.ma-portal strong {
    font-size: 1.12rem; font-weight: 800;
    font-family: var(--ma-ui);
}
.ma-portal small {
    font-size: .86rem; color: var(--ma-muted); line-height: 1.5;
}
.ma-portal__go {
    margin-top: auto; padding-top: 12px;
    font-size: .84rem; font-weight: 700; color: var(--ma-navy);
}
.ma-portal--admin {
    background: linear-gradient(160deg, #071525, #12263a);
    color: #fff; border-color: transparent;
}
.ma-portal--admin .ma-portal__tag { color: var(--ma-gold); }
.ma-portal--admin small { color: rgba(255,255,255,.6); }
.ma-portal--admin strong { color: #fff; }
.ma-portal--admin .ma-portal__go { color: var(--ma-gold); }
.ma-portal--investor { background: linear-gradient(180deg, #fff 0%, #F7F0DE 100%); }
.ma-portal--advisory { background: linear-gradient(180deg, #fff 0%, #EEF5FA 100%); }

/* Story asymmetric */
.ma-story {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 0;
    max-width: 1180px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--ma-line);
}
.ma-story__media {
    min-height: 420px;
    background:
        linear-gradient(135deg, rgba(7,21,37,.35), rgba(58,124,165,.2)),
        url('/acc-engine/assets/img/portals/melk/story-home.jpg') center/cover;
}
.ma-story__body {
    padding: 48px 40px;
    display: flex; flex-direction: column; justify-content: center;
    background: #fff;
}
.ma-story__body h3 {
    margin: 0 0 14px;
    font-family: var(--ma-display);
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.25;
}
.ma-story__body p {
    margin: 0 0 24px;
    color: var(--ma-muted);
    line-height: 1.75;
    font-size: .98rem;
}

/* Help */
.ma-help {
    background: var(--ma-navy);
    color: #fff;
    padding: 56px 48px;
}
.ma-help__inner {
    max-width: 1180px; margin: 0 auto;
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: space-between; gap: 28px;
}
.ma-help h2 {
    margin: 0 0 8px;
    font-family: var(--ma-display);
    font-size: 1.9rem;
    font-weight: 700;
}
.ma-help p { margin: 0; color: rgba(255,255,255,.6); }
.ma-help__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ma-help__actions .ma-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,.28);
    color: #fff;
}
.ma-help__actions .ma-btn--solid {
    background: var(--ma-gold);
    border-color: var(--ma-gold);
    color: var(--ma-navy);
}

/* ── حساب‌های تستی: دکمه شناور + پنل (دقیقاً الگوی پورتال ورزش) ── */
.melk-test-fab {
    position: fixed; left: 20px; bottom: 26px; z-index: 8000;
    width: 52px; height: 52px; border-radius: 50%; border: none;
    background: linear-gradient(135deg, var(--ma-navy), var(--ma-sky));
    color: #fff; font-size: 1.3rem; cursor: pointer;
    box-shadow: 0 4px 20px rgba(7,21,37,.35);
    transition: transform .2s, box-shadow .2s;
    display: grid; place-items: center;
}
.melk-test-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(7,21,37,.45); }
.melk-test-fab.is-active { transform: rotate(45deg) scale(1.1); }

.melk-test-panel {
    position: fixed; left: 20px; bottom: 88px; z-index: 8001;
    width: 380px; max-width: calc(100vw - 40px);
    max-height: min(520px, calc(100vh - 160px));
    background: var(--ma-paper); border: 1px solid var(--ma-line); border-radius: 4px;
    box-shadow: var(--ma-shadow);
    display: flex; flex-direction: column;
    opacity: 0; visibility: hidden; transform: translateY(16px) scale(.96);
    transition: opacity .25s ease, transform .25s ease;
    overflow: hidden; font-family: var(--ma-font);
}
.melk-test-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.melk-test-panel__head {
    padding: 14px 16px 10px; display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid var(--ma-line); flex-shrink: 0;
}
.melk-test-panel__head h3 { font-size: .95rem; font-weight: 700; color: var(--ma-ink); margin: 0; flex: 1; }
.melk-test-panel__sub { font-size: .72rem; color: var(--ma-muted); white-space: nowrap; }
.melk-test-panel__sub code { background: var(--ma-gold-soft); padding: 1px 6px; border-radius: 4px; color: var(--ma-gold); font-family: monospace; }
.melk-test-panel__close {
    width: 26px; height: 26px; border: none; background: transparent; font-size: 1.2rem;
    color: var(--ma-muted); cursor: pointer; border-radius: 50%; display: grid; place-items: center;
}
.melk-test-panel__close:hover { background: var(--ma-mist); color: var(--ma-ink); }
.melk-test-search {
    margin: 8px 12px 4px; padding: 7px 12px; border: 1px solid var(--ma-line); border-radius: 4px;
    font-size: .82rem; font-family: inherit; background: var(--ma-mist); color: var(--ma-ink);
    direction: rtl; outline: none; flex-shrink: 0;
}
.melk-test-search:focus { border-color: var(--ma-sky); }
.melk-test-list { list-style: none; margin: 0; padding: 6px 8px 10px; overflow-y: auto; flex: 1 1 auto; }
.melk-test-list::-webkit-scrollbar { width: 4px; }
.melk-test-list::-webkit-scrollbar-thumb { background: var(--ma-sky); border-radius: 4px; }

.melk-test-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px;
    cursor: pointer; transition: background .15s, transform .1s; border: 1px solid transparent;
}
.melk-test-item:hover { background: var(--ma-mist); border-color: var(--ma-line); }
.melk-test-item:active { transform: scale(.98); }
.melk-test-item--admin { border-color: var(--ma-gold-soft); background: var(--ma-gold-soft); }
.melk-test-item--loading { opacity: .6; pointer-events: none; }
.melk-test-item--error { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.3); }
.melk-test-item--doc { text-decoration: none; color: inherit; border-color: var(--ma-line); margin-bottom: 6px; }
.melk-test-item__icon { font-size: 1.2rem; flex-shrink: 0; }
.melk-test-item__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.melk-test-item__name { font-size: .85rem; font-weight: 600; color: var(--ma-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.melk-test-item__user { font-size: .7rem; color: var(--ma-muted); font-family: monospace; }
.melk-test-item__go { font-size: .72rem; font-weight: 700; color: var(--ma-sky); white-space: nowrap; flex-shrink: 0; }

@media (max-width: 480px) {
    .melk-test-panel { left: 12px; bottom: 80px; width: calc(100vw - 24px); }
    .melk-test-fab { left: 12px; bottom: 20px; width: 46px; height: 46px; font-size: 1.15rem; }
}

/* Footer */
.ma-footer {
    padding: 28px 48px;
    background: #040b14;
    color: rgba(255,255,255,.4);
    font-size: .8rem;
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.ma-footer a { color: rgba(255,255,255,.55); text-decoration: none; }
.ma-footer a:hover { color: var(--ma-gold); }

/* Reveal */
.ma-reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity .8s ease, transform .8s ease;
}
.ma-reveal.is-in { opacity: 1; transform: none; }

/* Workspace header polish */
.melk-app--workspace .melk-header--app {
    background: var(--ma-navy) !important;
    border: none !important;
}
.melk-app--workspace .melk-brand {
    font-family: var(--ma-display) !important;
    font-weight: 700 !important;
    color: #fff !important;
}
.melk-app--workspace .red-hero.em-hero {
    background: linear-gradient(135deg, #071525, #1a3048) !important;
    border-radius: 4px !important;
}

/* Login */
.ma-login-screen { min-height: 100vh; background: var(--ma-mist); }
.ma-login {
    display: flex; justify-content: center; padding: 48px 20px 80px;
}
.ma-login__card {
    width: 100%; max-width: 420px;
    background: #fff;
    border: 1px solid var(--ma-line);
    padding: 36px 32px;
    box-shadow: var(--ma-shadow);
}
.ma-login__brand {
    margin: 0 0 16px;
    font-family: var(--ma-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ma-navy);
}
.ma-login__brand em { font-style: italic; color: var(--ma-gold); }
.ma-login__role {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 12px; padding: 10px 12px;
    background: var(--ma-gold-soft);
    font-size: .9rem;
}
.ma-login__card h3 {
    margin: 0 0 8px;
    font-family: var(--ma-ui);
    font-size: 1.15rem;
}
.ma-login__hint { margin: 0 0 20px; color: var(--ma-muted); font-size: .88rem; line-height: 1.6; }

/* Login fields (was landing.css — kept local so unused purple landing sheet can stay off) */
.ma-login-screen .lp-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.ma-login-screen .lp-field label { font-size: .78rem; font-weight: 600; color: var(--ma-muted); }
.ma-login-screen .lp-field input {
    width: 100%; box-sizing: border-box;
    padding: 11px 12px; border: 1px solid var(--ma-line); border-radius: 8px;
    font: inherit; background: var(--ma-mist); color: var(--ma-ink);
}
.ma-login-screen .lp-field input:focus {
    outline: none; border-color: var(--ma-gold); background: #fff;
}
.ma-login-screen .lp-msg { font-size: .78rem; border-radius: 6px; padding: 8px 10px; margin-top: 10px; }
.ma-login-screen .lp-msg:empty { display: none; }
.ma-login-screen .lp-msg--error { background: #fee2e2; color: #991b1b; }

/* ورودِ پیامکی، دکمهٔ اصلیِ کارت است؛ فرمِ نام کاربری و رمز پشتِ همین
   لینک پنهان می‌ماند تا حساب‌های بدونِ شمارهٔ موبایل هم راهِ ورود داشته باشند. */
.melk-login__alt {
    display: block; width: 100%; margin-top: 14px;
    padding: 10px 0 0; border: none; border-top: 1px solid var(--ma-line);
    background: none; cursor: pointer;
    font-family: inherit; font-size: .82rem; color: var(--ma-muted);
    text-decoration: underline; text-underline-offset: 3px;
}
.melk-login__alt:hover { color: var(--ma-ink); }
#melk-pw-box { margin-top: 14px; }

.ma-boot {
    min-height: 40vh;
    display: flex; align-items: center; justify-content: center;
    color: var(--ma-muted); font-size: .95rem; letter-spacing: .02em;
}

/* Workspace header */
.ma-ws-header {
    display: flex !important; align-items: center; gap: 20px;
    padding: 12px 28px !important;
}
.ma-brand--ws .ma-brand__mark {
    width: 36px; height: 36px; font-size: .95rem;
}
.ma-brand--ws .ma-brand__name { color: #fff !important; font-size: 1.05rem; }
.ma-brand--ws .ma-brand__sub { color: rgba(255,255,255,.45) !important; }
.ma-ws-user { color: rgba(255,255,255,.75) !important; font-size: .88rem; margin-inline-start: auto; }
.ma-ws-nav a { color: rgba(255,255,255,.7) !important; }
/* کاشیِ خانه در سربرگِ Workspace — راهِ برگشت به صفحهٔ اصلیِ اقتصاد ملک برای
   کاربری که وارد شده است. روی موبایل `.ma-ws-nav` پنهان می‌شود، پس همین
   کار در نوارِ پایین هم به‌صورت یک آیتم آمده است. */
.ma-ws-home {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px;
    background: rgba(255,255,255,.09);
    font-size: 1rem; line-height: 1; text-decoration: none;
}
.ma-ws-home:hover { background: rgba(255,255,255,.2); }
.ma-btn--ghost-light {
    background: transparent;
    border: 1px solid rgba(255,255,255,.3);
    color: #fff !important;
    padding: 8px 14px;
    border-radius: 2px;
    cursor: pointer;
    font-family: inherit;
}
.ma-btn--ghost-light:hover { border-color: var(--ma-gold); color: var(--ma-gold) !important; }

/* Accounting panel */
.ma-abc { padding: 8px 4px 32px; }
.ma-abc__head h2 {
    margin: 6px 0 8px;
    font-family: var(--ma-display);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--ma-navy);
}
.ma-abc__head p { margin: 0; color: var(--ma-muted); font-size: .92rem; }
.ma-abc__toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 12px 0 16px; max-width: 100%; }
.ma-abc__toolbar label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ma-muted); min-width: 0; flex: 1 1 220px; }
.ma-abc__toolbar input, .ma-abc__toolbar select {
    padding: 8px 10px; border: 1px solid var(--ma-line); border-radius: 4px; min-width: 0; width: 100%; max-width: 100%;
    font-family: inherit; box-sizing: border-box;
}
@media (max-width: 640px) {
    .ma-abc__toolbar label { flex-basis: 100%; }
    .ma-abc__toolbar .red-btn { flex: 1 1 auto; }
}
.ma-abc__kpis {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px;
}
.ma-abc__kpi {
    background: var(--ma-mist); border: 1px solid var(--ma-line);
    padding: 14px 16px; border-radius: 4px;
}
.ma-abc__kpi strong {
    display: block; font-size: 1.25rem; font-family: var(--ma-ui);
    color: var(--ma-navy); font-weight: 800;
}
.ma-abc__kpi span { font-size: .75rem; color: var(--ma-muted); }
.ma-abc__layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.ma-abc__svg { width: 100%; height: auto; background: #f8fafc; border: 1px solid var(--ma-line); border-radius: 4px; }
.ma-abc__side {
    background: #fff; border: 1px solid var(--ma-line); padding: 16px; border-radius: 4px;
}
.ma-abc__side h3 {
    margin: 0 0 12px; font-size: .95rem; color: var(--ma-navy); font-family: var(--ma-ui);
}
.ma-abc__person, .ma-abc__act {
    display: flex; flex-direction: column; gap: 2px;
    padding: 10px 0; border-bottom: 1px solid var(--ma-line);
}
.ma-abc__person strong, .ma-abc__act b { font-size: .9rem; color: var(--ma-ink); }
.ma-abc__person small, .ma-abc__act small { color: var(--ma-muted); font-size: .75rem; }
.ma-abc__person span { font-weight: 700; color: var(--ma-gold); font-size: .88rem; margin-top: 4px; }
.ma-abc__muted { color: var(--ma-muted); font-size: .85rem; }
@media (max-width: 1024px) {
    .ma-pillars, .ma-stats, .ma-portals { grid-template-columns: 1fr 1fr; }
    .ma-story { grid-template-columns: 1fr; }
    .ma-abc__layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .ma-util, .ma-nav { display: none; }
    .ma-header, .ma-section, .ma-help, .ma-hero__content, .ma-footer {
        padding-left: 20px; padding-right: 20px;
    }
    .ma-hero { min-height: min(32vh, 240px); }
    .ma-hero__content { padding-top: 20px; padding-bottom: 24px; }
    .ma-header { padding-top: 8px; padding-bottom: 8px; gap: 8px; }
    .ma-brand__sub { display: none; }
    .ma-header__register { display: inline-flex; padding: 8px 11px; font-size: .76rem; }
    .ma-header__cta { padding: 8px 12px; font-size: .82rem; }
    .ma-pillars, .ma-stats, .ma-portals { grid-template-columns: 1fr; }
    .ma-pillar { border-left: none !important; border-top: 1px solid var(--ma-line); }
    .ma-pillar:first-child { border-top: none; }
}

@media (max-width: 480px) {
    .ma-header, .ma-section, .ma-help, .ma-hero__content, .ma-footer {
        padding-left: 14px; padding-right: 14px;
    }
    .ma-portal { padding: 18px 16px; }
    .ma-login__card { padding: 22px 18px; }
    .ma-roomeet-hint { display: none; }
    .ma-ws-user, .ma-ws-nav { display: none !important; }
    .ma-ws-header .ma-call-menu { margin-inline-start: auto; }
    .ma-ws-header #melk-logout { display: none !important; }
    .ma-call-menu__list-logout {
        display: block !important; margin-top: 4px; padding-top: 10px !important;
        border-top: 1px solid var(--ma-line, rgba(0,0,0,.08)); color: #b91c1c !important;
    }
}

/* ── دکمه‌ی واحد تماس، با فهرست کشویی چهار روش (به‌جای چهار دکمه‌ی پهلوبه‌پهلو) ── */
.ma-call-menu { position: relative; display: inline-block; }
.ma-call-menu__list {
    display: none; position: absolute; top: calc(100% + 6px); right: 0; left: auto;
    width: max-content; max-width: min(220px, calc(100vw - 24px));
    background: var(--ma-paper, #fff); border-radius: 10px;
    box-shadow: 0 14px 34px rgba(7, 21, 37, .22); padding: 6px; z-index: 40;
    flex-direction: column; gap: 2px;
}
.ma-call-menu__list--open { display: flex; }
.ma-call-menu__list button {
    display: block; width: 100%; text-align: right; background: transparent; border: none;
    border-radius: 7px; padding: 10px 12px; font-family: inherit; font-size: .84rem; font-weight: 600;
    color: var(--ma-ink, #16222f); cursor: pointer; white-space: nowrap;
}
.ma-call-menu__list button:hover { background: var(--ma-mist, #f2f5f8); }
.ma-call-menu__list-logout { display: none; }

/* ── فرم عمومی ثبت‌نام (پنجره/مودال) ── */
.ma-nav a[data-ref="navRegisterBtn"] { display: none !important; }
.ma-header__register {
    display: none !important; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px;
    background: var(--ma-gold-soft); color: var(--ma-navy); border: none; font-family: var(--ma-font);
    font-size: .82rem; font-weight: 700; cursor: pointer; flex-shrink: 0; white-space: nowrap;
    transition: background .2s;
}
.ma-header__register:hover { background: var(--ma-gold); color: #fff; }
.ma-modal-overlay {
    position: fixed; inset: 0; background: rgba(7, 21, 37, .62); z-index: 1000;
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.ma-modal {
    position: relative; background: var(--ma-paper); border-radius: 20px; width: 100%; max-width: 580px;
    max-height: 90vh; overflow-y: auto; padding: 30px; box-shadow: var(--ma-shadow);
}
.ma-modal h3 { margin: 0 0 6px; font-size: 1.15rem; color: var(--ma-ink); font-family: var(--ma-display, var(--ma-font)); }
.ma-modal__sub { margin: 0 0 20px; color: var(--ma-muted); font-size: .86rem; }
.ma-modal__close {
    position: absolute; top: 16px; left: 16px; width: 32px; height: 32px; border-radius: 50%;
    border: none; background: var(--ma-mist); color: var(--ma-ink); font-size: 1rem; cursor: pointer;
    display: grid; place-items: center;
}
.ma-modal__close:hover { background: var(--ma-line); }
.ma-register-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.ma-register-form__row label,
.ma-register-form__full {
    display: flex; flex-direction: column; gap: 6px; font-size: .82rem; color: var(--ma-muted); font-weight: 600;
}
.ma-register-form__full { margin-bottom: 16px; }
.ma-register-form input.red-inp,
.ma-register-form select.red-sel,
.ma-register-form textarea.red-inp {
    font-family: var(--ma-font); border: 1.5px solid var(--ma-line); border-radius: 10px;
    padding: 11px 14px; font-size: .88rem; color: var(--ma-ink); background: var(--ma-paper);
    box-sizing: border-box; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.ma-register-form input.red-inp:focus,
.ma-register-form select.red-sel:focus,
.ma-register-form textarea.red-inp:focus {
    outline: none; border-color: var(--ma-gold); box-shadow: 0 0 0 3px var(--ma-gold-soft);
}
.ma-register-form input.red-inp::placeholder,
.ma-register-form textarea.red-inp::placeholder { color: #9aa7b6; }
.ma-register-form select.red-sel {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23071525'%3e%3cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: left 12px center; background-size: 18px;
    padding-left: 36px;
}
.ma-register-form textarea.red-inp { resize: vertical; min-height: 70px; }
.ma-specialty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 8px; }
.ma-specialty-chip {
    display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 500; color: var(--ma-ink);
    background: var(--ma-mist); border: 1.5px solid var(--ma-line); border-radius: 9px; padding: 8px 10px;
    cursor: pointer; transition: border-color .15s, background .15s;
}
.ma-specialty-chip:has(input:checked) { border-color: var(--ma-gold); background: var(--ma-gold-soft); }
.ma-specialty-chip input { accent-color: var(--ma-gold); }
.ma-register-form__actions { display: flex; gap: 10px; }
.ma-register-result { margin-top: 14px; padding: 10px 14px; border-radius: 10px; font-size: .84rem; }
.ma-register-result--ok { background: #ecfdf5; color: #065f46; }
.ma-register-result--err { background: #fef2f2; color: #991b1b; }
@media (max-width: 640px) {
    .ma-register-form__row { grid-template-columns: 1fr; }
    .ma-modal { padding: 20px; border-radius: 16px; }
}

/* اتاق مذاکره‌ی رایگان (Jitsi) — جاسازی‌شده داخل خود سایت، بدون تب جدید و بدون صفحه‌ی واسط */
.ma-modal--jitsi {
    max-width: 1100px; width: 96vw; height: 88vh; padding: 0; display: flex; flex-direction: column;
    overflow: hidden; background: #000;
}
.ma-jitsi-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 16px; background: var(--ma-navy); color: #fff; flex-shrink: 0;
}
.ma-jitsi-head h3 { margin: 0; font-size: .95rem; color: #fff; }
.ma-jitsi-note { margin: 3px 0 0; font-size: .74rem; color: rgba(255,255,255,.65); }
.ma-jitsi-note a { color: var(--ma-gold); text-decoration: underline; }
.ma-jitsi-note a:hover { color: #fff; }
.ma-jitsi-head button {
    border: none; background: rgba(255,255,255,.12); color: #fff; border-radius: 8px;
    padding: 6px 14px; font-size: .8rem; cursor: pointer;
}
.ma-jitsi-head button:hover { background: rgba(255,255,255,.22); }
.ma-jitsi-body { flex: 1; position: relative; background: #000; }
.ma-jitsi-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ma-jitsi-loading {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .9rem;
}

/* ─────────────────────────────────────────────────────────────────
   پالایش موبایل — اندازه‌گیری‌شده روی ۳۷۵ پیکسل، نه حدسی.

   صفحه سرریز افقی نداشت (خوب)، ولی شش هدفِ لمسی زیر ۴۴ پیکسل بودند:
   لینک‌های فوتر (۲۲px)، دکمهٔ ورود مشاور (۳۶px)، لوگو (۳۸px) و بستنِ
   ویجت گفتگو (۲۵px). ۴۴px کف توصیه‌شدهٔ اپل/گوگل است و زیر آن، خطای لمس
   روی صفحهٔ کوچک محسوس می‌شود — به‌ویژه برای فوتر که لینک‌هایش کنار هم‌اند.
   ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ */
.ma-btn--block { width: 100%; justify-content: center; }

@media (max-width: 640px) {
    /* لینک‌های فوتر: ارتفاع لمسی بدون به‌هم‌ریختن ظاهر ردیف */
    .ma-footer a {
        display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px;
    }
    .ma-header__cta { min-height: 44px; }
    .ma-brand { min-height: 44px; }

    /* دکمه‌های فرم روی موبایل تمام‌عرض — کنار هم، هرکدام باریک و لغزنده می‌شدند */
    .ma-register-form__actions { flex-direction: column; }
    .ma-register-form__actions .ma-btn { width: 100%; justify-content: center; min-height: 44px; }

    /* kicker با ۱۰٫۸۸px زیر آستانهٔ خوانایی بود؛ حروف‌فاصله‌اش هم آن را ریزتر نشان می‌داد */
    .ma-kicker { font-size: .78rem; }
    .ma-brand__sub { font-size: .75rem; }
}

/* بستنِ ویجت گفتگو در همهٔ اندازه‌ها هدف لمسی درستی نداشت (۲۵×۲۵) */
.cw-header-close { min-width: 40px; min-height: 40px; }

/* ─────────────────────────────────────────────────────────────────
   راهنمای عمومی (Melk_Assistant) — نقطهٔ ورود صفحهٔ اصلی.
   روی موبایل کادر و دکمه زیر هم می‌روند تا هیچ‌کدام باریک نشوند؛ روی
   دسکتاپ کنار هم. چیپ‌های نمونه عمدی‌اند: کادر خالی، رایج‌ترین دلیل
   استفاده‌نشدنِ چنین ابزاری است، به‌ویژه روی گوشی.
   ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ */
.ma-assist__bar { display: flex; gap: 10px; }
.ma-assist__bar .red-inp {
    flex: 1 1 auto; min-width: 0; font-family: var(--ma-font);
    border: 1.5px solid var(--ma-line); border-radius: 12px; padding: 13px 16px;
    font-size: .95rem; background: var(--ma-paper); color: var(--ma-ink); box-sizing: border-box;
}
.ma-assist__bar .red-inp:focus {
    outline: none; border-color: var(--ma-gold); box-shadow: 0 0 0 3px var(--ma-gold-soft);
}
.ma-assist__bar .ma-btn { min-height: 48px; padding-inline: 22px; }

.ma-assist__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ma-assist__chip {
    font-family: var(--ma-font); font-size: .8rem; color: var(--ma-muted);
    background: var(--ma-paper); border: 1.5px solid var(--ma-line); border-radius: 999px;
    padding: 8px 14px; cursor: pointer; transition: border-color .15s, color .15s;
    /* ۴۴px کف لمسی؛ چون نوار چیپ‌ها افقی می‌لغزد، این ارتفاع فقط یک ردیف هزینه دارد. */
    min-height: 44px;
}
.ma-assist__chip:hover { border-color: var(--ma-gold); color: var(--ma-ink); }

.ma-assist__out {
    margin-top: 16px; padding: 18px; border-radius: 14px;
    background: var(--ma-paper); border: 1.5px solid var(--ma-line);
}
.ma-assist__answer { margin: 0 0 12px; font-size: .95rem; line-height: 1.9; color: var(--ma-ink); }
.ma-assist__out .ma-btn { display: inline-flex; }
.ma-assist__facts { margin: 12px 0 0; padding-inline-start: 18px; font-size: .84rem; color: var(--ma-muted); line-height: 1.9; }
.ma-assist__alts { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: .82rem; color: var(--ma-muted); }
.ma-assist__alts a { color: var(--ma-ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 640px) {
    .ma-assist__bar { flex-direction: column; }
    .ma-assist__bar .ma-btn { width: 100%; justify-content: center; }
    /* روی گوشی چیپ‌ها در یک نوار افقی می‌لغزند تا ارتفاع صفحه را نخورند */
    .ma-assist__chips {
        flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    .ma-assist__chips::-webkit-scrollbar { display: none; }
    .ma-assist__chip { flex: 0 0 auto; }
}

/* ─────────────────────────────────────────────────────────────────
   جست‌وجوی عمومی ملک — کارت، نه ردیف جدول.
   روی ۳۷۵ پیکسل یک جدولِ قیمت/متراژ/محله یا می‌شکند یا ریز می‌شود؛
   کارت هر دو را حل می‌کند و روی دسکتاپ هم شبکه‌ای می‌شود.
   ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ */
.ma-search__meta { margin-top: 14px; font-size: .85rem; color: var(--ma-muted); }
.ma-search__grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px; margin-top: 14px;
}
.ma-search__more { margin-top: 14px; }

.ma-listing {
    position: relative; background: var(--ma-paper); border: 1.5px solid var(--ma-line);
    border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px;
    transition: border-color .15s, box-shadow .15s;
}
.ma-listing:hover { border-color: var(--ma-gold); box-shadow: 0 6px 18px rgba(0,0,0,.05); }
.ma-listing__badge {
    align-self: flex-start; font-size: 12.5px; font-weight: 700;
    background: var(--ma-gold-soft); color: var(--ma-ink);
    padding: 3px 10px; border-radius: 999px;
}
.ma-listing__title { margin: 4px 0 0; font-size: .95rem; line-height: 1.7; color: var(--ma-ink); }
.ma-listing__price { font-size: 1.05rem; font-weight: 800; color: var(--ma-ink); }
.ma-listing__facts { font-size: .84rem; color: var(--ma-muted); }
.ma-listing__place { font-size: .82rem; color: var(--ma-muted); }
.ma-listing__agent { font-size: 12.5px; color: var(--ma-muted); margin-top: 4px; }
.ma-listing__agent:empty, .ma-listing__facts:empty, .ma-listing__place:empty { display: none; }

@media (max-width: 640px) {
    .ma-search__grid { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────────────────
   صفحه‌های سرور-رندرِ SEO (شهر و آگهی).
   عمداً بدون وابستگی به SPA: خزنده و کاربرِ موبایل روی شبکهٔ ضعیف باید
   بی‌درنگ محتوا ببینند، نه اسکلتِ در انتظار جاوااسکریپت.
   ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ */
.ma-seo-body { background: var(--ma-mist, #f6f7f9); color: var(--ma-ink, #0f172a); margin: 0; }
.ma-seo-head {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    padding: 14px 18px; background: var(--ma-paper, #fff); border-bottom: 1px solid var(--ma-line, #e2e8f0);
}
.ma-seo-brand { font-weight: 800; text-decoration: none; color: inherit; min-height: 44px; display: inline-flex; align-items: center; }
.ma-seo-nav { display: flex; gap: 14px; flex-wrap: wrap; }
.ma-seo-nav a { color: var(--ma-muted, #64748b); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.ma-seo-nav a:hover { color: var(--ma-ink, #0f172a); }

.ma-seo-main { max-width: 1040px; margin-inline: auto; padding: 20px 18px 40px; }
.ma-seo-crumbs { font-size: .84rem; color: var(--ma-muted, #64748b); margin-bottom: 12px; }
.ma-seo-crumbs a { color: inherit; }
.ma-seo-main h1 { font-size: 1.35rem; line-height: 1.7; margin: 0 0 10px; }
.ma-seo-lead { color: var(--ma-muted, #64748b); line-height: 1.9; margin: 0 0 18px; }
.ma-seo-price { font-size: 1.3rem; font-weight: 800; margin-bottom: 14px; }
.ma-seo-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.ma-seo-facts > div {
    background: var(--ma-paper, #fff); border: 1px solid var(--ma-line, #e2e8f0);
    border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px;
}
.ma-seo-facts span { font-size: 12.5px; color: var(--ma-muted, #64748b); }
.ma-seo-facts b { font-size: .9rem; }
.ma-seo-desc { line-height: 2; margin-bottom: 18px; }
.ma-seo-empty { background: var(--ma-paper, #fff); border: 1px solid var(--ma-line, #e2e8f0); border-radius: 14px; padding: 22px; }
.ma-seo-cities { margin-top: 26px; }
.ma-seo-cities h3 { font-size: .95rem; margin: 0 0 8px; }
.ma-seo-cities a {
    display: inline-flex; align-items: center; min-height: 44px; padding-inline: 8px;
    color: var(--ma-muted, #64748b);
}
.ma-seo-pager { margin-top: 18px; display: flex; gap: 6px; flex-wrap: wrap; }
.ma-seo-pager a, .ma-seo-pager b {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 44px; min-height: 44px; border-radius: 10px;
    background: var(--ma-paper, #fff); border: 1px solid var(--ma-line, #e2e8f0); text-decoration: none; color: inherit;
}
.ma-seo-pager b { background: var(--ma-gold-soft, #fdf6e3); font-weight: 800; }
.ma-seo-foot { padding: 20px 18px 34px; text-align: center; }
.ma-seo-foot a { color: var(--ma-muted, #64748b); min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* کارت آگهی وقتی خودش لینک است (صفحهٔ شهر) */
a.ma-listing { text-decoration: none; color: inherit; }

/* گالری صفحهٔ آگهی — افقی می‌لغزد تا روی گوشی ارتفاع صفحه را نخورد */
.ma-seo-gallery {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.ma-seo-gallery::-webkit-scrollbar { display: none; }
.ma-seo-gallery img {
    flex: 0 0 auto; width: min(78vw, 340px); height: 220px; object-fit: cover;
    border-radius: 12px; border: 1px solid var(--ma-line, #e2e8f0); background: #eef2f6;
}
.ma-listing__cover {
    width: 100%; height: 160px; object-fit: cover; border-radius: 10px;
    margin-bottom: 8px; background: #eef2f6;
}

/* ─────────────────────────────────────────────────────────────────
   نقشهٔ جست‌وجو. ارتفاعش روی گوشی عمداً کوتاه‌تر است: نقشهٔ بلند روی
   صفحهٔ کوچک، اسکرولِ صفحه را می‌بلعد و کاربر داخلش گیر می‌کند.
   ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ */
.ma-search__maprow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.ma-search__map {
    height: 420px; margin-top: 12px; border-radius: 14px; overflow: hidden;
    border: 1.5px solid var(--ma-line); background: #eef2f6;
}
.ma-search__map .leaflet-container { height: 100%; width: 100%; font-family: var(--ma-font); }
.ma-search__map .leaflet-popup-content { font-family: var(--ma-font); font-size: .85rem; line-height: 1.8; }

@media (max-width: 640px) {
    .ma-search__map { height: 300px; }
    .ma-search__maprow .ma-btn { width: 100%; justify-content: center; }
}

/* دکمه‌های زوم Leaflet پیش‌فرض ۳۰×۳۰‌اند — زیر کف لمسی روی گوشی */
@media (max-width: 720px) {
    .ma-search__map .leaflet-bar a,
    .ma-search__map .leaflet-control-zoom a {
        width: 44px; height: 44px; line-height: 44px; font-size: 20px;
    }
}

/* ============================================================
   موبایل — سروسامانِ صفحهٔ اول
   ------------------------------------------------------------
   بیش از ۸۰٪ بازدید از گوشی است. این بخش، چیزهایی را که روی
   دسکتاپ درست بودند و روی گوشی تنگ می‌شدند مرتب می‌کند.
   ============================================================ */
@media (max-width: 560px) {
    /* دو دکمهٔ قهرمان کنار هم ۱۲۰ و ۱۴۲ پیکسل می‌شدند — هیچ‌کدام
       هدف لمسیِ راحتی نبود. زیر هم، تمام‌عرض. */
    /* max-width لازم است، نه فقط width: قهرمان روی گوشی padding ندارد و
       دکمهٔ تمام‌عرض از لبهٔ صفحه بیرون می‌زد (۳۸۷ پیکسل در قابِ ۳۷۵). */
    .ma-hero__actions {
        flex-direction: column; align-items: stretch; gap: 10px;
        padding-inline: 16px; box-sizing: border-box; max-width: 100%;
    }
    .ma-hero__actions .ma-btn {
        width: 100%; max-width: 100%; box-sizing: border-box;
        justify-content: center; min-height: 52px;
    }

    /* سربرگ: نام برند جا باز کند، دکمهٔ ورود جمع‌تر شود. */
    .ma-header__cta, .ma-header .ma-btn { padding: .55rem .9rem !important; font-size: .88rem !important; }
}
