/* ═══════════════════════════════════════════════════════════════════
   صفحه اول کارگردان — Home page (فقط در صفحه اول بارگذاری می‌شود)
   همه فاصله‌ها با property های منطقی (inline/block) نوشته شده‌اند تا
   در RTL (فارسی/عربی) و LTR (انگلیسی/چینی) درست نمایش داده شوند.
═══════════════════════════════════════════════════════════════════ */

.page-home {
    --hm-radius: 20px;
    --hm-radius-sm: 14px;
    --hm-surface: #fff;
    --hm-text: var(--brand-dark, #0b1220);
    --hm-muted: rgba(11,18,32,.58);
    --hm-line: rgba(32,84,167,.1);
    --hm-shadow: 0 1px 2px rgba(11,18,32,.04), 0 8px 24px rgba(11,18,32,.06);
    --hm-shadow-hover: 0 14px 30px rgba(32,84,167,.16);
    --hm-ease: cubic-bezier(.2,.7,.2,1);
}

/* ─── کارت‌های پایه صفحه اول: گوشه‌های نرم‌تر و سایه لطیف‌تر ─── */
.page-home .home-card {
    border-top: 0;
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
    border: 1px solid rgba(11,18,32,.05);
}

.page-home .home-card-title {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .9rem;
    font-weight: 800;
    margin-bottom: .75rem;
}

/* ═══════════════ ۱) Hero + جست‌وجوی هوشمند ═══════════════ */
.hm-hero {
    position: relative;
    z-index: 5; /* پنل پیشنهادها باید روی بخش‌های بعدی قرار بگیرد */
    padding: 1.35rem 1.1rem 1.1rem;
    border: 1px solid rgba(32,84,167,.1);
    border-radius: 24px;
    color: #0b1220;
    box-shadow: 0 18px 40px rgba(32,84,167,.14);
}

/* لایه پس‌زمینه جدا تا overflow:hidden پنل پیشنهادها را نبُرد */
.hm-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    border-radius: inherit;
    background-color: #eaf4ff;
    background-image:
        linear-gradient(to left, rgba(255,255,255,.95) 0%, rgba(240,247,255,.86) 42%, rgba(240,247,255,.12) 100%),
        url("/imgs/hero/hero-car-light.svg");
    background-size: cover, cover;
    background-position: center, left bottom;
    background-repeat: no-repeat;
}

/* در زبان‌های چپ‌به‌راست تصویر و سایه آینه می‌شوند تا متن روی بخش تیره بماند */
[dir="ltr"] .hm-hero-bg { transform: scaleX(-1); }

.hm-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(80% 60% at 90% 0%, rgba(99,102,241,.1), transparent 60%);
}

.hm-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin: 0 0 .55rem;
    padding: .28rem .7rem;
    border: 1px solid rgba(32,84,167,.15);
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: #1a4fa8;
    font-size: .7rem;
    font-weight: 700;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hm-hero-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,.2);
}

.hm-hero-title {
    margin: 0 0 .45rem;
    color: #0b1a3d;
    font-size: clamp(1.25rem, 5.2vw, 2.1rem);
    font-weight: 900;
    line-height: 1.55;
    text-wrap: balance;
}

.hm-hero-title span {
    background: linear-gradient(90deg, #2054a7, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hm-hero-sub {
    max-width: 600px;
    margin: 0 0 1rem;
    color: rgba(11,18,32,.66);
    font-size: .82rem;
    line-height: 1.9;
}

/* ─── جعبه جست‌وجوی هوشمند (با حاشیه رنگی متحرک) ─── */
@property --hm-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.hm-ai {
    position: relative;
    max-width: 680px;
}

.hm-ai-box {
    --hm-angle: 0deg;
    position: relative;
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: 5px 5px 5px 5px;
    border-radius: 18px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        conic-gradient(from var(--hm-angle), #22d3ee, #6366f1, #a855f7, #f472b6, #22d3ee) border-box;
    border: 2px solid transparent;
    box-shadow: 0 12px 30px rgba(32,84,167,.18), 0 0 0 0 rgba(99,102,241,0);
    animation: hmSpin 6s linear infinite;
    transition: box-shadow .25s ease;
}

.hm-ai-box:focus-within {
    box-shadow: 0 12px 30px rgba(32,84,167,.18), 0 0 0 6px rgba(129,140,248,.25);
}

@keyframes hmSpin { to { --hm-angle: 360deg; } }

.hm-ai-spark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin-inline-start: .2rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(34,211,238,.14));
    color: #6366f1;
}

.hm-ai-spark svg { width: 20px; height: 20px; animation: hmTwinkle 2.8s ease-in-out infinite; }

@keyframes hmTwinkle {
    0%, 100% { transform: scale(1) rotate(0); opacity: 1; }
    50% { transform: scale(.82) rotate(18deg); opacity: .75; }
}

.hm-ai-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    padding: 0 .35rem;
    border: 0;
    background: transparent;
    color: #0b1220;
    font-size: .9rem;
    outline: none;
}

.hm-ai-input::placeholder { color: rgba(11,18,32,.42); }
.hm-ai-input::-webkit-search-cancel-button { display: none; }

.hm-ai-clear {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(11,18,32,.06);
    color: rgba(11,18,32,.55);
}

.hm-ai-clear svg { width: 14px; height: 14px; }
.hm-ai.has-value .hm-ai-clear { display: inline-flex; }

.hm-ai-go {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #22d3ee 0%, #6366f1 55%, #a855f7 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(99,102,241,.45), inset 0 1px 0 rgba(255,255,255,.35);
    transition: transform .18s var(--hm-ease), box-shadow .2s ease, filter .2s ease;
}

.hm-ai-go svg { width: 21px; height: 21px; transition: transform .2s var(--hm-ease); }
[dir="ltr"] .hm-ai-go svg { transform: scaleX(-1); }
.hm-ai-go:hover { filter: brightness(1.08); box-shadow: 0 10px 26px rgba(99,102,241,.55), inset 0 1px 0 rgba(255,255,255,.35); }
.hm-ai-go:hover svg { transform: translateX(-3px); }
[dir="ltr"] .hm-ai-go:hover svg { transform: scaleX(-1) translateX(-3px); }
.hm-ai-go:active { transform: scale(.92); }
.hm-ai-go:focus-visible { outline: 3px solid rgba(165,180,252,.8); outline-offset: 3px; }

/* پیشنهادهای آماده زیر جعبه */
.hm-ai-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: .75rem;
}

.hm-ai-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .32rem .7rem;
    border: 1px solid rgba(32,84,167,.14);
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    color: #1e3a8a;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background .18s ease, border-color .18s ease, transform .14s var(--hm-ease);
    cursor: pointer;
}

.hm-ai-chip:hover { background: #fff; border-color: rgba(99,102,241,.35); color: #3730a3; }
.hm-ai-chip:active { transform: scale(.95); }
.hm-ai-chip svg { width: 13px; height: 13px; opacity: .85; }

/* ─── پنل پاسخ/پیشنهادها ─── */
.hm-ai-panel {
    position: absolute;
    inset-inline: 0;
    inset-block-start: calc(100% + 8px);
    z-index: 40;
    max-height: min(62vh, 520px);
    overflow-y: auto;
    padding: .5rem;
    border: 1px solid rgba(99,102,241,.16);
    border-radius: 18px;
    background: #fff;
    color: #0b1220;
    box-shadow: 0 24px 60px rgba(4,20,56,.32);
    overscroll-behavior: contain;
    animation: hmPanelIn .22s var(--hm-ease) both;
}

.hm-ai-panel[hidden] { display: none; }

@keyframes hmPanelIn {
    from { opacity: 0; transform: translateY(-6px) scale(.99); }
    to   { opacity: 1; transform: none; }
}

.hm-ai-status {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .55rem .55rem;
    color: rgba(11,18,32,.6);
    font-size: .74rem;
}

.hm-ai-status svg { width: 16px; height: 16px; color: #6366f1; flex: 0 0 auto; }
.hm-ai-status strong { color: #0b1220; }

.hm-ai-thinking .hm-ai-status svg { animation: hmTwinkle 1.1s ease-in-out infinite; }

.hm-ai-shimmer {
    height: 12px;
    margin: .35rem .55rem;
    border-radius: 6px;
    background: linear-gradient(100deg, #eef1f8 30%, #e0e7ff 50%, #eef1f8 70%);
    background-size: 200% 100%;
    animation: homeHlShimmer 1.1s ease-in-out infinite;
}

.hm-ai-shimmer:nth-child(3) { width: 72%; }
.hm-ai-shimmer:nth-child(4) { width: 52%; }

/* کارت «پاسخ سریع» */
.hm-ai-answer {
    display: flex;
    gap: .65rem;
    margin: 0 0 .4rem;
    padding: .7rem .75rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99,102,241,.09), rgba(34,211,238,.1));
    border: 1px solid rgba(99,102,241,.16);
    color: inherit;
    text-decoration: none;
}

.hm-ai-answer:hover,
.hm-ai-answer.is-active { border-color: rgba(99,102,241,.45); color: inherit; }

.hm-ai-answer-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 11px;
    background: linear-gradient(135deg, #6366f1, #22d3ee);
    color: #fff;
}

.hm-ai-answer-ico svg { width: 18px; height: 18px; }

.hm-ai-answer-label {
    display: block;
    margin-bottom: .1rem;
    color: #6366f1;
    font-size: .66rem;
    font-weight: 800;
}

.hm-ai-answer-title {
    display: block;
    font-size: .8rem;
    font-weight: 800;
    line-height: 1.6;
}

.hm-ai-answer-price {
    display: flex;
    flex-wrap: wrap;
    gap: .15rem .8rem;
    margin-top: .15rem;
    color: rgba(11,18,32,.66);
    font-size: .74rem;
}

.hm-ai-answer-price b { color: #0f9f6e; font-weight: 800; }

.hm-ai-group-title {
    margin: .55rem .55rem .25rem;
    color: rgba(11,18,32,.45);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.hm-ai-opt {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .55rem;
    border-radius: 12px;
    color: #0b1220;
    text-decoration: none;
    transition: background .12s ease;
}

.hm-ai-opt:hover,
.hm-ai-opt.is-active { background: rgba(99,102,241,.08); color: #0b1220; }

.hm-ai-opt-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 10px;
    background: #f1f4fb;
    color: #4f46e5;
}

.hm-ai-opt-ico img { width: 100%; height: 100%; object-fit: cover; }
.hm-ai-opt-ico svg { width: 17px; height: 17px; }

.hm-ai-opt-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }

.hm-ai-opt-title {
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hm-ai-opt-sub {
    color: rgba(11,18,32,.5);
    font-size: .68rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hm-ai-opt-go {
    flex: 0 0 auto;
    color: rgba(11,18,32,.3);
    font-size: .9rem;
}

[dir="ltr"] .hm-ai-opt-go { transform: scaleX(-1); }

.hm-ai-opt mark {
    padding: 0;
    background: none;
    color: #4f46e5;
    font-weight: 800;
}

.hm-ai-foot {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .4rem;
    padding: .55rem .4rem .2rem;
    border-top: 1px solid rgba(11,18,32,.06);
}

.hm-ai-foot a {
    padding: .3rem .65rem;
    border-radius: 999px;
    background: #f1f4fb;
    color: #3730a3;
    font-size: .7rem;
    font-weight: 700;
    text-decoration: none;
}

.hm-ai-foot a:hover,
.hm-ai-foot a.is-active { background: #e0e7ff; }

.hm-ai-empty {
    padding: .3rem .55rem .5rem;
    color: rgba(11,18,32,.6);
    font-size: .76rem;
}

/* ─── میز کار کسب‌وکار (کاربران تعمیرگاه/نمایشگاه) ─── */
.hm-ws {
    position: relative;
    padding: 1rem 1rem .95rem;
    overflow: hidden;
    border: 1px solid rgba(99,102,241,.14);
    border-radius: var(--hm-radius);
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(99,102,241,.1), transparent 55%),
        #fff;
    box-shadow: var(--hm-shadow);
}

.hm-ws-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .8rem;
}

.hm-ws-kicker {
    margin: 0 0 .1rem;
    color: #6366f1;
    font-size: .7rem;
    font-weight: 800;
}

.hm-ws-title {
    margin: 0;
    color: var(--hm-text);
    font-size: 1rem;
    font-weight: 900;
}

.hm-ws-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .7rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.hm-ws-badge svg { width: 14px; height: 14px; }
.hm-ws-badge-on { background: rgba(16,185,129,.12); color: #047857; }
.hm-ws-badge-off { background: rgba(245,158,11,.14); color: #b45309; }
.hm-ws-badge-off:hover { background: rgba(245,158,11,.22); color: #92400e; }

.hm-ws-tabs {
    display: inline-flex;
    gap: .25rem;
    margin-bottom: .75rem;
    padding: .25rem;
    border-radius: 12px;
    background: rgba(32,84,167,.07);
}

.hm-ws-tab {
    padding: .38rem .9rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: rgba(11,18,32,.6);
    font-size: .76rem;
    font-weight: 800;
}

.hm-ws-tab[aria-selected="true"] {
    background: #fff;
    color: var(--brand-primary);
    box-shadow: 0 2px 8px rgba(11,18,32,.08);
}

.hm-ws-panel[hidden] { display: none; }

.hm-ws-cta {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .8rem;
    padding: .7rem .8rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #1a4fa8, #6366f1);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(79,70,229,.25);
    transition: transform .16s var(--hm-ease), box-shadow .2s ease;
}

.hm-ws-cta:hover { color: #fff; box-shadow: 0 14px 28px rgba(79,70,229,.32); transform: translateY(-1px); }
.hm-ws-cta:active { transform: scale(.98); }

.hm-ws-cta-ico {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 12px;
    background: rgba(255,255,255,.95);
}

.hm-ws-cta-ico img { width: 26px; height: 26px; }

.hm-ws-cta-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.hm-ws-cta-text strong { font-size: .88rem; font-weight: 800; }
.hm-ws-cta-text span { color: rgba(255,255,255,.78); font-size: .7rem; }
.hm-ws-cta-arrow { font-size: 1.1rem; }
[dir="ltr"] .hm-ws-cta-arrow { transform: scaleX(-1); }

.hm-ws-lock {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .8rem;
    padding: .65rem .8rem;
    border: 1px dashed rgba(245,158,11,.45);
    border-radius: 14px;
    background: rgba(245,158,11,.07);
    color: #92400e;
    font-size: .74rem;
    line-height: 1.8;
}

.hm-ws-lock a {
    padding: .35rem .8rem;
    border-radius: 9px;
    background: #f59e0b;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

/* ═══════════════ ۲) کاشی‌های اصلی (سلسله‌مراتب) ═══════════════ */
.hm-featured {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
    margin-bottom: .9rem;
}

.hm-feature {
    --tone: #2054a7;
    --tone-2: #1babe8;
    --tone-soft: rgba(32,84,167,.08);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .55rem;
    min-width: 0;
    padding: .85rem .8rem .8rem;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--tone) 14%, transparent);
    border-radius: 18px;
    background:
        radial-gradient(120% 120% at 100% 0%, var(--tone-soft), transparent 60%),
        #fff;
    color: var(--hm-text);
    text-decoration: none;
    transition: transform .18s var(--hm-ease), box-shadow .18s ease, border-color .18s ease;
    -webkit-tap-highlight-color: transparent;
}

.hm-feature:hover {
    color: var(--hm-text);
    border-color: color-mix(in srgb, var(--tone) 32%, transparent);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--tone) 20%, transparent);
    transform: translateY(-2px);
}

.hm-feature:active { transform: scale(.97); }

.hm-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--tone), var(--tone-2));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--tone) 32%, transparent);
}

.hm-feature-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    /* آیکون‌های رنگی را روی پس‌زمینه رنگی سفید می‌کند */
    filter: brightness(0) invert(1);
}

.hm-feature-title {
    font-size: .88rem;
    font-weight: 800;
    line-height: 1.4;
}

.hm-feature-sub {
    margin-top: -.3rem;
    color: var(--hm-muted);
    font-size: .7rem;
    line-height: 1.6;
}

.hm-feature-arrow {
    position: absolute;
    inset-block-start: .8rem;
    inset-inline-end: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--tone-soft);
    color: var(--tone);
    transition: transform .2s var(--hm-ease);
}

.hm-feature-arrow svg { width: 14px; height: 14px; }
[dir="ltr"] .hm-feature-arrow svg { transform: scaleX(-1); }
.hm-feature:hover .hm-feature-arrow { transform: translateX(-3px); }
[dir="ltr"] .hm-feature:hover .hm-feature-arrow { transform: translateX(3px); }

.hm-tone-blue   { --tone: #2054a7; --tone-2: #3b82f6; --tone-soft: rgba(37,99,235,.09); }
.hm-tone-green  { --tone: #0f9f6e; --tone-2: #34d399; --tone-soft: rgba(16,185,129,.1); }
.hm-tone-orange { --tone: #e8590c; --tone-2: #fb923c; --tone-soft: rgba(249,115,22,.1); }
.hm-tone-violet { --tone: #6d3fd8; --tone-2: #a78bfa; --tone-soft: rgba(124,58,237,.09); }

.hm-subhead {
    margin: 0 0 .55rem;
    color: var(--hm-muted);
    font-size: .72rem;
    font-weight: 700;
}

/* کاشی‌های کوچک: بازخورد لمسی */
.page-home .general-tile {
    transition: transform .14s var(--hm-ease), box-shadow .18s ease, border-color .18s ease, background .18s ease;
    -webkit-tap-highlight-color: transparent;
}

.page-home .general-tile:active { transform: scale(.95); }

@media (max-width: 575.98px) {
    .page-home .home-tile-grid .row.general-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px !important;
    }

    .page-home .home-tile-grid .general-tile {
        padding: .55rem .2rem .5rem;
        border-radius: 13px;
    }

    .page-home .home-tile-grid .general-icon-img {
        width: 28px;
        height: 28px;
        margin-bottom: .45rem;
    }

    .page-home .home-tile-grid .general-title {
        font-size: .66rem;
        line-height: 1.35;
    }
}

/* ═══════════════ ۳) آیکون‌های SVG یکدست ═══════════════ */
.hm-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 9px;
    background: rgba(32,84,167,.09);
    color: var(--brand-primary);
}

.hm-ico svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ═══════════════ ۵) کارت‌های برترین‌ها و اخبار ═══════════════ */
.page-home .home-hl-head {
    margin-bottom: .2rem;
}

.page-home .home-hl-scroller {
    gap: .7rem;
    padding: .55rem .1rem .6rem;
    scroll-padding-inline: .1rem;
    scrollbar-width: none;
}

.page-home .home-hl-scroller::-webkit-scrollbar { display: none; }

.page-home .home-hl-item,
.page-home .home-hl-news-item {
    position: relative;
    border-radius: 16px;
    background: #fff;
    border-color: rgba(11,18,32,.07);
    box-shadow: 0 1px 2px rgba(11,18,32,.04), 0 4px 14px rgba(11,18,32,.05);
    transition: transform .2s var(--hm-ease), box-shadow .2s ease, border-color .2s ease;
}

.page-home .home-hl-item:hover,
.page-home .home-hl-news-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--hm-shadow-hover);
}

.page-home .home-hl-item:active,
.page-home .home-hl-news-item:active { transform: scale(.97); }

/* روی موبایل عرض کارت طوری است که بخشی از کارت بعدی دیده شود (نشانه اسکرول) */
@media (max-width: 575.98px) {
    .page-home .home-hl-item { width: calc((100vw - 4.6rem) / 2.35); max-width: 150px; }
    .page-home .home-hl-news-item { width: calc((100vw - 4.6rem) / 1.7); max-width: 210px; }
    .page-home .home-hl-skel { width: calc((100vw - 4.6rem) / 2.35); max-width: 150px; }
    .page-home .home-hl-skel-news { width: calc((100vw - 4.6rem) / 1.7); max-width: 210px; }
}

.page-home .home-hl-item-imgwrap {
    position: relative;
}

.page-home .home-hl-item-img,
.page-home .home-hl-news-imgwrap img {
    transition: transform .4s var(--hm-ease);
}

.page-home .home-hl-item:hover .home-hl-item-img,
.page-home .home-hl-news-item:hover .home-hl-news-imgwrap img {
    transform: scale(1.05);
}

.page-home .home-hl-item-placeholder svg {
    width: 34px;
    height: 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* نشان رتبه */
.hm-rank {
    position: absolute;
    inset-block-start: .45rem;
    inset-inline-start: .45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 22px;
    padding-inline: .4rem;
    border-radius: 999px;
    background: rgba(11,18,32,.62);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-variant-numeric: tabular-nums;
}

.hm-rank-1 { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #3b2300; }
.hm-rank-2 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #1e293b; }
.hm-rank-3 { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; }

.hm-pin {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

.hm-pin svg {
    width: 11px;
    height: 11px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .75;
}

.page-home .home-hl-viewall {
    width: fit-content;
    margin-inline: auto;
    padding: .45rem 1.1rem;
}

/* ═══════════════ ۴) بخش ادغام‌شده کسب‌وکارها ═══════════════ */
.hm-biz {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    display: grid;
    gap: 1rem;
    padding: 1.25rem 1.1rem;
    border-radius: 24px;
    color: #fff;
    background:
        radial-gradient(90% 70% at 0% 0%, rgba(39,100,130,.75) 0%, transparent 60%),
        linear-gradient(125deg, #142c4e 0%, #0f1f3b 100%);
    box-shadow: 0 18px 40px rgba(16,44,77,.22);
}

.hm-biz::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset-block-end: -110px;
    inset-inline-end: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 50px solid rgba(255,255,255,.04);
}

.hm-biz-kicker {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 .5rem;
    color: #a9d9ff;
    font-size: .74rem;
    font-weight: 800;
}

.hm-biz-kicker span { color: #f6d68c; }

.hm-biz h2 {
    margin: 0 0 .5rem;
    color: #fff;
    font-size: clamp(1.15rem, 4.4vw, 1.75rem);
    font-weight: 900;
    line-height: 1.7;
}

.hm-biz h2 span { color: #a9dcff; }

.hm-biz-lead {
    margin: 0 0 1rem;
    color: #c3d1e4;
    font-size: .82rem;
    line-height: 2;
}

.hm-biz-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 44px;
    padding: .6rem 1.1rem;
    border-radius: 12px;
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform .14s var(--hm-ease), background .18s ease, box-shadow .18s ease, color .18s ease;
}

.hm-btn:active { transform: scale(.96); }
.hm-btn:focus-visible { outline: 3px solid #9bdaff; outline-offset: 3px; }

.hm-btn-light {
    background: #fff;
    color: #183a64;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

.hm-btn-light:hover { background: #e4f2ff; color: #102f55; }

.hm-btn-ghost {
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(255,255,255,.06);
    color: #e6f1ff;
}

.hm-btn-ghost:hover { background: rgba(255,255,255,.14); color: #fff; }

.hm-btn-arrow { display: inline-block; }
[dir="ltr"] .hm-btn-arrow { transform: scaleX(-1); }

.hm-biz-panels {
    display: grid;
    gap: .7rem;
}

.hm-biz-panel {
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 18px;
    background: rgba(255,255,255,.05);
}

.hm-biz-panel-head {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .7rem;
}

.hm-biz-panel-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 14px;
    background: #dceeff;
}

.hm-biz-panel-icon img { width: 30px; height: 30px; }

.hm-biz-panel h3 {
    margin: 0;
    color: #fff;
    font-size: .95rem;
    font-weight: 800;
}

.hm-biz-panel-sub {
    margin: .1rem 0 0;
    color: #9fb6d3;
    font-size: .72rem;
}

.hm-biz-list {
    display: grid;
    gap: .4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hm-biz-list li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    color: #d5e2f2;
    font-size: .78rem;
    line-height: 1.8;
}

.hm-biz-list li::before {
    content: "";
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: .25rem;
    border-radius: 50%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4.5 8.2 2.3 2.3 4.7-5' fill='none' stroke='%2306281f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat,
        #85e5bd;
}

.hm-biz-note {
    margin: 0;
    color: #cae6e8;
    font-size: .74rem;
}

.hm-biz-note span { color: #85e5bd; margin-inline-end: .35rem; }

/* ═══════════════ ارتباط با ما: آیکون برای هر راه ارتباطی ═══════════════ */
.page-home .home-contact-panel {
    border-radius: var(--hm-radius);
    box-shadow: var(--hm-shadow);
}

.page-home .home-contact-link {
    justify-content: flex-start;
}

.hm-contact-kicker {
    margin: 0 0 .2rem;
    color: var(--brand-primary);
    font-size: .72rem;
    font-weight: 800;
}

.hm-contact-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 12px;
    color: #fff;
}

.hm-contact-ico svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hm-contact-ico-call { background: linear-gradient(135deg, #2054a7, #3b82f6); }
.hm-contact-ico-wa   { background: linear-gradient(135deg, #0f9f6e, #34d399); }
.hm-contact-ico-ig   { background: linear-gradient(135deg, #c026d3, #f97316); }

.hm-contact-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: .1rem;
}

/* ═══════════════ متن سئو: جمع‌شونده (محتوا برای موتورهای جست‌وجو کامل در صفحه می‌ماند) ═══════════════ */
.hm-seo {
    position: relative;
}

.hm-js .hm-seo:not(.is-open) .hm-seo-body {
    max-height: 210px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
    mask-image: linear-gradient(to bottom, #000 55%, transparent);
}

.hm-seo-toggle {
    display: none;
    align-items: center;
    gap: .35rem;
    margin: .5rem auto 0;
    padding: .4rem 1rem;
    border: 1px solid rgba(32,84,167,.2);
    border-radius: 999px;
    background: #fff;
    color: var(--brand-primary);
    font-size: .76rem;
    font-weight: 700;
}

.hm-js .hm-seo-toggle { display: flex; }
.hm-seo-toggle svg { width: 14px; height: 14px; transition: transform .2s ease; }
.hm-seo.is-open .hm-seo-toggle svg { transform: rotate(180deg); }

/* ═══════════════ ۷) انیمیشن ورود بخش‌ها هنگام اسکرول ═══════════════ */
.hm-js .hm-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s var(--hm-ease), transform .5s var(--hm-ease);
}

.hm-js .hm-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@keyframes hmRise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* ورود کارت‌های async (برترین‌ها/اخبار) */
.home-hl-scroller.hm-loaded > * {
    animation: hmRise .45s var(--hm-ease) both;
}

.home-hl-scroller.hm-loaded > *:nth-child(2) { animation-delay: .04s; }
.home-hl-scroller.hm-loaded > *:nth-child(3) { animation-delay: .08s; }
.home-hl-scroller.hm-loaded > *:nth-child(4) { animation-delay: .12s; }
.home-hl-scroller.hm-loaded > *:nth-child(n+5) { animation-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
    .hm-js .hm-reveal,
    .hm-ai-box,
    .hm-ai-spark svg,
    .hm-ai-panel,
    .home-hl-scroller.hm-loaded > * {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }

    .hm-feature,
    .page-home .general-tile,
    .page-home .home-hl-item,
    .page-home .home-hl-news-item,
    .hm-btn,
    .hm-ai-go {
        transition: none;
    }

    .hm-feature:hover,
    .page-home .home-hl-item:hover,
    .page-home .home-hl-news-item:hover,
    .page-home .home-hl-item:hover .home-hl-item-img,
    .page-home .home-hl-news-item:hover .home-hl-news-imgwrap img {
        transform: none;
    }
}

/* ═══════════════ تبلت و دسکتاپ ═══════════════ */
@media (min-width: 768px) {
    .hm-hero {
        padding: 2rem 2rem 1.75rem;
        border-radius: 28px;
    }

    .hm-hero-sub { font-size: .9rem; }

    .hm-ai-input { height: 52px; font-size: .95rem; }
    .hm-ai-go { width: 52px; height: 52px; }
    .hm-ws { padding: 1.25rem 1.4rem 1.1rem; }

    .hm-featured {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: .8rem;
    }

    .hm-feature { padding: 1rem; }
    .hm-feature-icon { width: 52px; height: 52px; }
    .hm-feature-icon img { width: 30px; height: 30px; }
    .hm-feature-title { font-size: .95rem; }
    .hm-feature-sub { font-size: .74rem; }

    .hm-biz {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        align-items: center;
        gap: 2rem;
        padding: 2rem;
        border-radius: 28px;
    }
}

@media (min-width: 992px) {
    .hm-hero { padding: 2.8rem 2.8rem 2.4rem; min-height: 340px; }
    .hm-hero-bg {
        background-image:
            linear-gradient(to left, rgba(255,255,255,.95) 0%, rgba(240,247,255,.75) 45%, rgba(240,247,255,0) 75%),
            url("/imgs/hero/hero-car-light.svg");
    }

    html.dark-theme .hm-hero-bg {
        background-image:
            linear-gradient(to left, rgba(6,22,56,.94) 0%, rgba(8,30,74,.7) 45%, rgba(8,30,74,.05) 75%),
            url("/imgs/hero/hero-car.svg");
    }
}

/* موبایل: تصویر کم‌رنگ‌تر پشت متن، خودرو در پایین دیده می‌شود */
@media (max-width: 767.98px) {
    .hm-hero-bg {
        background-image:
            linear-gradient(to bottom, rgba(255,255,255,.93) 0%, rgba(244,249,255,.82) 60%, rgba(244,249,255,.4) 100%),
            url("/imgs/hero/hero-car-light.svg");
        background-position: center, 22% bottom;
    }

    html.dark-theme .hm-hero-bg {
        background-image:
            linear-gradient(to bottom, rgba(6,22,56,.9) 0%, rgba(8,30,74,.78) 60%, rgba(8,30,74,.45) 100%),
            url("/imgs/hero/hero-car.svg");
    }
}

/* ═══════════════ تم تاریک ═══════════════ */
html.dark-theme .page-home {
    --hm-text: #dce8ff;
    --hm-muted: rgba(200,220,255,.6);
    --hm-shadow: 0 10px 28px rgba(0,8,28,.35);
    --hm-shadow-hover: 0 14px 30px rgba(0,8,28,.5);
}

html.dark-theme .page-home .home-card {
    background: #0b1f45;
    border-color: rgba(110,170,255,.12);
}

html.dark-theme .page-home .home-tile-grid .general-tile {
    background: #12306a;
    border-color: rgba(255,255,255,.07);
}

html.dark-theme .page-home .home-tile-grid .general-tile:hover {
    background: #173b80;
    border-color: rgba(125,211,252,.25);
}

html.dark-theme .page-home .home-hl-viewall { border-color: rgba(125,211,252,.3); }

html.dark-theme .hm-ai-box {
    background:
        linear-gradient(#0d2248, #0d2248) padding-box,
        conic-gradient(from var(--hm-angle), #22d3ee, #6366f1, #a855f7, #f472b6, #22d3ee) border-box;
}

html.dark-theme .hm-ai-input { color: #eef4ff; }
html.dark-theme .hm-ai-input::placeholder { color: rgba(200,220,255,.5); }
html.dark-theme .hm-ai-spark { background: rgba(129,140,248,.16); color: #a5b4fc; }
html.dark-theme .hm-ai-clear { background: rgba(255,255,255,.08); color: rgba(220,232,255,.7); }

html.dark-theme .hm-ai-panel {
    border-color: rgba(129,140,248,.25);
    background: #0d2248;
    color: #dce8ff;
    box-shadow: 0 24px 60px rgba(0,8,28,.6);
}

html.dark-theme .hm-ai-status { color: rgba(200,220,255,.65); }
html.dark-theme .hm-ai-status strong { color: #fff; }
html.dark-theme .hm-ai-shimmer { background: linear-gradient(100deg, #12306a 30%, #1e3a8a 50%, #12306a 70%); background-size: 200% 100%; }
html.dark-theme .hm-ai-answer { background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(34,211,238,.12)); border-color: rgba(129,140,248,.3); }
html.dark-theme .hm-ai-answer-label { color: #a5b4fc; }
html.dark-theme .hm-ai-answer-price { color: rgba(200,220,255,.7); }
html.dark-theme .hm-ai-answer-price b { color: #34d399; }
html.dark-theme .hm-ai-group-title { color: rgba(200,220,255,.5); }
html.dark-theme .hm-ai-opt,
html.dark-theme .hm-ai-opt:hover,
html.dark-theme .hm-ai-opt.is-active { color: #e6efff; }
html.dark-theme .hm-ai-opt:hover,
html.dark-theme .hm-ai-opt.is-active { background: rgba(129,140,248,.14); }
html.dark-theme .hm-ai-opt-ico { background: #12306a; color: #a5b4fc; }
html.dark-theme .hm-ai-opt-sub { color: rgba(200,220,255,.55); }
html.dark-theme .hm-ai-opt-go { color: rgba(200,220,255,.35); }
html.dark-theme .hm-ai-opt mark { color: #a5b4fc; }
html.dark-theme .hm-ai-foot { border-color: rgba(255,255,255,.08); }
html.dark-theme .hm-ai-foot a { background: #12306a; color: #c7d2fe; }
html.dark-theme .hm-ai-foot a:hover,
html.dark-theme .hm-ai-foot a.is-active { background: #1e3a8a; }
html.dark-theme .hm-ai-empty { color: rgba(200,220,255,.65); }

html.dark-theme .hm-ws {
    border-color: rgba(129,140,248,.2);
    background:
        radial-gradient(90% 120% at 100% 0%, rgba(99,102,241,.18), transparent 55%),
        #0b1f45;
}

html.dark-theme .hm-ws-kicker { color: #a5b4fc; }
html.dark-theme .hm-ws-badge-on { background: rgba(52,211,153,.14); color: #6ee7b7; }
html.dark-theme .hm-ws-badge-off { background: rgba(251,191,36,.14); color: #fcd34d; }
html.dark-theme .hm-ws-tabs { background: rgba(255,255,255,.06); }
html.dark-theme .hm-ws-tab { color: rgba(220,232,255,.65); }
html.dark-theme .hm-ws-tab[aria-selected="true"] { background: #173b80; color: #fff; }
html.dark-theme .hm-ws-lock { background: rgba(251,191,36,.08); color: #fcd34d; border-color: rgba(251,191,36,.35); }

/* Hero شب در تم تاریک */
html.dark-theme .hm-hero {
    border-color: rgba(110,170,255,.12);
    color: #fff;
    box-shadow: 0 18px 40px rgba(0,8,28,.5);
}

html.dark-theme .hm-hero-bg {
    background-color: #0b2a66;
    background-image:
        linear-gradient(to left, rgba(6,22,56,.94) 0%, rgba(8,30,74,.82) 42%, rgba(8,30,74,.25) 100%),
        url("/imgs/hero/hero-car.svg");
}

html.dark-theme .hm-hero-bg::after { background: radial-gradient(80% 60% at 90% 0%, rgba(56,189,248,.22), transparent 60%); }
html.dark-theme .hm-hero-kicker { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.1); color: #dbeeff; }
html.dark-theme .hm-hero-kicker::before { background: #5eead4; box-shadow: 0 0 0 3px rgba(94,234,212,.25); }
html.dark-theme .hm-hero-title { color: #fff; text-shadow: 0 2px 18px rgba(0,10,40,.35); }
html.dark-theme .hm-hero-title span { background-image: linear-gradient(90deg, #7dd3fc, #a5b4fc); }
html.dark-theme .hm-hero-sub { color: rgba(226,238,255,.86); }
html.dark-theme .hm-ai-box { box-shadow: 0 14px 34px rgba(4,20,56,.45); }
html.dark-theme .hm-ai-box:focus-within { box-shadow: 0 14px 34px rgba(4,20,56,.45), 0 0 0 6px rgba(129,140,248,.28); }
html.dark-theme .hm-ai-chip { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.09); color: #e6f0ff; }
html.dark-theme .hm-ai-chip:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); color: #fff; }

html.dark-theme .hm-feature {
    border-color: rgba(255,255,255,.08);
    background:
        radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--tone) 28%, transparent), transparent 62%),
        #0d2248;
}

html.dark-theme .hm-feature:hover { border-color: color-mix(in srgb, var(--tone-2) 45%, transparent); }
html.dark-theme .hm-feature-arrow { background: rgba(255,255,255,.08); color: var(--tone-2); }

html.dark-theme .hm-ico { background: rgba(110,170,255,.14); color: #8fc2ff; }

html.dark-theme .page-home .home-hl-item,
html.dark-theme .page-home .home-hl-news-item {
    background: #0d2248;
    border-color: rgba(255,255,255,.08);
    box-shadow: 0 6px 18px rgba(0,8,28,.3);
}

html.dark-theme .hm-biz {
    background:
        radial-gradient(90% 70% at 0% 0%, rgba(23,95,140,.55) 0%, transparent 60%),
        linear-gradient(125deg, #0b1e3c 0%, #071430 100%);
    border: 1px solid rgba(110,170,255,.12);
}

html.dark-theme .hm-contact-kicker { color: #7dd3fc; }

html.dark-theme .hm-seo-toggle {
    background: #0d2248;
    border-color: rgba(110,170,255,.25);
    color: #8fc2ff;
}

/* ردیف پنل‌های تخصصی وقتی یکی از آن‌ها به «میز کار» بالای صفحه منتقل شده */
@media (min-width: 992px) {
    .home-pro-row.is-single { grid-template-columns: 1fr; }
}
