/* ============================================================
   Fair Key Homes - public site
   Shares the palette defined in app.css; everything here is
   scoped under .pub or to public-only components so the staff
   hub's styles are untouched.
   ============================================================ */

.pub { display: flex; flex-direction: column; min-height: 100vh; background: var(--surface); }
.pub-main { flex: 1; }

/* ---------- Header ---------- */
.pub-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; }
.pub-header-inner {
    max-width: 1140px; margin: 0 auto; padding: .85rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap;
}
.pub-brand { display: flex; align-items: center; gap: .65rem; color: #fff; }
.pub-brand:hover { text-decoration: none; }
.pub-logo { width: 40px; height: 40px; flex: 0 0 auto; }
.pub-brand-text strong { display: block; font-size: 1.05rem; letter-spacing: -.01em; }
.pub-brand-text small { color: #9db9c0; font-size: .76rem; }

.pub-nav { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.pub-nav-link {
    color: #cfe0e4; padding: .45rem .7rem; border-radius: 7px;
    font-size: .9rem; font-weight: 600;
}
.pub-nav-link:hover { background: rgba(255,255,255,.09); color: #fff; text-decoration: none; }
.pub-nav-link.active { background: var(--teal); color: #fff; }
.pub-nav-cta {
    margin-left: .35rem; padding: .45rem .9rem; border-radius: 999px;
    background: var(--gold); color: #24170a; font-weight: 700; font-size: .9rem; white-space: nowrap;
}
.pub-nav-cta:hover { text-decoration: none; filter: brightness(1.06); }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
    color: #fff; padding: 3.75rem 1.25rem 3.25rem;
}
.hero-inner { max-width: 1140px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 4.2vw, 2.8rem); line-height: 1.12; }
.hero-lead { margin: .85rem 0 0; font-size: 1.08rem; max-width: 46rem; color: #dcecef; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }

.btn-solid {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .72rem 1.4rem; border: 1px solid var(--gold); border-radius: 8px;
    background: var(--gold); color: #24170a; font-weight: 700; font-size: .95rem; cursor: pointer;
}
.btn-solid:hover { text-decoration: none; filter: brightness(1.06); }
.btn-solid:disabled { opacity: .6; cursor: default; filter: none; }
.btn-sm { padding: .48rem 1rem; font-size: .86rem; }

.btn-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .72rem 1.4rem; border: 1px solid rgba(255,255,255,.55); border-radius: 8px;
    background: transparent; color: #fff; font-weight: 700; font-size: .95rem;
}
.btn-ghost:hover { background: rgba(255,255,255,.12); text-decoration: none; }

/* ---------- Bands ---------- */
.band { padding: 3rem 1.25rem; }
.band-tint { background: var(--bg); }
.band-inner { max-width: 1140px; margin: 0 auto; }
.band-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.band-head h2 { font-size: 1.5rem; }

.page-band { background: var(--bg); padding: 2.5rem 1.25rem 2rem; border-bottom: 1px solid var(--border); }
.page-band h1 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); }
.page-lead { margin: .6rem 0 0; color: var(--muted); max-width: 46rem; line-height: 1.55; }

.cards-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.info-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.4rem; box-shadow: var(--shadow);
}
.info-card h2 { font-size: 1.12rem; margin-bottom: .55rem; }
.info-card p { margin: 0 0 1rem; color: var(--muted); line-height: 1.55; }

.link-arrow { font-weight: 700; font-size: .92rem; }

/* ---------- Listings ---------- */
.listing-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.listing-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.25rem; box-shadow: var(--shadow);
}
.listing-card h3 { font-size: 1.08rem; margin: 0 0 .3rem; padding-right: 6rem; }
.listing-address { margin: 0 0 .85rem; color: var(--muted); font-size: .88rem; line-height: 1.45; }

.tag {
    position: absolute; top: 1.1rem; right: 1.1rem;
    padding: .18rem .55rem; border-radius: 999px;
    font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase;
}
.tag-lihtc { background: #eaf2ee; color: var(--ok); }

.listing-facts { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0 0 1rem; padding: 0; }
.listing-facts li span {
    display: inline-block; padding: .22rem .6rem; border-radius: 6px;
    background: var(--bg); color: var(--text); font-size: .8rem; font-weight: 600; white-space: nowrap;
}

.listing-foot {
    margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
}
.listing-rent { font-size: 1.3rem; font-weight: 750; color: var(--navy); white-space: nowrap; }
.listing-rent small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.listing-available { margin: .65rem 0 0; font-size: .8rem; color: var(--muted); }

/* ---------- Filters and map ---------- */
.filter-bar { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filter-bar label { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
.filter-bar select {
    padding: .48rem .7rem; border: 1px solid var(--border); border-radius: 7px;
    background: var(--surface); font: inherit; color: var(--text); min-width: 11rem;
}
.filter-count { margin-left: auto; font-size: .85rem; color: var(--muted); }

.vacancy-map {
    height: 380px; border-radius: var(--radius);
    border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden;
}
.map-note { margin: .55rem 0 0; font-size: .78rem; color: var(--muted); }

.map-pin-wrap { background: none; border: 0; }
.map-pin {
    display: grid; place-items: center; width: 30px; height: 30px;
    border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
    background: var(--teal); color: #fff; border: 2px solid #fff;
    font-size: .78rem; font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,.32);
}
.map-pin-lihtc { background: var(--ok); }

.map-popup { min-width: 12rem; font-family: inherit; }
.map-popup strong { display: block; font-size: .95rem; color: var(--navy); }
.map-popup-address { font-size: .8rem; color: #6b7a80; margin: .15rem 0 .35rem; }
.map-popup-count { font-size: .82rem; font-weight: 700; margin-bottom: .45rem; }

/* ---------- Forms ---------- */
.form-layout { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.form-main { max-width: 40rem; }
.form-aside {
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem;
}
.form-aside h2 { font-size: 1.02rem; margin-bottom: .5rem; }
.form-aside p { margin: 0 0 .8rem; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.form-aside hr { border: 0; border-top: 1px solid var(--border); margin: 1.1rem 0; }

.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.05rem; }
.field label { font-size: .86rem; font-weight: 700; color: var(--navy); }
.field .optional { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
    padding: .62rem .75rem; border: 1px solid var(--border); border-radius: 8px;
    font: inherit; color: var(--text); background: var(--surface); width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(34,91,108,.14);
}
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.validation-message { color: var(--bad); font-size: .82rem; font-weight: 600; }

.form-fineprint { margin: 1rem 0 0; font-size: .8rem; color: var(--muted); line-height: 1.5; }

.applying-for {
    background: var(--bg); border-left: 3px solid var(--teal); border-radius: 8px;
    padding: .85rem 1rem; margin-bottom: 1.5rem;
}
.applying-label {
    display: block; font-size: .7rem; font-weight: 800; letter-spacing: .07em;
    text-transform: uppercase; color: var(--muted); margin-bottom: .15rem;
}
.applying-for strong { display: block; font-size: 1.02rem; color: var(--navy); }
.applying-for .muted { font-size: .86rem; }

/* ---------- Notices ---------- */
.notice { border-radius: var(--radius); padding: 1.5rem; border: 1px solid var(--border); background: var(--surface); }
.notice h1, .notice h2 { font-size: 1.25rem; margin-bottom: .55rem; }
.notice p { margin: 0 0 1rem; color: var(--text); line-height: 1.55; }
.notice p:last-child { margin-bottom: 0; }
.notice-ok { border-left: 4px solid var(--ok); background: #f2f9f5; }
.notice-info { border-left: 4px solid var(--teal); background: #f1f7f8; }
.notice-bad { border-left: 4px solid var(--bad); background: #fdf3f2; }
.notice-centred { max-width: 34rem; margin: 2rem auto; text-align: center; }
.notice-centred .hero-actions { justify-content: center; }

.empty-state { text-align: center; padding: 2.5rem 1rem; }
.empty-state h2 { font-size: 1.3rem; margin-bottom: .5rem; }
.empty-state p { color: var(--muted); max-width: 34rem; margin: 0 auto 1.25rem; line-height: 1.55; }
.empty-state .hero-actions { justify-content: center; }

/* ---------- Footer ---------- */
.pub-footer { background: var(--navy); color: #cfe0e4; padding: 2.5rem 1.25rem 2rem; margin-top: auto; }
.pub-footer-inner {
    max-width: 1140px; margin: 0 auto;
    display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}
.pub-footer a { color: #b9d6da; }
.pub-footer-brand { display: flex; gap: .85rem; }
.pub-footer-logo { width: 44px; height: 44px; flex: 0 0 auto; }
.pub-footer-brand strong { color: #fff; font-size: 1.02rem; }
.pub-footer-brand p { margin: .3rem 0 0; font-size: .86rem; line-height: 1.5; }

.pub-footer-legal p { margin: 0 0 .7rem; font-size: .78rem; line-height: 1.6; color: #a9c4ca; }
.pub-footer-fineprint { color: #8fadb4 !important; }

.eho { display: flex; align-items: center; gap: .6rem; margin-bottom: .75rem; color: #fff; }
.eho-mark { width: 34px; height: 34px; flex: 0 0 auto; }
.eho span { font-size: .82rem; letter-spacing: .02em; }

/* ---------- Enquiries page (staff) ---------- */
.status-select { padding: .28rem .5rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.detail-cell { background: #f8fbfb; }
.detail-cell strong { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .2rem; }
.detail-cell p { margin: 0 0 .9rem; white-space: pre-wrap; }
.notes-box { width: 100%; padding: .5rem .65rem; border: 1px solid var(--border); border-radius: 7px; font: inherit; }

@media (max-width: 860px) {
    .form-layout { grid-template-columns: 1fr; }
    .pub-footer-inner { grid-template-columns: 1fr; }
    .pub-header-inner { justify-content: center; }
    .filter-count { margin-left: 0; width: 100%; }
}

/* A building with nothing free still gets a pin: it shows where we operate.
   Muted and dotted so it reads as context rather than an offer. */
.map-pin-empty { background: var(--muted); opacity: .78; font-size: 1rem; }
