﻿/* Footer.css - Dedicated Footer Styles */

/* CSS Variables for Footer */
:root {
    --footer-bg: #1f2937;
    --footer-bg-light: #374151;
    --footer-text: #d1d5db;
    --footer-text-light: #9ca3af;
    --footer-link-hover: #7c3aed;
    --footer-border: #4b5563;
    --social-hover-bg: #7c3aed;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Performance optimizations to prevent scroll jitter */
.main-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: auto;
    position: relative;
    will-change: auto; /* Prevent unnecessary compositing */
}

    .main-footer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, var(--footer-border), transparent);
    }

    .main-footer .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 1rem;
    }

/* Footer Content Layout */
.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    padding: 3rem 0 2rem;
}

/* Footer Logo Section */
.footer-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.footer-logo-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    transition: var(--transition-smooth);
    margin-bottom: 0.5rem;
}

.footer-logo:hover .footer-logo-img {
    transform: scale(1.05);
}

.footer-brand-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.footer-description {
    color: var(--footer-text-light);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    max-width: 400px;
}

/* Footer Sections */
.footer-links,
.footer-contact,
.footer-social {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--footer-link-hover);
    position: relative;
}

/* Navigation Links */
.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: var(--footer-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    transition: var(--transition-smooth);
    font-size: 0.9rem;
}

    .footer-link:hover {
        color: var(--footer-link-hover);
        text-decoration: none;
        transform: translateX(5px);
    }

    .footer-link i {
        font-size: 0.85rem;
        width: 16px;
        opacity: 0.7;
    }

    .footer-link:hover i {
        opacity: 1;
    }

/* Contact Information */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--footer-text);
    font-size: 0.9rem;
}

    .contact-item i {
        color: var(--footer-link-hover);
        font-size: 1rem;
        width: 16px;
    }

    .contact-item a {
        color: var(--footer-text);
        text-decoration: none;
        transition: var(--transition-smooth);
    }

        .contact-item a:hover {
            color: var(--footer-link-hover);
            text-decoration: underline;
        }

/* Social Media Links */
.social-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--footer-bg-light);
    color: var(--footer-text);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 1.1rem;
}

    .social-link:hover {
        background: var(--social-hover-bg);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
    }

    .social-link:active {
        transform: translateY(0);
    }

/* Footer Bottom Section */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--footer-border);
    margin-top: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: var(--footer-text-light);
    font-size: 0.85rem;
}

.footer-links-bottom {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-link-bottom {
    color: var(--footer-text-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

    .footer-link-bottom:hover {
        color: var(--footer-link-hover);
        text-decoration: underline;
    }

/* Tablet Responsive */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem 1.5rem;
    }

    .footer-logo {
        grid-column: 1 / -1;
        text-align: center;
        align-items: center;
    }

    .footer-brand-name {
        font-size: 1.3rem;
    }

    .footer-description {
        max-width: 500px;
        text-align: center;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 0 1.5rem;
    }

    .footer-logo {
        text-align: center;
        align-items: center;
    }

    .footer-logo-img {
        width: 65px;
        height: 65px;
    }

    .footer-brand-name {
        font-size: 1.4rem;
    }

    .footer-description {
        font-size: 0.9rem;
    }

    .footer-section-title {
        font-size: 1rem;
        text-align: center;
    }

    .footer-nav {
        align-items: center;
    }

    .contact-info {
        align-items: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer-links-bottom {
        justify-content: center;
        gap: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .main-footer .container {
        padding: 0 0.75rem;
    }

    .footer-content {
        gap: 1.5rem;
        padding: 1.5rem 0 1rem;
    }

    .footer-logo-img {
        width: 60px;
        height: 60px;
    }

    .footer-brand-name {
        font-size: 1.2rem;
    }

    .footer-description {
        font-size: 0.85rem;
    }

    .footer-link,
    .contact-item {
        font-size: 0.85rem;
    }

    .footer-section-title {
        font-size: 0.95rem;
    }

    .social-link {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .footer-copyright,
    .footer-link-bottom {
        font-size: 0.8rem;
    }

    .footer-links-bottom {
        gap: 0.75rem;
    }
}

/* RTL Support - Simplified */
[dir="rtl"] .footer-content {
    text-align: right;
}

[dir="rtl"] .footer-logo {
    text-align: center;
}

[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .main-footer {
        background: #000;
        color: #fff;
    }

    .footer-link:hover,
    .footer-link-bottom:hover {
        color: #fff;
        background: var(--footer-link-hover);
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
    }
}

/* Reduced Motion for Performance */
@media (prefers-reduced-motion: reduce) {
    .footer-logo-img,
    .footer-link,
    .social-link,
    .footer-link-bottom {
        transition: none;
        transform: none;
    }

        .footer-link:hover,
        .social-link:hover {
            transform: none;
        }

    .footer-logo:hover .footer-logo-img {
        transform: none;
    }
}

/* Focus Indicators */
.footer-link:focus-visible,
.footer-link-bottom:focus-visible,
.social-link:focus-visible {
    outline: 2px solid var(--footer-link-hover);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .main-footer {
        background: none !important;
        color: #000 !important;
        box-shadow: none !important;
    }

    .social-links {
        display: none;
    }
}
