/* ==========================================================================
   اجزای مشترک سایت عمومی — منتقل‌شده از استایل‌های درون‌خطی ویوها.
   --------------------------------------------------------------------------
   چرا اینجا: استایلِ درون‌خطیِ داخل صفحه همیشه بعد از فایل قالب رندر می‌شود و
   روی قالب را می‌گیرد؛ نتیجه این بود که عوض‌کردن قالب تقریباً چیزی را عوض نمی‌کرد.
   با انتقال به این فایل — که *قبل از* فایل قالب لود می‌شود — قالب‌ها می‌توانند
   هر کدام از این اجزا را بازنویسی کنند.
   رنگ‌ها هم به متغیرهای تنظیمات وصل شدند تا از رنگ سازمانی پیروی کنند.
   ========================================================================== */

        .site-promo-bar {
            display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
            background: var(--pub-dark, #151515);
            background-image: linear-gradient(90deg, rgba(0,0,0,0.1), rgba(255,255,255,0.08) 55%, rgba(0,0,0,0.1));
            color: #fff;
            padding: 9px 14px; font-size: 13.5px; font-weight: 700; text-align: center; position: relative; z-index: 20;
        }
        .spb-code { background: var(--pub-primary, #f6d014); color: var(--pub-dark, #151515); border: none; border-radius: 8px; padding: 3px 12px; font-size: 12.5px; font-weight: 800; cursor: pointer; }
        .spb-code:hover { filter: brightness(1.08); }
        .spb-count { background: rgba(255,255,255,.12); border-radius: 8px; padding: 3px 10px; font-size: 12.5px; font-variant-numeric: tabular-nums; }
            .site-foot-brand h6 { display: flex; align-items: center; }
            .site-foot-social { margin-top: 14px; }
            .site-foot-list { line-height: 2.2; margin: 0; }
            .site-foot-list a, .site-foot-brand a { color: #b7b7b7; text-decoration: none; transition: color .15s; }
            .site-foot-list a:hover, .site-foot-brand a:hover { color: #fff; }
            .site-foot-h { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; }
            /* دسکتاپ/تبلت: همیشه باز، بدون آکاردئون */
            @media (min-width: 768px) {
                .site-foot-list { display: block !important; }
                .site-foot-h { cursor: default; }
            }
            /* موبایل: هر ستون یک آکاردئون */
            @media (max-width: 767px) {
                .site-foot-grid {
                    display: flex !important;
                    flex-direction: column;
                    gap: 0 !important;
                    row-gap: 0 !important;
                    padding: 24px 0 10px !important;
                    margin-bottom: 0 !important;
                }
                .site-foot-grid > * {
                    width: 100% !important;
                    max-width: 100% !important;
                }
                .site-foot-col {
                    padding-inline: 2px;
                    margin-bottom: 0 !important;
                    border-bottom: 1px solid rgba(255,255,255,.09);
                }
                .site-foot-col:last-child {
                    border-bottom: 0;
                }
                .site-foot-h {
                    min-height: 40px;
                    padding: 7px 2px;
                    margin: 0 !important;
                    cursor: pointer;
                    font-size: 13.5px;
                    line-height: 1.4;
                }
                .site-foot-h::after { content: '⌄'; font-size: 16px; line-height: 1; opacity: .55; transition: transform .2s; margin-inline-start: 8px; }
                .site-foot-col.open .site-foot-h::after { transform: rotate(180deg); }
                .site-foot-list { display: none; }
                .site-foot-col.open .site-foot-list {
                    display: block;
                    padding: 3px 2px 10px;
                    line-height: 1.9;
                }
                .site-foot-brand {
                    padding-inline: 2px;
                    padding-bottom: 12px;
                    margin-bottom: 4px;
                }
                .footer-corporate__inner {
                    width: 100%;
                    margin-top: 10px;
                    padding-top: 10px;
                    gap: 10px;
                    border-top: 1px solid rgba(255,255,255,.09);
                }
                .footer-corporate__inner .rights {
                    width: 100%;
                    line-height: 1.8;
                }
            }
    .quick-call-btn {
        display: none; position: fixed; bottom: 90px; right: 22px; z-index: 99997;
        width: 58px; height: 58px; border-radius: 50%;
        background: linear-gradient(160deg, #34d075, #15803d); color: #fff;
        align-items: center; justify-content: center;
        box-shadow: 0 8px 28px rgba(22,163,74,.42);
        animation: qcPulse 2.4s infinite;
    }
    .quick-call-btn:hover { color: #fff; }
    @keyframes qcPulse {
        0%, 100% { box-shadow: 0 8px 28px rgba(22,163,74,.42), 0 0 0 0 rgba(22,163,74,.35); }
        50% { box-shadow: 0 8px 28px rgba(22,163,74,.42), 0 0 0 12px rgba(22,163,74,0); }
    }
    @media (max-width: 991px) {
        .quick-call-btn { display: flex; bottom: 82px; right: 14px; }
    }

/* ==========================================================================
   منوی چسبان + افکت‌های گرافیکی (پایه‌ی مشترک؛ هر قالب می‌تواند بازنویسی کند)
   ========================================================================== */

/* --- منوی چسبان ---
   دو نکته‌ی حیاتی که بدونشان sticky کار نمی‌کند:
   ۱) .page دارای overflow:hidden بود که sticky را در همه‌ی فرزندان خنثی می‌کند.
      با overflow-x:clip همان محافظت از اسکرول افقی می‌ماند ولی sticky زنده می‌شود.
   ۲) sticky فقط داخل مرزهای والدش حرکت می‌کند؛ پس روی خودِ .page-header
      (که والدش .page تمام‌قد است) اعمال می‌شود، نه روی wrapper کوتاهِ داخلش. */
.page {
    overflow-x: clip;
    overflow-y: visible;
}
.page > .page-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 1000;
    transition: box-shadow .25s ease, background-color .25s ease;
}
/* هنگام اسکرول، هدر جمع‌وجورتر و با سایه می‌شود */
.page.is-scrolled > .page-header {
    box-shadow: 0 6px 24px -10px rgba(0, 0, 0, .28);
    backdrop-filter: saturate(1.4) blur(8px);
}
.page.is-scrolled .rd-navbar {
    background: color-mix(in srgb, #ffffff 88%, transparent);
}
@supports not (backdrop-filter: blur(1px)) {
    .page.is-scrolled .rd-navbar { background: #fff; }
}

/* --- نمایان‌شدن نرم هنگام اسکرول --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(18px);
        transition: opacity .55s cubic-bezier(.22,.61,.36,1), transform .55s cubic-bezier(.22,.61,.36,1);
        will-change: opacity, transform;
    }
    .reveal-up.is-visible { opacity: 1; transform: none; }
}

/* --- ریزتعامل‌های هاور --- */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .page .prod-card,
    .page .svc-card,
    .page .post-classic,
    .page .public-card { transition: transform .25s cubic-bezier(.22,.61,.36,1), box-shadow .25s ease; }
    .page .prod-cover img,
    .page .post-cover img,
    .page .cover-img img { transition: transform .5s cubic-bezier(.22,.61,.36,1); }
    .page .prod-card:hover .prod-cover img,
    .page .post-classic:hover .post-cover img { transform: scale(1.05); }
    .page .button, .page .btn { transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, color .16s ease; }
    .page .button:active, .page .btn:active { transform: translateY(1px); }
}

/* احترام به کاهش حرکت */
@media (prefers-reduced-motion: reduce) {
    .reveal-up { opacity: 1 !important; transform: none !important; }
}
