﻿footer {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
    border-top: 1px solid var(--border);
    padding: 3rem 1rem 1.5rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .footer-col h4 svg {
        width: 18px;
        height: 18px;
        color: var(--accent);
    }

/* Column 1: Brand */
.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
}

.footer-brand > p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.footer-social {
    display: flex;
    gap: 0.5rem;
}

    .footer-social a {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        transition: all 0.3s;
    }

        .footer-social a:hover {
            background: rgba(99, 102, 241, 0.15);
            border-color: var(--primary);
            color: var(--primary-light);
            transform: translateY(-2px);
        }

    .footer-social svg {
        width: 16px;
        height: 16px;
    }

/* Column 2 & 3: Links */
.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

    .footer-links-list a {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.875rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        transition: all 0.3s;
    }

        .footer-links-list a::before {
            content: '';
            width: 4px;
            height: 4px;
            background: var(--text-muted);
            border-radius: 50%;
            transition: all 0.3s;
        }

        .footer-links-list a:hover {
            color: var(--accent);
            padding-right: 0.25rem;
        }

            .footer-links-list a:hover::before {
                background: var(--accent);
            }

/* Column 4: Newsletter */
.footer-newsletter p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-input-wrapper {
    position: relative;
}

    .newsletter-input-wrapper input {
        width: 100%;
        padding: 0.875rem 1rem;
        padding-left: 2.75rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        color: var(--text-primary);
        font-family: inherit;
        font-size: 0.875rem;
        transition: all 0.3s;
    }

        .newsletter-input-wrapper input::placeholder {
            color: var(--text-muted);
        }

        .newsletter-input-wrapper input:focus {
            outline: none;
            border-color: var(--primary);
            background: rgba(255, 255, 255, 0.08);
        }

    .newsletter-input-wrapper svg {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        color: var(--text-muted);
    }

.newsletter-btn {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

    .newsletter-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    }

    .newsletter-btn svg {
        width: 16px;
        height: 16px;
    }

.newsletter-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

    .newsletter-hint svg {
        width: 12px;
        height: 12px;
    }

/* Newsletter Message */
.newsletter-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    animation: fadeIn 0.3s ease;
}

    .newsletter-message.success {
        background: rgba(34, 197, 94, 0.15);
        border: 1px solid rgba(34, 197, 94, 0.3);
        color: #22c55e;
    }

    .newsletter-message.error {
        background: rgba(239, 68, 68, 0.15);
        border: 1px solid rgba(239, 68, 68, 0.3);
        color: #ef4444;
    }

    .newsletter-message svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Newsletter Button Loading */
.newsletter-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.newsletter-btn .spinner {
    width: 18px;
    height: 18px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

    .footer-bottom-links a {
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.8rem;
        transition: color 0.3s;
    }

        .footer-bottom-links a:hover {
            color: var(--accent);
        }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
    }

        .footer-brand .logo {
            justify-content: center;
        }

        .footer-brand > p {
            max-width: 400px;
            margin-left: auto;
            margin-right: auto;
        }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    footer {
        padding: 2.5rem 1rem 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-col h4 {
        justify-content: center;
    }

    .footer-links-list {
        align-items: center;
    }

        .footer-links-list a::before {
            display: none;
        }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}
