/* =====================================================================
   Magica — site-wide chrome (navbar + footer) matching the new home design.
   Loaded on every page (after styles.css). Turns the theme's sticky pill
   navbar into a fixed floating pill and the footer into the dark rounded panel.
   ===================================================================== */

:root {
    --mhc-ink: #161a1e;
    --mhc-blue: #0d62e1;
    --mhc-blue-600: #0a52bd;
    --mhc-page: #f9f9f9;
    --mhc-font: "Albert Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --mhc-font-head: "Unbounded", "Albert Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Brand type pairing, site-wide: Albert Sans body + Unbounded headings. */
body {
    font-family: "Albert Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
    font-family: "Unbounded", "Albert Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}
/* Small footer labels read better in the body sans than the display face. */
.footer .footer-links h4, .footer .app-download h4 { font-family: var(--mhc-font); }
/* Long-form protection: Unbounded is a display face — great for the big article
   title (.entry-title, left as-is) but heavy on in-body subheadings of a long SEO
   post. Keep those in the body sans for readability. FAQ/hero/home stay Unbounded. */
.entry-content h2, .entry-content h3, .entry-content h4,
.entry-content h5, .entry-content h6 { font-family: var(--mhc-font); }

/* =========================  FLOATING PILL NAVBAR  =================== */
/* Fixed = always visible (sticky) and out of flow (no white band above a
   full-bleed hero). The wrapper ignores pointer events so the transparent
   gaps beside the centered pill don't block clicks on the content behind. */
.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1030;
    pointer-events: none;
    transform: none !important;   /* neutralize any legacy hide-on-scroll JS */
}
.header .container {
    pointer-events: auto;
    position: static;               /* override the theme's sticky pill */
    margin: 16px auto 0;
    width: min(1200px, calc(100% - 32px));
    max-width: none;
    background: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: 0 10px 34px rgba(22, 26, 30, .16);
    padding: .9rem 1.6rem;          /* a touch taller for nicer vertical rhythm */
    transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.admin-bar .header { top: 32px; }
@media (max-width: 782px) { .admin-bar .header { top: 46px; } }

.header .navbar { padding: 0; align-items: center; }
.header .navbar-brand { padding: 0; margin: 0; }
.header .navbar-brand img { height: 30px; width: auto; transition: filter .3s ease; }
.header .navbar-nav { align-items: center; gap: .15rem; }
.header .nav-link {
    color: var(--mhc-ink) !important;
    font-weight: 500;
    font-size: .95rem;
    margin: 0 !important;
    padding: .5rem .85rem !important;
    border-radius: 999px;
    transition: color .25s ease;
}
.header .nav-link:hover { color: var(--mhc-blue) !important; }
.header .navbar-toggler { border: 0; padding: .25rem .4rem; }
.header .navbar-toggler-icon { transition: filter .3s ease; }

/* Home only: dark translucent pill while over the video hero,
   flips to the white pill once scrolled past it (.is-scrolled added by JS). */
body.home .header:not(.is-scrolled) .container {
    background: rgba(13, 16, 20, .5);
    border-color: rgba(255, 255, 255, .14);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .28);
}
body.home .header:not(.is-scrolled) .nav-link { color: #fff !important; }
body.home .header:not(.is-scrolled) .nav-link:hover { color: #9ec5ff !important; }
body.home .header:not(.is-scrolled) .navbar-brand img { filter: brightness(0) invert(1); }
body.home .header:not(.is-scrolled) .navbar-toggler-icon { filter: brightness(0) invert(1); }

/* Nav CTA (injected on the front page in header.php) */
.header .nav-cta {
    display: inline-flex;
    align-items: center;
    background: var(--mhc-blue);
    color: #fff;
    font-weight: 600;
    font-size: .92rem;
    line-height: 1;
    padding: .6rem 1.25rem;
    border-radius: 999px;
    text-decoration: none;
    margin-left: .85rem;
    white-space: nowrap;
    transition: background .15s ease, transform .15s ease;
}
.header .nav-cta:hover { background: var(--mhc-blue-600); color: #fff; transform: translateY(-1px); }

/* Offset page content for the fixed navbar (home hero is full-bleed dark). */
.site-main { margin-top: 0; }
body { padding-top: 98px; }
body.home { padding-top: 0; }

@media (max-width: 991px) {
    .header .container { border-radius: 22px; padding: .55rem 1rem; }
    body { padding-top: 86px; }

    /* The pill IS the menu container — the dropdown adds no box of its own,
       so there's no double-container when expanded. */
    .header .collapse.navbar-collapse {
        background: transparent;
        border: 0;
        border-radius: 0;
        margin-top: 0;
        padding: .35rem 0 .15rem;
    }
    /* While the menu is open, make the pill opaque (it holds the whole menu). */
    .header .container:has(.navbar-collapse.show),
    .header .container:has(.navbar-collapse.collapsing) {
        background: rgba(255, 255, 255, .99);
    }
    body.home .header:not(.is-scrolled) .container:has(.navbar-collapse.show),
    body.home .header:not(.is-scrolled) .container:has(.navbar-collapse.collapsing) {
        background: rgba(18, 22, 27, .98);
    }

    /* Left-aligned, full-width menu rows (block layout lets the flags stay inline). */
    .header .navbar-nav { display: block; width: 100%; }
    .header .navbar-nav > li { list-style: none; }
    .header .nav-link {
        display: block;
        width: 100%;
        text-align: left;
        padding: .7rem .6rem !important;
        border-radius: 10px;
    }
    /* Language flags in a single horizontal row. */
    .header .lang-item { display: inline-block; width: auto; margin-top: .5rem; vertical-align: middle; }
    .header .lang-item .nav-link { display: inline-flex; width: auto; padding: .4rem .5rem !important; }
    .header .nav-cta { display: inline-flex; margin: .7rem 0 0 .6rem; }
    .header .navbar-toggler:focus,
    .header .navbar-toggler:focus-visible { box-shadow: none; outline: 0; }

    body.home .header:not(.is-scrolled) .nav-link:hover { background: rgba(255, 255, 255, .08); }
}

/* =============================  DARK FOOTER  ======================= */
.site-footer-outer { width: 100%; }
.footer {
    background: var(--mhc-ink);
    color: rgba(255, 255, 255, .72);
    border-radius: 32px 32px 0 0;
    box-shadow: none;
    margin: 64px 0 0;
    padding: 4rem 0 2rem;
}
.footer .container { max-width: 1200px; }
.footer .footer-brand { margin-bottom: 30px; }
.footer .footer-logo,
.footer .footer-brand img { height: 34px; margin-bottom: 16px; filter: none; }
.footer .footer-brand p { color: rgba(255, 255, 255, .6); font-size: .95rem; max-width: 300px; }

.footer .footer-links h4,
.footer .app-download h4 {
    color: rgba(255, 255, 255, .5);
    text-transform: uppercase;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    margin-bottom: 18px;
}
.footer .footer-links ul li { margin-bottom: 12px; }
.footer .footer-links a { color: rgba(255, 255, 255, .78); font-size: .98rem; }
.footer .footer-links a:hover { color: #fff; }

.footer .social-links { margin-top: 22px; gap: 10px; }

.footer .download-badges { gap: 12px; }
.footer .download-badge { height: 46px; }

.footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    margin-top: 2.5rem;
    padding-top: 1.6rem;
}
.footer .footer-bottom p { color: rgba(255, 255, 255, .5); font-size: .88rem; }

@media (max-width: 767px) {
    .footer { border-radius: 24px 24px 0 0; padding: 3rem 0 1.5rem; margin-top: 40px; }
}
