/* ═══════════════════════════════════════════════════════════════
   NAT-DESKTOP-FOOTER-FIX — مقاوم‌سازی فوتر
   ═══════════════════════════════════════════════════════════════ */

/* ─── ۱) مهار آیکن‌های موبایل که در دسکتاپ نشت می‌کنند ─── */
@media (min-width: 769px) {
    /* هر widget منوی موبایل باید کاملاً مخفی باشد */
    .nat-mobile-quick,
    .nat-mobile-quick-nav,
    .nat-quick-nav,
    .nat-floating-actions,
    .nat-float-nav,
    #natMobileQuick,
    #natMobileQuickNav,
    [class*="mobile-quick"],
    [class*="quick-nav"],
    [class*="mobile-nav-fab"],
    [class*="floating-nav"] {
        display: none !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        max-width: 0 !important;
        max-height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        left: -99999px !important;
        top: -99999px !important;
        pointer-events: none !important;
        opacity: 0 !important;
        z-index: -9999 !important;
    }
}

/* ─── ۲) محدودسازی SVGهای سرگردان در فوتر ─── */
html body footer.footer svg {
    max-width: 30px !important;
    max-height: 30px !important;
    width: auto !important;
    height: auto !important;
}
/* SVGهای داخل شبکه‌های اجتماعی — اجازه ۲۰px */
html body footer.footer .footer__social svg {
    max-width: 20px !important;
    max-height: 20px !important;
    width: 20px !important;
    height: 20px !important;
}
/* SVG داخل برند */
html body footer.footer .brand__mark svg {
    max-width: 22px !important;
    max-height: 22px !important;
    width: 22px !important;
    height: 22px !important;
}

/* ─── ۳) هر SVG بزرگ مستقیم زیر body یا main → مخفی ─── */
html body > svg,
html body main > svg:not([width]):not([height]),
html body main + svg,
html body main > div > svg:only-child {
    max-width: 40px !important;
    max-height: 40px !important;
    width: 40px !important;
    height: 40px !important;
    display: inline-block !important;
}

/* ─── ۴) قفل کردن گرید فوتر در دسکتاپ ─── */
@media (min-width: 901px) {
    html body footer.footer .footer__inner,
    html body footer.footer .container.footer__inner,
    html body footer.footer > .container,
    html body footer.footer > .footer__inner {
        display: grid !important;
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr !important;
        grid-auto-flow: row !important;
        gap: 26px !important;
        align-items: start !important;
        padding: 0 32px 12px !important;
        max-width: 1240px !important;
        margin: 0 auto !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background: transparent !important;
        border: none !important;
        float: none !important;
        position: relative !important;
        overflow: visible !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    /* ستون‌های فوتر — عرض دقیق */
    html body footer.footer .footer__col {
        display: block !important;
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        float: none !important;
        position: relative !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
    html body footer.footer .footer__col--brand {
        display: block !important;
    }

    /* نوار پایین — flex افقی */
    html body footer.footer .footer__bottom .container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        flex-direction: row !important;
        text-align: right !important;
    }
}

/* ─── ۵) تبلت — ۲ ستونه ─── */
@media (min-width: 601px) and (max-width: 900px) {
    html body footer.footer .footer__inner,
    html body footer.footer .container.footer__inner {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
        padding: 0 22px 12px !important;
    }
    html body footer.footer .footer__col--brand {
        grid-column: 1 / -1 !important;
    }
}

/* ─── ۶) موبایل — تک‌ستونه + فشرده ─── */
@media (max-width: 600px) {
    html body footer.footer .footer__inner,
    html body footer.footer .container.footer__inner {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 0 16px 10px !important;
    }
    html body footer.footer .footer__col:not(.footer__col--brand) {
        display: none !important;
    }
}

/* ─── ۷) تضمین: هیچ آیکن بزرگ در footer ─── */
html body footer.footer img:not(.footer__enamad img) {
    max-width: 32px !important;
    max-height: 32px !important;
}

/* ─── ۸) مهار SVGهای بزرگ سراسری (safety net) ─── */
svg[viewBox]:only-child,
svg[viewBox]:not([class]):not([id]):not([width]):not([height]) {
    max-width: 60px !important;
    max-height: 60px !important;
}