/**
 * Footer Styles - Professional Design
 * Matches the camera pro theme aesthetic
 * Version: 2.1.0 - Optimized & Secured
 * CSP-Safe: No inline styles, external resources validated
 */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */

:root {
    --footer-bg-gradient: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.95) 50%, rgba(15, 23, 42, 0.98) 100%);
    --footer-border-color: rgba(59, 130, 246, 0.1);
    --footer-border-hover: rgba(59, 130, 246, 0.4);
    --footer-logo-gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #34d399);
    --footer-badge-bg: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.05));
    --footer-badge-bg-hover: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.1));
    --footer-section-border: rgba(59, 130, 246, 0.3);
    --footer-accent-gradient: linear-gradient(90deg, #6366f1, #8b5cf6);
    --footer-btn-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --footer-btn-hover: linear-gradient(135deg, #7c3aed, #a855f7);
    --footer-text-primary: #ffffff;
    --footer-text-secondary: #e2e8f0;
    --footer-text-muted: #94a3b8;
    --footer-text-dark: #cbd5e1;
    --footer-link-color: #94a3b8;
    --footer-link-hover: #ffffff;
    --footer-accent-color: #6366f1;
    --footer-transition: 0.3s ease;
    --footer-container-width: 1400px;
    --footer-focus-outline: 2px solid;
    --footer-focus-offset: 2px;
}

/* ============================================
   FOOTER MAIN STYLES
   ============================================ */

.site-footer {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.95) 50%, rgba(15, 23, 42, 0.98) 100%); /* fallback */
    background: var(--footer-bg-gradient);
    color: #e2e8f0; /* fallback */
    color: var(--footer-text-secondary);
    margin-top: 0;
    overflow: hidden;
    border-top: 1px solid rgba(59, 130, 246, 0.1); /* fallback */
    border-top: 1px solid var(--footer-border-color);
    contain: layout style;
}

/* SECURITY: Block injected inline styles */
.site-footer[style*="background"],
.site-footer[style*="animation"] {
    animation: none !important;
}

/* ============================================
   FOOTER BACKGROUND EFFECTS
   ============================================ */

.footer-background {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.footer-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20% 30%, rgba(59, 130, 246, 0.3), transparent),
        radial-gradient(1px 1px at 80% 70%, rgba(168, 85, 247, 0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(34, 197, 94, 0.15), transparent);
    background-repeat: repeat;
    background-size: 300px 300px, 400px 350px, 250px 280px;
    animation: footerParticles 30s linear infinite;
    opacity: 0.4;
    will-change: transform;
}

@keyframes footerParticles {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50px, -40px, 0); }
}

.footer-gradient-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(168, 85, 247, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.footer-content-wrapper {
    position: relative;
    z-index: 2;
}

/* ============================================
   FOOTER MAIN GRID
   ============================================ */

.footer-main {
    padding: 60px 0 40px;
}

.footer-grid {
    max-width: 1400px; /* fallback */
    max-width: var(--footer-container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

/* ============================================
   COMPANY SECTION
   ============================================ */

.company-section {
    gap: 1.5rem;
}

.footer-logo h3 {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    font-weight: 900;
    color: #ffffff; /* fallback */
    color: var(--footer-text-primary);
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #34d399); /* fallback */
    background: var(--footer-logo-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.logo-tagline {
    font-size: 0.95rem;
    color: #94a3b8; /* fallback */
    color: var(--footer-text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.company-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #cbd5e1; /* fallback */
    color: var(--footer-text-dark);
    margin: 0 0 2rem 0;
    max-width: 90%;
}

.trust-badges {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.05)); /* fallback */
    background: var(--footer-badge-bg);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 30px;
    font-size: 0.85rem;
    color: #e2e8f0; /* fallback */
    color: var(--footer-text-secondary);
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease; /* fallback */
    transition: all var(--footer-transition);
    backface-visibility: hidden;
}

.trust-badge:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.1)); /* fallback */
    background: var(--footer-badge-bg-hover);
    border-color: rgba(59, 130, 246, 0.4); /* fallback */
    border-color: var(--footer-border-hover);
    transform: translate3d(0, -2px, 0);
}

.trust-badge i {
    color: #6366f1; /* fallback */
    color: var(--footer-accent-color);
    font-size: 1rem;
    pointer-events: none;
}

/* ============================================
   FOOTER SECTIONS
   ============================================ */

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-section h4 {
    color: #ffffff; /* fallback */
    color: var(--footer-text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3); /* fallback */
    border-bottom: 2px solid var(--footer-section-border);
    display: inline-block;
    position: relative;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6); /* fallback */
    background: var(--footer-accent-gradient);
    border-radius: 1px;
}

/* ============================================
   FOOTER LINKS
   ============================================ */

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #94a3b8; /* fallback */
    color: var(--footer-link-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease; /* fallback */
    transition: all var(--footer-transition);
    padding: 0.6rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

.footer-links a:hover {
    color: #ffffff; /* fallback */
    color: var(--footer-link-hover);
    border-left-color: rgba(59, 130, 246, 0.5);
    background: rgba(59, 130, 246, 0.05);
    transform: translateX(5px);
}

.footer-links a:focus-visible {
    outline: 2px solid #6366f1; /* fallback */
    outline: var(--footer-focus-outline) var(--footer-accent-color);
    outline-offset: 2px; /* fallback */
    outline-offset: var(--footer-focus-offset);
    border-radius: 4px;
}

.footer-links a i {
    color: #6366f1; /* fallback */
    color: var(--footer-accent-color);
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    pointer-events: none;
}

/* ============================================
   CONTACT & SOCIAL
   ============================================ */

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.1); /* fallback */
    border: 1px solid var(--footer-border-color);
    border-radius: 12px;
    transition: all 0.3s ease; /* fallback */
    transition: all var(--footer-transition);
    backface-visibility: hidden;
}

.contact-item:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

.contact-item i {
    color: #6366f1; /* fallback */
    color: var(--footer-accent-color);
    font-size: 1.2rem;
    margin-top: 0.25rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    pointer-events: none;
}

.contact-item div {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.contact-item strong {
    color: #ffffff; /* fallback */
    color: var(--footer-text-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.contact-item a,
.contact-item span {
    color: #cbd5e1; /* fallback */
    color: var(--footer-text-dark);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease; /* fallback */
    transition: color var(--footer-transition);
}

.contact-item a:hover {
    color: #6366f1; /* fallback */
    color: var(--footer-accent-color);
}

.contact-item a:focus-visible {
    outline: 2px solid #6366f1; /* fallback */
    outline: var(--footer-focus-outline) var(--footer-accent-color);
    outline-offset: 2px; /* fallback */
    outline-offset: var(--footer-focus-offset);
    border-radius: 4px;
}

/* Social Links */
.social-section {
    margin-top: 2rem;
}

.social-section h5 {
    color: #ffffff; /* fallback */
    color: var(--footer-text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.social-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.05)); /* fallback */
    background: var(--footer-badge-bg);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    color: #cbd5e1; /* fallback */
    color: var(--footer-text-dark);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease; /* fallback */
    transition: all var(--footer-transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    backface-visibility: hidden;
}

.social-link:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(99, 102, 241, 0.1)); /* fallback */
    background: var(--footer-badge-bg-hover);
    border-color: rgba(59, 130, 246, 0.4); /* fallback */
    border-color: var(--footer-border-hover);
    color: #ffffff; /* fallback */
    color: var(--footer-text-primary);
    transform: translate3d(0, -3px, 0) scale(1.05);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

.social-link:focus-visible {
    outline: 2px solid #6366f1; /* fallback */
    outline: var(--footer-focus-outline) var(--footer-accent-color);
    outline-offset: 2px; /* fallback */
    outline-offset: var(--footer-focus-offset);
}

.social-link.facebook:hover { background: rgba(24, 119, 242, 0.2); }
.social-link.twitter:hover { background: rgba(29, 161, 242, 0.2); }
.social-link.instagram:hover { background: rgba(225, 48, 108, 0.2); }
.social-link.youtube:hover { background: rgba(255, 0, 0, 0.2); }
.social-link.linkedin:hover { background: rgba(0, 119, 181, 0.2); }

/* ============================================
   NEWSLETTER SECTION
   ============================================ */

.newsletter-section {
    margin-top: 2rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.05)); /* fallback */
    background: var(--footer-badge-bg);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #34d399); /* fallback */
    background: var(--footer-logo-gradient);
    pointer-events: none;
}

.newsletter-section h5 {
    color: #ffffff; /* fallback */
    color: var(--footer-text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.newsletter-section p {
    color: #cbd5e1; /* fallback */
    color: var(--footer-text-dark);
    font-size: 0.9rem;
    margin: 0.5rem 0 2rem;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
}

.newsletter-input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    color: #ffffff; /* fallback */
    color: var(--footer-text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease; /* fallback */
    transition: all var(--footer-transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.newsletter-input::placeholder {
    color: #94a3b8; /* fallback */
    color: var(--footer-text-muted);
}

.newsletter-input:focus {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: rgba(255, 255, 255, 0.12);
}

.newsletter-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6); /* fallback */
    background: var(--footer-btn-gradient);
    border: none;
    border-radius: 50%;
    color: #ffffff; /* fallback */
    color: var(--footer-text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease; /* fallback */
    transition: all var(--footer-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    backface-visibility: hidden;
}

.newsletter-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #7c3aed, #a855f7); /* fallback */
    background: var(--footer-btn-hover);
}

.newsletter-btn:focus-visible {
    outline: 2px solid #6366f1; /* fallback */
    outline: var(--footer-focus-outline) var(--footer-accent-color);
    outline-offset: 2px; /* fallback */
    outline-offset: var(--footer-focus-offset);
}

/* ============================================
   FOOTER BOTTOM
   ============================================ */

.footer-bottom {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    padding: 2rem 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.footer-bottom-content {
    max-width: 1400px; /* fallback */
    max-width: var(--footer-container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.copyright {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.copyright p {
    margin: 0;
    color: #94a3b8; /* fallback */
    color: var(--footer-text-muted);
    font-size: 0.85rem;
}

.tagline {
    font-style: italic;
    color: #6b7280;
    font-size: 0.8rem;
}

.footer-legal {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-legal a {
    color: #94a3b8; /* fallback */
    color: var(--footer-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease; /* fallback */
    transition: all var(--footer-transition);
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
    font-weight: 500;
}

.footer-legal a:hover {
    color: #ffffff; /* fallback */
    color: var(--footer-text-primary);
    border-bottom-color: rgba(59, 130, 246, 0.4);
}

.footer-legal a:focus-visible {
    outline: 2px solid #6366f1; /* fallback */
    outline: var(--footer-focus-outline) var(--footer-accent-color);
    outline-offset: 2px; /* fallback */
    outline-offset: var(--footer-focus-offset);
    border-radius: 4px;
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .footer-particles,
    .trust-badge,
    .social-link,
    .newsletter-btn {
        animation: none !important;
        transition: none !important;
    }
    
    .trust-badge:hover,
    .social-link:hover {
        transform: none;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    .footer-section h4,
    .trust-badge,
    .contact-item,
    .social-link,
    .newsletter-section {
        border: 2px solid currentColor;
    }
    
    .footer-links a:focus-visible,
    .social-link:focus-visible,
    .newsletter-btn:focus-visible,
    .contact-item a:focus-visible,
    .footer-legal a:focus-visible {
        outline-width: 3px;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --footer-bg-gradient: linear-gradient(135deg, rgba(10, 18, 36, 0.98) 0%, rgba(20, 31, 49, 0.95) 50%, rgba(10, 18, 36, 0.98) 100%);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 3rem;
    }
    
    .footer-section:last-child {
        grid-column: 1 / -1;
        max-width: 500px;
    }
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    
    .company-section {
        grid-column: 1 / -1;
    }
    
    .footer-section:last-child {
        grid-column: 1 / -1;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .footer-main {
        padding: 40px 0 30px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 0 1rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-legal {
        justify-content: center;
        gap: 1rem;
    }
    
    .trust-badges,
    .social-links {
        justify-content: center;
    }
    
    .newsletter-section {
        padding: 2rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .site-footer {
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    .footer-background,
    .social-links,
    .newsletter-section {
        display: none !important;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }
    
    .footer-logo h3 {
        color: #000000 !important;
        -webkit-text-fill-color: #000000;
    }
    
    .footer-links a {
        color: #000000 !important;
    }
}
