/* Footer Base Styles */
.footer {
    background: #0f172a;
    color: #94a3b8;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #ec4899);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1rem 1.5rem;
    position: relative;
}

/* Footer Main Content */
.footer-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr 2fr;
        gap: 4rem;
    }
}

/* Footer Brand Section */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.footer-logo-image {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
    margin-right: 1rem;
}

.footer-logo-fallback {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.footer-logo-fallback i {
    font-size: 1.5rem;
    color: white;
}

.footer-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.footer-tagline {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Footer Links */
.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (min-width: 640px) {
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-column-title {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #4f46e5;
}

.footer-link-list {
    list-style: none;
}

.footer-link-list li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 0;
}

.footer-link:hover {
    color: white;
    transform: translateX(5px);
}

.footer-link::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-link:hover::before {
    opacity: 1;
    left: -10px;
}

/* Social Media */
.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #4f46e5;
    color: white;
    transform: translateY(-3px);
}

/* Newsletter */
.footer-newsletter p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: #4f46e5;
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-input::placeholder {
    color: #94a3b8;
}

.newsletter-button {
    width: 40px;
    height: 40px;
    background: #4f46e5;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-button:hover {
    background: #4338ca;
    transform: scale(1.05);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-copyright {
    text-align: center;
}

@media (min-width: 640px) {
    .footer-copyright {
        text-align: left;
    }
}

.footer-copyright p {
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

#currentYear {
    color: white;
    font-weight: 600;
}

.footer-mission {
    color: #cbd5e1;
    font-style: italic;
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 640px) {
    .footer-legal {
        justify-content: flex-end;
    }
}

.footer-legal-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-legal-link:hover {
    color: white;
}

.footer-separator {
    color: #475569;
    font-size: 0.75rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #4f46e5;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
}

.back-to-top.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #4338ca;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

/* Responsive Design */
@media (max-width: 640px) {
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .footer-main {
        gap: 2rem;
    }
    
    .footer-container {
        padding: 2rem 1rem 1rem;
    }
}

/* Animation for year update */
@keyframes yearUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.year-updated {
    animation: yearUpdate 0.5s ease;
}

/* Additional styles for proper footer positioning */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body > .page-content {
    flex: 1;
}