/* ========================================
   ENHANCED FOOTER STYLES
======================================== */

footer {
    margin-top: 3rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.9;
    z-index: 1;
}

footer > * {
    position: relative;
    z-index: 2;
}

.footer-top {
    padding-top: 3rem;
    padding-bottom: 2rem;
}

.footer-bottom {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
}

/* Social Media Icons */
.footer-social-icons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-social-icons a {
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social-icons a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Social Media Specific Colors */
.footer-social-icons a:nth-child(1):hover { /* Facebook */
    background: #1877f2;
    border-color: #1877f2;
}

.footer-social-icons a:nth-child(2):hover { /* X/Twitter */
    background: #000000;
    border-color: #000000;
}

.footer-social-icons a:nth-child(3):hover { /* Instagram */
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: #e6683c;
}

.footer-social-icons a:nth-child(4):hover { /* LinkedIn */
    background: #0077b5;
    border-color: #0077b5;
}

.footer-social-icons a:nth-child(5):hover { /* GitHub */
    background: #333;
    border-color: #333;
}

/* Footer Links */
.footer-links {
    margin: 0;
    padding: 0;
}

.footer-links li {
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}

.footer-links li:first-child {
    padding-top: 0;
}

.footer-links li a {
    position: relative;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.25rem 0;
    display: inline-block;
}

.footer-links li a:hover {
    color: #ffffff;
    transform: translateX(8px);
}

.footer-links li a::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: #ffffff;
    transition: width 0.3s ease;
}

.footer-links li a:hover::before {
    width: 100%;
}

/* Footer Headings */
.footer h5, .footer .h5 {
    position: relative;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: none;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.footer h4 {
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Footer Borders */
.footer-border-top {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.footer-border-bottom {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Background Gradient */
.bg-dark-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    position: relative;
}

/* Text Colors */
.text-white-65 {
    color: rgba(255, 255, 255, 0.65) !important;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.white-link a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.white-link a:hover {
    color: #ffffff;
}

/* Avatar Styles */
.avatar-sm {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
}

.avatar-lg {
    width: 60px;
    height: 60px;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Newsletter Form */
footer form {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

footer form:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

footer form .form-control {
    border: none;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.95);
}

footer form .form-control:focus {
    box-shadow: none;
    background: #ffffff;
}

footer form .btn {
    border: none;
    font-weight: 600;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: all 0.3s ease;
}

footer form .btn:hover {
    background: linear-gradient(45deg, #764ba2, #667eea);
    transform: scale(1.05);
}

/* Latest Articles Section */
.white-link .d-flex {
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 0.5rem;
    margin: -0.5rem;
}

.white-link .d-flex:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .footer-top {
        padding-top: 2.5rem;
        padding-bottom: 1.5rem;
    }
    
    .footer-social-icons {
        justify-content: center;
        margin-top: 1rem;
    }
    
    footer form {
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .footer-top {
        padding-top: 2rem;
        padding-bottom: 1rem;
    }
    
    .footer-social-icons a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .footer h4 {
        font-size: 1.25rem;
    }
    
    .footer h5, .footer .h5 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .footer-border-bottom {
        padding-bottom: 2rem !important;
        margin-bottom: 2rem !important;
    }
    
    /* Stack newsletter form on mobile */
    footer form {
        flex-direction: column;
    }
    
    footer form .form-control {
        border-radius: 25px !important;
        margin-bottom: 0.5rem;
    }
    
    footer form .btn {
        border-radius: 25px !important;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .footer-top {
        padding-top: 1.5rem;
    }
    
    .footer-bottom {
        text-align: center !important;
    }
    
    .footer-bottom .col-md-6 {
        margin-top: 0.5rem;
    }
    
    .footer-links li {
        padding: 0.3rem 0;
    }
    
    .avatar-sm {
        width: 30px;
        height: 30px;
    }
}

/* Dark Theme Support */
[data-theme="dark"] footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .footer-social-icons a {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .footer-social-icons a:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Animation Classes */
.footer-fade-in {
    animation: footerFadeIn 0.6s ease-out;
}

@keyframes footerFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus Styles for Accessibility */
.footer-links a:focus,
.footer-social-icons a:focus,
footer form .form-control:focus,
footer form .btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .footer-social-icons a {
        border: 2px solid #ffffff;
        background: rgba(0, 0, 0, 0.8);
    }
    
    .footer-links a {
        color: #ffffff;
    }
}