/**
 * Footer Styles
 * Functionality: Complete footer styling including newsletter, social links
 * Features: Responsive layout, hover effects, cookie banner
 */

/* ==========================================================================
   Footer Base
   ========================================================================== */

footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-3xl);
    padding: var(--spacing-3xl) 0 var(--spacing-2xl);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent-blue) 25%, 
        var(--accent-purple) 50%, 
        var(--accent-green) 75%, 
        transparent);
    opacity: 0.5;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ==========================================================================
   Footer Top - Main Navigation
   ========================================================================== */

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: var(--text-lg);
    margin-bottom: var(--spacing-lg);
    font-weight: 600;
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-blue);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--spacing-sm);
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-size: var(--text-base);
    display: inline-block;
    position: relative;
}

.footer-section a::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-blue);
    transition: width var(--transition-fast);
}

.footer-section a:hover {
    color: var(--text-primary);
    transform: translateX(5px);
}

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

/* ==========================================================================
   Footer Newsletter
   ========================================================================== */

.footer-newsletter {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: var(--spacing-2xl);
    margin: var(--spacing-2xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer-newsletter::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-orange), transparent);
    opacity: 0.1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.footer-newsletter h4 {
    font-size: var(--text-2xl);
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.footer-newsletter p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.footer-newsletter-form {
    display: flex;
    gap: var(--spacing-sm);
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.footer-newsletter-form input[type="email"] {
    flex: 1;
    padding: 14px 24px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: all var(--transition-fast);
}

.footer-newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.footer-newsletter-form input[type="email"]::placeholder {
    color: var(--text-muted);
}

.footer-newsletter-form button {
    padding: 14px 32px;
    border-radius: 30px;
    border: none;
    background: var(--accent-orange);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.footer-newsletter-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.4);
}

/* ==========================================================================
   Footer Bottom
   ========================================================================== */

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-xl);
    padding-top: var(--spacing-2xl);
    border-top: 1px solid var(--border-color);
}

.footer-info p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin: 0;
}

.footer-address {
    margin-top: var(--spacing-xs);
    opacity: 0.8;
}

/* ==========================================================================
   Social Links
   ========================================================================== */

.footer-social {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--spacing-md);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-links a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--accent-blue);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all var(--transition-fast);
}

.social-links a:hover {
    color: white;
    transform: translateY(-3px);
}

.social-links a:hover::before {
    width: 100%;
    height: 100%;
}

.social-links a svg {
    position: relative;
    z-index: 1;
}

/* Individual social media colors */
.social-links a[href*="facebook"]:hover::before { background: #1877f2; }
.social-links a[href*="twitter"]:hover::before { background: #1da1f2; }
.social-links a[href*="instagram"]:hover::before { background: #e4405f; }
.social-links a[href*="linkedin"]:hover::before { background: #0077b5; }
.social-links a[href*="youtube"]:hover::before { background: #ff0000; }
.social-links a[href*="rss"]:hover::before { background: var(--accent-orange); }

/* ==========================================================================
   Footer Certifications
   ========================================================================== */

.footer-certifications {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-color);
    opacity: 0.6;
    filter: grayscale(100%);
    transition: all var(--transition-fast);
}

.footer-certifications:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.footer-certifications img {
    height: 30px;
    width: auto;
}

/* ==========================================================================
   Cookie Banner
   ========================================================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-lg);
    z-index: var(--z-sticky);
    transform: translateY(100%);
    transition: transform var(--transition-base);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: var(--content-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-2xl);
    flex-wrap: wrap;
}

.cookie-content h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.cookie-content p {
    flex: 1;
    min-width: 300px;
    color: var(--text-secondary);
    margin: 0;
    line-height: var(--leading-relaxed);
}

.cookie-content a {
    color: var(--accent-blue);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: var(--spacing-md);
}

.cookie-actions button {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: var(--text-sm);
}

.cookie-accept {
    background: var(--accent-blue);
    color: white;
}

.cookie-accept:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

.cookie-settings {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.cookie-settings:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
}

.cookie-reject {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.cookie-reject:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-secondary);
}

/* ==========================================================================
   Cookie Modal
   ========================================================================== */

.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    padding: var(--spacing-lg);
}

.cookie-modal-content {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: var(--spacing-2xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-modal-content h2 {
    margin-bottom: var(--spacing-lg);
}

.cookie-modal-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    justify-content: flex-end;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--spacing-xl);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-social {
        align-items: center;
    }
    
    .footer-newsletter-form {
        flex-direction: column;
    }
    
    .footer-newsletter-form input[type="email"],
    .footer-newsletter-form button {
        width: 100%;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .cookie-actions button {
        flex: 1;
        min-width: 140px;
    }
    
    .footer-certifications {
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    footer {
        padding: var(--spacing-2xl) 0 var(--spacing-xl);
    }
    
    .footer-section h4 {
        font-size: var(--text-base);
    }
    
    .footer-newsletter {
        padding: var(--spacing-xl) var(--spacing-md);
    }
    
    .social-links {
        gap: var(--spacing-sm);
    }
    
    .social-links a {
        width: 40px;
        height: 40px;
    }
}