/* ===================================
   PREMIUM FOOTER ENHANCEMENTS
   Universal - Works on ALL Pages
   =================================== */

/* Enhance footer sections spacing - works for both .footer-col and .footer-section */
.footer .footer-section,
.footer .footer-col {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.footer .footer-section:nth-child(1),
.footer .footer-col:nth-child(1) {
    animation-delay: 0.1s;
}

.footer .footer-section:nth-child(2),
.footer .footer-col:nth-child(2) {
    animation-delay: 0.2s;
}

.footer .footer-section:nth-child(3),
.footer .footer-col:nth-child(3) {
    animation-delay: 0.3s;
}

.footer .footer-section:nth-child(4),
.footer .footer-col:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced footer links with hover animations */
.footer .footer-links,
.footer .footer-col {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Standardized vertical gap */
}

.footer .nav-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1.5rem;
}

.footer .footer-links li,
.footer .footer-col li {
    margin: 0;
}

.footer .footer-links a,
.footer .footer-col a {
    position: relative;
    display: inline-block;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 0;
    width: fit-content;
}

.footer .footer-links a::before,
.footer .footer-col a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer .footer-links a:hover,
.footer .footer-col a:hover {
    color: var(--primary);
    transform: translateX(8px);
}

.footer .footer-links a:hover::before,
.footer .footer-col a:hover::before {
    width: 100%;
}

/* Footer section titles - works for all footer structures */
.footer .nav-grid h4 {
    grid-column: 1 / -1;
}

.footer .footer-section h4,
.footer .footer-col h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 0.75rem;
}

[data-theme="dark"] .footer .footer-section h4,
[data-theme="dark"] .footer .footer-col h4 {
    color: var(--text-light);
}

.footer .footer-section h4::after,
.footer .footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 2px;
}

/* Enhanced footer description */
.footer .footer-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-top: 1rem;
    max-width: 300px;
}

@media (max-width: 768px) {
    .footer .footer-description {
        text-align: center !important;
    }
}

/* Footer logo hover effect */
.footer .footer-logo {
    transition: transform 0.3s ease;
    display: inline-block;
}

.footer .footer-logo:hover {
    transform: scale(1.05);
}

/* Footer bottom section */
.footer .footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

[data-theme="dark"] .footer .footer-bottom {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Responsive footer enhancements */
@media (max-width: 768px) {
    .footer {
        padding: 3rem 0 1.5rem !important;
    }

    .footer .footer-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 2rem !important; /* Balanced gap between sections */
    }

    .footer .footer-section,
    .footer .footer-col,
    .footer .footer-links {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .footer .footer-description {
        margin: 1rem auto 0 !important;
        text-align: center !important;
    }

    .footer .footer-section h4,
    .footer .footer-col h4 {
        text-align: center !important;
        width: 100% !important;
        margin-bottom: 1.5rem !important; /* Balanced space for links */
    }

    .footer .footer-section h4::after,
    .footer .footer-col h4::after {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }

    .footer .footer-links a,
    .footer .footer-col a {
        text-align: center !important;
        margin: 0 auto !important;
        padding: 0 !important;
        width: fit-content !important;
        transform: none !important;
        display: block !important;
    }

    .footer .nav-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem 1.5rem !important; /* Unified vertical gap with other sections */
        width: 100% !important;
        max-width: 320px !important;
        margin: 0 auto !important;
    }

    .footer .footer-bottom {
        margin-top: 2rem !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .footer .nav-grid {
        grid-template-columns: 1fr !important;
    }
}
