/**
 * Footer Component
 * 
 * Site footer styles
 */

/* ==========================================================================
   Footer Structure
   ========================================================================== */
.site-footer {
    background-color: var(--text-color);
    color: var(--color-text-inverse, white);
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

/* Footer decoration */
.footer-decoration {
    position: absolute;
    top: 0;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ==========================================================================
   Footer Widgets
   ========================================================================== */
.footer-widgets {
    padding: var(--space-3xl) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

/* Widget styles */
.footer-widget {
    color: var(--color-text-inverse, rgba(255, 255, 255, 0.8));
    opacity: 0.8;
}

.footer-widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-lg);
    color: var(--color-text-inverse, white);
    opacity: 1;
}

.footer-widget p {
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.footer-widget a {
    color: var(--color-text-inverse, --primary-color);
    opacity: 0.8;
    text-decoration: none;
    transition: opacity var(--transition-base);
}

.footer-widget a:hover {
    opacity: 1;
}

/* Widget lists */
.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget li {
    margin-bottom: var(--space-sm);
}

.footer-widget li a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
}

.footer-widget li a::before {
    content: '→';
    color: var(--primary-color);
    transition: transform var(--transition-base);
}

.footer-widget li a:hover::before {
    transform: translateX(4px);
}

/* Company info widget */
.footer-company-info .company-logo {
    display: block;
    max-width: 180px;
    margin-bottom: var(--space-lg);
}

.footer-company-info .company-logo img {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.company-contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.company-contact-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--primary-color);
}

/* Newsletter widget */
.footer-newsletter {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
}

.newsletter-form {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text-inverse, white);
}

.newsletter-form input[type="email"]::placeholder {
    color: var(--color-text-inverse, white);
    opacity: 0.5;
}

.newsletter-form input[type="email"]:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.newsletter-form button {
    padding: var(--space-sm) var(--space-lg);
    background: var(--primary-color);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.newsletter-form button:hover {
    background: var(--primary-dark);
}

/* Social links */
.footer-social {
    margin-top: var(--space-lg);
}

.footer-social-links {
    display: flex;
    gap: var(--space-sm);
}

.footer-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: white;
    transition: all var(--transition-base);
}

.footer-social-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-social-link svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Footer Bottom
   ========================================================================== */
.footer-bottom {
    padding: var(--space-xl) 0;
    background: rgba(0, 0, 0, 0.2);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

/* Copyright */
.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.footer-copyright a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

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

/* Footer menu */
.footer-menu {
    display: flex;
    gap: var(--space-xl);
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-base);
}

.footer-menu a:hover {
    color: white;
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: var(--z-fixed);
    cursor: pointer;
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   Footer Variations
   ========================================================================== */

/* Minimal footer */
.footer-minimal {
    padding: var(--space-2xl) 0;
    text-align: center;
    background: var(--bg-light);
    color: var(--text-color);
}

.footer-minimal .footer-copyright {
    color: var(--text-light);
}

.footer-minimal .footer-social-links {
    justify-content: center;
    margin-top: var(--space-md);
}

.footer-minimal .footer-social-link {
    background: var(--light-gray);
    color: var(--text-color);
}

.footer-minimal .footer-social-link:hover {
    background: var(--primary-color);
    color: white;
}

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

@media (max-width: 768px) {
    /* Widget grid */
    .footer-widgets-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    /* Newsletter form */
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
    
    /* Footer bottom */
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-menu {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
    
    /* Back to top */
    .back-to-top {
        bottom: var(--space-lg);
        right: var(--space-lg);
        width: 40px;
        height: 40px;
    }
    
    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
    
    /* Footer decoration */
    .footer-decoration {
        display: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Widget grid */
    .footer-widgets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Adjust spacing */
    .footer-widgets {
        padding: var(--space-2xl) 0;
    }
}