.mag-footer {
    background: var(--tab-glass-bg, rgba(255, 255, 255, 0.12));
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    border-top: 1px solid var(--tab-glass-border, rgba(255, 255, 255, 0.2));
    padding: 40px 0 20px;
    margin-top: 50px;
    margin-bottom: 0 !important;
    padding-bottom: 20px !important;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 -1px 0 rgba(0, 0, 0, 0.02),
        inset 0 1px 0 var(--tab-glass-highlight, rgba(255, 255, 255, 0.3));
}

.mag-footer::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 40%;
    border-radius: 0 0 12px 12px / 0 0 8px 8px;
    background: transparent;
    pointer-events: none;
    z-index: 6;
    transition: background 0.5s ease;
}

body.dark-theme .mag-footer::before {
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.06) 0%, 
        rgba(255, 255, 255, 0.0) 100%
    );
}

.footer-glare-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 5;
}

.footer-glare {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: transparent;
    pointer-events: none;
}

body.dark-theme .footer-glare {
    background: radial-gradient(circle 150px at var(--fx, 50%) var(--fy, 50%), 
        rgba(255, 215, 0, 0.04) 0%, 
        transparent 100%
    );
}

.mag-footer:hover .footer-glare {
    opacity: 1;
}

body.dark-theme .mag-footer {
    --tab-glass-bg: rgba(30, 30, 35, 0.35);
    --tab-glass-border: rgba(255, 255, 255, 0.08);
    --tab-glass-highlight: rgba(255, 255, 255, 0.05);
    background: var(--tab-glass-bg);
    backdrop-filter: blur(50px) saturate(200%);
    -webkit-backdrop-filter: blur(50px) saturate(200%);
    border-top: 1px solid var(--tab-glass-border);
    box-shadow: 
        0 -1px 0 rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.footer-grid {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
    font-weight: 700;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

body.dark-theme .footer-col h4 {
    color: #e8e8e8;
}

.mag-footer:hover .footer-col h4 {
    color: #0077ff;
}

body.dark-theme .mag-footer:hover .footer-col h4 {
    color: #ffd700;
}

.footer-col p {
    font-size: 0.8rem;
    color: #666;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
    transition: color 0.3s ease;
}

body.dark-theme .footer-col p {
    color: #8a9aaa;
}

.footer-email {
    direction: ltr;
    font-family: monospace;
}

.footer-col a {
    text-decoration: none;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

body.dark-theme .footer-col a {
    color: #8a9aaa;
}

.footer-col a:hover {
    color: #8b5e3c;
    padding-right: 5px;
}

body.dark-theme .footer-col a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.75rem;
    color: #777;
    font-family: 'Estedad', 'Vazirmatn', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

body.dark-theme .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.06);
    color: #7a8a9a;
}

.footer-heart {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-heart i {
    display: inline-block;
    color: #e25555;
    fill: #e25555;
    transition: transform 0.3s ease;
}

.mag-footer:hover .footer-heart i {
    transform: scale(1.15);
}


@media (max-width: 768px) {
    .mag-footer {
        padding: 30px 0 16px;
        margin-top: 40px;
    }

    .footer-grid {
        margin-bottom: 16px;
    }

    .footer-col h4 {
        font-size: 0.9rem;
    }

    .footer-col p {
        font-size: 0.7rem;
    }

    .footer-bottom {
        font-size: 0.65rem;
        padding-top: 16px;
        flex-direction: column;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .mag-footer {
        padding: 24px 0 12px;
        margin-top: 30px;
    }

    .footer-grid {
        margin-bottom: 12px;
    }

    .footer-col h4 {
        font-size: 0.85rem;
    }

    .footer-col p {
        font-size: 0.65rem;
    }

    .footer-bottom {
        font-size: 0.6rem;
        padding-top: 12px;
    }
}