/* Footer Styling */
footer {
    background: var(--footer-color);
    color: var(--text-color);
    padding: 0.8rem 2rem;
    text-align: center;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--card-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    max-width: var(--content-width);
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Mobile responsiveness for footer */
@media screen and (max-width: 768px) {
    footer {
        padding: 0.6rem 1rem;
        margin-top: 0.8rem;
        max-width: 95%;
    }
    
    footer p {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }
    
    .footer-links {
        gap: 0.8rem;
        margin-top: 0.6rem;
    }
    
    .footer-links a {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
}

@media screen and (max-width: 480px) {
    footer {
        padding: 0.5rem 0.8rem;
        margin-top: 0.4rem;
        max-width: 98%;
    }
    
    footer p {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
    
    .footer-links {
        gap: 0.6rem;
        margin-top: 0.4rem;
        flex-wrap: wrap;
    }
    
    .footer-links a {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
}

/* Add subtle animated glow to the top border */
@keyframes borderGlow {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

footer::before {
    animation: borderGlow 3s ease-in-out infinite;
}

footer p {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.3rem;
    font-weight: 400;
    line-height: 1.3;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 0.75rem 0;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Contact icons in footer */
.contact-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.contact-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: var(--card-background);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid var(--card-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
    border-color: var(--primary-color);
}

/* Add tooltip to contact icons */
.contact-icons a::after {
    content: attr(aria-label);
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-background);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.contact-icons a:hover::after {
    opacity: 1;
    visibility: visible;
    bottom: -35px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .footer-links {
        gap: 15px;
    }

    .contact-icons {
        gap: 15px;
    }

    footer {
        padding: 30px 15px;
    }
}

/* Add "Back to top" floating button at footer */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.5);
}

/* Add footer newsletter form styling */
.footer-newsletter {
    max-width: 500px;
    margin: 0 auto 30px;
}

.footer-newsletter h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.newsletter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border-radius: 30px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
}

.newsletter-form button {
    padding: 12px 20px;
    border-radius: 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.4);
}
