/* ═══════════════════════════════════════════════════════════════
   Mabsut Footer — نسخه نهایی (تمیز، بدون تناقض)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Footer Container ─── */
.mbs-footer {
    position: relative;
    background: linear-gradient(180deg, #3548a0 0%, #2d3d8a 100%);
    color: #eef2ff;
    margin-top: 60px;
    overflow: hidden;
    direction: rtl;
}

/* نوار گرادیان بالا */
.mbs-footer__accent {
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e40af 0%, #6c5ce7 33%, #b91c1c 66%, #ea580c 100%);
    z-index: 2;
}

/* ─── Row 1: Main ─── */
.mbs-footer__main {
    padding: 60px 0 40px;
    position: relative;
    z-index: 1;
}
.mbs-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1.1fr 1fr 1fr;
    gap: 36px;
    align-items: start;
}
.mbs-footer__col { min-width: 0; }
.mbs-footer__col--brand { max-width: 420px; }

/* ─── Brand ─── */
.mbs-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 18px;
}
.mbs-footer__logo-wrap {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
}
.mbs-footer__logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.mbs-footer__logo-fallback {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e40af, #6c5ce7);
    color: #fff;
    font-size: 28px;
    font-weight: 900;
    border-radius: 16px;
}
.mbs-footer__brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mbs-footer__brand-name {
    font-size: 17px;
    font-weight: 800;
    color: #fff;
}
.mbs-footer__brand-tagline {
    font-size: 12px;
    color: rgba(255, 255, 255, .75);
    font-weight: 500;
}
.mbs-footer__about {
    margin: 0 0 20px;
    font-size: 13px;
    line-height: 1.9;
    color: rgba(255, 255, 255, .7);
}

/* ─── Contact ─── */
.mbs-footer__contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mbs-footer__contact-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 10px;
    color: #eef2ff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
    align-self: flex-start;
    max-width: 100%;
}
.mbs-footer__contact-chip:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .2);
    transform: translateX(-3px);
}
.mbs-footer__contact-icon {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #6c5ce7, #1e40af);
    border-radius: 8px;
    flex-shrink: 0;
    color: #fff;
}
.mbs-footer__contact-icon svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    filter: brightness(0) invert(1);
}

/* ─── Column title ─── */
.mbs-footer__title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    padding-bottom: 12px;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    position: relative;
}
.mbs-footer__title::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #6c5ce7, #c026d3);
    border-radius: 2px;
}
.mbs-footer__title-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #6c5ce7, #c026d3);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(108, 92, 231, .6);
}

/* ─── Badges ─── */
.mbs-footer__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.mbs-footer__badge-slot {
    min-width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .95);
    border-radius: 10px;
    padding: 6px;
    overflow: hidden;
    transition: transform .25s ease;
}
.mbs-footer__badge-slot:hover { transform: translateY(-3px); }
.mbs-footer__badge-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.mbs-footer__badge-link {
    display: block;
    width: 100%;
    height: 100%;
}

/* ─── Links ─── */
.mbs-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mbs-footer__links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .25s ease;
}
.mbs-footer__links a:hover {
    color: #fff;
    transform: translateX(-6px);
}
.mbs-footer__link-icon {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 6px;
    transition: all .25s ease;
    flex-shrink: 0;
}
.mbs-footer__link-icon svg {
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
    filter: brightness(0) invert(1);
    opacity: .85;
    display: block;
}
.mbs-footer__links a:hover .mbs-footer__link-icon {
    background: linear-gradient(135deg, #6c5ce7, #1e40af);
    border-color: transparent;
    transform: scale(1.1);
}

/* ─── Row 2: Social ─── */
.mbs-footer__social {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 24px 0;
    background: rgba(0, 0, 0, .12);
}
.mbs-footer__social-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.mbs-footer__social-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, .9);
}
.mbs-footer__social-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #6c5ce7, #c026d3);
    border-radius: 8px;
}
.mbs-footer__social-icon svg {
    width: 14px !important;
    height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    filter: brightness(0) invert(1);
}
.mbs-footer__social-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ─── Social buttons ─── */
.mbs-social-btn {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    color: #eef2ff;
    text-decoration: none;
    transition: all .25s cubic-bezier(.2, .8, .2, 1);
    overflow: hidden;
    flex-shrink: 0;
}
.mbs-social-btn svg {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    display: block;
    transition: transform .25s ease;
}
.mbs-social-btn:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: transparent;
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, .4);
    color: #fff;
}
.mbs-social-btn:hover svg { transform: scale(1.15); }

/* رنگ برند هر شبکه */
.mbs-social-btn--instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.mbs-social-btn--x:hover         { background: #000; }
.mbs-social-btn--twitter:hover   { background: #1d9bf0; }
.mbs-social-btn--facebook:hover  { background: #1877f2; }
.mbs-social-btn--youtube:hover   { background: #ff0000; }
.mbs-social-btn--linkedin:hover  { background: #0077b5; }
.mbs-social-btn--telegram:hover  { background: #0088cc; }
.mbs-social-btn--whatsapp:hover  { background: #25d366; }
.mbs-social-btn--eitaa:hover     { background: #ef7f1a; }
.mbs-social-btn--aparat:hover    { background: #e02e2e; }
.mbs-social-btn--bale:hover      { background: #00a3e0; }
.mbs-social-btn--rubika:hover    { background: #7b1fa2; }
.mbs-social-btn--gap:hover       { background: #5c6bc0; }
.mbs-social-btn--soroush:hover   { background: #00b4d8; }
.mbs-social-btn--igap:hover      { background: #f59e0b; }

.mbs-social-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, .15);
    margin: 0 6px;
}

/* ─── Row 3: Bottom ─── */
.mbs-footer__bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    background: rgba(0, 0, 0, .2);
}
.mbs-footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: rgba(255, 255, 255, .65);
}
.mbs-footer__copyright {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mbs-footer__copyright strong {
    color: #fff;
    font-weight: 800;
}
.mbs-footer__copy-mark {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, .08);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
}
.mbs-footer__meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.mbs-footer__version {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, .06);
    border-radius: 6px;
    font-weight: 600;
}
.mbs-footer__version svg {
    width: 13px !important;
    height: 13px !important;
    max-width: 13px !important;
    max-height: 13px !important;
    filter: brightness(0) invert(1) opacity(.8);
}
.mbs-footer__sep { opacity: .4; }
.mbs-footer__meta-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    transition: color .2s ease;
}
.mbs-footer__meta-link:hover { color: #fff; }
.mbs-footer__meta-link svg {
    width: 12px !important;
    height: 12px !important;
    max-width: 12px !important;
    max-height: 12px !important;
    filter: brightness(0) invert(1);
}
.mbs-footer__empty-note {
    color: rgba(255, 255, 255, .5);
    font-size: 12px;
    font-style: italic;
}

/* ─── Back to top ─── */
.mbs-footer__back-to-top {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #1e40af, #6c5ce7);
    color: #fff;
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 8px 24px -6px rgba(30, 64, 175, .5);
    transition: all .25s cubic-bezier(.2, .8, .2, 1);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
}
.mbs-footer__back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}
.mbs-footer__back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px -6px rgba(30, 64, 175, .7);
}
.mbs-footer__back-to-top svg {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
    filter: brightness(0) invert(1);
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .mbs-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
    .mbs-footer__col--brand {
        grid-column: 1 / -1;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .mbs-footer__main { padding: 40px 0 28px; }
    .mbs-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .mbs-footer__col--brand {
        grid-column: 1 / -1;
    }
    .mbs-footer__col--badges {
        grid-column: 1 / -1;
    }
    .mbs-footer__col--links,
    .mbs-footer__col--services {
        grid-column: auto;
    }
    .mbs-footer__links a { font-size: 12.5px; }
    .mbs-footer__link-icon {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 480px) {
    .mbs-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .mbs-footer__col--brand {
        grid-column: 1 / -1;
    }
    .mbs-footer__col--badges,
    .mbs-footer__col--services {
        grid-column: 1 / -1;
    }
    .mbs-footer__brand { gap: 12px; }
    .mbs-footer__logo-wrap,
    .mbs-footer__logo-fallback {
        width: 52px;
        height: 52px;
    }
    .mbs-footer__about { font-size: 12.5px; }
    .mbs-footer__social-inner { justify-content: center; }
    .mbs-footer__social-links { justify-content: center; }
    .mbs-social-btn {
        width: 38px;
        height: 38px;
    }
    .mbs-social-btn svg {
        width: 20px !important;
        height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
    }
    .mbs-footer__bottom-inner {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 10px;
    }
    .mbs-footer__back-to-top {
        bottom: 86px;
        left: 12px;
        width: 44px;
        height: 44px;
    }
    .mbs-footer__back-to-top svg {
        width: 20px !important;
        height: 20px !important;
    }
}
