/* ===========================================================
   Jackson County Connect — 2026 modern, American-flag palette
   =========================================================== */
:root {
    --navy:        #0a1f44;   /* Old Glory Blue, deepened */
    --navy-2:      #112a5c;
    --navy-ink:    #061533;
    --red:         #b31942;   /* Old Glory Red */
    --red-bright:  #e02747;
    --white:       #ffffff;
    --cream:       #f6f8fc;
    --slate:       #5b6679;
    --line:        #e4e8f0;
    --ink:         #16203a;

    --grad-flag:   linear-gradient(120deg, #0a1f44 0%, #14306b 45%, #b31942 100%);
    --grad-blue:   linear-gradient(135deg, #0a1f44, #14306b);
    --shadow-sm:   0 1px 3px rgba(10,31,68,.08), 0 1px 2px rgba(10,31,68,.06);
    --shadow:      0 10px 30px -12px rgba(10,31,68,.25);
    --shadow-lg:   0 24px 60px -20px rgba(10,31,68,.35);
    --radius:      16px;
    --radius-sm:   10px;
    --maxw:        1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--ink);
    background: var(--cream);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: rgba(10,31,68,.15);
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
    overflow-wrap: break-word;
}
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
img { max-width: 100%; display: block; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }
.page { min-height: 60vh; }

/* ---------- Navbar ---------- */
.nav {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(10,31,68,.82);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav__inner {
    max-width: var(--maxw); margin: 0 auto; padding: 0 22px;
    height: 66px; display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand__star { color: #fff; filter: drop-shadow(0 0 6px rgba(255,255,255,.5)); }
.nav__links { display: flex; gap: 4px; margin-left: 8px; }
.nav__links a {
    color: rgba(255,255,255,.82); font-weight: 600; font-size: .9rem;
    padding: 7px 14px; border-radius: 999px; line-height: 1;
    transition: background .15s ease, color .15s ease;
}
.nav__links a:hover { color: #fff; background: rgba(255,255,255,.12); text-decoration: none; }
.nav__links a.is-active { color: #fff; background: rgba(255,255,255,.18); }
.nav__auth { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav__toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; }

.usermenu { position: relative; }
.usermenu__btn { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #fff; padding: 5px 12px 5px 5px; border-radius: 999px; cursor: pointer; font: inherit; }
.usermenu__name { font-size: .9rem; font-weight: 600; }
.usermenu__drop { position: absolute; right: 0; top: 120%; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px; min-width: 210px; display: none; flex-direction: column; gap: 2px; }
.usermenu.open .usermenu__drop { display: flex; }
.usermenu__drop a { color: var(--ink); padding: 9px 12px; border-radius: 9px; font-size: .92rem; font-weight: 500; }
.usermenu__drop a:hover { background: var(--cream); text-decoration: none; }
.usermenu__drop .badge { align-self: flex-start; margin-bottom: 6px; }
.usermenu__out { color: var(--red) !important; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 11px !important; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; border-radius: 12px; padding: 12px 20px; border: 1px solid transparent; cursor: pointer; transition: transform .08s ease, box-shadow .2s ease, background .2s; text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--sm { padding: 8px 15px; font-size: .9rem; border-radius: 10px; }
.btn--lg { padding: 15px 28px; font-size: 1.05rem; }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px -8px rgba(179,25,66,.6); }
.btn--primary:hover { background: var(--red-bright); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-2); }
.btn--ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.22); }
.btn--ghost:hover { background: rgba(255,255,255,.16); }
.btn--outline { background: #fff; color: var(--navy); border-color: var(--line); }
.btn--outline:hover { border-color: var(--navy); }
.btn--block { width: 100%; }
.btn--danger { background: #fff; color: var(--red); border-color: #f0c9d3; }
.btn--danger:hover { background: var(--red); color: #fff; }

/* ---------- Hero + Home ---------- */
.hero { position: relative; background: var(--grad-flag); color: #fff; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background:
    repeating-linear-gradient(180deg, transparent 0 38px, rgba(255,255,255,.03) 38px 76px); pointer-events: none; }
.hero__inner { max-width: var(--maxw); margin: 0 auto; padding: 64px 22px 40px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); font-weight: 900; }
.hero h1 .accent { background: linear-gradient(90deg,#fff,#ffd9e0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.18rem; color: rgba(255,255,255,.88); max-width: 32ch; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero__stats { display: flex; gap: 26px; margin-top: 34px; }
.hero__stats .stat b { display: block; font-size: 1.7rem; font-weight: 800; }
.hero__stats .stat span { font-size: .82rem; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .08em; }
.hero__map { position: relative; }

/* Map */
.map { width: 100%; height: 440px; border-radius: 20px; box-shadow: var(--shadow-lg); border: 4px solid rgba(255,255,255,.85); z-index: 0; }
.map--full { height: 520px; }
.map-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: .85rem; }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,.9); }
.dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(255,255,255,.25); }
.dot--biz { background: #2563eb; }
.dot--gov { background: var(--red); }
.dot--garage { background: #f59e0b; }
.dot--vehicle { background: #10b981; }
.dot--rental { background: #8b5cf6; }

/* Section heading */
.section { padding: 56px 0; }
.section__head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.section__head h2 { font-size: 1.9rem; font-weight: 800; }
.section__head p { color: var(--slate); margin: 4px 0 0; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }

/* Quick category tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 18px; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .2s, border-color .2s; color: var(--ink); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; text-decoration: none; }
.tile__ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--grad-blue); color: #fff; margin-bottom: 14px; }
.tile h3 { font-size: 1.12rem; margin-bottom: 4px; }
.tile p { color: var(--slate); font-size: .9rem; margin: 0; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(360px,1fr)); }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .12s, box-shadow .2s; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card__media { height: 168px; background: var(--grad-blue); position: relative; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 18px; }
.card__body h3 { font-size: 1.15rem; margin-bottom: 6px; }
.card__body h3 a { color: var(--ink); }
/* Whole-card click target: the title link's overlay covers the card */
.card--link { position: relative; }
.card--link .card__stretch::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card--link .card__stretch:hover { text-decoration: none; }
.card__meta { color: var(--slate); font-size: .88rem; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.card__price { font-weight: 800; color: var(--navy); font-size: 1.2rem; }

/* ---------- Badges & chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.badge--superuser { background: #fde7ec; color: var(--red); }
.badge--government { background: #e7ecfb; color: var(--navy); }
.badge--business  { background: #e6f7f0; color: #0f7a52; }
.badge--standard  { background: #eef1f6; color: var(--slate); }
.badge--pending   { background: #fff3da; color: #9a6700; }
.badge--cat { background: var(--cream); color: var(--navy); border: 1px solid var(--line); text-transform: none; letter-spacing: 0; font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: .9rem; font-weight: 500; }
.chip:hover { border-color: var(--navy); text-decoration: none; }
.chip--active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Avatars ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--grad-flag); color: #fff; display: inline-grid; place-items: center; font-weight: 700; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 30px; height: 30px; font-size: .8rem; }
.avatar--lg { width: 88px; height: 88px; font-size: 2rem; }

/* ---------- Forms ---------- */
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.field .hint { color: var(--slate); font-size: .82rem; margin-top: 4px; }
.input, .select, .textarea {
    width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px;
    font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(10,31,68,.1); }
.textarea { min-height: 120px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.auth-wrap { max-width: 460px; margin: 56px auto; }
.auth-wrap .brand { color: var(--navy); justify-content: center; margin-bottom: 8px; }
.auth-wrap .brand__star { color: var(--red); }

/* role picker */
.rolepick { display: grid; gap: 10px; }
.rolepick label { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; transition: border-color .15s, background .15s; }
.rolepick label:hover { border-color: var(--navy); }
.rolepick input { margin-top: 3px; }
.rolepick input:checked + .rolepick__txt { color: var(--navy); }
.rolepick label:has(input:checked) { border-color: var(--navy); background: #f3f6fd; }
.rolepick__txt strong { display: block; }
.rolepick__txt span { font-size: .85rem; color: var(--slate); }

/* ---------- Flash ---------- */
.flash { position: relative; padding: 14px 44px 14px 18px; border-radius: 12px; margin: 18px auto; max-width: var(--maxw); font-weight: 500; box-shadow: var(--shadow-sm); }
.flash--success { background: #e6f7f0; color: #0f7a52; }
.flash--error   { background: #fde7ec; color: var(--red); }
.flash--info    { background: #e7ecfb; color: var(--navy); }
.flash__x { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: inherit; opacity: .6; }

/* ---------- Feed ---------- */
.feed { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.composer { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.composer textarea { border: 0; width: 100%; resize: none; font: inherit; min-height: 64px; }
.composer textarea:focus { outline: none; }
.composer__bar { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.post { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.post__head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.post__head .who { font-weight: 700; }
.post__head .when { color: var(--slate); font-size: .82rem; }
.post__body { white-space: pre-wrap; }
.post__img { margin-top: 12px; border-radius: 12px; max-height: 460px; width: 100%; object-fit: cover; }
.post__actions { display: flex; gap: 6px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.post__actions button, .post__actions a { background: none; border: 0; color: var(--slate); font: inherit; font-weight: 600; cursor: pointer; padding: 6px 12px; border-radius: 8px; display: inline-flex; gap: 6px; align-items: center; }
.post__actions button:hover { background: var(--cream); color: var(--navy); text-decoration: none; }
.post__actions .liked { color: var(--red); }
.comments { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.comment { display: flex; gap: 10px; }
.comment .bubble { background: var(--cream); border-radius: 12px; padding: 8px 12px; font-size: .92rem; }
.comment .bubble b { display: block; font-size: .82rem; }
.comment-form { display: flex; gap: 8px; margin-top: 8px; }
.comment-form input { flex: 1; }

/* Feed layout with browse sidebar */
.feed-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 30px; align-items: start; }
.feed-side { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 18px; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; }
.side-card h4 { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); margin: 0 0 10px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink); font-weight: 500; font-size: .94rem; }
.side-nav a:hover { background: var(--cream); color: var(--navy); text-decoration: none; }
.side-nav a.is-active { background: var(--navy); color: #fff; font-weight: 700; }
.side-nav a.is-active:hover { background: var(--navy); color: #fff; }
.side-nav .ic { width: 20px; text-align: center; flex: none; }

/* Government-channel posts get a navy accent rail */
.post--gov { border-left: 4px solid var(--navy); }

/* Events */
.event-list { display: flex; flex-direction: column; gap: 14px; }
.event-list--past { opacity: .72; }
.section__title { font-size: 1.15rem; margin: 0 0 14px; }
.event-card .card__body { padding: 16px 18px; }
.event-date { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none;
    width: 58px; height: 58px; border-radius: 14px; background: var(--grad-flag); color: #fff; line-height: 1; }
.event-date__mon { font-size: .68rem; font-weight: 700; letter-spacing: .06em; }
.event-date__day { font-size: 1.5rem; font-weight: 800; margin-top: 2px; }
.event-date--lg { width: 72px; height: 72px; border-radius: 16px; }
.event-date--lg .event-date__day { font-size: 1.9rem; }

/* Nav message icon + unread dot */
.nav__icon { position: relative; font-size: 1.2rem; line-height: 1; padding: 4px; text-decoration: none; }
.nav__dot { position: absolute; top: -6px; right: -8px; background: var(--red); color: #fff; font-size: .64rem;
    font-weight: 800; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; display: flex;
    align-items: center; justify-content: center; }

/* Messages — inbox list */
.msg-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.msg-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.msg-row:last-child { border-bottom: 0; }
.msg-row:hover { background: var(--cream); text-decoration: none; }
.msg-row--unread { background: #eef3ff; }
.msg-row__main { flex: 1; min-width: 0; }
.msg-row__top { display: flex; justify-content: space-between; gap: 10px; }
.msg-row__top .when { color: var(--slate); font-size: .8rem; flex: none; }
.msg-row__preview { color: var(--slate); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-row--unread .msg-row__preview { color: var(--ink); font-weight: 600; }
.msg-badge { flex: none; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; min-width: 20px;
    height: 20px; padding: 0 6px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }

/* Messages — chat thread */
.chat { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); }
.chat__head { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--cream); }
.chat__head b { color: var(--ink); }
.chat__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; }
.chat__day { text-align: center; margin: 8px 0; }
.chat__day span { background: var(--cream); color: var(--slate); font-size: .74rem; padding: 3px 10px; border-radius: 999px; }
.chat-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; }
.chat-msg--me { align-self: flex-end; align-items: flex-end; }
.chat-bubble { background: var(--cream); color: var(--ink); padding: 9px 14px; border-radius: 16px; border-bottom-left-radius: 4px; word-wrap: break-word; overflow-wrap: anywhere; }
.chat-msg--me .chat-bubble { background: var(--navy); color: #fff; border-radius: 16px; border-bottom-right-radius: 4px; }
.chat-time { font-size: .68rem; color: var(--slate); margin: 2px 6px 0; }
.chat__compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat__compose .input { flex: 1; }

/* "Claim this business" banner on unclaimed listings */
.claim-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    background: #fff8e6; border: 1px solid #f3d98a; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 24px; }
.claim-banner h3 { color: #8a6100; }

@media (max-width: 900px) {
    /* sidebar sits above the feed; lists become horizontal scrolling chips */
    .feed-layout { grid-template-columns: 1fr; gap: 18px; }
    .feed-side { position: static; gap: 12px; }
    .side-card { padding: 12px 14px; }
    .side-card h4 { margin-bottom: 8px; }
    .side-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 8px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
    .side-nav a { white-space: nowrap; background: var(--cream); padding: 8px 13px; border-radius: 999px; font-size: .9rem; }
}

/* ---------- Detail pages ---------- */
.detail { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; align-items: start; }
.detail__hero { background: var(--grad-blue); color: #fff; padding: 36px 0; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.kv { display: grid; grid-template-columns: 28px 1fr; gap: 10px 12px; align-items: start; }
.kv .k { color: var(--slate); }
.infolist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.infolist li { display: flex; gap: 10px; }
.infolist .ic { width: 22px; text-align: center; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 60px 20px; color: var(--slate); }
.empty .em { font-size: 3rem; }

/* ---------- Admin table ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.table th { background: var(--cream); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--slate); }
.table tr:last-child td { border-bottom: 0; }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 16px; margin-bottom: 30px; }
.statcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.statcard b { font-size: 2rem; font-weight: 800; color: var(--navy); display: block; }
.statcard span { color: var(--slate); font-size: .85rem; }

.errcode { font-size: 5rem; font-weight: 900; color: var(--navy); letter-spacing: -.04em; }
.inline { display: inline; }
.muted { color: var(--slate); }
.mt { margin-top: 18px; } .mt-lg { margin-top: 30px; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

/* ---------- Footer ---------- */
.footer { background: var(--navy-ink); color: rgba(255,255,255,.78); margin-top: 60px; }
.footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 48px 22px 30px; display: grid; grid-template-columns: 1fr 2fr; gap: 30px; }
.footer__brand .brand__star { color: var(--red); }
.footer__brand { font-weight: 800; color: #fff; font-size: 1.1rem; }
.footer__brand p { font-weight: 400; color: rgba(255,255,255,.6); font-size: .9rem; margin: 8px 0 0; }
.footer__cols { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.footer__cols h4 { color: #fff; font-size: .9rem; margin-bottom: 12px; }
.footer__cols a { display: block; color: rgba(255,255,255,.7); font-size: .9rem; padding: 4px 0; }
.footer__cols a:hover { color: #fff; }
.footer__bar { border-top: 1px solid rgba(255,255,255,.1); text-align: center; padding: 18px; font-size: .82rem; color: rgba(255,255,255,.55); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; padding-top: 40px; gap: 30px; }
    .detail { grid-template-columns: 1fr; }
    .footer__inner { grid-template-columns: 1fr; }

    /* Mobile nav: one stacked panel holding both links and auth (no overlap) */
    .nav__inner { flex-wrap: wrap; gap: 0; }
    .nav__links, .nav__auth { display: none; }
    .nav__toggle { display: block; margin-left: auto; }
    body.nav-open .nav__inner { height: auto; padding-bottom: 14px; }
    body.nav-open .nav__links {
        display: flex; flex-direction: column; width: 100%;
        gap: 2px; margin: 6px 0 8px;
    }
    body.nav-open .nav__links a { padding: 13px 6px; font-size: 1rem; border-radius: 10px; }
    body.nav-open .nav__links a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
    body.nav-open .nav__auth { display: flex; width: 100%; margin-left: 0; gap: 10px; flex-wrap: wrap; }
    body.nav-open .nav__auth .btn { flex: 1 1 auto; }
    body.nav-open .usermenu { width: 100%; }
    body.nav-open .usermenu__btn { width: 100%; justify-content: flex-start; }

    /* Wide tables scroll horizontally instead of stretching the viewport */
    .table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }

    .section { padding: 40px 0; }
    .map { height: 360px; }
    .map--full { height: 420px; }
}

@media (max-width: 560px) {
    .container, .nav__inner, .hero__inner, .footer__inner, .footer__bar {
        padding-left: 16px; padding-right: 16px;
    }
    .flash { margin-left: 16px; margin-right: 16px; }
    .field-row { grid-template-columns: 1fr; }
    .hero__inner { padding-top: 30px; }
    .hero h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
    .hero p.lead { font-size: 1.05rem; }
    .hero__cta { gap: 10px; }
    .hero__cta .btn { flex: 1 1 auto; }
    .hero__stats { gap: 18px; flex-wrap: wrap; }
    .hero__stats .stat b { font-size: 1.4rem; }
    .section { padding: 32px 0; }
    .section__head h2 { font-size: 1.5rem; }
    .grid--2, .grid--3 { grid-template-columns: 1fr; }
    .form { padding: 20px; }
    .map { height: 300px; }
    .map--full { height: 360px; }
    .detail__hero { padding: 26px 0; }
    .footer__cols { grid-template-columns: 1fr 1fr; }
    .feed, .composer, .post { border-radius: 14px; }
    .brand { font-size: 1rem; }
    .post__actions { gap: 2px; }
    .post__actions button, .post__actions a { padding: 6px 8px; font-size: .88rem; }
    /* 16px inputs stop iOS Safari from auto-zooming on focus */
    .input, .select, .textarea { font-size: 16px; }
}

@media (max-width: 380px) {
    .hero__stats .stat span { font-size: .72rem; }
    .footer__cols { grid-template-columns: 1fr; }
    .btn { padding: 11px 16px; }
}
