/* ===================================
   FOOTER SECTION STYLES
   =================================== */

.footer {
    background: linear-gradient(135deg, 
        var(--dark-color) 0%, 
        var(--dark-secondary) 50%,
        #1a202c 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="footer-grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%2300d4ff" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23footer-grid)"/></svg>');
    pointer-events: none;
    animation: footer-pattern-float 30s ease-in-out infinite;
}

.footer::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, 
        rgba(0, 102, 204, 0.1) 0%, 
        transparent 60%);
    animation: footer-glow 20s ease-in-out infinite alternate;
    pointer-events: none;
}

/* Main Footer Content */
.footer-content {
    padding: var(--spacing-5xl) 0 var(--spacing-3xl);
    position: relative;
    z-index: 2;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-3xl);
    margin-bottom: var(--spacing-3xl);
}

/* Footer Sections */
.footer-section {
    position: relative;
}

.footer-section:first-child {
    max-width: 400px;
}

/* Footer Logo */
.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    transition: all var(--transition-normal);
}

.footer-logo img {
    height: 80px;
    width: auto;
    transition: all var(--transition-normal);
    filter: brightness(1.2);
}

.footer-logo span {
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--white);
    transition: color var(--transition-normal);
}

.footer-logo:hover {
    transform: translateY(-2px);
}

.footer-logo:hover img {
    transform: scale(1.05);
    filter: brightness(1.4);
}

.footer-logo:hover span {
    color: var(--accent-color);
}

/* Footer Titles */
.footer-title {
    font-size: var(--fs-2xl);
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    border-radius: 1px;
}

.footer-subtitle {
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-xs);
}

.footer-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 1px;
}

/* Footer Description */
.footer-description {
    font-size: var(--fs-base);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-xl);
}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: var(--fs-base);
    font-weight: 400;
    transition: all var(--transition-normal);
    position: relative;
    display: inline-block;
    padding: var(--spacing-xs) 0;
}

.footer-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width var(--transition-normal);
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.footer-links a:hover::before {
    width: 100%;
}

/* Social Links */
.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transition: left var(--transition-normal);
    z-index: 1;
}

.social-link i {
    position: relative;
    z-index: 2;
    transition: all var(--transition-normal);
}

.social-link:hover::before {
    left: 0;
}

.social-link:hover {
    color: var(--white);
    border-color: var(--accent-color);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.social-link:hover i {
    color: var(--white);
    transform: scale(1.1);
}

.social-link:active {
    transform: translateY(-1px) scale(1.02);
}

/* Contact Information */
.contact-info {
    margin-top: var(--spacing-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--fs-base);
    transition: color var(--transition-normal);
}

.contact-item:hover {
    color: var(--accent-color);
}

.contact-item i {
    color: var(--accent-color);
    font-size: var(--fs-lg);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.contact-item span {
    flex: 1;
}

/* CTA Section (Above Footer) */
.cta-section {
    background: linear-gradient(135deg, 
        var(--primary-color) 0%, 
        var(--primary-dark) 100%);
    padding: var(--spacing-5xl) 0;
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><pattern id="cta-pattern" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="2" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23cta-pattern)"/></svg>');
    animation: cta-pattern-move 25s linear infinite;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-title {
    font-size: var(--fs-4xl);
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--white);
}

.cta-description {
    font-size: var(--fs-lg);
    margin-bottom: var(--spacing-2xl);
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--primary-color);
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-xl) 0;
    position: relative;
    z-index: 2;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-lg);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--fs-sm);
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--fs-sm);
    transition: color var(--transition-normal);
}

.footer-bottom-links a:hover {
    color: var(--accent-color);
}

/* Newsletter Signup (Optional) */
.newsletter-signup {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--spacing-lg);
    backdrop-filter: blur(10px);
}

.newsletter-title {
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--spacing-md);
}

.newsletter-description {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-lg);
}

.newsletter-form {
    display: flex;
    gap: var(--spacing-sm);
}

.newsletter-input {
    flex: 1;
    padding: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: var(--fs-base);
    backdrop-filter: blur(5px);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.newsletter-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        gap: var(--spacing-2xl);
    }
    
    .footer-section:last-child {
        grid-column: 1 / -1;
        margin-top: var(--spacing-xl);
    }
    
    .cta-title {
        font-size: var(--fs-3xl);
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-actions .btn {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
        padding: var(--spacing-4xl) 0 var(--spacing-2xl);
    }
    
    .footer-section:first-child {
        grid-column: 1 / -1;
        margin-bottom: var(--spacing-lg);
        max-width: 100%;
    }
    
    .social-links {
        justify-content: center;
        margin-top: var(--spacing-xl);
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
    
    .cta-section {
        padding: var(--spacing-4xl) 0;
    }
    
    .cta-title {
        font-size: var(--fs-2xl);
    }
    
    .cta-description {
        font-size: var(--fs-base);
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        padding: var(--spacing-3xl) 0 var(--spacing-xl);
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-title::after,
    .footer-subtitle::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
        gap: var(--spacing-sm);
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: var(--fs-base);
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xs);
    }
    
    .cta-title {
        font-size: var(--fs-xl);
    }
    
    .cta-actions .btn {
        min-width: 200px;
        width: 100%;
    }
    
    .footer-bottom-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* Animation Keyframes */
@keyframes footer-pattern-float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, -5px); }
    50% { transform: translate(-5px, 10px); }
    75% { transform: translate(-10px, -5px); }
}

@keyframes footer-glow {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes cta-pattern-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

/* Loading State */
.footer.loading .footer-content {
    opacity: 0.7;
}

.footer.loading .footer-links a,
.footer.loading .contact-item span {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
    color: transparent;
    border-radius: var(--radius-sm);
}

@keyframes loading-shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .footer {
        background: var(--dark-color);
        border-top: 3px solid var(--white);
    }
    
    .footer-links a,
    .contact-item,
    .social-link {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .social-link {
        background: var(--dark-color);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .footer::before,
    .footer::after,
    .cta-section::before {
        animation: none;
    }
    
    .footer-logo,
    .footer-links a,
    .social-link,
    .contact-item {
        transition: none;
    }
    
    .footer-logo:hover,
    .social-link:hover {
        transform: none;
    }
}

/* Print Styles */
@media print {
    .footer,
    .cta-section {
        background: var(--white);
        color: var(--dark-color);
        padding: var(--spacing-xl) 0;
    }
    
    .footer::before,
    .footer::after,
    .cta-section::before {
        display: none;
    }
    
    .social-links,
    .newsletter-signup,
    .cta-actions {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-lg);
    }
    
    .footer-title,
    .footer-subtitle {
        color: var(--dark-color);
    }
    
    .footer-links a,
    .contact-item {
        color: var(--dark-color);
    }
    
    .footer-bottom {
        border-top: 1px solid var(--gray-light);
    }
    
    .footer-bottom p,
    .footer-bottom-links a {
        color: var(--dark-color);
    }
}