/* ============================================================
   ESRC v3 — consolidated stylesheet
   Design tokens, base, components, layout, responsive
   ============================================================ */

:root {
    /* Brand palette — derived from the logo
       outer shield = warm sunflower yellow
       inner shield = medium blue-leaning teal */
    --teal-50:  #ecf6fa;
    --teal-100: #cfe7ef;
    --teal-300: #6ab6cb;
    --teal-500: #2596b3;
    --teal-600: #1d7e98;
    --teal-700: #16627a;
    --teal-900: #0a3645;

    --gold-300: #ffdb5e;
    --gold-400: #f4c01a;
    --gold-500: #d6a400;

    --ink-900: #0f1a1a;
    --ink-700: #2b3a3a;
    --ink-500: #5b6b6b;
    --ink-300: #98a4a4;
    --ink-100: #e3e8e8;

    --bg:        #fbfaf6;
    --bg-card:   #ffffff;
    --bg-soft:   #f4f1ea;

    --danger:  #c0392b;
    --success: #228b22;
    --warning: #b45309;

    --radius-sm: 6px;
    --radius:    12px;
    --radius-lg: 18px;

    --shadow-sm: 0 1px 2px rgba(15,26,26,.06);
    --shadow:    0 4px 14px rgba(15,26,26,.08);
    --shadow-lg: 0 12px 32px rgba(15,26,26,.12);

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 72px;

    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --max-width: 1200px;

    --z-nav: 50;
    --z-modal: 100;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    font-family: var(--font-sans);
    color: var(--ink-900);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
}

a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--teal-700); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
    font-family: var(--font-sans);
    color: var(--ink-900);
    margin: 0 0 var(--space-3);
    line-height: 1.2;
    font-weight: 700;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 var(--space-3); color: var(--ink-700); }

main { display: block; min-height: 60vh; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-5); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: var(--space-2);
    padding: 12px 22px;
    background: var(--teal-600);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    text-decoration: none;
    font-family: inherit;
}
.btn:hover { background: var(--teal-700); color: #fff; box-shadow: var(--shadow); transform: translateY(-1px); }
.btn-gold  { background: var(--gold-400); color: var(--ink-900); }
.btn-gold:hover { background: var(--gold-500); color: var(--ink-900); }
.btn-ghost { background: transparent; color: var(--teal-700); border: 1.5px solid var(--teal-600); }
.btn-ghost:hover { background: var(--teal-50); color: var(--teal-700); }
.btn-ghost-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); color: #fff; box-shadow: none; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn-success { background: var(--success); }
.btn-success:hover { background: #1d6f1d; }
.btn-danger  { background: var(--danger); }
.btn-danger:hover  { background: #962819; }

/* Icon-only square buttons used in admin tables */
.btn-icon {
    width: 32px; height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--ink-100);
    background: #fff;
    color: var(--ink-700);
    cursor: pointer;
    transition: background .12s, color .12s, border-color .12s;
    font-family: inherit;
    text-decoration: none;
}
.btn-icon:hover    { background: var(--bg-soft); color: var(--teal-700); border-color: var(--teal-300); box-shadow: none; transform: none; }
.btn-icon.success:hover { background: #ecf7ec; color: var(--success); border-color: #c8e6c9; }
.btn-icon.danger:hover  { background: #fef2f0; color: var(--danger);  border-color: #f5c6c0; }
.btn-icon.warn:hover    { background: #fff7eb; color: var(--warning); border-color: #fde0a3; }
.btn-icon.active   { background: var(--teal-600); color: #fff; border-color: var(--teal-600); }
.btn-icon[disabled] { opacity: .35; cursor: not-allowed; }
.btn-icon-sm { width: 28px; height: 28px; }
.btn-icon-sm svg { width: 14px; height: 14px; }
.icon-row { display: inline-flex; gap: 4px; flex-wrap: wrap; }

/* ---------- Form controls ---------- */
.form-group { margin-bottom: var(--space-4); }
.form-group label { display: block; font-weight: 600; margin-bottom: var(--space-2); font-size: 0.92rem; color: var(--ink-700); }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(37,150,179,.18);
}
textarea.form-control { min-height: 110px; resize: vertical; }

/* ---------- Cards / tags / alerts ---------- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: var(--space-5);
    border: 1px solid var(--ink-100);
}
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--teal-50);
    color: var(--teal-700);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.tag-gold { background: #fff5d1; color: #8a6a00; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-4);
    border: 1px solid transparent;
    font-size: 0.92rem;
}
.alert-success { background: #e8f5e9; color: #1b5e20; border-color: #c8e6c9; }
.alert-danger  { background: #fdecea; color: #b71c1c; border-color: #f5c6c0; }
.alert-info    { background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-100); }

/* ---------- Top nav ---------- */
.nav {
    position: sticky; top: 0; z-index: var(--z-nav);
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--ink-100);
}
/* Hidden by default; shown only on small viewports as a centered strip
   that sits above the logo + buttons. */
.nav-tagline {
    display: none;
    text-align: center;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-500);
    padding: 6px var(--space-4) 0;
    line-height: 1.2;
}
.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex; align-items: center; gap: var(--space-5);
    padding: var(--space-3) var(--space-5);
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; color: var(--ink-900); font-size: 1rem;
    text-decoration: none;
}
.nav-logo:hover { color: var(--ink-900); }
.nav-logo img { height: 38px; width: 38px; }
.nav-logo small {
    display: block; font-size: 0.7rem; color: var(--ink-500);
    font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
}
.nav-links {
    display: flex; gap: var(--space-5);
    margin-left: var(--space-5);
    flex: 1;
}
.nav-links a {
    color: var(--ink-700);
    font-weight: 500; font-size: 0.92rem;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}
.nav-links a:hover { color: var(--teal-700); border-bottom-color: var(--gold-400); }
.nav-links a.active { color: var(--teal-700); border-bottom-color: var(--teal-600); }

/* Dropdown groups */
.nav-group { position: relative; }
.nav-group-toggle {
    background: transparent; border: 0;
    padding: 6px 2px;
    color: var(--ink-700);
    font: inherit; font-weight: 500; font-size: 0.92rem;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
    border-bottom: 2px solid transparent;
}
.nav-group-toggle:hover { color: var(--teal-700); border-bottom-color: var(--gold-400); }
.nav-group.active .nav-group-toggle { color: var(--teal-700); border-bottom-color: var(--teal-600); }
.nav-chev { font-size: 0.7rem; transition: transform .15s; opacity: .7; }
.nav-group.open .nav-chev { transform: rotate(180deg); }

.nav-group-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15,26,26,.10);
    padding: 6px;
    display: none;
    flex-direction: column;
    z-index: 60;
}
/* Decorative arrow pointing up at the toggle */
.nav-group-menu::before {
    content: '';
    position: absolute; top: -5px; left: 18px;
    width: 10px; height: 10px;
    background: #fff;
    border-left: 1px solid var(--ink-100);
    border-top: 1px solid var(--ink-100);
    transform: rotate(45deg);
}
/* Invisible hover-bridge: closes the 8px gap between the toggle and
   the menu so the cursor never leaves the hoverable area. */
.nav-group-menu::after {
    content: '';
    position: absolute;
    top: -10px; left: 0; right: 0;
    height: 12px;
    /* transparent on purpose — only there to keep :hover alive */
}
.nav-group-menu a {
    padding: 8px 12px; border-radius: 6px;
    color: var(--ink-700); font-size: 0.92rem;
    border-bottom: none;
    white-space: nowrap;
}
.nav-group-menu a:hover { background: var(--bg-soft); color: var(--teal-700); border-bottom-color: transparent; }
.nav-group-menu a.active { background: var(--teal-50); color: var(--teal-700); border-bottom-color: transparent; }

/* Open via :hover (desktop) and via .open class (click / mobile) */
@media (hover: hover) {
    .nav-group:hover > .nav-group-menu { display: flex; }
    .nav-group:hover > .nav-group-toggle .nav-chev { transform: rotate(180deg); }
}
.nav-group.open > .nav-group-menu { display: flex; }
.nav-actions { display: flex; align-items: center; gap: var(--space-3); margin-left: auto; }
.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink-700); margin: 4px 0; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--teal-900);
    color: #cfe7e6;
    padding: var(--space-7) 0 var(--space-5);
    margin-top: var(--space-8);
}
.site-footer h4 {
    color: #fff; font-size: 0.95rem;
    text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}
.site-footer a { color: #cfe7e6; }
.site-footer a:hover { color: var(--gold-300); }
.footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-grid ul { padding: 0; list-style: none; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-bottom {
    padding-top: var(--space-4);
    display: flex; justify-content: space-between;
    font-size: 0.85rem; opacity: .8;
}

/* ---------- Banner ad slot ---------- */
.banner-ad {
    max-width: var(--max-width);
    margin: var(--space-7) auto 0;
    padding: var(--space-4) var(--space-5);
    background: linear-gradient(90deg, var(--bg-soft), #fff);
    border: 1px dashed var(--ink-300);
    border-radius: var(--radius);
    text-align: center;
    color: var(--ink-500); font-size: 0.85rem;
}
.banner-ad strong { color: var(--ink-700); display: block; font-size: 0.95rem; margin-bottom: 4px; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(10,54,69,.85) 0%, rgba(22,98,122,.7) 60%, rgba(244,192,26,.35) 100%),
        url('https://images.unsplash.com/photo-1568605114967-8130f3a36994?auto=format&fit=crop&w=1800&q=80') center/cover no-repeat;
    padding: var(--space-8) 0 var(--space-7);
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(800px 400px at 85% 10%, rgba(244,192,26,.18), transparent 60%);
    pointer-events: none;
}
.hero > .container {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1.3fr 1fr;
    gap: var(--space-7); align-items: center;
}
.hero h1 { color: #fff; }
.hero p.lead { color: rgba(255,255,255,.92); font-size: 1.1rem; max-width: 540px; }
.hero .cta { display: flex; gap: var(--space-3); margin-top: var(--space-5); flex-wrap: wrap; }
.hero-stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-6);
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255,255,255,.18);
}
.stat-num { font-size: 1.8rem; font-weight: 800; color: var(--gold-300); }
.stat-lbl { font-size: 0.8rem; color: rgba(255,255,255,.8); text-transform: uppercase; letter-spacing: .05em; }
.stat-link { display: block; text-decoration: none; transition: transform .15s; }
.stat-link:hover { transform: translateY(-2px); }
.stat-link:hover .stat-lbl { color: var(--gold-300); }

.hero-card {
    background: #fff; color: var(--ink-900);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-5);
}
.hero-card h3 { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.hero-card .pulse {
    width: 8px; height: 8px; background: var(--success);
    border-radius: 50%; box-shadow: 0 0 0 0 rgba(34,139,34,.7);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34,139,34,.6); }
    70% { box-shadow: 0 0 0 12px rgba(34,139,34,0); }
    100% { box-shadow: 0 0 0 0 rgba(34,139,34,0); }
}
.hero-card .meta { font-size: 0.8rem; color: var(--ink-500); margin-bottom: var(--space-2); }
.hero-card p { font-size: 0.95rem; }

/* ---------- Quick action tiles ---------- */
.quick-actions { margin-top: -40px; position: relative; z-index: 5; }
.tiles {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--space-4);
}
.tile {
    background: #fff; border-radius: var(--radius);
    padding: var(--space-5) var(--space-3);
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
    color: var(--ink-900); text-decoration: none;
    border: 1px solid var(--ink-100);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--teal-700); }
.tile .ico {
    width: 44px; height: 44px;
    margin: 0 auto var(--space-3);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--teal-50);
    color: var(--teal-700);
    font-size: 1.25rem;
}
.tile.gold .ico { background: #fff5d1; color: #8a6a00; }
.tile-label { font-weight: 600; font-size: 0.9rem; }
.tile-sub { font-size: 0.75rem; color: var(--ink-500); margin-top: 2px; }

/* ---------- Section / grids ---------- */
.section { padding: var(--space-7) 0; }
.section.tinted { background: var(--bg-soft); }
.section-head {
    display: flex; justify-content: space-between; align-items: end;
    margin-bottom: var(--space-5);
}
.section-head h2 { margin: 0; }
.section-head a { font-weight: 600; }

.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-6); }

/* ---------- Featured announcement ---------- */
.announcement-feature {
    background: linear-gradient(135deg, #fff 0%, var(--teal-50) 100%);
    border: 1px solid var(--teal-100);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    position: relative;
}
.announcement-feature .tag { margin-bottom: var(--space-3); }
.announcement-feature h3 { font-size: 1.5rem; margin-bottom: var(--space-3); }
.announcement-feature .actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); }

.announcement-list { display: flex; flex-direction: column; gap: 0; margin-top: var(--space-5); }
.announcement-row {
    display: flex; gap: var(--space-4);
    padding: var(--space-4) 0;
    border-top: 1px solid var(--ink-100);
}
.announcement-row .date {
    flex: 0 0 60px; text-align: center;
    background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius-sm);
    padding: 6px 0; align-self: flex-start;
}
.announcement-row .date .d { font-size: 1.1rem; font-weight: 700; color: var(--teal-700); }
.announcement-row .date .m { font-size: 0.7rem; text-transform: uppercase; color: var(--ink-500); letter-spacing: .05em; }
.announcement-row h4 { margin: 0 0 4px; font-size: 1rem; }
.announcement-row p { margin: 0; font-size: 0.9rem; color: var(--ink-500); }
.announcement-row .row-actions { display: flex; gap: 6px; margin-top: 6px; }
.announcement-row .row-actions a { font-size: 0.8rem; }

/* ---------- Sidebar widgets ---------- */
.widget { margin-bottom: var(--space-5); }
.widget h3 {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: var(--space-4);
    font-size: 1rem; text-transform: uppercase; letter-spacing: .05em;
    color: var(--ink-700);
}
.widget h3 a { font-size: 0.7rem; }

.whatsapp-card {
    background: linear-gradient(135deg, #128C7E, #25D366);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
}
.whatsapp-card h3 { color: #fff; text-transform: none; letter-spacing: 0; font-size: 1.1rem; justify-content: center; }
.whatsapp-card p { color: rgba(255,255,255,.92); font-size: 0.9rem; margin-bottom: var(--space-4); }
.whatsapp-card .btn { background: #fff; color: #128C7E; }
.whatsapp-card .btn:hover { background: #f0f0f0; color: #0c6b5f; }

.provider-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.provider-row {
    display: flex; gap: var(--space-3); align-items: center;
    padding: var(--space-3); border-radius: var(--radius);
    transition: background .15s;
    text-decoration: none; color: inherit;
}
.provider-row:hover { background: var(--bg-soft); color: inherit; }
.provider-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--teal-100); color: var(--teal-700);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    flex: 0 0 auto;
}
.provider-meta { flex: 1; min-width: 0; }
.provider-meta .nm { font-weight: 600; font-size: 0.92rem; }
.provider-meta .ct { font-size: 0.78rem; color: var(--ink-500); }
.rating { color: var(--gold-500); font-size: 0.85rem; font-weight: 600; white-space: nowrap; }

/* ---------- Classifieds grid ---------- */
.classifieds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.classified {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--ink-100);
    display: flex; flex-direction: column;
    transition: transform .15s, box-shadow .15s;
    text-decoration: none; color: inherit;
}
.classified:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.classified .thumb {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, var(--teal-100), var(--gold-300));
    background-size: cover; background-position: center;
}
.classified .body { padding: var(--space-4); flex: 1; display: flex; flex-direction: column; }
.classified h4 { margin: 0 0 4px; font-size: 1rem; }
.classified .price { color: var(--teal-700); font-weight: 700; }
.classified .desc { font-size: 0.85rem; color: var(--ink-500); margin: var(--space-2) 0; flex: 1; }

/* ---------- Committee strip ---------- */
.committee-strip {
    background: var(--bg-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    display: grid; grid-template-columns: 1fr 2fr;
    gap: var(--space-6); align-items: center;
}
.committee-photos { display: flex; }
.committee-photos .face {
    width: 64px; height: 64px; border-radius: 50%;
    background-size: cover; background-position: center;
    border: 3px solid #fff;
    margin-left: -14px;
    box-shadow: var(--shadow-sm);
}
.committee-photos .face:first-child { margin-left: 0; }

/* ---------- Map fullscreen toggle (reused by potholes + cameras) ----
   Layout strategy:
     • Desktop  → embedded map visible; View-Map CTA hidden (not needed).
     • Mobile   → embedded map hidden; View-Map CTA + caption shown.
                  Tapping the CTA expands the map's wrapper to cover the
                  viewport; a Close button overlay exits the fullscreen view.
*/
.map-wrap { position: relative; }
.map-cta  { display: none; }                     /* shown only on mobile */

.map-open-btn {
    display: inline-flex;
    align-items: center; gap: 8px;
    background: var(--teal-600);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 12px 22px;
    font-size: 1rem; font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background .15s, transform .1s;
}
.map-open-btn:hover { background: var(--teal-700); transform: translateY(-1px); }
.map-open-btn .ico { font-size: 1.15rem; }

.map-cta-text {
    color: var(--ink-500);
    font-size: 0.88rem;
    margin: 8px 0 0;
    line-height: 1.45;
}

/* Close button shown only while the map is fullscreen — overlay style. */
.map-close-btn {
    display: none;
    position: absolute; z-index: 10000;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    background: #fff; color: var(--ink-900);
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.95rem; font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
}
.map-close-btn:hover { background: var(--bg-soft); }
.map-wrap.map-fullscreen .map-close-btn { display: inline-flex; align-items: center; gap: 6px; }

/* Fullscreen overlay — applies to BOTH mobile (when triggered) and desktop. */
.map-wrap.map-fullscreen {
    display: block !important;
    position: fixed; inset: 0;
    z-index: 9999;
    background: #fff;
    margin: 0; padding: 0;
}
.map-wrap.map-fullscreen > .leaflet-container,
.map-wrap.map-fullscreen > [id$="-map"] {
    width: 100% !important;
    height: 100vh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* --- Mobile: hide the inline map, show the CTA + caption --- */
@media (max-width: 820px) {
    .map-wrap { display: none; }
    .map-cta  {
        display: block;
        background: var(--bg-soft);
        border: 1px dashed var(--ink-300);
        border-radius: var(--radius);
        padding: var(--space-4);
        text-align: center;
        margin-bottom: var(--space-4);
    }
    /* "View on map" buttons inside cards do nothing useful when the inline
       map is hidden — drop them. The fullscreen View-Map CTA is enough. */
    .fly-btn { display: none !important; }
}

/* ---------- Admin shell ---------- */
.admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-5);
    /* No max-width — admin views use the full viewport so wide tables breathe. */
    width: 100%;
    margin: 0;
    padding: var(--space-5) var(--space-6);
}
.admin-sidebar {
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius);
    padding: var(--space-4);
    position: sticky;
    top: 80px;
    align-self: start;
    box-shadow: var(--shadow-sm);
}
.admin-sidebar h3 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink-500);
    margin: 0 0 var(--space-3);
    padding: 0 var(--space-3);
}
.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.admin-sidebar a {
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink-700);
    text-decoration: none;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .12s, color .12s;
}
.admin-sidebar a:hover { background: var(--bg-soft); color: var(--teal-700); }
.admin-sidebar a.active {
    background: var(--teal-600);
    color: #fff;
    font-weight: 600;
}
.admin-sidebar a.active:hover { color: #fff; background: var(--teal-700); }
.admin-sidebar a .ico { font-size: 1rem; flex: 0 0 auto; }
.admin-sidebar a .badge {
    margin-left: auto;
    background: var(--gold-400);
    color: var(--ink-900);
    border-radius: 999px;
    font-size: 0.7rem;
    padding: 1px 7px;
    font-weight: 700;
    line-height: 1.4;
}
.admin-sidebar a.active .badge { background: var(--gold-300); }

.admin-content { min-width: 0; }
.admin-content h1 { margin-top: 0; }
/* Pages still wrap content in .section/.container — neutralise the double
   gutter when they render inside the admin shell. */
.admin-content > .section { padding: 0; }
.admin-content > .section > .container { max-width: none; padding: 0; }
.admin-content > .section.tinted { background: transparent; }

@media (max-width: 820px) {
    .admin-shell { grid-template-columns: 1fr; padding: var(--space-3); }
    .admin-sidebar { position: relative; top: auto; }
    .admin-sidebar nav { flex-direction: row; flex-wrap: wrap; }
    .admin-sidebar a { flex: 1 1 auto; min-width: 0; }
}

/* ---------- Stat cards (admin overview) ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}
.stat-tile {
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius);
    padding: var(--space-4);
    border-top: 3px solid var(--teal-500);
}
.stat-tile.gold { border-top-color: var(--gold-400); }
.stat-tile.warn { border-top-color: var(--warning); }
.stat-tile.muted { border-top-color: var(--ink-300); background: var(--bg-soft); }
.stat-tile .label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--ink-500);
}
.stat-tile .value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; margin: 6px 0 2px; color: var(--ink-900); }
.stat-tile .sub   { font-size: 0.78rem; color: var(--ink-500); }
.stat-tile .delta { font-size: 0.78rem; font-weight: 600; color: var(--success); }
.stat-tile .delta.neg { color: var(--danger); }
.stat-tile .delta.flat { color: var(--ink-500); }

/* Mini sparkline-ish bar chart */
.bar-chart { display: flex; align-items: flex-end; gap: 4px; height: 60px; margin-top: var(--space-3); }
.bar-chart .bar { flex: 1; background: var(--teal-300); border-radius: 3px 3px 0 0; min-height: 2px; transition: background .15s; }
.bar-chart .bar:hover { background: var(--teal-600); }
.bar-chart .bar.empty { background: var(--ink-100); }

/* Section panel inside admin content */
.admin-panel {
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}
.admin-panel h2 { margin-top: 0; font-size: 1.1rem; }
.admin-panel .panel-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin: 0 0 var(--space-4) 0;
}

/* ---------- Drawer (slide-in panel from the right) ---------- */
.drawer-backdrop {
    position: fixed; inset: 0;
    background: rgba(15, 26, 26, 0.45);
    z-index: 90;
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s;
}
.drawer-backdrop.open { opacity: 1; visibility: visible; }
.drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(480px, 100vw);
    background: #fff;
    box-shadow: -8px 0 32px rgba(15, 26, 26, .18);
    z-index: 95;
    transform: translateX(100%);
    transition: transform .25s ease;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.drawer.open { transform: translateX(0); }
.drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--ink-100);
    background: linear-gradient(180deg, var(--bg-soft), #fff);
    flex: 0 0 auto;
}
.drawer-head h2 { margin: 0; font-size: 1.2rem; }
.drawer-close {
    background: transparent; border: 0;
    font-size: 1.6rem; line-height: 1;
    color: var(--ink-500); cursor: pointer;
    padding: 4px 8px; border-radius: 6px;
}
.drawer-close:hover { color: var(--ink-900); background: var(--bg-soft); }
.drawer-body { padding: var(--space-5); overflow-y: auto; flex: 1; }
.drawer-foot {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--ink-100);
    background: var(--bg-soft);
    display: flex; gap: var(--space-3); justify-content: flex-end;
    flex: 0 0 auto;
}

/* ---------- Modal (login) ---------- */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(15,26,26,.55);
    z-index: var(--z-modal);
    display: none;
    align-items: center; justify-content: center;
    padding: var(--space-4);
}
.modal-backdrop.open { display: flex; }
.modal {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%; max-width: 420px;
    padding: var(--space-6);
    position: relative;
}
.modal h2 { margin-top: 0; }
.modal .close {
    position: absolute; top: var(--space-3); right: var(--space-3);
    background: transparent; border: 0; font-size: 1.4rem;
    cursor: pointer; color: var(--ink-500);
}

/* ---------- Utility ---------- */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-7 { margin-top: var(--space-7); }
.text-center { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .hero > .container { grid-template-columns: 1fr; }
    .tiles { grid-template-columns: repeat(3, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .classifieds-grid { grid-template-columns: repeat(2, 1fr); }
    .committee-strip { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: #fff; flex-direction: column;
        padding: var(--space-4);
        border-bottom: 1px solid var(--ink-100);
        margin-left: 0;
        box-shadow: var(--shadow);
    }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }

    /* Dropdowns become accordions inside the burger menu */
    .nav-group { width: 100%; }
    .nav-group-toggle { width: 100%; justify-content: space-between; padding: 8px 0; }
    .nav-group-menu {
        position: static; box-shadow: none; border: 0;
        padding: 0 0 0 var(--space-4);
        background: transparent;
        margin-top: 4px;
    }
    .nav-group-menu::before { display: none; }
    .nav-group-menu a { padding: 6px 0; }
}

/* ----- Phone-sized header ---------------------------------------- */
/* Show the centered tagline above the nav, hide the inline subtitle,
   and tighten everything so logo + buttons + burger fit on one row. */
@media (max-width: 600px) {
    .nav-tagline { display: block; }
    .nav-logo small { display: none; }
    /* Tighter vertical rhythm on phones — the desktop 48-px section padding
       leaves a lot of empty space above headings on a small screen. */
    .section { padding: var(--space-4) 0; }
}

@media (max-width: 450px) {
    .nav-tagline { font-size: 0.62rem; padding-top: 5px; letter-spacing: .06em; }
    .nav-inner { gap: var(--space-3); padding: var(--space-2) var(--space-3); }
    .nav-logo { gap: 6px; font-size: 0.95rem; }
    .nav-logo img { height: 32px; width: 32px; }
    .nav-actions { gap: 6px; }
    .nav-actions .btn-sm { padding: 6px 10px; font-size: 0.78rem; }
    .nav-toggle { padding: 6px; }
}

@media (max-width: 360px) {
    /* Last-resort: drop button labels to icons-only spacing */
    .nav-actions .btn-sm { padding: 6px 8px; font-size: 0.72rem; }
    .nav-logo small { display: none; }
}
@media (max-width: 560px) {
    .tiles { grid-template-columns: repeat(2, 1fr); }
    .classifieds-grid { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: var(--space-2); text-align: center; }
}
