/**
 * 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. MC's card idiom: white, hairline border, generous radius.
 * 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;
    background: #fff;
    border: 1px solid #e4e8f0;
    border-radius: 14px;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.mcf-location-card .mcf-loc-card:hover,
.mcf-location-card .mcf-loc-card:focus-within {
    border-color: var(--mcf-accent, #008ca7);
    box-shadow: 0 10px 28px rgba(0, 41, 97, .12);
    transform: translateY(-2px);
}

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

/* 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. */
.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;
}

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

.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: var(--mcf-navy, #002961);
}

.mcf-location-card .mcf-loc-card-tagline {
    margin: 0;
    color: #54607a;
    line-height: 1.7;
}

/* The CTA carries Uncode's own .btn classes (see mcf_render_location_card), so
 * its look comes from the theme and stays identical to every other button on
 * the site — we own only the spacing and the stretched hit area. */
.mcf-location-card .mcf-loc-card-link {
    margin: 18px 0 0;
}

/* 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: 30%;
    }

    .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: 200px;
        margin: 0 0 16px;
    }
}
