/* ==========================================
   EVERYDAY INSIGHT — SHARED FOOTER
   Load this stylesheet after other CSS files.
========================================== */

#footer {
    width: 100%;
}

.site-footer.site-footer {
    --footer-heading: #304438;
    --footer-text: #465e4e;
    --footer-muted: #52695a;
    --footer-link-hover: #2f6b4a;
    --footer-button: #678574;
    --footer-button-hover: #527060;
    --footer-input: #fffdf9;
    --footer-border: #a9c3b0;
    --footer-accent: #9c8061;

    width: 100%;
    margin-top: 50px;
    padding: 50px 20px 0;
    color: var(--footer-text);
    background: linear-gradient(
        135deg,
        #dcebe1 0%,
        #cfe2d6 100%
    );
    border-top: 3px solid var(--footer-accent);
}

.site-footer .footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
    gap: 40px;
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
}

.site-footer .footer-column h2,
.site-footer .footer-column h3 {
    margin: 0 0 15px;
    color: var(--footer-heading);
    font-size: 1.05rem;
    line-height: 1.3;
}

.site-footer .footer-column p {
    margin: 0 0 15px;
    color: var(--footer-text);
    font-size: 0.92rem;
    line-height: 1.7;
}

.site-footer .footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer .footer-column li {
    margin-bottom: 10px;
}

.site-footer .footer-column a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer .footer-column a:hover {
    color: var(--footer-link-hover);
    text-decoration: underline;
}

.site-footer .footer-column a:focus-visible {
    outline: 3px solid rgba(103, 133, 116, 0.3);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Newsletter */

.site-footer .footer-newsletter-form {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.site-footer .footer-newsletter-form input[type="email"] {
    width: 100%;
    min-width: 0;
    padding: 11px 12px;
    color: #3d3a36;
    background: var(--footer-input);
    border: 1px solid var(--footer-border);
    border-radius: 8px;
}

.site-footer .footer-newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--footer-button);
    box-shadow: 0 0 0 3px rgba(103, 133, 116, 0.18);
}

.site-footer .footer-newsletter-form .footer-button,
.site-footer .footer-button {
    padding: 11px 15px;
    color: #ffffff;
    background: var(--footer-button);
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.site-footer .footer-newsletter-form .footer-button:hover,
.site-footer .footer-button:hover {
    color: #ffffff;
    background: var(--footer-button-hover);
    transform: translateY(-1px);
}

.site-footer .footer-newsletter-form .footer-button:focus-visible,
.site-footer .footer-button:focus-visible {
    outline: 3px solid rgba(82, 112, 96, 0.35);
    outline-offset: 3px;
}

.site-footer .footer-newsletter-message {
    margin-top: 8px;
    color: var(--footer-muted);
    font-size: 0.86rem;
}

/* Copyright and disclosures */

.site-footer .footer-bottom {
    width: min(1120px, calc(100% - 36px));
    margin: 40px auto 0;
    padding: 22px 0;
    border-top: 1px solid rgba(70, 94, 78, 0.25);
    text-align: center;
}

.site-footer .footer-bottom,
.site-footer .footer-bottom p,
.site-footer .footer-disclaimer,
.site-footer .affiliate-disclosure {
    max-width: 900px;
    color: var(--footer-muted);
    opacity: 1;
}

.site-footer .footer-bottom p,
.site-footer .footer-disclaimer,
.site-footer .affiliate-disclosure {
    margin: 5px auto;
    font-size: 0.82rem;
    line-height: 1.6;
}

/* Tablet */

@media (max-width: 800px) {
    .site-footer .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

/* Mobile */

@media (max-width: 600px) {
    .site-footer.site-footer {
        padding: 40px 18px 0;
    }

    .site-footer .footer-container {
        width: 100%;
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }

    .site-footer .footer-column ul {
        text-align: center;
    }

    .site-footer .footer-newsletter-form {
        width: 100%;
        max-width: 400px;
        margin: 15px auto 0;
        flex-direction: column;
    }

    .site-footer .footer-newsletter-form .footer-button,
    .site-footer .footer-button {
        width: 100%;
    }

    .site-footer .footer-bottom {
        width: 100%;
        margin-top: 30px;
    }
}

/* Printing */

@media print {
    #footer,
    .site-footer {
        display: none !important;
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    .site-footer *,
    .site-footer *::before,
    .site-footer *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
