/* Homepage only. Composition follows the supplied Homewired prototype. */
.home-reference {
    --home-blue: #2852cf;
    --primary-500: var(--home-blue);
    --home-ink: #20252c;
    --home-muted: #4d5c6d;
    --home-line: #dce1e8;
    --home-canvas: #f5f6f8;
    --home-width: min(1440px, calc(100% - 112px));
    font-family: Manrope, system-ui, sans-serif;
}
.home-reference-container, .home-reference .navbar > .container {
    width: var(--home-width);
    max-width: none;
    padding-inline: 0;
    margin-inline: auto;
}
.home-reference .navbar {
    --primary-500: var(--home-blue);
    --primary-600: #2044b6;
    min-height: 76px;
    padding-block: .625rem;
    border-bottom: 1px solid var(--home-line);
    box-shadow: none !important;
}
.home-reference .navbar-brand { font: 800 1.75rem/1 Manrope, system-ui, sans-serif; letter-spacing: -.06em; }
.home-reference .home-reference-mark { width: 35px; height: 35px; margin-right: .5rem; fill: none; stroke: var(--home-blue); stroke-width: 2.3; stroke-linejoin: round; stroke-linecap: round; flex-shrink: 0; }
.home-reference .home-reference-mark circle { fill: var(--home-blue); stroke: none; }
.home-reference .navbar-nav .nav-link { font-size: .8125rem; }
.home-reference .navbar .btn-primary { font-size: .75rem; padding-inline: 1rem !important; min-height: 40px; }
.home-reference .navbar-nav .nav-link.active::after { height: 2px; border-radius: 0; }
.home-discovery { background: var(--home-canvas); color: var(--home-ink); border-bottom: 1px solid var(--home-line); }
.home-discovery :is(h1,h2,h3) { color: var(--home-ink); font-family: inherit; }
.home-discovery [hidden] { display: none !important; }
.home-discovery :is(a,button,input,select):focus-visible { outline: 2px solid var(--home-blue); outline-offset: 3px; }
.home-hero {
    display: grid;
    grid-template-columns: minmax(0,1.08fr) minmax(0,1fr);
    grid-template-areas: "copy scene" "search scene";
    gap: 14px 40px;
    align-items: center;
    padding-block: 24px 22px;
}
.home-hero-copy { grid-area: copy; }
.home-reference .home-hero h1 { font-size: clamp(32px,3.2vw,48px); line-height: 1.06; letter-spacing: -.045em; font-weight: 800; margin: 0; }
.home-hero h1 span { display: block; color: var(--home-blue); }
.home-discovery .home-kicker {
    display: flex; align-items: center; gap: 9px; margin-bottom: 8px;
    color: var(--home-blue); font-size: 10px; letter-spacing: .135em; font-weight: 800; text-transform: uppercase;
}
.home-kicker > span { background: currentColor; width: 7px; height: 7px; position: relative; }
.home-kicker > span::after { content: ""; position: absolute; right: -4px; top: -4px; width: 3px; height: 3px; background: #abc0ff; }
.home-discovery .home-hero-description { color: var(--home-muted); font-size: 13px; line-height: 1.55; margin: 9px 0 0; max-width: 58ch; }
.home-discovery .home-hero-search {
    grid-area: search; display: flex; align-items: center; gap: .65rem;
    background: white; border: 1px solid var(--home-line); border-radius: 9px;
    width: 100%; max-width: 500px; min-height: 58px; padding: 5px; margin: 0;
}
.home-search-pin { color: var(--home-blue); margin-left: .65rem; }
.home-search-field { flex: 1; min-width: 0; }
.home-search-field label { display: block; color: var(--home-muted); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.home-search-field input { display: block; width: 100%; background: transparent; border: 0; color: var(--home-ink); font-family: inherit; font-size: 14px; font-weight: 700; line-height: 1.35; padding: 3px 0; }
.home-search-field input::placeholder { color: var(--home-muted); opacity: 1; }
.home-search-submit { min-height: 46px; padding: 0 1rem; border: 0; border-radius: 6px; font-weight: 800; font-size: 12px; background: var(--home-blue); color: white; white-space: nowrap; }
.home-search-submit span { margin-left: .55rem; }
.home-search-submit:hover { background: #2044b6; }

.home-scene { grid-area: scene; min-width: 0; margin: 0; }
.home-scene-frame { position: relative; height: 208px; border-radius: 11px; overflow: hidden; isolation: isolate; background: #494138; }
.home-scene-frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, #18212b0a 30%, #101b25a3 100%); pointer-events: none; }
.home-scene-frame img { display: block; height: 100%; width: 100%; object-fit: cover; object-position: 50% 47%; transition: filter .8s ease; }
.home-evening-wash, .home-lamp-glow { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .8s ease; }
.home-evening-wash { background: linear-gradient(110deg,#102b4d35,#4d2b2820 70%); }
.home-lamp-glow { background: radial-gradient(ellipse 25% 70% at 52% 48%,#ffd5a44d,#ffba6b1a 55%,transparent 90%),radial-gradient(ellipse 65% 85% at 80% 95%,#f8bb7426,transparent 80%); mix-blend-mode: screen; }
.home-scene[data-scene="evening"] img { filter: brightness(.47) saturate(.72) sepia(.16); }
.home-scene[data-scene="evening"] :is(.home-evening-wash,.home-lamp-glow) { opacity: 1; }
.home-scene-badge { position: absolute; z-index: 1; top: 14px; left: 16px; background: #fff; border-radius: 4px; color: #36424d; font-size: 9px; font-weight: 800; letter-spacing: .085em; text-transform: uppercase; padding: 5px 8px; }
.home-scene-console { position: absolute; z-index: 1; inset: auto 14px 14px 18px; display: flex; align-items: end; justify-content: space-between; gap: .5rem; }
.home-scene-reading { display: flex; align-items: center; gap: 8px; color: white; text-shadow: 0 1px 6px #101820; }
.home-scene-reading > i { font-size: 1.2rem; }
.home-scene-reading span { font-size: 9px; letter-spacing: .095em; text-transform: uppercase; display: block; font-weight: 800; }
.home-scene-reading p { font-size: 13px; font-weight: 700; color: white; margin: 0; }
.home-scene-switch { display: flex; gap: 2px; padding: 3px; flex-shrink: 0; border: 1px solid #ffffff61; border-radius: 7px; background: #17222ae8; }
.home-scene-switch button { border: 0; border-radius: 4px; min-height: 34px; padding: 5px 9px; background: transparent; color: #fff; font-size: 11px; font-weight: 700; }
.home-scene-switch button[aria-pressed="true"] { background: white; color: #344153; }
.home-scene-switch button[data-lighting="evening"][aria-pressed="true"] { background: #fff0d9; color: #634126; }
.home-scene-switch button:focus-visible { outline-color: #adc1ff; outline-offset: -2px; }
.home-scene figcaption { margin-top: 6px; display: flex; justify-content: space-between; color: var(--home-muted); gap: .5rem; font-size: 11px; }

.home-categories { border-bottom: 1px solid var(--home-line); padding-bottom: 10px; }
.home-categories ul { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.home-categories a, .home-service-toolbar a { display: inline-flex; align-items: center; gap: .5rem; min-height: 42px; color: var(--home-ink); font-size: 12px; font-weight: 700; text-decoration: none; padding: 0 .7rem; border-radius: 7px; }
.home-categories a:hover, .home-service-toolbar a:hover { text-decoration: underline; }
.home-categories a.home-category-current { background: #e9efff; color: #2147c6; border: 1px solid #dbe5ff; }
.home-category-current span { font-size: 10px; background: var(--home-blue); border-radius: 4px; color: white; padding: 1px 5px; }
.home-results { padding-block: 13px 36px; scroll-margin-top: 90px; }
.home-service-toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.home-service-toolbar :is(label,a), .home-sort { font-size: 12px; color: var(--home-muted); font-weight: 700; }
.home-service-toolbar input { min-height: 35px; width: min(175px,100%); border: 1px solid #a0aabb; border-radius: 6px; background: white; padding: .35rem .55rem; font-size: 13px; }
.home-service-toolbar input::placeholder { color: var(--home-muted); }
.home-service-toolbar a { min-height: 35px; padding-inline: .35rem; color: #2045bc; }
.home-results-heading { display: flex; align-items: end; justify-content: space-between; gap: .5rem; padding-block: 13px 16px; }
.home-results-heading h2 { font-size: 19px; line-height: 1.35; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.home-results-heading h2 span { font-weight: 600; }
.home-results-heading p { color: var(--home-muted); margin: 3px 0 0; font-size: 11px; }
.home-sort select { color: var(--home-ink); min-height: 34px; padding-inline: .25rem; border: 0; background: transparent; font-size: 12px; font-weight: 700; }

.home-workspace { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); gap: 26px; align-items: start; }
.home-list-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.home-list-card { position: relative; overflow: hidden; border: 1px solid var(--home-line); border-radius: 10px; background: white; display: flex; flex-direction: column; min-width: 0; }
.home-list-card:is(:hover,:focus-within) { border-color: var(--home-blue); }
.home-list-card:focus-within { outline: 2px solid var(--home-blue); outline-offset: 2px; }
.home-list-photo { position: relative; aspect-ratio: 1.78; background: #e6e1da; overflow: hidden; }
.home-list-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-list-photo > span { position: absolute; left: 10px; top: 10px; background: #fff; border-radius: 4px; color: #263241; padding: 4px 7px; font-size: 10px; font-weight: 800; }
.home-list-content { display: flex; flex: 1; flex-direction: column; min-height: 164px; padding: 15px 16px 12px; }
.home-list-content h3 { font-size: 16px; line-height: 1.32; font-weight: 800; margin-bottom: 5px; overflow-wrap: anywhere; }
.home-list-content p { font-size: 12px; color: var(--home-muted); margin-bottom: 5px; }
.home-list-content p i { width: 1em; text-align: center; margin-right: .125rem; }
.home-list-footer { margin-top: auto; padding-top: 9px; text-align: end; }
.home-list-footer a { border-top: 1px solid #edf0f4; display: block; padding-top: 8px; font-size: 12px; font-weight: 800; color: #2045bc; text-decoration: none; }
.home-list-footer a:hover { text-decoration: underline; }
.home-more { margin-top: 15px; border: 1px solid #a0aabb; background: white; border-radius: 7px; color: var(--home-ink); font: inherit; font-size: 13px; font-weight: 700; min-height: 44px; padding: 0 .85rem; }
.home-map-panel { min-width: 0; position: sticky; top: 100px; }
.home-map-shell { height: clamp(400px, 47vw, 652px); position: relative; overflow: hidden; border: 1px solid var(--home-line); border-radius: 10px; isolation: isolate; background: #eaeee9; }
.home-reference #explore-map { height: 100%; width: 100%; z-index: 1; background: #e9ede8; }
.home-map-shell .leaflet-tile-pane { filter: saturate(.45) brightness(1.04) contrast(.93); }
.home-map-label { position: absolute; z-index: 500; top: 14px; left: 14px; margin: 0; padding: 7px 10px; color: var(--home-ink); background: white; border-radius: 6px; box-shadow: 0 2px 8px #26324520; font-size: 12px; font-weight: 800; pointer-events: none; }
.home-map-label i { color: var(--home-blue); }
.home-map-note { margin: 6px 0 0; color: var(--home-muted); font-size: 12px; }
.home-map-unavailable { position: absolute; z-index: 2; top: 58px; left: 14px; right: 14px; color: var(--home-ink); }
.home-map-pin,
.brand-map-pin {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    cursor: pointer;
}
.brand-map-pin-wrap {
    position: relative;
    display: block;
    width: 38px;
    height: 46px;
    transform-origin: 50% 92%;
    transition: transform .18s cubic-bezier(.22, 1, .36, 1), filter .18s ease;
    filter: drop-shadow(0 3px 6px rgba(16, 28, 52, .22));
}
.brand-map-pin-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.brand-map-pin-shadow { fill: rgba(20, 32, 56, .22); }
.brand-map-pin-body { fill: var(--home-blue); stroke: #ffffff; stroke-width: 2.2; stroke-linejoin: round; transition: fill .16s ease; }
.brand-map-pin-disc { fill: #ffffff; }
.brand-map-pin-house { fill: none; stroke: #2044b6; stroke-width: 1.75; stroke-linejoin: round; stroke-linecap: round; }
.brand-map-pin-node { fill: none; stroke: var(--home-blue); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.brand-map-pin-dot { fill: var(--home-blue); }
.brand-map-pin-count {
    position: absolute;
    top: -3px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    border-radius: 999px;
    background: #20252c;
    color: #ffffff;
    border: 2px solid #ffffff;
    font: 800 10px/1 Manrope, system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(16, 24, 40, .28);
}
.brand-map-pin:hover .brand-map-pin-wrap,
.brand-map-pin:focus-visible .brand-map-pin-wrap {
    transform: translateY(-3px) scale(1.08);
    filter: drop-shadow(0 6px 12px rgba(20, 44, 120, .32));
}
.brand-map-pin:hover .brand-map-pin-body,
.brand-map-pin:focus-visible .brand-map-pin-body { fill: #2044b6; }
.brand-map-pin:focus-visible { outline: 2.5px solid #2044b6; outline-offset: 2px; border-radius: 999px; }
@media (prefers-reduced-motion: reduce) {
    .brand-map-pin-wrap, .brand-map-pin-body { transition: none; }
}
.home-map-shell .leaflet-popup-content a { color: #2045bc; }
.home-map-shell .leaflet-popup-content > div > div + div { border-top: 1px solid var(--home-line); padding-top: .4rem; margin-top: .4rem; }
.home-view-switch { display: none; }

/* The navbar expands from lg onward; keep every item on one line between lg and xxl. */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .home-reference .navbar > .container { width: calc(100% - 40px); }
    .home-reference .navbar-brand { font-size: 1.3rem; }
    .home-reference .home-reference-mark { width: 30px; height: 30px; }
    .home-reference .navbar-nav .nav-link { --nav-link-px: .35rem; padding-inline: .35rem; white-space: nowrap; }
    .home-reference .navbar-nav.me-auto { margin-inline-start: .4rem !important; }
    .home-reference .navbar .btn-primary { padding-inline: .7rem !important; }
    .home-reference .navbar .nav-link .text-truncate { max-width: 120px !important; }
}

@media (max-width: 1190px) {
    .home-reference { --home-width: calc(100% - 64px); }
    .home-hero { column-gap: 30px; }
}
@media (max-width: 960px) {
    .home-reference { --home-width: calc(100% - 48px); }
    .home-workspace { gap: 18px; grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .home-list-grid { grid-template-columns: 1fr; }
    .home-scene-frame { height: 189px; }
}
@media (max-width: 720px) {
    .home-reference { --home-width: calc(100% - 36px); }
    .home-reference .navbar { min-height: 72px; }
    .home-reference .navbar-brand { font-size: clamp(17px, 4.9vw, 23px); }
    .home-reference .home-reference-mark { width: 27px; height: 27px; margin-right: 5px; }
    .home-hero { grid-template-columns: minmax(0,1fr) 112px; grid-template-areas: "copy scene" "search search"; gap: 15px 14px; padding-block: 23px 18px; }
    .home-reference .home-hero h1 { font-size: clamp(21px, 5.9vw, 32px); letter-spacing: -.045em; }
    .home-discovery .home-kicker { font-size: 8px; margin-bottom: 7px; letter-spacing: .075em; }
    .home-discovery .home-hero-description { font-size: 11px; margin-top: 8px; }
    .home-discovery .home-hero-search { min-height: 56px; max-width: none; }
    .home-search-submit { min-height: 44px; padding-inline: .7rem; }
    .home-scene-frame { height: 126px; border-radius: 8px; }
    .home-scene { align-self: start; }
    .home-scene-frame img { object-position: 57% 50%; }
    .home-scene-console { left: 4px; right: 4px; bottom: 5px; justify-content: center; }
    .home-scene-switch button { min-height: 39px; width: 40px; padding: 4px; font-size: 14px; }
    .home-scene-switch button span, .home-scene-badge, .home-scene-reading, .home-scene figcaption { display: none; }
    .home-categories ul { gap: 4px; flex-wrap: nowrap; overflow-x: auto; padding: 3px 26px 3px 3px; scroll-padding-right: 26px; }
    .home-categories a { font-size: 11px; padding-inline: .45rem; white-space: nowrap; }
    .home-service-toolbar { flex-wrap: nowrap; gap: 7px; }
    .home-service-toolbar input { width: clamp(90px, 29vw, 140px); min-width: 0; }
    .home-service-toolbar a { white-space: nowrap; font-size: 11px; }
    .home-results-heading h2 { font-size: 16px; }
    .home-sort { align-self: center; font-size: 0; }
    .home-workspace { display: block; }
    .home-workspace[data-home-view="list"] .home-map-panel,
    .home-workspace[data-home-view="map"] .home-list-panel { display: none; }
    .home-map-panel { position: static; }
    .home-map-shell { height: min(60vh,480px); }
    .home-workspace[data-home-view] { padding-bottom: 56px; }
    .home-workspace [id="home-list-panel"] a { scroll-margin-bottom: 75px; }
    .home-workspace.home-workspace-in-view .home-view-switch {
        display: flex; position: fixed; z-index: 3; left: 50%; transform: translateX(-50%); bottom: max(10px,env(safe-area-inset-bottom)); width: fit-content;
        padding: 4px; gap: 3px; background: #20252c; border-radius: 50px; box-shadow: 0 4px 12px #14203345;
    }
    .home-view-switch button { min-height: 44px; min-width: 75px; border: 0; border-radius: 50px; background: transparent; color: #fff; font-size: 13px; font-weight: 800; }
    .home-view-switch button[aria-pressed="true"] { background: white; color: #20252c; }
}
@media (max-width: 440px) {
    .home-hero { grid-template-columns: minmax(0,1fr) 98px; }
    .home-scene-frame { height: 118px; }
}
@media (max-width: 360px) {
    .home-reference { --home-width: calc(100% - 28px); }
    .home-hero { grid-template-columns: minmax(0,1fr) 88px; gap: 14px 10px; }
    .home-scene-switch button { width: 36px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-scene-frame img, .home-evening-wash, .home-lamp-glow { transition: none; }
}
