/* ═══════════════════════════════════════════════════════════
   Footer v2 — mockup-aligned, premium RTL
   ═══════════════════════════════════════════════════════════ */

/* Sticky footer — فوتر به کف سایت می‌چسبد، بدون فضای خالی پایین */
html.mk-public {
    height: 100%;
}

html.mk-public body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding-bottom: 0;
}

html.mk-public .mk-site-header,
html.mk-public .mk-mobile-panel,
html.mk-public .main-content,
html.mk-public .footer.mk-footer-v2 {
    flex-shrink: 0;
}

html.mk-public .main-content {
    flex: 1 0 auto;
}

html.mk-public .footer.mk-footer-v2 {
    margin-top: auto !important;
    margin-bottom: 0 !important;
}

.mk-footer-v2 {
    --mk-ft-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --mk-ft-bg-image: url('../images/footer-bg.webp');
    --mk-ft-bg-height: clamp(220px, 34vw, 420px);
    --mk-ft-bg-base: #eef2f8;
    --mk-ft-border: rgba(15, 23, 42, 0.1);
    --mk-ft-text: #0f172a;
    --mk-ft-muted: #64748b;
    --mk-ft-accent: #7c3aed;
    --mk-ft-accent-strong: #6d28d9;
    --mk-ft-link-hover: #0f172a;
    --mk-ft-trust-bg: rgba(255, 255, 255, 0.72);
    --mk-ft-trust-slot-bg: rgba(255, 255, 255, 0.92);
    --mk-ft-scroll-bg: rgba(255, 255, 255, 0.85);
    --mk-ft-city-opacity: 0.82;
    --mk-ft-social-bg: rgba(255, 255, 255, 0.55);
    --mk-ft-purple: #7c3aed;
    --mk-ft-purple-hover: #6d28d9;
    position: relative;
    margin-top: 0;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow: hidden;
    color: var(--mk-ft-text);
}

html.mk-public .footer.mk-footer-pro.mk-footer-v2 {
    background-color: var(--mk-ft-bg-base) !important;
    background-image: none !important;
    border-top: none !important;
    color: var(--mk-ft-text) !important;
    isolation: isolate;
    padding-top: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px)) !important;
}

html.mk-public .footer.mk-footer-pro.mk-footer-v2 a {
    color: inherit;
}

/* Dark theme */
html.mk-public:not([data-theme="light"]) .mk-footer-v2 {
    --mk-ft-bg-base: #0a0814;
    --mk-ft-text: #f8fafc;
    --mk-ft-muted: #94a3b8;
    --mk-ft-accent: #c4b5fd;
    --mk-ft-accent-strong: #a78bfa;
    --mk-ft-link-hover: #ffffff;
    --mk-ft-border: rgba(148, 163, 184, 0.14);
    --mk-ft-trust-bg: rgba(255, 255, 255, 0.04);
    --mk-ft-trust-slot-bg: rgba(255, 255, 255, 0.06);
    --mk-ft-scroll-bg: rgba(255, 255, 255, 0.05);
    --mk-ft-city-opacity: 1;
    --mk-ft-social-bg: rgba(255, 255, 255, 0.04);
}

/* Light theme */
html.mk-public[data-theme="light"] .mk-footer-v2 {
    --mk-ft-bg-base: #eef2f8;
    --mk-ft-text: #0f172a;
    --mk-ft-muted: #64748b;
    --mk-ft-accent: #7c3aed;
    --mk-ft-accent-strong: #6d28d9;
    --mk-ft-link-hover: #0f172a;
    --mk-ft-border: rgba(15, 23, 42, 0.1);
    --mk-ft-trust-bg: rgba(255, 255, 255, 0.72);
    --mk-ft-trust-slot-bg: rgba(255, 255, 255, 0.92);
    --mk-ft-scroll-bg: rgba(255, 255, 255, 0.85);
    --mk-ft-city-opacity: 0.82;
    --mk-ft-social-bg: rgba(255, 255, 255, 0.55);
}

/* Cityscape — full width, anchored to bottom */
.mk-footer-v2.footer::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--mk-ft-bg-height);
    background-image: var(--mk-ft-bg-image);
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: 100% auto;
    opacity: var(--mk-ft-city-opacity, 1);
    pointer-events: none;
    z-index: 0;
}

/* Overlay — theme-specific */
.mk-footer-v2.footer::before {
    content: '' !important;
    display: block !important;
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(10, 8, 20, 0.96) 0%,
            rgba(10, 8, 20, 0.88) 32%,
            rgba(10, 8, 20, 0.62) 58%,
            rgba(10, 8, 20, 0.22) 82%,
            rgba(10, 8, 20, 0.08) 100%
        ),
        radial-gradient(ellipse 65% 50% at 12% 0%, rgba(124, 58, 237, 0.1), transparent 58%);
    pointer-events: none;
    z-index: 1;
}

html.mk-public[data-theme="light"] .mk-footer-v2.footer::before {
    background:
        linear-gradient(
            180deg,
            rgba(241, 245, 249, 0.98) 0%,
            rgba(241, 245, 249, 0.9) 30%,
            rgba(241, 245, 249, 0.72) 55%,
            rgba(241, 245, 249, 0.42) 78%,
            rgba(241, 245, 249, 0.12) 100%
        ),
        radial-gradient(ellipse 65% 50% at 12% 0%, rgba(124, 58, 237, 0.06), transparent 58%);
}

.mk-footer-v2 .container {
    position: relative;
    z-index: 2;
}

html.mk-public .footer.mk-footer-pro.mk-footer-v2.footer::before {
    display: block !important;
}

.mk-footer-v2 .mk-ft-shell {
    padding-top: clamp(1.75rem, 4vw, 2.75rem);
    padding-bottom: clamp(0.75rem, 2vw, 1rem);
}

/* Reveal */
.mk-footer-v2 .mk-ft-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition:
        opacity 0.7s var(--mk-ft-ease),
        transform 0.7s var(--mk-ft-ease);
    transition-delay: calc(var(--ft-delay, 0) * 0.06s);
}

.mk-footer-v2 .mk-ft-reveal.is-inview {
    opacity: 1;
    transform: translateY(0);
}

/* ── CTA row ── */
.mk-footer-v2 .mk-ft-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 3vw, 2rem);
    flex-wrap: wrap;
    padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
    border-bottom: 1px solid var(--mk-ft-border);
}

.mk-footer-v2 .mk-ft-cta__copy {
    flex: 1 1 16rem;
    min-width: 0;
}

.mk-footer-v2 .mk-ft-cta__title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.15rem, 2.4vw, 1.55rem);
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: -0.02em;
    color: var(--mk-ft-text) !important;
}

.mk-footer-v2 .mk-ft-cta__sub {
    margin: 0;
    font-size: clamp(0.78rem, 1.5vw, 0.88rem);
    line-height: 1.6;
    color: var(--mk-ft-muted) !important;
}

.mk-footer-v2 .mk-ft-cta__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

.mk-footer-v2 .mk-ft-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.62rem 1.15rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background 0.22s var(--mk-ft-ease),
        border-color 0.22s var(--mk-ft-ease),
        color 0.22s var(--mk-ft-ease),
        transform 0.22s var(--mk-ft-ease),
        box-shadow 0.22s var(--mk-ft-ease);
}

.mk-footer-v2 .mk-ft-btn--primary {
    background: var(--mk-ft-purple);
    color: #fff !important;
    box-shadow: 0 8px 24px -8px rgba(124, 58, 237, 0.55);
}

.mk-footer-v2 .mk-ft-btn--primary:hover {
    background: var(--mk-ft-purple-hover);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -8px rgba(124, 58, 237, 0.65);
}

.mk-footer-v2 .mk-ft-btn--ghost {
    background: transparent;
    border-color: color-mix(in srgb, var(--mk-ft-text) 28%, transparent);
    color: var(--mk-ft-text) !important;
}

.mk-footer-v2 .mk-ft-btn--ghost:hover {
    border-color: color-mix(in srgb, var(--mk-ft-text) 45%, transparent);
    background: color-mix(in srgb, var(--mk-ft-text) 6%, transparent);
    color: var(--mk-ft-link-hover) !important;
}

/* ── Main grid ── */
.mk-footer-v2 .mk-ft-main {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 2.2fr) auto;
    gap: clamp(1rem, 2.5vw, 1.75rem);
    align-items: start;
    padding: 0 0 clamp(1.25rem, 2.5vw, 1.65rem);
    border-bottom: 1px solid var(--mk-ft-border);
}

/* Brand */
.mk-footer-v2 .mk-ft-brand {
    padding: 0;
}

.mk-footer-v2 .mk-ft-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    margin-bottom: 0.75rem;
}

.mk-footer-v2 .mk-ft-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 6px 20px -8px rgba(124, 58, 237, 0.4);
    flex-shrink: 0;
}

.mk-footer-v2 .mk-ft-logo-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.mk-footer-v2 .mk-ft-logo-text {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--mk-ft-text) !important;
    letter-spacing: -0.02em;
}

.mk-footer-v2 .mk-ft-tagline {
    margin: 0 0 1rem;
    max-width: 16rem;
    font-size: 0.78rem;
    line-height: 1.75;
    color: var(--mk-ft-muted) !important;
}

.mk-footer-v2 .mk-ft-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.mk-footer-v2 .mk-ft-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    font-size: 0.82rem;
    color: var(--mk-ft-muted) !important;
    background: var(--mk-ft-social-bg);
    border: 1px solid var(--mk-ft-border);
    border-radius: 10px;
    text-decoration: none;
    transition:
        color 0.22s var(--mk-ft-ease),
        border-color 0.22s var(--mk-ft-ease),
        background 0.22s var(--mk-ft-ease),
        transform 0.22s var(--mk-ft-ease);
}

.mk-footer-v2 .mk-ft-social-link:hover {
    color: var(--mk-ft-link-hover) !important;
    border-color: rgba(124, 58, 237, 0.4);
    background: rgba(124, 58, 237, 0.15);
    transform: translateY(-2px);
}

/* Link columns */
.mk-footer-v2 .mk-ft-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.5rem, 1.5vw, 0.85rem);
}

.mk-footer-v2 .mk-ft-col {
    padding: 0;
}

.mk-footer-v2 .mk-ft-col-title {
    margin: 0 0 0.7rem;
    padding-bottom: 0.45rem;
    width: 100%;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: var(--mk-ft-accent-strong) !important;
    border-bottom: 1px solid rgba(124, 58, 237, 0.25);
}

.mk-footer-v2 .mk-ft-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
}

.mk-footer-v2 .mk-ft-col a {
    display: inline-flex;
    align-items: center;
    font-size: 0.77rem;
    font-weight: 500;
    color: var(--mk-ft-muted) !important;
    text-decoration: none;
    transition: color 0.2s var(--mk-ft-ease), transform 0.2s var(--mk-ft-ease);
}

.mk-footer-v2 .mk-ft-col a:hover {
    color: var(--mk-ft-link-hover) !important;
    transform: translateX(-2px);
}

/* Trust badge — single enamad link, no outer card */
.mk-footer-v2 .mk-ft-trust {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 5.5rem;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
}

.mk-footer-v2 .mk-ft-trust-slot--enamad {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
    text-decoration: none;
    line-height: 0;
}

.mk-footer-v2 .mk-ft-trust-slot--enamad img {
    display: block;
    width: 80px;
    height: 80px;
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}

.mk-footer-v2 .mk-ft-trust-note {
    margin: 0.55rem auto 0;
    font-size: 0.62rem;
    line-height: 1.55;
    color: var(--mk-ft-muted) !important;
    max-width: 9.5rem;
}

/* Bottom bar */
.mk-footer-v2 .mk-ft-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.15rem;
    padding-top: clamp(0.85rem, 2vw, 1.15rem);
}

.mk-footer-v2 .mk-ft-bar-copy {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1 1 12rem;
    min-width: 0;
}

.mk-footer-v2 .mk-ft-copy {
    margin: 0;
    font-size: 0.71rem;
    line-height: 1.55;
    color: var(--mk-ft-muted) !important;
}

.mk-footer-v2 .mk-ft-creator {
    font-size: 0.65rem;
}

.mk-footer-v2 .mk-ft-creator a {
    color: var(--mk-ft-accent-strong) !important;
    text-decoration: none;
    font-weight: 600;
}

.mk-footer-v2 .mk-ft-creator a:hover {
    color: var(--mk-ft-accent) !important;
}

.mk-footer-v2 .mk-ft-bar-end {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.mk-footer-v2 .mk-ft-bar-nav {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem 0.55rem;
}

.mk-footer-v2 .mk-ft-bar-nav a {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--mk-ft-muted) !important;
    text-decoration: none;
    transition: color 0.2s var(--mk-ft-ease);
}

.mk-footer-v2 .mk-ft-bar-nav a:hover {
    color: var(--mk-ft-link-hover) !important;
}

.mk-footer-v2 .mk-ft-bar-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.45);
    flex-shrink: 0;
}

.mk-footer-v2 .mk-ft-scroll-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    border: 1px solid var(--mk-ft-border);
    border-radius: 50%;
    background: var(--mk-ft-scroll-bg);
    color: var(--mk-ft-muted);
    font-size: 0.75rem;
    cursor: pointer;
    flex-shrink: 0;
    transition:
        background 0.22s var(--mk-ft-ease),
        border-color 0.22s var(--mk-ft-ease),
        color 0.22s var(--mk-ft-ease),
        transform 0.22s var(--mk-ft-ease);
}

.mk-footer-v2 .mk-ft-scroll-top:hover {
    background: rgba(124, 58, 237, 0.2);
    border-color: rgba(124, 58, 237, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1100px) {
    .mk-footer-v2 .mk-ft-main {
        grid-template-columns: 1fr 1fr;
    }

    .mk-footer-v2 .mk-ft-links {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mk-footer-v2 .mk-ft-trust {
        grid-column: 1 / -1;
        justify-self: center;
    }
}

@media (max-width: 991px) {
    .mk-footer-v2 .mk-ft-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .mk-footer-v2 .mk-ft-cta__actions {
        width: 100%;
    }

    .mk-footer-v2 .mk-ft-btn {
        flex: 1 1 auto;
        min-width: 0;
    }
}

@media (max-width: 640px) {
    .mk-footer-v2 .mk-ft-main {
        grid-template-columns: 1fr;
    }

    .mk-footer-v2 .mk-ft-links {
        grid-template-columns: 1fr;
    }

    .mk-footer-v2 .mk-ft-brand {
        text-align: center;
    }

    .mk-footer-v2 .mk-ft-logo,
    .mk-footer-v2 .mk-ft-social {
        justify-content: center;
    }

    .mk-footer-v2 .mk-ft-tagline {
        max-width: none;
        margin-inline: auto;
    }

    .mk-footer-v2 .mk-ft-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .mk-footer-v2 .mk-ft-bar-end {
        width: 100%;
        justify-content: space-between;
    }

    .mk-footer-v2 .mk-ft-cta__actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mk-footer-v2 .mk-ft-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .mk-footer-v2 .mk-ft-col a,
    .mk-footer-v2 .mk-ft-social-link,
    .mk-footer-v2 .mk-ft-btn,
    .mk-footer-v2 .mk-ft-scroll-top {
        transition: none;
    }
}
