/**
 * MCF — "Location" profile card on single Projects and Articles (ADJ-36)
 *
 * Rendered by mcf-public/includes/mcf-location-card.php and appended beneath the
 * body. It sits INSIDE the content column (the layout has a sidebar), so it is
 * deliberately fluid rather than full-bleed — same as "Meet the Designer(s)",
 * whose section chrome (border-top, spacing, title scale) this deliberately
 * mirrors so the two read as one system when both appear on a project.
 *
 * Colour rules are scoped through .mcf-location-card (0,2,0) deliberately:
 * Uncode's style-custom.css styles headings via `.style-light h2 / h3` (0,1,1),
 * which outranks a bare single class — an unscoped `.mcf-loc-card-name` would
 * silently lose to the theme.
 *
 * The brand vars are NOT defined on public pages (mcf-public.css is portal-only,
 * verified: only mcf-project-designers.css loads on a project), so the literal
 * fallbacks are what actually render. They are kept as vars so a future :root
 * definition — and the per-service accent wrappers (.mcf-svc-plumbing etc.,
 * which override --mcf-accent) — theme this for free.
 */

.mcf-location-card {
    margin: 40px 0 8px;
    padding-top: 32px;
    border-top: 1px solid var(--mcf-line, #e4e8f0);
}

.mcf-location-card .mcf-location-card-title {
    margin: 0 0 28px;
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--mcf-accent, #008ca7);
}

/* The card — DARK (ADJ-69, Louise 2026-09-04: "lets do clearly different").
 * Sitting under "Meet the Designer" (white, borderless, photo-left), a white
 * bordered card with the same photo-left layout read as a near-duplicate. The
 * Location card is a different kind of thing — a link OUT to a business, not
 * a bio — so it now carries Louise's own feature-card gradient (navy → steel
 * blue, the palette's color-725309) with white type: unmistakably a distinct
 * block, still on-brand. The photo keeps the designer photo's size (38% / 260px)
 * so the two left edges align and the section reads as one system with two
 * voices, not two clashing components. position:relative anchors the stretched
 * CTA link below. */
.mcf-location-card .mcf-loc-card {
    position: relative;
    display: flex;
    gap: 28px;
    align-items: center;
    padding: 24px;
    color: #fff;
    background: var(--mcf-navy, #002e62);
    background-image: linear-gradient(to right, #002e62 39%, #5886b9 100%);
    border: 0;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 46, 98, .18);
    transition: box-shadow .18s ease, transform .18s ease;
}

.mcf-location-card .mcf-loc-card:hover,
.mcf-location-card .mcf-loc-card:focus-within {
    box-shadow: 0 14px 34px rgba(0, 46, 98, .30);
    transform: translateY(-2px);
}

.mcf-location-card .mcf-loc-card-media {
    flex: 0 0 38%;
    max-width: 260px;
}

/* Square + cover, so any upload aspect normalises to one consistent shape.
 * height:auto is REQUIRED (not redundant): WordPress prints width/height attrs
 * on the <img>, which otherwise defeat aspect-ratio and keep the native ratio.
 * `center top` keeps the subject in frame when a portrait photo is cropped —
 * same treatment as the designers photos. The hairline white ring lifts the
 * photo off the gradient. */
.mcf-location-card .mcf-loc-card-media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
    border-radius: 10px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}

.mcf-location-card .mcf-loc-card-body {
    flex: 1 1 auto;
    min-width: 0;
}

/* White on navy. Scoped (0,2,0) so Uncode's `.style-light h3` (0,1,1) — which
 * would paint the name in the theme's heading colour — loses. */
.mcf-location-card .mcf-loc-card-name {
    margin: 0 0 8px;
    font-size: 1.25rem;
    line-height: 1.25;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #fff;
}

.mcf-location-card .mcf-loc-card-tagline {
    margin: 0;
    color: rgba(255, 255, 255, .82);
    line-height: 1.7;
}

/* The CTA carries Uncode's own .btn classes (see mcf_render_location_card) for
 * shape, sizing and typography. On the dark card the theme's teal fill sat too
 * close to the navy, so colour is ours here: white with navy text, inverting to
 * teal on hover — the same accent, higher contrast. (0,2,0) outranks Uncode's
 * .btn-color-* (0,1,0). */
.mcf-location-card .mcf-loc-card-link {
    margin: 18px 0 0;
}

.mcf-location-card .mcf-loc-card-cta,
.mcf-location-card .mcf-loc-card-cta:visited {
    background: #fff;
    color: var(--mcf-navy, #002e62);
}

.mcf-location-card .mcf-loc-card-cta:hover,
.mcf-location-card .mcf-loc-card-cta:focus,
.mcf-location-card .mcf-loc-card:hover .mcf-loc-card-cta {
    background: var(--mcf-accent, #008ca7);
    color: #fff;
}

/* Clicking anywhere on the card follows the CTA, with ONE semantic link.
 * Verified safe: Uncode defines no ::after on .btn / .btn-color-*. */
.mcf-location-card .mcf-loc-card-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

/* Tablet: keep both columns, tighten the gutter. */
@media (max-width: 900px) {
    .mcf-location-card .mcf-loc-card {
        gap: 20px;
    }

    .mcf-location-card .mcf-loc-card-media {
        flex-basis: 34%;
    }

    .mcf-location-card .mcf-loc-card-name {
        font-size: 1.1rem;
    }
}

/* Mobile: photo above the text, capped so it never dominates the screen. */
@media (max-width: 600px) {
    .mcf-location-card .mcf-loc-card {
        display: block;
        padding: 20px;
    }

    .mcf-location-card .mcf-loc-card-media {
        max-width: 280px;
        margin: 0 0 16px;
    }
}
