/* ==========================================================================
   FinRadar Footer Styles
   Dependencies: finradar-design-system.css (--fr-* CSS variables)
   ========================================================================== */

/* ==========================================================================
   Section 1: Footer CSS Variables
   ========================================================================== */

:root {
    --fr-footer-bg: var(--fr-card-bg);
    --fr-footer-border: var(--fr-border);
    --fr-footer-text: var(--fr-text-secondary);
    --fr-footer-heading: var(--fr-text);
    --fr-footer-link: var(--fr-text-muted);
    --fr-footer-link-hover: var(--fr-green);
}

/* ==========================================================================
   Section 2: Base Footer
   ========================================================================== */

.fr-footer {
    background: var(--fr-footer-bg);
    border-top: 1px solid var(--fr-footer-border);
    padding: var(--fr-space-lg) 0 var(--fr-space-sm) 0;
    margin-top: auto;
    color: var(--fr-footer-text);
    font-family: var(--fr-font);
    font-size: 13px;
    line-height: 1.5;
}

.fr-footer__inner {
    max-width: var(--fr-container-max);
    margin: 0 auto;
    padding: 0 var(--fr-space-lg);
}

/* ==========================================================================
   Section 3: Footer Grid (4-column layout)
   ========================================================================== */

.fr-footer__grid {
    display: grid;
    grid-template-columns: 1fr 2fr 0.8fr 1.1fr;
    gap: var(--fr-space-lg);
    padding-bottom: var(--fr-space-md);
    border-bottom: 1px solid var(--fr-footer-border);
    margin-bottom: var(--fr-space-sm);
}

/* ==========================================================================
   Section 4: Brand Column
   ========================================================================== */

.fr-footer__brand .custom-logo-link img {
    max-height: 24px;
    width: auto;
}

.fr-footer__site-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--fr-footer-heading);
    text-decoration: none;
}

.fr-footer__logo {
    display: inline-block;
    text-decoration: none;
}

.fr-footer__tagline {
    color: var(--fr-footer-text);
    margin-top: var(--fr-space-sm);
    font-size: 12px;
    line-height: 1.4;
}

/* ==========================================================================
   Section 5: Link Columns
   ========================================================================== */

.fr-footer__heading {
    font-size: 11px;
    font-weight: 600;
    color: var(--fr-footer-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--fr-space-sm);
}

.fr-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fr-footer__links--2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: column;
    grid-template-rows: repeat(9, auto);
    column-gap: var(--fr-space-lg, 24px);
    row-gap: 0;
}

.fr-footer__links li {
    margin-bottom: 2px;
}

.fr-footer__links a {
    color: var(--fr-footer-link);
    text-decoration: none;
    transition: color 0.2s ease;
}

.fr-footer__links a:hover {
    color: var(--fr-footer-link-hover) !important;
}

/* ==========================================================================
   Section 6: Newsletter Column
   ========================================================================== */

.fr-footer__newsletter-desc {
    color: var(--fr-footer-text);
    margin-bottom: var(--fr-space-sm);
}

.fr-footer__newsletter-input-wrap {
    display: flex;
    gap: var(--fr-space-xs);
}

.fr-footer__newsletter-input {
    flex: 1;
    padding: 6px var(--fr-space-sm);
    border: 1px solid var(--fr-footer-border);
    border-radius: var(--fr-radius-sm);
    background: var(--fr-bg);
    color: var(--fr-text);
    font-size: 13px;
    font-family: var(--fr-font);
    outline: none;
    transition: border-color 0.2s ease;
}

.fr-footer__newsletter-input:focus {
    border-color: var(--fr-green);
}

.fr-footer__newsletter-input::placeholder {
    color: var(--fr-text-muted);
}

.fr-footer__newsletter-btn {
    padding: 6px var(--fr-space-md);
    background: var(--fr-green);
    color: var(--fr-white);
    border: none;
    border-radius: var(--fr-radius-sm);
    font-weight: 600;
    font-size: 12px;
    font-family: var(--fr-font);
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.fr-footer__newsletter-btn:hover {
    filter: brightness(0.9);
}

.fr-footer__newsletter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fr-footer__newsletter-status {
    margin-top: var(--fr-space-xs);
    font-size: 11px;
}

.fr-footer__newsletter-status--success {
    color: var(--fr-green);
}

.fr-footer__newsletter-status--error {
    color: var(--fr-red);
}

/* ==========================================================================
   Section 7: Bottom Bar (Copyright + Social)
   ========================================================================== */

.fr-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--fr-space-md);
}

.fr-footer__copyright {
    color: var(--fr-footer-text);
    margin: 0;
}

.fr-footer__social {
    display: flex;
    gap: var(--fr-space-md);
    align-items: center;
}

.fr-footer__social a {
    color: var(--fr-footer-link);
    transition: color 0.2s ease;
    display: inline-flex;
}

.fr-footer__social a:hover {
    color: var(--fr-footer-link-hover) !important;
}

.fr-footer__social svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   Section 8: Responsive - Tablet (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .fr-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--fr-space-lg);
    }

    .fr-footer__newsletter {
        grid-column: 1 / -1;
    }
}

/* ==========================================================================
   Section 9: Responsive - Mobile (max-width: 480px)
   ========================================================================== */

@media (max-width: 480px) {
    .fr-footer__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .fr-footer__bottom {
        justify-content: center;
        flex-direction: column;
        text-align: center;
    }

    .fr-footer__newsletter-input-wrap {
        flex-direction: column;
    }

    .fr-footer__newsletter-btn {
        width: 100%;
    }

    .fr-footer__links--2col {
        display: block;
    }
}

/* ==========================================================================
   Section 10: Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .fr-footer__links a,
    .fr-footer__social a,
    .fr-footer__newsletter-input,
    .fr-footer__newsletter-btn {
        transition: none;
    }
}
