/* Modern Footer Styles with Liquid Glass Design */

/* Footer Container - Full Width */
.modern-footer {
    background: linear-gradient(135deg, 
        var(--neutral-900) 0%,
        var(--neutral-800) 50%, 
        var(--neutral-700) 100%);
    color: var(--neutral-100);
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 0;
    padding-top: 0;
}

/* Remove gaps from Astra theme */
.site-footer,
.ast-footer-copyright,
.ast-footer-copyright-wrapper {
    display: none !important;
}

/* Ensure proper spacing above footer */
.site-content {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.site-main {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Landing page specific spacing */
.landing-page .blog-grid-section {
    margin-bottom: 0;
    padding-bottom: 0;
}

.landing-page .modern-pagination {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Single post spacing */
.modern-single-post .modern-single-container {
    margin-bottom: 0;
    padding-bottom: 60px;
}

/* Animated Background Pattern */
.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(14, 165, 233, 0.08) 0%, transparent 50%);
    opacity: 0.6;
    animation: footerFloat 20s ease-in-out infinite;
}

@keyframes footerFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

/* Footer Container */
.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 40px 0;
    position: relative;
    z-index: 2;
}

/* Main Footer Grid */
.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 60px;
}

/* Footer Brand Section */
.footer-brand {
    max-width: 400px;
}

.footer-logo {
    margin-bottom: 24px;
}

.footer-logo img {
    max-height: 50px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-site-title {
    color: white;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}

.footer-description {
    color: var(--neutral-300);
    line-height: 1.6;
    margin-bottom: 32px;
    font-size: 1rem;
}

/* Social Links */
.footer-social {
    display: flex;
    gap: 16px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--neutral-200);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    border-color: var(--primary);
    color: white;
}

.social-link.facebook:hover {
    background: linear-gradient(135deg, #1877f2, #0c63d4);
}

.social-link.twitter:hover {
    background: linear-gradient(135deg, #1da1f2, #0d8bd9);
}

.social-link.linkedin:hover {
    background: linear-gradient(135deg, #0077b5, #005885);
}

.social-link.instagram:hover {
    background: linear-gradient(135deg, #e4405f, #833ab4);
}

.social-link:hover::before {
    left: 100%;
}

/* Footer Sections */
.footer-section {
    position: relative;
}

.footer-section-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    font-family: var(--font-display);
    position: relative;
}

.footer-section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
}

/* Footer Menu */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    color: var(--neutral-300);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-menu a::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
    transform: translateY(-50%);
}

.footer-menu a:hover {
    color: white;
    padding-left: 16px;
    transform: translateX(4px);
}

.footer-menu a:hover::before {
    width: 12px;
}

/* Newsletter Section */
.footer-newsletter {
    max-width: 300px;
}

.newsletter-description {
    color: var(--neutral-300);
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.newsletter-form {
    position: relative;
}

.newsletter-input-group {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 6px;
    transition: all 0.3s ease;
}

.newsletter-input-group:focus-within {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
    border-color: var(--primary);
}

.newsletter-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: white;
    font-size: 0.95rem;
    outline: none;
}

.newsletter-input::placeholder {
    color: var(--neutral-400);
}

.newsletter-button {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    border-radius: 50px;
    padding: 12px 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 0;
    margin-top: 60px;
    position: relative;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.footer-copyright {
    color: var(--neutral-400);
    margin: 0;
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 30px;
}

.footer-bottom-links a {
    color: var(--neutral-400);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
    color: var(--primary);
}

/* Liquid Glass Background Elements */
.footer-bg-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: liquidFloat 12s ease-in-out infinite;
}

.footer-bg-1 {
    width: 120px;
    height: 120px;
    top: 20%;
    left: 5%;
    animation-delay: 0s;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: liquidFloat 15s ease-in-out infinite, liquidMorph 20s ease-in-out infinite;
}

.footer-bg-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 10%;
    animation-delay: 3s;
    border-radius: 40% 60% 70% 30% / 40% 70% 30% 60%;
    animation: liquidFloat 18s ease-in-out infinite reverse, liquidMorph 25s ease-in-out infinite;
}

.footer-bg-3 {
    width: 100px;
    height: 100px;
    bottom: 30%;
    left: 80%;
    animation-delay: 6s;
    border-radius: 70% 30% 50% 50% / 30% 70% 50% 50%;
    animation: liquidFloat 12s ease-in-out infinite, liquidMorph 15s ease-in-out infinite reverse;
}

@keyframes liquidFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    33% {
        transform: translateY(-15px) rotate(120deg) scale(1.05);
    }
    66% {
        transform: translateY(10px) rotate(240deg) scale(0.95);
    }
}

@keyframes liquidMorph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 40% 60% 70% 30% / 40% 70% 30% 60%;
    }
    50% {
        border-radius: 70% 30% 50% 50% / 30% 70% 50% 50%;
    }
    75% {
        border-radius: 30% 70% 40% 60% / 70% 40% 60% 30%;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .footer-main {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 40px;
    }
    
    .footer-container {
        padding: 60px 30px 0;
    }
}

@media (max-width: 768px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-container {
        padding: 50px 20px 0;
    }
    
    .footer-brand {
        max-width: 100%;
    }
    
    .footer-newsletter {
        max-width: 100%;
    }
    
    .footer-section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    
    /* Hide background elements on mobile for performance */
    .footer-bg-element {
        display: none;
    }
    
    .footer-container {
        padding: 60px 20px 0;
    }
    
    .modern-footer {
        margin-top: 60px;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 40px 15px 0;
    }
    
    .footer-main {
        gap: 30px;
    }
    
    .footer-social {
        gap: 12px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .newsletter-input-group {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        border-radius: 20px;
    }
    
    .newsletter-input {
        text-align: center;
    }
    
    .newsletter-button {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }
    
    .newsletter-button::after {
        content: 'Subscribe';
        font-size: 0.9rem;
    }
    
    .footer-bottom {
        padding: 30px 0;
    }
    
    .footer-bottom-links {
        gap: 15px;
    }
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .modern-footer {
        background: linear-gradient(135deg, 
            #0a0a0b 0%,
            #1a1a1d 50%, 
            #2d2d30 100%);
    }
}