/* Builder / agent directory (agents.php): layout refinements on top of listings.css.
   Colours are the page's own (--agent-blue, --agent-navy, --agent-soft and the existing light blues); only layout changes here. */

/* ---------- Shorter header ---------- */
.lp-agents .agents-hero-copy { padding: clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3.5vw, 2.25rem); }
.lp-agents .lp-title { font-size: clamp(1.85rem, 3.6vw, 2.75rem); }
.lp-agents .agents-intro { margin-top: .65rem; }
.lp-agents .agents-hero-copy::after {   /* the ring sits fully inside the card instead of being cut off */
    top: 50%;
    right: clamp(1rem, 5vw, 3.5rem);
    bottom: auto;
    width: 8.5rem;
    height: 8.5rem;
    border-width: 1.1rem;
    transform: translateY(-50%);
}

/* ---------- Card: property cover, logo in the centre, buttons always at the bottom ---------- */
.lp-agents .agent-lp-card { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: .75rem .75rem 1.1rem; }
.lp-agents .agent-lp-card .lp-card-body { display: flex; flex: 1; flex-direction: column; padding: 0 .5rem; }
.lp-agents .agent-cover {
    position: relative;
    display: block;
    flex: 0 0 auto;
    height: 7.25rem;
    margin-bottom: 2.6rem;
    border-radius: 1rem;
    /* no photo yet: a light building skyline in the page's own blues */
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='80' viewBox='0 0 320 80'%3E%3Cg fill='%23245fa8' fill-opacity='.11'%3E%3Crect x='6' y='38' width='26' height='42'/%3E%3Crect x='36' y='18' width='30' height='62'/%3E%3Crect x='70' y='46' width='22' height='34'/%3E%3Cpath d='M96 80V40l20-14 20 14v40z'/%3E%3Crect x='140' y='8' width='34' height='72'/%3E%3Crect x='178' y='32' width='24' height='48'/%3E%3Cpath d='M206 80V48l16-12 16 12v32z'/%3E%3Crect x='242' y='22' width='28' height='58'/%3E%3Crect x='274' y='42' width='40' height='38'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.9'%3E%3Crect x='44' y='28' width='5' height='6'/%3E%3Crect x='54' y='28' width='5' height='6'/%3E%3Crect x='44' y='42' width='5' height='6'/%3E%3Crect x='54' y='42' width='5' height='6'/%3E%3Crect x='150' y='18' width='5' height='6'/%3E%3Crect x='160' y='18' width='5' height='6'/%3E%3Crect x='150' y='32' width='5' height='6'/%3E%3Crect x='160' y='32' width='5' height='6'/%3E%3Crect x='150' y='46' width='5' height='6'/%3E%3Crect x='160' y='46' width='5' height='6'/%3E%3Crect x='250' y='32' width='5' height='6'/%3E%3Crect x='260' y='32' width='5' height='6'/%3E%3Crect x='250' y='46' width='5' height='6'/%3E%3Crect x='260' y='46' width='5' height='6'/%3E%3C/g%3E%3C/svg%3E") center bottom / 100% auto no-repeat,
        radial-gradient(circle at 85% 15%, rgba(101, 161, 231, .25), transparent 45%),
        linear-gradient(145deg, #e7f1ff, #f7faff);
    box-shadow: inset 0 0 0 1px #dce9f7;
}
.lp-agents .agent-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 1rem; object-fit: cover; }
.lp-agents .agent-cover.has-photo::after {   /* soft shade so the logo stands out on any photo */
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(16, 42, 76, 0) 35%, rgba(16, 42, 76, .38));
}
.lp-agents .agent-cover .agent-lp-logo {
    position: absolute;
    left: 50%;
    bottom: -2.1rem;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 1.1rem;
    background: linear-gradient(145deg, #e7f1ff, #f7faff);
    box-shadow: 0 .75rem 1.5rem -1rem rgba(17, 52, 94, .6), inset 0 0 0 1px #dce9f7;
    transform: translateX(-50%);
}
.lp-agents .agent-cover .agent-lp-logo img { width: 100%; height: 100%; padding: .35rem; background: #fff; object-fit: contain; }
.lp-agents .agent-cover .agent-lp-logo span { font-size: 1.5rem; font-weight: 700; color: var(--agent-blue); }

.lp-agents .agent-lp-card .lp-card-top { margin: 0; min-height: 0; text-align: center; }
.lp-agents .agent-lp-card .lp-card-tags { justify-content: center; }
.lp-agents .agent-lp-card .lp-card-loc { justify-content: center; }
.lp-agents .agent-lp-card .lp-card-desc { text-align: center; }

/* Equal buttons, same height, side by side; one button fills the row */
.lp-agents .agent-lp-card .lp-card-foot { margin-top: auto; padding-top: .9rem; }
.lp-agents .agent-lp-card .lp-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; width: 100%; }
.lp-agents .agent-lp-card.is-one-action .lp-card-actions { grid-template-columns: 1fr; }
.lp-agents .agent-lp-card .lp-card-actions .btn { height: 2.75rem; min-height: 2.75rem; margin: 0; padding-block: 0; justify-content: center; line-height: 1; }

/* ---------- One or two results: wide cards (cover on the left) ---------- */
.lp-agents .lp-list.is-few { grid-template-columns: 1fr; }
.lp-agents .lp-list.is-few .agent-lp-card { display: grid; grid-template-columns: 13rem minmax(0, 1fr); align-items: stretch; gap: 1.5rem; padding: .875rem 1.5rem .875rem .875rem; }
.lp-agents .lp-list.is-few .agent-cover { height: auto; min-height: 11rem; margin: 0; }
.lp-agents .lp-list.is-few .agent-cover .agent-lp-logo { top: 50%; bottom: auto; width: 5.5rem; height: 5.5rem; transform: translate(-50%, -50%); }
.lp-agents .lp-list.is-few .lp-card-body { padding: .5rem 0 .25rem; }
.lp-agents .lp-list.is-few .lp-card-top,
.lp-agents .lp-list.is-few .lp-card-desc { text-align: left; }
.lp-agents .lp-list.is-few .lp-card-tags,
.lp-agents .lp-list.is-few .lp-card-loc { justify-content: flex-start; }
.lp-agents .lp-list.is-few .lp-card-title { font-size: 1.35rem; }
.lp-agents .lp-list.is-few .agent-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 1rem 0 .25rem; }
.lp-agents .lp-list.is-few .agent-facts > div,
.lp-agents .lp-list.is-few .agent-facts > div:nth-child(3) { margin-top: 0; padding-top: .25rem; border-top: 0; border-left: 1px solid #e1e9f2; }
.lp-agents .lp-list.is-few .agent-facts > div:first-child { border-left: 0; }
.lp-agents .lp-list.is-few .lp-card-desc { margin-top: .5rem; -webkit-line-clamp: 2; }
.lp-agents .lp-list.is-few .lp-card-foot { display: flex; justify-content: flex-end; }
.lp-agents .lp-list.is-few .lp-card-actions { grid-template-columns: repeat(2, 10.5rem); width: auto; }
.lp-agents .lp-list.is-few .agent-lp-card.is-one-action .lp-card-actions { grid-template-columns: 10.5rem; }

/* ---------- More professionals in other cities ---------- */
.agents-elsewhere {
    margin-top: 1.75rem;
    padding: 1.25rem;
    border: 1px solid #dde7f1;
    border-radius: 1.25rem;
    background: #f6f9fd;
}
.agents-elsewhere-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 1rem; margin-bottom: 1rem; }
.agents-elsewhere-head .agents-eyebrow { margin-bottom: .35rem; }
.agents-elsewhere-head h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.02em; color: var(--agent-navy); }
.agents-elsewhere-head .btn { gap: .4rem; }
.agents-elsewhere-head .btn .icon { width: .9rem; height: .9rem; }
.agents-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.agents-mini {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .8rem;
    height: 100%;
    padding: .85rem;
    border: 1px solid #dde7f1;
    border-radius: 1rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.agents-mini:hover { border-color: #bfd2e7; box-shadow: 0 1rem 2rem -1.75rem rgba(17, 52, 94, .55); transform: translateY(-1px); }
.agents-mini > .icon { width: 1rem; height: 1rem; color: var(--agent-blue); }
.agents-mini-logo {
    display: grid;
    place-items: center;
    width: 3.25rem;
    height: 3.25rem;
    overflow: hidden;
    border-radius: .9rem;
    background: linear-gradient(145deg, #e7f1ff, #f7faff);
    box-shadow: inset 0 0 0 1px #dce9f7;
    font-weight: 700;
    color: var(--agent-blue);
}
.agents-mini-logo img { width: 100%; height: 100%; padding: .3rem; object-fit: contain; }
.agents-mini-body { display: grid; gap: .2rem; min-width: 0; }
.agents-mini-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.agents-mini-tags .tag { font-size: .65rem; }
.agents-mini-body b { overflow: hidden; font-size: .95rem; white-space: nowrap; text-overflow: ellipsis; color: var(--agent-navy); }
.agents-mini-body small { display: flex; align-items: center; gap: .3rem; overflow: hidden; font-size: .75rem; white-space: nowrap; text-overflow: ellipsis; color: #60748a; }
.agents-mini-body small .icon { flex: 0 0 auto; width: .8rem; height: .8rem; }

@media (max-width: 991.98px) {
    .lp-agents .lp-list.is-few .agent-lp-card { grid-template-columns: 10rem minmax(0, 1fr); gap: 1.25rem; padding-right: 1.25rem; }
    .lp-agents .lp-list.is-few .agent-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-agents .lp-list.is-few .agent-facts > div:nth-child(3) { border-left: 0; }
    .lp-agents .lp-list.is-few .agent-facts > div:nth-child(n+3) { margin-top: .5rem; padding-top: .75rem; border-top: 1px solid #e1e9f2; }
    .lp-agents .lp-list.is-few .lp-card-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
}
@media (max-width: 767.98px) {
    .lp-agents .agents-hero-copy { padding: 1.1rem 1.15rem; }
    .lp-agents .lp-title { font-size: clamp(1.6rem, 7.5vw, 2.1rem); }
    .lp-agents .agents-intro { display: none; }   /* phones: the first card comes into view sooner */
    .lp-agents .agents-hero-copy::after { width: 6rem; height: 6rem; border-width: .85rem; right: -1.5rem; }

    /* every card is the stacked version on phones: cover on top, logo in the centre */
    .lp-agents .agent-lp-card,
    .lp-agents .lp-list.is-few .agent-lp-card { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: .75rem .75rem 1rem; }
    .lp-agents .agent-lp-card .agent-cover,
    .lp-agents .lp-list.is-few .agent-cover { height: 6.5rem; min-height: 0; margin-bottom: 2.5rem; }
    .lp-agents .agent-lp-card .agent-cover .agent-lp-logo,
    .lp-agents .lp-list.is-few .agent-cover .agent-lp-logo { top: auto; bottom: -2rem; width: 4.25rem; height: 4.25rem; transform: translateX(-50%); }
    .lp-agents .agent-lp-card .lp-card-body { grid-column: auto; padding: 0 .25rem; }
    .lp-agents .lp-list.is-few .lp-card-top,
    .lp-agents .lp-list.is-few .lp-card-desc { text-align: center; }
    .lp-agents .lp-list.is-few .lp-card-tags,
    .lp-agents .lp-list.is-few .lp-card-loc { justify-content: center; }
    .lp-agents .lp-list.is-few .lp-card-title { font-size: 1.15rem; }
    .lp-agents .agent-lp-card .lp-card-foot { flex-direction: row; }
    .agents-elsewhere { padding: 1rem; }
    .agents-elsewhere-head .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .agents-mini { transition: none; }
    .agents-mini:hover { transform: none; }
}
