/**
 * emadbrz – Full-bleed dark footer
 */

.emadbrz-footer {
    --footer-content-max: 1680px;
    --footer-mt: 0;
    --footer-min-h: 340px;
    --footer-accent: #5b58f2;
    --footer-accent-light: #8b88ff;
    --footer-text: #f1f5f9;
    --footer-text-muted: rgba(241, 245, 249, 0.55);
    --footer-border: rgba(255, 255, 255, 0.08);
    --footer-glass: rgba(255, 255, 255, 0.05);
    --footer-glass-border: rgba(255, 255, 255, 0.1);
    --footer-glass-hover: rgba(91, 88, 242, 0.15);
    --footer-social: 44px;
    --footer-bar-h: 68px;
    /* Match site page-bg (#0f1117 dark) then deepen softly — no hard cut */
    --footer-page: var(--page-bg, #0f1117);
    --footer-shell-bg:
        radial-gradient(ellipse 80% 55% at 90% 30%, rgba(91, 88, 242, 0.14) 0%, transparent 58%),
        radial-gradient(ellipse 60% 45% at 8% 100%, rgba(74, 71, 224, 0.1) 0%, transparent 52%),
        linear-gradient(
            180deg,
            var(--footer-page) 0%,
            var(--footer-page) 28%,
            #0d0f16 62%,
            #0b0c12 100%
        );
    --footer-glow-tr: rgba(91, 88, 242, 0.28);
    --footer-glow-bl: rgba(74, 71, 224, 0.22);

    position: relative;
    z-index: 2;
    width: 100%;
    max-width: none;
    min-height: var(--footer-min-h);
    margin: var(--footer-mt) 0 0;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    color: var(--footer-text);
    overflow: hidden;
    background: transparent;
}

.emadbrz-footer__shell {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: var(--footer-min-h);
    overflow: hidden;
    border-radius: 0;
    border: none;
    background: var(--footer-shell-bg);
    box-shadow: none;
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
    /* Soft dissolve into the page above */
    -webkit-mask-image: linear-gradient(
        180deg,
        transparent 0%,
        #000 72px,
        #000 100%
    );
    mask-image: linear-gradient(
        180deg,
        transparent 0%,
        #000 72px,
        #000 100%
    );
}

/* Soft haze at the seam (replaces hard 1px rule) */
.emadbrz-footer__shell::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(
        180deg,
        var(--footer-page) 0%,
        rgba(15, 17, 23, 0.55) 35%,
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
}

.emadbrz-footer__shell::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: min(720px, 70%);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(155, 152, 245, 0.18) 40%,
        rgba(155, 152, 245, 0.28) 50%,
        rgba(155, 152, 245, 0.18) 60%,
        transparent 100%
    );
    opacity: 0.55;
    z-index: 3;
    pointer-events: none;
    filter: blur(0.5px);
}

.emadbrz-footer--visible .emadbrz-footer__shell {
    opacity: 1;
    transform: translateY(0);
}

/* Decorative background */
.emadbrz-footer__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.emadbrz-footer__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
}

.emadbrz-footer__glow--tr {
    width: 420px;
    height: 420px;
    top: -40px;
    inset-inline-end: -80px;
    background: var(--footer-glow-tr);
    opacity: 0.35;
}

.emadbrz-footer__glow--bl {
    width: 360px;
    height: 360px;
    bottom: -120px;
    inset-inline-start: -60px;
    background: var(--footer-glow-bl);
}

.emadbrz-footer__grid-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.6) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.6) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}

.emadbrz-footer__dots {
    position: absolute;
    inset-inline-end: 6%;
    top: 22%;
    width: 140px;
    height: 120px;
    opacity: 0.06;
    background-image: radial-gradient(circle, rgba(139, 136, 255, 0.9) 1.5px, transparent 1.5px);
    background-size: 18px 18px;
}

.emadbrz-footer--ltr .emadbrz-footer__dots {
    inset-inline-end: auto;
    inset-inline-start: 6%;
}

/* Main 3-column layout */
.emadbrz-footer__main {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr) minmax(0, 0.75fr);
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3rem);
    flex: 1;
    width: min(var(--footer-content-max), 100%);
    margin-inline: auto;
    padding: clamp(3.25rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2rem);
}

.emadbrz-footer--rtl .emadbrz-footer__main {
    direction: rtl;
}

.emadbrz-footer--ltr .emadbrz-footer__main {
    direction: ltr;
}

/* Brand */
.emadbrz-footer__brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.125rem;
    min-width: 0;
}

.emadbrz-footer__logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--footer-text);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.emadbrz-footer__logo:hover {
    opacity: 0.9;
    color: var(--footer-text);
    transform: translateY(-1px);
}

.emadbrz-footer__logo-text {
    font-size: clamp(1.75rem, 3vw, 2.125rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, rgba(241, 245, 249, 0.85) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.emadbrz-footer__logo-dot {
    -webkit-text-fill-color: var(--footer-accent);
    color: var(--footer-accent);
}

.emadbrz-footer__logo-img {
    display: block;
    max-height: 44px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.05);
}

.emadbrz-footer__tagline {
    margin: 0;
    max-width: 22rem;
    font-size: clamp(0.8125rem, 1.2vw, 0.9375rem);
    line-height: 1.75;
    color: var(--footer-text-muted);
}

.emadbrz-footer--rtl .emadbrz-footer__logo-text,
.emadbrz-footer--rtl .emadbrz-footer__tagline,
.emadbrz-footer--rtl .emadbrz-footer__section-title,
.emadbrz-footer--rtl .emadbrz-footer__link,
.emadbrz-footer--rtl .emadbrz-footer__copyright,
.emadbrz-footer--rtl .emadbrz-footer__credit {
    font-family: 'ModamWeb', sans-serif;
}

.emadbrz-footer--ltr .emadbrz-footer__logo-text,
.emadbrz-footer--ltr .emadbrz-footer__tagline,
.emadbrz-footer--ltr .emadbrz-footer__section-title,
.emadbrz-footer--ltr .emadbrz-footer__link,
.emadbrz-footer--ltr .emadbrz-footer__copyright,
.emadbrz-footer--ltr .emadbrz-footer__credit {
    font-family: 'DM Sans', 'ModamWeb', sans-serif;
}

/* Social */
.emadbrz-footer__social {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
}

.emadbrz-footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--footer-social);
    height: var(--footer-social);
    border-radius: 12px;
    color: var(--footer-text-muted);
    text-decoration: none;
    background: var(--footer-glass);
    border: 1px solid var(--footer-glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease,
        background 0.3s ease,
        color 0.3s ease;
}

.emadbrz-footer__social-link svg {
    width: 18px;
    height: 18px;
}

.emadbrz-footer__social-link:hover {
    transform: translateY(-3px);
    border-color: rgba(91, 88, 242, 0.5);
    background: var(--footer-glass-hover);
    box-shadow:
        0 8px 24px rgba(91, 88, 242, 0.25),
        0 0 0 1px rgba(91, 88, 242, 0.15);
    color: var(--footer-accent-light);
}

/* Quick links */
.emadbrz-footer__links {
    min-width: 0;
}

.emadbrz-footer__section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.125rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--footer-text);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.emadbrz-footer__section-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--footer-accent);
    box-shadow: 0 0 14px rgba(91, 88, 242, 0.8);
    flex-shrink: 0;
}

.emadbrz-footer__links-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.emadbrz-footer__link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--footer-text-muted);
    text-decoration: none;
    padding: 0.25rem 0;
    transition: color 0.25s ease, transform 0.25s ease;
}

.emadbrz-footer__link-chevron {
    font-size: 1rem;
    line-height: 1;
    color: rgba(91, 88, 242, 0.4);
    transition: color 0.25s ease, transform 0.25s ease;
}

.emadbrz-footer__link:hover {
    color: var(--footer-text);
}

.emadbrz-footer__link:hover .emadbrz-footer__link-chevron {
    color: var(--footer-accent-light);
}

.emadbrz-footer--rtl .emadbrz-footer__link:hover {
    transform: translateX(-4px);
}

.emadbrz-footer--ltr .emadbrz-footer__link:hover {
    transform: translateX(4px);
}

/* Trust badge */
.emadbrz-footer__trust {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
    min-width: 0;
}

.emadbrz-footer__section-title--trust {
    margin-bottom: 0.25rem;
}

.emadbrz-footer__trust-card {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: var(--footer-glass);
    border: 1px solid var(--footer-glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.emadbrz-footer__trust-card:hover {
    transform: translateY(-3px);
    border-color: rgba(91, 88, 242, 0.3);
    box-shadow:
        0 12px 36px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(91, 88, 242, 0.12);
}

.emadbrz-footer__trust-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
}

.emadbrz-footer__trust-img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 8px;
}

.emadbrz-footer__trust-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 88px;
    min-height: 88px;
    text-align: center;
}

.emadbrz-footer__trust-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.375rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #5b58f2, #4a47e0);
    box-shadow: 0 8px 24px rgba(91, 88, 242, 0.4);
}

.emadbrz-footer__trust-badge-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--footer-text-muted);
}

@media (min-width: 1101px) {
    .emadbrz-footer--ltr .emadbrz-footer__trust {
        align-items: flex-end;
    }

    .emadbrz-footer--rtl .emadbrz-footer__trust {
        align-items: flex-start;
    }
}

/* Bottom bar */
.emadbrz-footer__bar {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--footer-bar-h);
    width: min(var(--footer-content-max), 100%);
    margin-inline: auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    border-top: 1px solid var(--footer-border);
    background: rgba(0, 0, 0, 0.2);
}

.emadbrz-footer--rtl .emadbrz-footer__bar {
    direction: rtl;
}

.emadbrz-footer--ltr .emadbrz-footer__bar {
    direction: ltr;
}

.emadbrz-footer__copyright,
.emadbrz-footer__credit {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--footer-text-muted);
}

.emadbrz-footer__credit a {
    color: var(--footer-text-muted);
    text-decoration: none;
    transition: color 0.25s ease;
}

.emadbrz-footer__credit a:hover {
    color: var(--footer-accent-light);
}

/* Stagger reveal */
.emadbrz-footer--visible .emadbrz-footer__brand {
    animation: emadbrz-footer-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.emadbrz-footer--visible .emadbrz-footer__links {
    animation: emadbrz-footer-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

.emadbrz-footer--visible .emadbrz-footer__trust {
    animation: emadbrz-footer-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}

.emadbrz-footer--visible .emadbrz-footer__bar {
    animation: emadbrz-footer-fade-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.32s both;
}

@keyframes emadbrz-footer-fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
    .emadbrz-footer__main {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            'brand brand'
            'links trust';
    }

    .emadbrz-footer__brand {
        grid-area: brand;
    }

    .emadbrz-footer__links {
        grid-area: links;
    }

    .emadbrz-footer__trust {
        grid-area: trust;
        align-items: center;
        text-align: center;
    }

    .emadbrz-footer__trust .emadbrz-footer__section-title {
        justify-content: center;
        width: 100%;
    }

    .emadbrz-footer__trust-card {
        margin-inline: auto;
    }
}

@media (max-width: 767px) {
    .emadbrz-footer {
        --footer-min-h: auto;
        --footer-social: 42px;
        --footer-bar-h: auto;
    }

    .emadbrz-footer__main {
        grid-template-columns: 1fr;
        grid-template-areas:
            'brand'
            'links'
            'trust';
        gap: 1.75rem;
        padding: 2rem 1.25rem 1.5rem;
    }

    .emadbrz-footer__brand,
    .emadbrz-footer__links,
    .emadbrz-footer__trust {
        align-items: center;
        text-align: center;
    }

    .emadbrz-footer__tagline {
        max-width: 28rem;
    }

    .emadbrz-footer__social {
        justify-content: center;
    }

    .emadbrz-footer__section-title {
        justify-content: center;
    }

    .emadbrz-footer__links-list {
        align-items: center;
    }

    .emadbrz-footer__bar {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 1rem 1.25rem 1.25rem;
        text-align: center;
    }
}

@media (max-width: 479px) {
    .emadbrz-footer {
        --footer-mt: 40px;
    }

    .emadbrz-footer__logo-text {
        font-size: 1.5rem;
    }

    .emadbrz-footer__tagline {
        font-size: 0.8125rem;
        line-height: 1.65;
    }
}

@media (prefers-reduced-motion: reduce) {
    .emadbrz-footer__shell,
    .emadbrz-footer--visible .emadbrz-footer__brand,
    .emadbrz-footer--visible .emadbrz-footer__links,
    .emadbrz-footer--visible .emadbrz-footer__trust,
    .emadbrz-footer--visible .emadbrz-footer__bar {
        animation: none;
        opacity: 1;
        transform: none;
        transition: none;
    }

    .emadbrz-footer__social-link:hover,
    .emadbrz-footer__trust-card:hover,
    .emadbrz-footer__link:hover {
        transform: none;
    }
}

@media (hover: none) {
    .emadbrz-footer__social-link:hover {
        transform: none;
    }
}
