/* ============================================================
   FOOTER STYLES — Share Market Pro (Trading Terminal)
   ============================================================ */

.site-footer {
    background: #f8f9fa;
    border-top: 1px solid #e2e5ea;
    padding: 4rem 0 0;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

/* Subtle grid pattern */
.site-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,0,0,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.015) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* Green accent line at top */
.site-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 200, 83, 0.4) 30%, rgba(0, 200, 83, 0.6) 50%, rgba(0, 200, 83, 0.4) 70%, transparent 100%);
}

.footer__inner {
    position: relative;
    z-index: 1;
}

/* ── Grid Layout ───────────────────────────────────────── */
.footer__grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #e2e5ea;
}

/* ── Brand Column ──────────────────────────────────────── */
.footer__brand {}

.footer__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer__logo-icon {
    width: 36px;
    height: 36px;
    background: var(--color-accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.footer__logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: #0d0d0d;
    letter-spacing: -0.01em;
}

.footer__logo-text span {
    color: var(--color-accent);
}

.footer__tagline {
    font-size: 0.875rem;
    color: #6b6b6b;
    line-height: 1.7;
    max-width: 280px;
    margin-bottom: 1.5rem;
}

/* SEBI Trust Badge */
.footer__trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.875rem;
    background: rgba(0, 200, 83, 0.06);
    border: 1px solid rgba(0, 200, 83, 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.footer__trust-badge svg {
    flex-shrink: 0;
}

/* Social Links */
.footer__social {
    display: flex;
    gap: 0.625rem;
}

.footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e5ea;
    color: #6b6b6b;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    text-decoration: none;
}

.footer__social-link:hover {
    background: rgba(0, 200, 83, 0.1);
    border-color: rgba(0, 200, 83, 0.3);
    color: var(--color-accent);
}

.footer__social-link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ── Nav Columns ───────────────────────────────────────── */
.footer__col {}

.footer__heading {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0d0d0d;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.25rem;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__link {
    font-size: 0.875rem;
    color: #6b6b6b;
    text-decoration: none;
    transition: color 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.footer__link:hover { color: #0d0d0d; }

.footer__link:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ── Bottom Bar ────────────────────────────────────────── */
.footer__bottom {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer__bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer__copy {
    font-size: 0.8125rem;
    color: #4a4a4a;
}

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

.footer__bottom-link {
    font-size: 0.8125rem;
    color: #4a4a4a;
    text-decoration: none;
    transition: color 0.15s;
}

.footer__bottom-link:hover { color: #6b6b6b; }

.footer__disclaimer {
    font-size: 0.75rem;
    color: #6b6b6b;
    line-height: 1.6;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e5ea;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer__brand { grid-column: auto; }
    .footer__bottom-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   DARK THEME OVERRIDES
   ============================================================ */
[data-theme="dark"] .site-footer {
    background: #080808;
    border-top-color: #1a1a1a;
}

[data-theme="dark"] .site-footer::before {
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
}

[data-theme="dark"] .footer__grid {
    border-bottom-color: #1a1a1a;
}

[data-theme="dark"] .footer__logo-text {
    color: #f5f5f5;
}

[data-theme="dark"] .footer__social-link {
    background: #111;
    border-color: #1f1f1f;
    color: #6b6b6b;
}

[data-theme="dark"] .footer__social-link:hover {
    background: rgba(0, 200, 83, 0.1);
    border-color: rgba(0, 200, 83, 0.3);
    color: var(--color-accent);
}

[data-theme="dark"] .footer__heading {
    color: #f5f5f5;
}

[data-theme="dark"] .footer__link {
    color: #6b6b6b;
}

[data-theme="dark"] .footer__link:hover {
    color: #f5f5f5;
}

[data-theme="dark"] .footer__bottom-link {
    color: #4a4a4a;
}

[data-theme="dark"] .footer__bottom-link:hover {
    color: #9e9e9e;
}

[data-theme="dark"] .footer__disclaimer {
    color: #333;
    border-top-color: #111;
}
