/* =========================================
   WooLogger Footer Styles
   Optimized & Clean
   ========================================= */

/* 1. FOOTER BASE */
.site-footer {
    background-color: var(--c-surface);
    border-top: 1px solid var(--c-border);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 2. NEWSLETTER SECTION */
.footer-newsletter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    margin-bottom: 3rem;
    background-color: var(--c-surface-alt);
    border: 1px solid var(--c-border);
    border-radius: 0.5rem;
}

.newsletter-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--c-text);
}

.newsletter-content p {
    font-size: 0.875rem;
    color: var(--c-text-muted);
    margin: 0;
}

.newsletter-form {
    flex-shrink: 0;
}

.newsletter-input-group {
    display: flex;
    gap: 0.5rem;
}

.newsletter-input-group input {
    width: 240px;
    padding: 0.625rem 1rem;
    border: 1px solid var(--c-border);
    border-radius: 0.375rem;
    background-color: var(--c-surface);
    color: var(--c-text);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.newsletter-input-group input:focus {
    border-color: var(--c-text);
}

.newsletter-input-group input::placeholder {
    color: var(--c-text-muted);
}

.newsletter-input-group .btn {
    padding: 0.625rem 1.25rem;
    white-space: nowrap;
}

/* 3. FOOTER CONTENT GRID */
.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-col-brand {
    padding-right: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--c-text);
    text-decoration: none;
}

.footer-logo:hover {
    opacity: 0.8;
}

.footer-description {
    font-size: 0.875rem;
    color: var(--c-text-muted);
    line-height: 1.6;
}

.footer-col-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--c-text);
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-nav-list a {
    font-size: 0.875rem;
    color: var(--c-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-nav-list a:hover {
    color: var(--c-text);
}

/* 4. FOOTER BOTTOM */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--c-border);
}

.footer-copyright {
    font-size: 0.8125rem;
    color: var(--c-text-muted);
}

.footer-legal-links {
    display: flex;
    gap: 1.5rem;
}

.footer-legal-links a {
    font-size: 0.8125rem;
    color: var(--c-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-legal-links a:hover {
    color: var(--c-text);
}

/* 5. BACK TO TOP */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background-color: var(--c-surface);
    color: var(--c-text);
    border: 1px solid var(--c-border);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    z-index: 100;
    transition: all 0.2s;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--c-text);
    color: var(--c-surface);
}

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

/* 6. RESPONSIVE */
@media (max-width: 1024px) {
    .footer-newsletter {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .newsletter-input-group {
        width: 100%;
        max-width: 400px;
    }

    .newsletter-input-group input {
        flex: 1;
        width: auto;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-col-brand {
        grid-column: 1 / -1;
        padding-right: 0;
        text-align: center;
    }

    .footer-brand {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding: 3rem 0 1.5rem;
        margin-top: 3rem;
    }

    .footer-container {
        padding: 0 1rem;
    }

    .footer-newsletter {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .newsletter-content h3 {
        font-size: 1.125rem;
    }

    .newsletter-input-group {
        flex-direction: column;
        max-width: 100%;
    }

    .newsletter-input-group input,
    .newsletter-input-group .btn {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-legal-links {
        justify-content: center;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .site-footer {
        padding: 2.5rem 0 1.25rem;
        margin-top: 2rem;
    }

    .footer-newsletter {
        padding: 1.25rem;
    }

    .newsletter-content h3 {
        font-size: 1rem;
    }

    .newsletter-content p {
        font-size: 0.8125rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-col-brand,
    .footer-col-title {
        text-align: center;
    }

    .footer-nav-list {
        align-items: center;
    }

    .footer-legal-links {
        flex-wrap: wrap;
        gap: 1rem;
    }
}
