/* ============================================================
   فوتر مدرن — گرید چندستونه، کارت نماد اعتماد، نوار کپی‌رایت
   (کلاس‌های footer-categories / footer-articles از footer_tags.py می‌آیند)
   ============================================================ */

.site-footer {
    padding: 56px 0 0;
    background:
        radial-gradient(900px 300px at 85% -10%, rgba(99, 102, 241, 0.22), transparent 60%),
        radial-gradient(700px 260px at 10% 110%, rgba(118, 75, 162, 0.18), transparent 60%),
        linear-gradient(135deg, #0b1120 0%, #162033 100%);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 36px 32px;
    align-items: start;
    padding-bottom: 40px;
}

/* ===== ستون معرفی ===== */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.footer-brand__name {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    text-decoration: none;
    background: linear-gradient(135deg, #a5b4fc 0%, #f0abfc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #a5b4fc;
}

.site-footer .footer-brand__text {
    text-align: right;
    font-size: 0.88rem;
    line-height: 2;
    color: #94a3b8;
    margin: 0;
    max-width: 34ch;
}

/* ===== عنوان ستون‌ها ===== */
.footer-heading {
    position: relative;
    margin: 0 0 18px;
    padding-bottom: 12px;
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
    text-align: right;
    width: auto;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #818cf8, #c084fc);
}

/* ===== لیست لینک‌ها (مشترک بین سه ستون) ===== */
.footer-links__list,
.footer-articles__list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: right;
    width: auto;
    font-size: 0.9rem;
}

.footer-links__list li,
.footer-articles__list li {
    margin: 0 0 4px;
}

.footer-links a,
.footer-categories__links a,
.footer-articles__list a {
    position: relative;
    display: block;
    padding: 6px 18px 6px 0;
    color: #94a3b8;
    text-decoration: none;
    line-height: 1.7;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* فلش کوچک کنار هر لینک */
.footer-links a::before,
.footer-categories__links a::before,
.footer-articles__list a::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 6px;
    height: 6px;
    border-left: 2px solid #6366f1;
    border-bottom: 2px solid #6366f1;
    transform: translateY(-50%) rotate(45deg);
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.footer-links a:hover,
.footer-categories__links a:hover,
.footer-articles__list a:hover {
    color: #ffffff;
    transform: translateX(-4px);
}

.footer-links a:hover::before,
.footer-categories__links a:hover::before,
.footer-articles__list a:hover::before {
    opacity: 1;
    border-color: #c084fc;
}

.footer-links a:focus-visible,
.footer-categories__links a:focus-visible,
.footer-articles__list a:focus-visible,
.footer-brand__name:focus-visible {
    outline: 2px solid #a5b4fc;
    outline-offset: 3px;
    border-radius: 6px;
}

/* دسته‌ها: یک ستونه عمودی (به‌جای ردیف افقی قبلی) */
.footer-categories__links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: auto;
    margin: 0;
    font-size: 0.9rem;
}

/* عنوان مقاله‌ها بلند است؛ حداکثر دو خط */
.footer-articles__list a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.86rem;
}

/* ===== نماد اعتماد (اینماد) در کارت روشن ===== */
.enamad-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.45);
}

.enamad-badge img {
    display: block;
    width: 80px;
    height: 80px;
    border: none;
}

/* ===== نوار پایین ===== */
.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 18px 0 22px;
}

.site-footer .footer-bottom p {
    margin: 0;
    text-align: center;
    font-size: 0.82rem;
    color: #64748b;
    letter-spacing: 0.2px;
}

/* ===== موبایل ===== */
@media (max-width: 600px) {
    .site-footer { padding-top: 40px; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px 20px;
    }

    /* ستون معرفی و مقالات تمام‌عرض؛ لینک‌ها و دسته‌ها کنار هم */
    .footer-brand,
    .footer-articles { grid-column: 1 / -1; }

    .footer-brand { align-items: center; text-align: center; }
    .site-footer .footer-brand__text { text-align: center; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
    .footer-links a,
    .footer-categories__links a,
    .footer-articles__list a { transition: none; }
    .footer-links a:hover,
    .footer-categories__links a:hover,
    .footer-articles__list a:hover { transform: none; }
}
