/* ═══════════════════════════════════════════════════════════════
   NAT-FOOTER-MOBILE — فوتر اختصاصی موبایل (بدون دست‌کاری دسکتاپ)
   ═══════════════════════════════════════════════════════════════ */

/* ─── پیش‌فرض (دسکتاپ): دکمه‌های موبایلی مخفی ─── */
.nat-footer-menu-mobile { display: none !important; }

/* ─── موبایل: تا 768px ─── */
@media (max-width: 768px) {

    /* ۱) مخفی کردن ۳ ستون لینک در موبایل */
    html body footer.footer .footer__col:not(.footer__col--brand) {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* ۲) فوتر تک‌ستونه، فشرده */
    html body footer.footer {
        padding: 18px 0 0 !important;
        margin-top: 20px !important;
    }
    html body footer.footer .footer__inner,
    html body footer.footer .container.footer__inner,
    html body footer.footer > .container.footer__inner {
        display: block !important;
        grid-template-columns: 1fr !important;
        padding: 0 16px 8px !important;
        gap: 0 !important;
        text-align: center !important;
    }

    /* ۳) ستون برند — مرکز چین */
    html body footer.footer .footer__col--brand {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        padding: 0 !important;
    }
    html body footer.footer .footer__col--brand .brand {
        justify-content: center !important;
        margin: 0 0 4px !important;
    }
    html body footer.footer .footer__col--brand p {
        text-align: center !important;
        font-size: .74rem !important;
        margin: 4px 0 0 !important;
        max-width: 320px !important;
        line-height: 1.65 !important;
    }

    /* ۴) گرید دکمه‌های منو — نمایش داده می‌شود */
    .nat-footer-menu-mobile {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 7px !important;
        width: 100% !important;
        max-width: 420px !important;
        margin: 12px auto 14px !important;
        padding: 0 !important;
    }
    .nat-footer-menu-mobile a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        padding: 10px 12px !important;
        background: rgba(255,255,255,.06) !important;
        border: 1px solid rgba(255,255,255,.14) !important;
        border-radius: 10px !important;
        color: #fbf9f3 !important;
        font-family: 'Vazirmatn',Tahoma !important;
        font-size: .78rem !important;
        font-weight: 700 !important;
        text-decoration: none !important;
        text-align: center !important;
        line-height: 1.3 !important;
        transition: all .22s ease !important;
        box-sizing: border-box !important;
        min-height: 40px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    .nat-footer-menu-mobile a:active,
    .nat-footer-menu-mobile a:hover {
        background: linear-gradient(135deg, #D99A2B, #8B5E14) !important;
        border-color: transparent !important;
        color: #1a1e22 !important;
        transform: translateY(-1px) !important;
    }
    /* دکمه‌های مخصوص — پروفایل / ورود / خروج */
    .nat-footer-menu-mobile a.is-account {
        background: linear-gradient(135deg, #0F3641, #2A6E80) !important;
        border-color: rgba(217,154,43,.35) !important;
        color: #D99A2B !important;
        font-weight: 800 !important;
    }
    .nat-footer-menu-mobile a.is-account:active,
    .nat-footer-menu-mobile a.is-account:hover {
        background: linear-gradient(135deg, #D99A2B, #8B5E14) !important;
        color: #1a1e22 !important;
        border-color: transparent !important;
    }

    /* ۵) شبکه‌های اجتماعی — مربعی، مرتب، وسط‌چین */
    html body footer.footer .footer__badges {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 10px 0 4px !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        height: auto !important;
        min-height: 0 !important;
    }
    html body footer.footer .footer__social {
        display: flex !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        flex: none !important;
        width: 100% !important;
    }
    /* آیکن‌ها مربعی، هم‌اندازه ۴۰×۴۰ */
    html body footer.footer .footer__social a,
    html body footer.footer .footer__enamad {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
        border-radius: 10px !important;
        background: rgba(255,255,255,.08) !important;
        border: 1px solid rgba(255,255,255,.16) !important;
        color: #fbf9f3 !important;
        padding: 0 !important;
        margin: 0 !important;
        flex: none !important;
        text-decoration: none !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        transition: all .22s ease !important;
    }
    /* دکمه‌های KIIFF / IFOS */
    html body footer.footer .footer__social a.ext-btn {
        width: auto !important;
        min-width: 56px !important;
        max-width: 72px !important;
        padding: 0 10px !important;
        font-size: .68rem !important;
        font-weight: 800 !important;
        color: #D99A2B !important;
        letter-spacing: .04em !important;
        line-height: 1 !important;
    }
    html body footer.footer .footer__social a svg {
        width: 18px !important;
        height: 18px !important;
        max-width: 18px !important;
        max-height: 18px !important;
        display: block !important;
        color: currentColor !important;
        stroke: currentColor !important;
    }
    html body footer.footer .footer__enamad img {
        width: 26px !important;
        height: 26px !important;
        max-width: 26px !important;
        max-height: 26px !important;
        background: #fff !important;
        border-radius: 5px !important;
        padding: 2px !important;
        display: block !important;
        object-fit: contain !important;
    }
    html body footer.footer .footer__enamad span { display: none !important; }

    /* ۶) نوار پایین فوتر — فشرده */
    html body footer.footer .footer__bottom {
        margin-top: 10px !important;
        padding: 9px 0 !important;
        font-size: .68rem !important;
    }
    html body footer.footer .footer__bottom .container {
        padding: 0 16px !important;
        flex-direction: column !important;
        gap: 4px !important;
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* ۷) مخفی کردن CTA اضافی */
    html body footer.footer .footer__cta-strip { display: none !important; }
}

/* ─── موبایل کوچک — 480px ─── */
@media (max-width: 480px) {
    .nat-footer-menu-mobile {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
        max-width: 100% !important;
    }
    .nat-footer-menu-mobile a {
        font-size: .72rem !important;
        padding: 9px 8px !important;
        min-height: 38px !important;
    }
    html body footer.footer .footer__social a,
    html body footer.footer .footer__enamad {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }
    html body footer.footer .footer__social a.ext-btn {
        min-width: 50px !important;
        font-size: .64rem !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   دسکتاپ — هیچ تغییری، همه چیز مثل قبل
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 769px) {
    .nat-footer-menu-mobile { display: none !important; }
    /* اطمینان از گرید ۴ ستونه */
    html body footer.footer .footer__inner,
    html body footer.footer .container.footer__inner {
        display: grid !important;
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr !important;
        gap: 22px !important;
    }
    html body footer.footer .footer__col:not(.footer__col--brand) {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        overflow: visible !important;
    }
}