/**
 * BioCode Custom Footer Styles
 * Redesigned 2026-05-25 — dark modern SaaS/edtech layout
 *
 * Colour palette:
 *   --bc-footer-bg          : #0f0f1a   (main body)
 *   --bc-footer-bottom-bg   : #080812   (copyright bar)
 *   --bc-footer-border      : rgba(255,255,255,0.08)
 *   --bc-footer-text        : #8892a4   (muted body text / links)
 *   --bc-footer-heading     : #ffffff
 *   --bc-footer-link-hover  : #5c9df5   (lighter brand blue — readable on dark)
 *   --bc-footer-accent      : #175cff   (BioCode blue — used sparingly)
 *   --bc-footer-social-bg   : rgba(255,255,255,0.06)
 *   --bc-footer-social-hover: rgba(255,255,255,0.14)
 *
 * @package TutorStarter_Child
 */

/* ─── Custom properties ──────────────────────────────────────────────────── */
.biocode-footer {
    --bc-footer-bg:          #0f0f1a;
    --bc-footer-bottom-bg:   #080812;
    --bc-footer-border:      rgba(255, 255, 255, 0.08);
    --bc-footer-text:        #8892a4;
    --bc-footer-heading:     #ffffff;
    --bc-footer-link-hover:  #5c9df5;
    --bc-footer-accent:      #175cff;
    --bc-footer-social-bg:   rgba(255, 255, 255, 0.06);
    --bc-footer-social-hover:rgba(255, 255, 255, 0.14);
}

/* ─── Root element ───────────────────────────────────────────────────────── */
.biocode-footer {
    background-color: var(--bc-footer-bg);
    color: var(--bc-footer-text);
    font-family: inherit;
    font-size: 0.9375rem; /* 15px */
    line-height: 1.6;

    /* 3 px accent line at the very top */
    border-top: 3px solid var(--bc-footer-accent);
}

/* ─── Override any parent theme footer styles ────────────────────────────── */
.biocode-footer,
.biocode-footer * {
    box-sizing: border-box;
}

/* Remove parent theme footer-widgets section if it accidentally renders */
.biocode-footer .footer-widgets {
    display: none;
}

/* ─── Main body ──────────────────────────────────────────────────────────── */
.biocode-footer__main {
    padding: 64px 0 48px;
}

/* ─── Grid layout: brand + 3 nav columns ────────────────────────────────── */
.biocode-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px 32px;
    align-items: start;
}

/* ─── Brand column ───────────────────────────────────────────────────────── */
.biocode-footer__brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Logo — invert to white on dark background */
.biocode-footer__logo-link {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}

.biocode-footer__logo {
    max-width: 130px;
    height: auto;
    /* SVG is dark; make it white on dark background */
    filter: brightness(0) invert(1);
    transition: opacity 0.2s ease;
}

.biocode-footer__logo-link:hover .biocode-footer__logo,
.biocode-footer__logo-link:focus .biocode-footer__logo {
    opacity: 0.8;
}

/* Tagline */
.biocode-footer__tagline {
    color: var(--bc-footer-text);
    font-size: 0.9375rem;
    line-height: 1.65;
    margin: 0;
    max-width: 280px;
}

/* ─── Contact details ────────────────────────────────────────────────────── */
.biocode-footer__contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-style: normal; /* override <address> italic default */
    color: var(--bc-footer-text);
    font-size: 0.875rem;
}

.biocode-footer__contact-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
    color: inherit;
    text-decoration: none;
}

.biocode-footer__contact-link {
    transition: color 0.2s ease;
}

.biocode-footer__contact-link:hover,
.biocode-footer__contact-link:focus {
    color: var(--bc-footer-link-hover);
    text-decoration: none;
    outline: 2px solid transparent;
}

.biocode-footer__contact-icon {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.6;
    color: var(--bc-footer-heading);
}

/* ─── Social icons ───────────────────────────────────────────────────────── */
.biocode-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.biocode-footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bc-footer-social-bg);
    color: var(--bc-footer-text);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.biocode-footer__social-link:hover,
.biocode-footer__social-link:focus {
    background: var(--bc-footer-social-hover);
    color: var(--bc-footer-heading);
    transform: translateY(-2px);
    outline: none;
    text-decoration: none;
}

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

.biocode-footer__social-link svg {
    pointer-events: none;
}

/* ─── Nav columns ────────────────────────────────────────────────────────── */
.biocode-footer__col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.biocode-footer__col-title {
    color: var(--bc-footer-heading);
    font-size: 0.8125rem; /* 13px */
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.biocode-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.biocode-footer__links li {
    margin: 0;
    padding: 0;
}

.biocode-footer__links a {
    color: var(--bc-footer-text);
    text-decoration: none;
    font-size: 0.9375rem;
    line-height: 1.4;
    transition: color 0.2s ease, padding-left 0.2s ease;
    display: inline-block;
}

.biocode-footer__links a:hover,
.biocode-footer__links a:focus {
    color: var(--bc-footer-link-hover);
    padding-left: 4px;
    text-decoration: none;
    outline: none;
}

.biocode-footer__links a:focus-visible {
    outline: 2px solid var(--bc-footer-accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ─── Divider between main and bottom bar ────────────────────────────────── */
.biocode-footer__main {
    border-bottom: 1px solid var(--bc-footer-border);
}

/* ─── Bottom copyright bar ───────────────────────────────────────────────── */
.biocode-footer__bottom {
    background-color: var(--bc-footer-bottom-bg);
    padding: 16px 0;
}

.biocode-footer__bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.biocode-footer__copyright {
    font-size: 0.875rem;
    color: var(--bc-footer-text);
    opacity: 0.7;
}

/* Legal links */
.biocode-footer__legal {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.biocode-footer__legal a {
    font-size: 0.875rem;
    color: var(--bc-footer-text);
    text-decoration: none;
    opacity: 0.7;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.biocode-footer__legal a:hover,
.biocode-footer__legal a:focus {
    color: var(--bc-footer-link-hover);
    opacity: 1;
    text-decoration: none;
    outline: none;
}

.biocode-footer__legal-dot {
    color: var(--bc-footer-text);
    opacity: 0.4;
    font-size: 1rem;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

/* ─── Responsive — Tablet (≤ 960px) ─────────────────────────────────────── */
@media (max-width: 960px) {
    .biocode-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px 28px;
    }

    /* Brand spans both columns on tablet */
    .biocode-footer__brand {
        grid-column: 1 / -1;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 28px 40px;
        align-items: flex-start;
    }

    .biocode-footer__tagline {
        max-width: 360px;
    }

    .biocode-footer__main {
        padding: 48px 0 40px;
    }
}

/* ─── Responsive — Mobile (≤ 600px) ─────────────────────────────────────── */
@media (max-width: 600px) {
    .biocode-footer__grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .biocode-footer__brand {
        flex-direction: column;
        gap: 16px;
    }

    .biocode-footer__tagline {
        max-width: 100%;
    }

    .biocode-footer__main {
        padding: 40px 0 32px;
    }

    .biocode-footer__bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .biocode-footer__legal {
        gap: 10px;
    }
}

/* ─── Reduce motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .biocode-footer__logo,
    .biocode-footer__social-link,
    .biocode-footer__links a,
    .biocode-footer__contact-link {
        transition: none;
    }

    .biocode-footer__social-link:hover,
    .biocode-footer__social-link:focus {
        transform: none;
    }
}
