/**
 * Footer Styles - Total Makeover: Match Header Design
 * Modern, sophisticated, content-driven design matching header
 */

/* --- Variables (Match Header) --- */
:root {
    --font-primary: 'Google Sans Flex', 'Google Sans', 'Roboto Flex', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --color-text-main: #202124;       /* Deep dark gray for main text */
    --color-text-light: #5f6368;      /* Medium gray for secondary text */
    --color-accent: #1a73e8;          /* Google Blue style accent */
    --color-bg: #ffffff;              /* Pure white */
    --color-border: #dadce0;          /* Subtle border color */
    --color-hover-bg: #f1f3f4;        /* Light gray hover state */
    --container-width: 1280px;
    --transition-speed: 0.2s;
}

/* Apply Google Sans Flex globally to footer elements */
.site-footer, .site-footer * {
    font-family: var(--font-primary);
    box-sizing: border-box;
}

.site-footer {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    width: 100%;
    position: relative;
    border-top: 1px solid var(--color-border);
    margin-top: 60px;
}

.site-footer .container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* --- 1. Newsletter Section --- */
.footer-newsletter {
    background-color: var(--color-bg);
    padding: 60px 0;
    border-bottom: 1px solid var(--color-border);
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text-main);
    margin: 0 0 12px;
    font-family: var(--font-primary);
}

.newsletter-description {
    font-size: 15px;
    color: var(--color-text-light);
    margin: 0 0 30px;
    line-height: 1.6;
    font-weight: 400;
}

.newsletter-form {
    margin-top: 20px;
}

.newsletter-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.newsletter-email {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-size: 14px;
    font-family: var(--font-primary);
    transition: border-color var(--transition-speed);
}

.newsletter-email::placeholder {
    color: var(--color-text-light);
}

.newsletter-email:focus {
    outline: none;
    border-color: var(--color-accent);
}

.newsletter-submit {
    padding: 12px 24px;
    background-color: var(--color-text-main);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-primary);
    cursor: pointer;
    transition: background-color var(--transition-speed);
    white-space: nowrap;
}

.newsletter-submit:hover {
    background-color: #000;
}

.newsletter-submit:active {
    transform: translateY(1px);
}

.newsletter-message {
    margin-top: 12px;
    padding: 12px;
    border-radius: 4px;
    font-size: 13px;
    text-align: left;
    display: none;
    font-family: var(--font-primary);
}

.newsletter-message.success {
    display: block;
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.newsletter-message.error {
    display: block;
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #f44336;
}

/* --- 2. Footer Links Section --- */
.footer-links {
    padding: 60px 0;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-bg);
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-column-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-primary);
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu li a {
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font-primary);
    transition: color var(--transition-speed);
    display: inline-block;
}

.footer-menu li a:hover {
    color: var(--color-accent);
}

/* --- 3. Footer Bottom (Social + Copyright) --- */
.footer-bottom {
    padding: 40px 0;
    background-color: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

/* Social Media */
.footer-social {
    flex: 1;
    min-width: 200px;
}

.social-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: var(--font-primary);
}

.social-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 12px;
}

.social-links li {
    margin: 0;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--color-hover-bg);
    border-radius: 50%;
    color: var(--color-text-main);
    text-decoration: none;
    transition: all var(--transition-speed);
}

.social-links a:hover {
    background-color: var(--color-accent);
    color: #fff;
    transform: translateY(-2px);
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Copyright */
.footer-copyright {
    flex: 1;
    min-width: 250px;
    text-align: right;
}

.copyright-text {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--color-text-light);
    font-weight: 400;
    font-family: var(--font-primary);
}

.legal-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.legal-links li {
    margin: 0;
}

.legal-links a {
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font-primary);
    transition: color var(--transition-speed);
}

.legal-links a:hover {
    color: var(--color-accent);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .footer-bottom-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-copyright {
        text-align: left;
        width: 100%;
    }

    .legal-links {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .footer-newsletter {
        padding: 40px 0;
    }

    .newsletter-title {
        font-size: 24px;
    }

    .newsletter-description {
        font-size: 14px;
    }

    .newsletter-input-wrapper {
        flex-direction: column;
    }

    .newsletter-submit {
        width: 100%;
    }

    .footer-links {
        padding: 40px 0;
    }

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

    .footer-column {
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .footer-column:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .footer-column-title {
        cursor: pointer;
        position: relative;
        padding-right: 30px;
        user-select: none;
        margin-bottom: 0;
    }

    .footer-column-title::after {
        content: '+';
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        font-size: 20px;
        font-weight: 300;
        transition: transform var(--transition-speed);
    }

    .footer-column.active .footer-column-title::after {
        content: '−';
        transform: translateY(-50%);
    }

    .footer-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        margin-top: 0;
    }

    .footer-column.active .footer-menu {
        max-height: 1000px;
        padding-top: 15px;
        margin-top: 15px;
    }

    .footer-bottom {
        padding: 30px 0;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-social {
        width: 100%;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-copyright {
        width: 100%;
        text-align: center;
    }

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

@media (max-width: 480px) {
    .footer-newsletter {
        padding: 30px 0;
    }

    .newsletter-title {
        font-size: 20px;
    }

    .newsletter-description {
        font-size: 13px;
    }

    .footer-links {
        padding: 30px 0;
    }

    .footer-bottom {
        padding: 25px 0;
    }

    .legal-links {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

/* --- Accessibility --- */
.footer-menu a:focus,
.newsletter-email:focus,
.newsletter-submit:focus,
.social-links a:focus,
.legal-links a:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* --- Print Styles --- */
@media print {
    .site-footer {
        display: none;
    }
}
