/**
 * Maryland Homebuyer Hub - county resource page components.
 *
 * Additive only. Colours, radii and borders reuse the tokens already defined by
 * loan-program.css so a county page is visually indistinguishable from the
 * program pages. Nothing here overrides an existing selector.
 *
 * Every grid uses auto-fit so a county with three featured agents, or five
 * professional categories, or seven municipalities never leaves a single card
 * stranded alone on the last row.
 */

/* ---------- Market snapshot ---------- */

.mhh-cty-metrics {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.mhh-cty-metric {
    background: #fff;
    border: 1px solid var(--mhh-line);
    border-top: 4px solid var(--mhh-gold);
    border-radius: 8px;
    padding: 20px 19px;
    min-width: 0;
}

.mhh-cty-metric b {
    display: block;
    font-size: 26px;
    line-height: 1.05;
    letter-spacing: -.6px;
    margin-bottom: 7px;
    font-variant-numeric: tabular-nums;
}

.mhh-cty-metric span { display: block; font-size: 13.5px; line-height: 1.45; color: #55585e; }

.mhh-cty-delta {
    display: inline-block;
    margin-top: 9px;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 3px;
    background: #f1f3f5;
    color: #55585e;
    font-variant-numeric: tabular-nums;
}

.mhh-cty-secondary {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.mhh-cty-secondary li {
    background: var(--mhh-cream);
    border: 1px solid var(--mhh-line);
    border-radius: 8px;
    padding: 15px 16px;
    min-width: 0;
}

.mhh-cty-secondary b { display: block; font-size: 19px; line-height: 1.1; margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.mhh-cty-secondary span { display: block; font-size: 12.5px; line-height: 1.45; color: #6c6f74; }

.mhh-cty-datanote { font-size: 12.5px; line-height: 1.6; color: #6c6f74; margin: 0 0 8px; }
.mhh-cty-datanote strong { color: #3f4247; }

/* ---------- Featured professionals ---------- */

/*
 * Built for the mature state: up to six featured professionals, three across on
 * desktop and two rows deep. auto-FILL rather than auto-fit is deliberate -- it
 * keeps the empty tracks, so a county with one featured professional shows one
 * correctly sized card instead of a single card stretched across the row. No
 * filler cards are ever generated, and the column count falls to two and then
 * one as the container narrows.
 */
.mhh-cty-agents {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
    margin: 26px 0 20px;
}

.mhh-cty-agent {
    background: #fff;
    border: 1px solid var(--mhh-line);
    border-top: 5px solid var(--mhh-red);
    border-radius: 10px;
    overflow: hidden;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/*
 * A 16:9 media container, not a video container. It holds a professional image
 * by default and becomes video-capable only when real Spotlight content exists,
 * so nothing here implies a video that has not been recorded.
 */
.mhh-cty-agent-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--mhh-cream);
    overflow: hidden;
}

/*
 * contain, not cover. A professional headshot is usually square or portrait,
 * and cover would crop the top of the head out of a 16:9 frame. contain shows
 * the whole image against the cream ground, and a native 16:9 Spotlight
 * thumbnail still fills the frame exactly.
 */
.mhh-cty-agent-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.mhh-cty-agent-initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: 38px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #b9b3a6;
    background: var(--mhh-cream);
}

.mhh-cty-agent-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .93);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--mhh-red);
    padding-left: 4px;
}

.mhh-cty-agent-body {
    padding: 20px 21px 21px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mhh-cty-agent-cat {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--mhh-red);
    margin: 0 0 8px;
}

.mhh-cty-agent h3 { margin: 0 0 3px; font-size: 20px; line-height: 1.2; }
.mhh-cty-agent-firm { margin: 0 0 9px; font-size: 13.5px; color: #55585e; font-weight: 700; }
.mhh-cty-agent-area { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: #55585e; }
.mhh-cty-agent-sptitle { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: #55585e; font-style: italic; }

.mhh-cty-agent-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-top: auto;
    padding-top: 16px;
}

.mhh-cty-agent-links .mhh-lp2-btn { padding: 10px 18px; font-size: 14px; }
.mhh-cty-agent-spotlight { font-size: 13.5px; font-weight: 700; }

.mhh-cty-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    background: #3f4247;
    padding: 4px 9px;
    border-radius: 3px;
    margin-bottom: 11px;
}

/* ---------- Directory CTA band ---------- */

.mhh-cty-dircta {
    background: var(--mhh-cream);
    border: 1px solid var(--mhh-line);
    border-left: 5px solid var(--mhh-gold);
    border-radius: 9px;
    padding: 26px 26px;
    margin: 22px 0 10px;
}

.mhh-cty-dircta h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; }
.mhh-cty-dircta p { margin: 0 0 16px; }
.mhh-cty-dircta p:last-child { margin-bottom: 0; }

/* ---------- Compact category gateway ---------- */

.mhh-cty-gateway { margin: 20px 0 12px; }

.mhh-cty-gateway ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.mhh-cty-gateway li a,
.mhh-cty-gateway li span {
    display: block;
    font-size: 14px;
    font-weight: 700;
    padding: 9px 15px;
    border-radius: 999px;
    border: 1px solid var(--mhh-line);
    background: #fff;
    text-decoration: none;
}

.mhh-cty-gateway li a:hover { border-color: var(--mhh-red); }
.mhh-cty-gateway li span { color: #82868c; background: var(--mhh-cream); font-weight: 600; }

/* ---------- Spotlights ---------- */

.mhh-cty-spotlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    margin: 26px 0 18px;
}

.mhh-cty-spotlight {
    background: #fff;
    border: 1px solid var(--mhh-line);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mhh-cty-spotlight-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #22252a;
    overflow: hidden;
}

.mhh-cty-spotlight-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.mhh-cty-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: var(--mhh-red);
    padding-left: 4px;
}

.mhh-cty-spotlight-body { padding: 20px 21px 22px; display: flex; flex-direction: column; flex: 1; }
.mhh-cty-spotlight-cat { font-size: 11px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--mhh-red); margin: 0 0 8px; }
.mhh-cty-spotlight h3 { margin: 0 0 4px; font-size: 19px; line-height: 1.28; }
.mhh-cty-spotlight-who { margin: 0 0 10px; font-size: 13.5px; color: #55585e; font-weight: 700; }
.mhh-cty-spotlight-body p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.6; color: #55585e; }
.mhh-cty-spotlight-body a.mhh-cty-watch { margin-top: auto; font-weight: 700; font-size: 14.5px; }

/* ---------- Info cards (local considerations, financing) ---------- */

.mhh-cty-infocards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(262px, 1fr));
    gap: 20px;
    margin: 26px 0 30px;
}

.mhh-cty-infocard {
    background: #fff;
    border: 1px solid var(--mhh-line);
    border-top: 4px solid var(--mhh-gold);
    border-radius: 9px;
    padding: 23px 22px;
    min-width: 0;
}

.mhh-cty-infocard h3 { margin: 0 0 9px; font-size: 18px; line-height: 1.28; }
.mhh-cty-infocard p { margin: 0 0 11px; font-size: 14.5px; line-height: 1.62; }
.mhh-cty-infocard p:last-child { margin-bottom: 0; }
.mhh-cty-infocard a { font-weight: 700; }

.mhh-cty-infocard--link { border-top-color: var(--mhh-red); }

/* ---------- Communities ---------- */

.mhh-cty-places {
    list-style: none;
    margin: 22px 0 22px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.mhh-cty-places li {
    background: #fff;
    border: 1px solid var(--mhh-line);
    border-left: 4px solid var(--mhh-gold);
    border-radius: 8px;
    padding: 17px 18px;
    min-width: 0;
}

.mhh-cty-places b { display: block; font-size: 16px; margin-bottom: 5px; }
.mhh-cty-places span { display: block; font-size: 13.5px; line-height: 1.55; color: #55585e; }

/* ---------- Quiet states and notes ---------- */

.mhh-cty-quiet {
    background: var(--mhh-cream);
    border: 1px solid var(--mhh-line);
    border-radius: 9px;
    padding: 22px 24px;
    margin: 24px 0 18px;
}

.mhh-cty-quiet p { margin: 0; font-size: 14.5px; line-height: 1.62; color: #55585e; }
.mhh-cty-quiet strong { color: #22252a; }

.mhh-cty-microdisclosure {
    font-size: 12.5px;
    line-height: 1.6;
    color: #82868c;
    margin: 0 0 26px;
}

.mhh-cty-microdisclosure a { color: #6c6f74; }

/* ---------- Responsive ---------- */

@media (max-width: 680px) {
    .mhh-cty-metric b { font-size: 23px; }
    .mhh-cty-dircta { padding: 22px 20px; }
    .mhh-cty-agent-body { padding: 18px 18px 19px; }
    .mhh-cty-agent-initials { font-size: 32px; }
    .mhh-cty-agents { grid-template-columns: minmax(0, 1fr); }
}
