/* 🎨 Modern Footer Design - CodeMaster Platform */

/* Main Footer Container */
.site-footer,
.footer {
    background: linear-gradient(180deg, var(--bg) 0%, var(--panel) 100%);
    border-top: 1px solid var(--border);
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

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

/* Footer Inner Container */
.footer-inner,
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px 30px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
}

/* Footer Sections */
.footer-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Footer Branding */
.footer-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-title::before {
    content: '⚡';
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.5));
}

.footer-text {
    color: var(--subtext);
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0;
    max-width: 280px;
}

/* Footer Headings */
.footer-heading,
.footer-section strong {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-heading::before {
    content: '▸';
    color: var(--accent);
    font-size: 0.9rem;
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    color: var(--subtext);
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.footer-links a::before {
    content: '';
    width: 0;
    height: 2px;
    background: var(--accent);
    position: absolute;
    bottom: -2px;
    left: 0;
    transition: width 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 8px;
}

.footer-links a:hover::before {
    width: 30px;
}

/* Navigation Footer (for course pages) */
nav.footer-links {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: center;
}

nav.footer-links a {
    padding: 8px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.footer-links a::before {
    display: none;
}

nav.footer-links a:hover {
    padding-left: 16px;
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.1), rgba(59, 130, 246, 0.1));
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 211, 153, 0.2);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-link {
    width: 44px;
    height: 44px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    opacity: 0;
    transition: opacity 0.3s;
}

.social-link:hover {
    transform: translateY(-4px) scale(1.05);
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(52, 211, 153, 0.3);
}

.social-link:hover::before {
    opacity: 0.15;
}

/* Social icons with emojis */
.social-link[href*="github"]::after {
    content: '⚙️';
    position: relative;
    z-index: 1;
}

.social-link[href*="twitter"]::after {
    content: '🐦';
    position: relative;
    z-index: 1;
}

.social-link[href*="discord"]::after {
    content: '💬';
    position: relative;
    z-index: 1;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 24px 40px;
    text-align: center;
    background: var(--panel);
}

.footer-bottom p {
    margin: 0;
    color: var(--subtext);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer-bottom p::before {
    content: '💙';
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Course Page Simple Footer */
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-inner>div:first-child {
    flex: 1;
    min-width: 250px;
}

.footer-inner strong {
    font-size: 1.2rem;
    color: var(--text);
    display: block;
    margin-bottom: 8px;
}

.footer-inner>div:first-child {
    color: var(--subtext);
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-section:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        padding: 40px 24px 20px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        padding: 30px 24px;
    }

    nav.footer-links {
        flex-direction: column;
        width: 100%;
    }

    nav.footer-links a {
        width: 100%;
        text-align: center;
    }

    .footer-section {
        text-align: center;
    }

    .footer-text {
        max-width: 100%;
    }

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

/* Light Theme Adjustments */
[data-theme="light"] .site-footer,
[data-theme="light"] .footer {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border-top-color: #d1d5db;
}

[data-theme="light"] .footer-bottom {
    background: #f3f4f6;
    border-top-color: #d1d5db;
}

[data-theme="light"] nav.footer-links a {
    background: #ffffff;
    border-color: #d1d5db;
}

[data-theme="light"] .social-link {
    background: #ffffff;
    border-color: #d1d5db;
}

/* Decorative Elements */
.footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg,
            transparent,
            var(--accent),
            var(--accent-2),
            transparent);
    border-radius: 2px;
}

/* Hover Animation for Footer Sections */
.footer-section {
    animation: fadeInUp 0.6s ease-out backwards;
}

.footer-section:nth-child(1) {
    animation-delay: 0.1s;
}

.footer-section:nth-child(2) {
    animation-delay: 0.2s;
}

.footer-section:nth-child(3) {
    animation-delay: 0.3s;
}

.footer-section:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}