/* ==========================================================================
   Pentos LMS — public-editorial.css
   "Civic Editorial" — the client (Nike) design language applied to the
   PUBLIC-FACING portal only.

   LOAD ORDER (see _Layout.cshtml): bootstrap → site.css → theme.css →
   THIS FILE → <style id="theme-overrides"> (per-LGU runtime brand color).
   The per-LGU block only sets --bs-* variables, so brand retinting keeps
   working while this layer owns geometry / type / spacing.

   SCOPE: every rule is nested under `.public-portal` (added to <body> in the
   public _Layout). Admin / Executive / Member shells use their own layouts and
   never carry that class, so nothing here can leak into the back office — even
   for partials (_Alert, _StatusBadge, _Pagination) shared across areas.

   Plan: Docs/public-nike-redesign-plan-2026-06-20.md
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Editorial tokens — neutral spine (Nike-derived). Brand color stays the
      single accent via --bs-primary (untouched here).
   -------------------------------------------------------------------------- */
.public-portal {
    --pe-ink: #111113;          /* near-black text (flips light in dark mode) */
    --pe-canvas: #ffffff;       /* card / surface background */
    --pe-cloud: #f5f5f5;        /* the "studio" gray behind imagery & cards */
    --pe-hairline: #cacacb;     /* 1px dividers / chip borders */
    --pe-hairline-soft: #e5e5e5;/* card borders */
    --pe-mute: #707072;         /* subtitles, metadata */
    --pe-stone: #9e9ea0;        /* lowest-emphasis / placeholder glyphs */

    /* Geometry — square containers, pill controls */
    --pe-radius-control: 9999px;

    /* 16px editorial body (calmer "catalog" tier; admin keeps its 14-15px) */
    --bs-body-font-size: 1rem;
}

[data-bs-theme="dark"] .public-portal {
    --pe-ink: var(--pt-slate-100);
    --pe-canvas: var(--pt-surface-0);
    --pe-cloud: var(--pt-slate-800);
    --pe-hairline: rgba(148, 163, 184, 0.22);
    --pe-hairline-soft: rgba(148, 163, 184, 0.14);
    --pe-mute: var(--pt-slate-400);
    --pe-stone: var(--pt-slate-500);
}

/* --------------------------------------------------------------------------
   2. Typography — extreme contrast: heavy display tier ↔ quiet 16px body.
   -------------------------------------------------------------------------- */
.public-portal .pe-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--pe-mute);
    margin-bottom: 0.75rem;
}

.public-portal .pe-eyebrow--brand { color: var(--bs-primary); }
.public-portal .pe-eyebrow--invert { color: rgba(255, 255, 255, 0.72); }

.public-portal .pe-display {
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.035em;
    color: var(--pe-ink);
    font-size: clamp(2.25rem, 1.3rem + 4vw, 4rem);
    margin: 0;
}

.public-portal .pe-headline {
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.022em;
    color: var(--pe-ink);
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2rem);
    margin: 0;
}

.public-portal .pe-headline--invert { color: #fff; }

.public-portal .pe-lead {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--pe-mute);
}

/* Underlined inline link (Nike link-md) */
.public-portal .pe-link {
    font-weight: 600;
    color: var(--pe-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

.public-portal .pe-link:hover { color: var(--bs-primary); text-decoration: underline; }

/* --------------------------------------------------------------------------
   3. Layout rhythm — ~48px section beat, hairline separators, cloud band.
   -------------------------------------------------------------------------- */
.public-portal .pe-section { padding-block: clamp(2.25rem, 4vw, 3.25rem); }
.public-portal .pe-section--tight { padding-block: clamp(1.5rem, 3vw, 2.25rem); }
.public-portal .pe-cloud { background-color: var(--pe-cloud); }
.public-portal .pe-hairline-top { border-top: 1px solid var(--pe-hairline-soft); }
.public-portal .pe-hairline-bottom { border-bottom: 1px solid var(--pe-hairline-soft); }

/* --------------------------------------------------------------------------
   4. Controls — pills everywhere; flat (no soft shadow / inset highlight).
   -------------------------------------------------------------------------- */
.public-portal .btn {
    --bs-btn-border-radius: var(--pe-radius-control);
    --bs-btn-font-weight: 600;
}

.public-portal .btn-primary { box-shadow: none; }
.public-portal .btn-primary:hover { box-shadow: none; }

/* Search pill — cloud field with a soft "glove" focus halo */
.public-portal .pe-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--pe-cloud);
    border: 1px solid transparent;
    border-radius: var(--pe-radius-control);
    padding: 0.4rem 0.4rem 0.4rem 1.1rem;
}

.public-portal .pe-search:focus-within {
    background-color: var(--pe-canvas);
    border-color: var(--pe-ink);
    box-shadow: 0 0 0 4px var(--pe-cloud);
}

.public-portal .pe-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 1rem;
    color: var(--pe-ink);
}

.public-portal .pe-search input::placeholder { color: var(--pe-mute); }
.public-portal .pe-search .btn { flex-shrink: 0; }

/* Filter chip — flips to brand fill when active */
.public-portal .pe-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--pe-hairline);
    border-radius: var(--pe-radius-control);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: var(--pe-canvas);
    color: var(--pe-ink);
    text-decoration: none;
    transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.public-portal a.pe-chip:hover { border-color: var(--pe-ink); color: var(--pe-ink); text-decoration: none; }
.public-portal .pe-chip.active { background-color: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }

/* Promo badge — white pill + hairline (e.g. "Pinned") */
.public-portal .pe-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background-color: var(--pe-canvas);
    border: 1px solid var(--pe-hairline);
    border-radius: var(--pe-radius-control);
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--pe-ink);
}

/* --------------------------------------------------------------------------
   5. Cards — flat, square, hairline, no shadow, no hover-lift. The image is
      staged on cloud; the photograph (or the document number) is the card.
   -------------------------------------------------------------------------- */
.public-portal .pe-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: var(--pe-canvas);
    border: 1px solid var(--pe-hairline-soft);
    border-radius: 0;
    box-shadow: none;
    transition: border-color 0.12s ease;
}

.public-portal a.pe-card,
.public-portal .pe-card a { text-decoration: none; color: inherit; }
.public-portal a.pe-card:hover,
.public-portal .pe-card--interactive:hover { border-color: var(--pe-ink); }
.public-portal a.pe-card:hover .pe-card__name { color: var(--bs-primary); }

.public-portal .pe-card:focus-visible,
.public-portal a.pe-card:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.public-portal .pe-card--flat { border: 0; background: transparent; }

.public-portal .pe-card__media {
    display: block;
    width: 100%;
    background-color: var(--pe-cloud);
    object-fit: cover;
    aspect-ratio: 16 / 10;
    border-radius: 0;
}

.public-portal .pe-card__media--portrait { aspect-ratio: 4 / 5; }
.public-portal .pe-card__media--square { aspect-ratio: 1 / 1; }

.public-portal .pe-card__media-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pe-stone);
}

.public-portal .pe-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1rem 1.1rem 1.2rem;
}

.public-portal .pe-card__name {
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
    color: var(--pe-ink);
    transition: color 0.12s ease;
}

.public-portal .pe-card__meta {
    margin: 0;
    font-size: 0.875rem;
    color: var(--pe-mute);
}

/* Document "number-as-hero" anchor for legislation cards */
.public-portal .pe-card__number {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    color: var(--pe-ink);
}

/* --------------------------------------------------------------------------
   6. Stat block — heavy number, quiet uppercase label, ink top-rule.
   -------------------------------------------------------------------------- */
.public-portal .pe-stat { border-top: 2px solid var(--pe-ink); padding-top: 0.85rem; }

.public-portal .pe-stat__value {
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--pe-ink);
    font-size: clamp(2.5rem, 1.6rem + 3vw, 3.5rem);
}

.public-portal .pe-stat__label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--pe-mute);
}

/* --------------------------------------------------------------------------
   7. Hero seal stage + meeting date block — product staged on cloud.
   -------------------------------------------------------------------------- */
.public-portal .pe-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 2rem;
    background-color: var(--pe-cloud);
    border-radius: 0;
}

.public-portal .pe-stage img { max-width: 72%; height: auto; }

.public-portal .pe-datebox {
    flex-shrink: 0;
    min-width: 72px;
    padding: 0.65rem 0.5rem;
    text-align: center;
    background-color: var(--pe-cloud);
}

.public-portal .pe-datebox__day { font-size: 1.6rem; font-weight: 900; line-height: 1; color: var(--pe-ink); }
.public-portal .pe-datebox__mon { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--pe-mute); }
.public-portal .pe-datebox__yr { font-size: 0.75rem; color: var(--pe-mute); }

/* ==========================================================================
   PHASE 2 — Shared chrome promotion (global, .public-portal scope)
   Promotes the flat/square/hairline editorial geometry to EVERY public page's
   Bootstrap chrome at once, so listing/detail pages inherit the look before
   their per-page passes (Phases 3-5). Admin/Exec/Member use separate layouts
   and never carry `.public-portal`, so the back office is untouched.
   ========================================================================== */

/* 1. Every public Bootstrap card → flat, square, hairline.
   `!important` overrides the utilities used across public views (`border-0`,
   `shadow-sm`, `rounded-*`). With shadows gone, the hairline is what defines a
   white card on a white/cloud surface — so the border replaces the shadow. */
.public-portal .card {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: 1px solid var(--pe-hairline-soft) !important;
}

.public-portal .card-img-top,
.public-portal .card-img,
.public-portal .card-img-bottom { border-radius: 0 !important; }

/* 2. Kill decorative shadows + hover-lift (site.css .hover-shadow,
   theme.css .card-hover/.card-interactive) — editorial cards sit flat.
   Modals/offcanvas keep their elevation (overlays, not chrome). */
.public-portal .shadow-sm,
.public-portal .shadow { box-shadow: none !important; }

.public-portal .hover-shadow:hover,
.public-portal .card.card-hover:hover,
.public-portal .card.card-interactive:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Interactive cards darken their hairline on hover instead of lifting */
.public-portal a.card:hover,
.public-portal .card.hover-shadow:hover { border-color: var(--pe-ink) !important; }

/* 3. Navbar — keep the brand fill, drop the gradient + heavy shadow, add a
   crisp hairline base (flat brand chrome). */
.public-portal .navbar.bg-primary {
    background-image: none !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

/* 2px active/hover underline (Nike active-section cue) replacing the pill
   background highlight from theme.css. */
.public-portal .navbar.bg-primary .nav-link { border-radius: 0; }
.public-portal .navbar.bg-primary .nav-link.active,
.public-portal .navbar.bg-primary .nav-link.show,
.public-portal .navbar.bg-primary .nav-link:hover,
.public-portal .navbar.bg-primary .nav-link:focus {
    background-color: transparent !important;
    box-shadow: inset 0 -2px 0 0 #fff;
}

/* 4. Footer — keep the dark anchor, square the rounded chrome for the flat
   editorial language. */
.public-portal .footer-brand-icon,
.public-portal .footer-social-icon { border-radius: 0 !important; }

/* ==========================================================================
   PHASE 3 — Listing pages: align the BESPOKE-CSS pages to the editorial system.
   Officers (officers.css), News/Post and Search (site.css) use custom class
   names instead of Bootstrap `.card`, so Phase 2's `.card` rule didn't reach
   them. Enforce the same flat / square / hairline / cloud language here via
   scoped overrides. (Full markup retirement of officers.css + Post CSS is a
   later refinement; this achieves the visual system now without rewrites.)
   ========================================================================== */

/* --- Officers: grid cards --- */
.public-portal .officer-card {
    border-radius: 0;
    border-width: 1px;
    border-color: var(--pe-hairline-soft);
}
.public-portal .officer-card:hover {
    box-shadow: none;
    transform: none;
    border-color: var(--pe-ink);
}
/* Role accent → monochrome ink top/left rule (was primary/success/info) */
.public-portal .officer-card--executive,
.public-portal .officer-card--councilor,
.public-portal .officer-card--staff { border-top: 2px solid var(--pe-ink); }
.public-portal .officer-card--staff-row {
    border-top: none;
    border-left: 2px solid var(--pe-ink);
    border-radius: 0;
}
.public-portal .officer-card__committee-tag { border-radius: 0; }
.public-portal .officers-empty-icon,
.public-portal .oc-no-results-icon { border-radius: 0; }

/* Officers hero — drop the gradient for a flat brand band */
.public-portal .officers-hero { background: color-mix(in srgb, var(--bs-primary) 82%, black); }

/* --- Officers: org-chart cards --- */
.public-portal .orgchart-wrap,
.public-portal .oc-stats,
.public-portal .oc-card { border-radius: 0; }
.public-portal .oc-card:hover {
    box-shadow: none;
    transform: none;
    border-color: var(--pe-ink);
}

/* --- News / Post: custom grid + cards --- */
.public-portal .content-card,
.public-portal .pinned-card {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: 1px solid var(--pe-hairline-soft) !important;
}
.public-portal .content-card-img,
.public-portal .pinned-card-img,
.public-portal .img-placeholder {
    border-radius: 0 !important;
    background-color: var(--pe-cloud) !important;
}
.public-portal .hover-lift:hover {
    transform: none !important;
    box-shadow: none !important;
}
.public-portal a.content-card:hover,
.public-portal a.pinned-card:hover { border-color: var(--pe-ink) !important; }
.public-portal .gallery-item,
.public-portal .gallery-grid img { border-radius: 0 !important; }

/* --- Search: result + browse cards (site.css) --- */
.public-portal .result-card,
.public-portal .browse-card,
.public-portal .browse-shortcut {
    border-radius: 0 !important;
    box-shadow: none !important;
}
.public-portal .result-card:hover,
.public-portal .browse-card:hover,
.public-portal .browse-shortcut:hover {
    box-shadow: none !important;
    transform: none !important;
    border-color: var(--pe-ink) !important;
}
.public-portal .result-badge { border-radius: 0 !important; }
.public-portal .search-bar-wrapper { border-radius: 9999px !important; }

/* ==========================================================================
   PHASE 4 — Detail pages. The .card-based detail pages (Ordinance/Resolution/
   RepublicAct/Officer/E-Library/Committee details) are already flat from Phase
   2. Only News/Post detail carries bespoke chrome (site.css) — align it here.
   (The "document-as-hero" typographic treatment on legislation details is a
   per-view markup enhancement tracked as polish; the pages are already flat.)
   ========================================================================== */

/* Post detail hero — was a hardcoded blue gradient (didn't retint). Flatten to
   a brand-aware solid band so it goes editorial AND follows the per-LGU brand. */
.public-portal .post-detail-hero {
    background: color-mix(in srgb, var(--bs-primary) 82%, black) !important;
}
.public-portal .post-detail-hero-image {
    border-radius: 0 !important;
    box-shadow: none !important;
    background-color: var(--pe-cloud);
}

/* Post detail sidebar/info panel + back button + any prose media */
.public-portal .info-panel {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: 1px solid var(--pe-hairline-soft) !important;
}
.public-portal .btn-back { border-radius: 9999px !important; }
.public-portal .prose img { border-radius: 0; }

/* Square the Bootstrap rounded-BOX utilities site-wide on public — catches the
   `.rounded`/`rounded-3` panels Phase 2's `.card` rule didn't reach (e.g.
   `.ordinance-content.rounded`, `bg-light rounded-3` metadata/controls boxes,
   icon-tint tiles). Pills (`rounded-pill`) and circles (`rounded-circle`) use
   different classes and are intentionally preserved. */
.public-portal .rounded,
.public-portal .rounded-1,
.public-portal .rounded-2,
.public-portal .rounded-3,
.public-portal .rounded-4,
.public-portal .rounded-5 { border-radius: 0 !important; }

/* ==========================================================================
   PHASE 5 — Forms + secondary pages. FOI / Search / Help / dashboards / auth /
   About-Contact-Privacy inherit flat cards (Phase 2) + squared boxes (Phase 4).
   Here we square the FORM CONTROLS to match the flat language (Nike leaves form
   fields undocumented; we align them to the system). The theme.css focus ring is
   kept; the hero + Search page search pills stay pills (different markup).
   ========================================================================== */
.public-portal .form-control,
.public-portal .form-select,
.public-portal .input-group-text,
.public-portal .input-group > .form-control,
.public-portal .input-group > .form-select {
    border-radius: 0 !important;
}

/* Select2 controls to match squared inputs */
.public-portal .select2-container--default .select2-selection--single,
.public-portal .select2-container--default .select2-selection--multiple {
    border-radius: 0 !important;
}

/* One-time-passcode inputs (CitizenAccount verify) */
.public-portal .otp-input { border-radius: 0 !important; }

/* ==========================================================================
   PHASE 7 — Full editorial rewrite refinements (page-specific)
   ========================================================================== */

/* Officers index — the grid/org view tabs were relocated from the old dark
   `officers-hero` band onto the light editorial header; restyle for light bg
   (officers.css styled them white-on-band). JS hooks (#tabGrid/#tabOrg) intact. */
.public-portal .officers-view-tabs { border-top: 1px solid var(--pe-hairline-soft); margin-top: 1rem; }
.public-portal .officers-view-tab { color: var(--pe-mute); }
.public-portal .officers-view-tab:hover { color: var(--pe-ink); }
.public-portal .officers-view-tab.active { color: var(--pe-ink); border-bottom-color: var(--pe-ink); }

/* News / Post detail — convert the brand-band hero to the light editorial look
   (Phase 4 flattened it to a brand band; now align it with the light headers used
   on every other page). CSS-only — markup, JS, SEO, and structure preserved. */
.public-portal .post-detail-hero {
    background: transparent !important;
    padding-top: 2.5rem;
    padding-bottom: 0;
    margin-bottom: 2rem;
}
.public-portal .post-detail-hero-title { color: var(--pe-ink); }
.public-portal .post-detail-hero-summary { color: var(--pe-mute); }
.public-portal .post-detail-hero-meta-item,
.public-portal .post-detail-hero-meta-item i { color: var(--pe-mute); }
.public-portal .post-detail-hero-meta-divider { background: var(--pe-hairline); }
.public-portal .post-detail-hero .breadcrumb-item a { color: var(--pe-mute); }
.public-portal .post-detail-hero .breadcrumb-item.active,
.public-portal .post-detail-hero .breadcrumb-item + .breadcrumb-item::before { color: var(--pe-stone); }

/* Detail-page record titles — a notch smaller than the section/listing headline
   tier so long legislative titles (often all-caps sentences) don't form a 2rem
   wall. Short titles (officers, committees, e-library docs) keep full size. */
.public-portal .pe-headline--doc { font-size: clamp(1.375rem, 1.05rem + 1vw, 1.625rem); }


/* ==========================================================================
   PHASE 8 — News & Events index (Post/Index.cshtml)
   Append to the bottom of public-editorial.css.
   All rules scoped under .public-portal.
   ========================================================================== */

/* ── FILTER TABS ────────────────────────────────────────────── */

.public-portal .filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    align-items: center;
}

.public-portal .filter-tab {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .9rem;
    border: 1.5px solid var(--pe-hairline);
    border-radius: 0;
    font-size: .8125rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--pe-mute);
    background: transparent;
    transition: border-color .15s, color .15s, background .15s;
    white-space: nowrap;
    line-height: 1.4;
}

    .public-portal .filter-tab:hover {
        border-color: var(--pe-ink);
        color: var(--pe-ink);
        background: var(--bs-primary-bg-subtle);
        text-decoration: none;
    }

    .public-portal .filter-tab.active {
        background: var(--bs-primary);
        color: #fff;
        border-color: var(--bs-primary);
    }

/* ── SEARCH BAR ─────────────────────────────────────────────── */

.public-portal .search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.public-portal .search-bar-icon {
    position: absolute;
    left: .875rem;
    color: var(--pe-stone);
    font-size: .8125rem;
    pointer-events: none;
}

.public-portal .search-bar-input {
    width: 100%;
    padding: .5rem 2.5rem .5rem 2.25rem;
    border: 1.5px solid var(--pe-hairline);
    border-radius: 0;
    font-size: .875rem;
    background: var(--pe-canvas);
    color: var(--pe-ink);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

    .public-portal .search-bar-input:focus {
        border-color: var(--pe-ink);
        box-shadow: 0 0 0 4px var(--pe-cloud);
    }

    .public-portal .search-bar-input::placeholder {
        color: var(--pe-stone);
    }

.public-portal .search-bar-clear {
    position: absolute;
    right: .625rem;
    background: none;
    border: none;
    color: var(--pe-stone);
    cursor: pointer;
    padding: .25rem;
    line-height: 1;
    font-size: .75rem;
}

    .public-portal .search-bar-clear:hover {
        color: var(--pe-ink);
    }

.public-portal .custom-select {
    font-size: .875rem;
    border: 1.5px solid var(--pe-hairline);
    border-radius: 0;
    padding: .4rem .75rem;
    background: var(--pe-canvas);
    color: var(--pe-ink);
    cursor: pointer;
    outline: none;
}

    .public-portal .custom-select:focus {
        border-color: var(--pe-ink);
        box-shadow: 0 0 0 3px var(--pe-cloud);
    }

.public-portal .btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .45rem .85rem;
    border: 1.5px solid var(--pe-hairline);
    border-radius: 0;
    font-size: .875rem;
    font-weight: 600;
    background: var(--pe-canvas);
    color: var(--pe-mute);
    cursor: pointer;
    transition: border-color .15s, color .15s;
    line-height: 1;
    white-space: nowrap;
}

    .public-portal .btn-action:hover {
        border-color: var(--pe-ink);
        color: var(--pe-ink);
    }

/* ── GRIDS ──────────────────────────────────────────────────── */

.public-portal .grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.public-portal .grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 991.98px) {
    .public-portal .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .public-portal .grid-2,
    .public-portal .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ── CONTENT CARD ───────────────────────────────────────────── */

.public-portal a.content-card {
    display: flex;
    flex-direction: column;
    background: var(--pe-canvas);
    border: 1px solid var(--pe-hairline-soft);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    height: 100%;
    transition: border-color .15s;
}

    .public-portal a.content-card:hover {
        border-color: var(--pe-ink);
        text-decoration: none;
        color: inherit;
    }

.public-portal .content-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--pe-cloud);
    flex-shrink: 0;
}

    .public-portal .content-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.public-portal .content-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1rem 1.125rem;
    gap: .375rem;
}

.public-portal .content-card-title {
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--pe-ink);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.public-portal .content-card-excerpt {
    font-size: .8125rem;
    color: var(--pe-mute);
    line-height: 1.5;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.public-portal .content-card-footer {
    display: flex;
    align-items: center;
    padding: .625rem 1.125rem;
    border-top: 1px solid var(--pe-hairline-soft);
    gap: .5rem;
}

/* ── PINNED CARD ────────────────────────────────────────────── */

.public-portal a.pinned-card {
    display: flex;
    flex-direction: column;
    background: var(--pe-canvas);
    border: 1px solid var(--pe-hairline-soft);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    height: 100%;
    transition: border-color .15s;
}

    .public-portal a.pinned-card:hover {
        border-color: var(--pe-ink);
        text-decoration: none;
        color: inherit;
    }

.public-portal .pinned-card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    background: var(--pe-cloud);
    flex-shrink: 0;
}

    .public-portal .pinned-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.public-portal .pinned-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.125rem 1.25rem;
    gap: .5rem;
}

.public-portal .pinned-card-title {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--pe-ink);
    margin: 0;
    letter-spacing: -.015em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.public-portal .pinned-card-summary {
    font-size: .875rem;
    color: var(--pe-mute);
    line-height: 1.5;
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── SHARED IMAGE UTILITIES ─────────────────────────────────── */

.public-portal .img-overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.42) 0%, rgba(0,0,0,.12) 45%, transparent 100%);
    pointer-events: none;
}

.public-portal .img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    color: var(--pe-stone);
    background: var(--pe-cloud);
}

.public-portal .img-placeholder--news {
    background: #e8f0fd;
    color: #4a80e8;
}

.public-portal .img-placeholder--announcement {
    background: #fff3cd;
    color: #c9a000;
}

.public-portal .img-placeholder--event {
    background: #d1f5e0;
    color: #2d9e5f;
}

[data-bs-theme="dark"] .public-portal .img-placeholder--news {
    background: rgba(74,128,232,.15);
    color: #7aabff;
}

[data-bs-theme="dark"] .public-portal .img-placeholder--announcement {
    background: rgba(201,160,0,.15);
    color: #ffd84d;
}

[data-bs-theme="dark"] .public-portal .img-placeholder--event {
    background: rgba(45,158,95,.15);
    color: #4fd98c;
}

/* ── HOVER-LIFT base — transition only, no transform/shadow ─── */
/* Phase 3 already cancels transform+shadow on .hover-lift:hover  */

.public-portal .hover-lift {
    transition: border-color .18s ease;
}

/* ── META ROW ───────────────────────────────────────────────── */

.public-portal .meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem .6rem;
    font-size: .6875rem;
    color: var(--pe-stone);
}

    .public-portal .meta-row span {
        display: inline-flex;
        align-items: center;
    }

.public-portal .dot-separator {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* ── ARROW CIRCLE ───────────────────────────────────────────── */

.public-portal .arrow-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--pe-hairline);
    border-radius: 50%;
    color: var(--pe-mute);
    flex-shrink: 0;
    transition: border-color .15s, color .15s, background .15s;
}

.public-portal a.content-card:hover .arrow-circle,
.public-portal a.pinned-card:hover .arrow-circle {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}

/* ── EYEBROW TEXT (pinned section label) ────────────────────── */

.public-portal .eyebrow-text {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--pe-mute);
    margin: 0;
}

/* ── EMPTY STATE ────────────────────────────────────────────── */

.public-portal .empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
}

.public-portal .empty-state-icon {
    width: 68px;
    height: 68px;
    background: var(--pe-cloud);
    border: 1px solid var(--pe-hairline-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: var(--pe-stone);
}

.public-portal .empty-state-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--pe-ink);
    margin: 0 0 .375rem;
}

.public-portal .empty-state-text {
    font-size: .875rem;
    color: var(--pe-mute);
    margin: 0;
}

/* ── DataTable wrapper — hide default chrome ─────────────────── */

.public-portal #postsTable,
.public-portal #postsTable thead,
.public-portal #postsTable_wrapper .dataTables_length,
.public-portal #postsTable_wrapper .dataTables_filter,
.public-portal #postsTable_wrapper .dataTables_info {
    display: none;
}

.public-portal #postsTable_wrapper .dataTables_paginate {
    display: block;
    margin-top: 1.5rem;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */

@media (max-width: 575.98px) {
    .public-portal .filter-tab {
        padding: .25rem .65rem;
        font-size: .75rem;
    }

    .public-portal .content-card-title {
        font-size: .875rem;
    }

    .public-portal .pinned-card-title {
        font-size: .9375rem;
    }

    .public-portal .pinned-card-img {
        aspect-ratio: 16 / 8;
    }
}

/* ==========================================================================
   PHASE 9 — Post/Detail + remaining public portal UI
   Append to: wwwroot/css/public-editorial.css  (after Phase 8)
   All rules scoped under .public-portal.
   ========================================================================== */

/* ── POST DETAIL HERO ───────────────────────────────────────── */
/*
   Phase 7 already sets:
     background: transparent, padding-top: 2.5rem, margin-bottom: 2rem,
     title/summary/meta-item/meta-divider colors, breadcrumb colors.
   Here we add the missing LAYOUT and GEOMETRY.
*/

/* 2-col hero grid: text left, image right */
.public-portal .post-detail-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.public-portal .post-detail-hero-text {
    display: flex;
    flex-direction: column;
}

.public-portal .post-detail-hero-title {
    font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.25rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.03em;
    margin: 0 0 .75rem;
    /* color set by Phase 7 */
}

.public-portal .post-detail-hero-summary {
    font-size: 1.0625rem;
    line-height: 1.6;
    margin: 0 0 1.25rem;
    /* color set by Phase 7 */
}

/* Meta row */
.public-portal .post-detail-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    font-size: .8125rem;
}

.public-portal .post-detail-hero-meta-item {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    /* color set by Phase 7 */
}

.public-portal .post-detail-hero-meta-divider {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    flex-shrink: 0;
    /* background set by Phase 7 */
}

/* Right image column */
.public-portal .post-detail-hero-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--pe-cloud);
    /* border-radius: 0 set by Phase 4 */
}

    .public-portal .post-detail-hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.public-portal .post-detail-hero-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--pe-stone);
    background: var(--pe-cloud);
}

@media (max-width: 991.98px) {
    .public-portal .post-detail-hero-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    /* Image goes above text on mobile/tablet */
    .public-portal .post-detail-hero-image {
        order: -1;
        aspect-ratio: 16 / 7;
    }
}

/* ── CONTENT + SIDEBAR LAYOUT ───────────────────────────────── */

.public-portal .content-sidebar-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    align-items: start;
}

.public-portal .sticky-sidebar {
    position: sticky;
    top: 5rem; /* clears the sticky navbar */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (max-width: 991.98px) {
    .public-portal .content-sidebar-layout {
        grid-template-columns: 1fr;
    }

    .public-portal .sticky-sidebar {
        position: static;
    }
    /* Sidebar renders after <main> in markup; visually move it below */
    .public-portal .content-sidebar-layout aside {
        order: 1;
    }
}

/* ── INFO PANEL (sidebar card) ──────────────────────────────── */
/*
   Phase 4 already sets: border-radius:0, box-shadow:none, border hairline.
   Here we add the inner layout.
*/

.public-portal .info-panel-header {
    padding: .75rem 1rem;
    font-size: .6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--pe-mute);
    border-bottom: 1px solid var(--pe-hairline-soft);
}

.public-portal .info-panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .625rem 1rem;
    border-bottom: 1px solid var(--pe-hairline-soft);
    font-size: .8125rem;
}

    .public-portal .info-panel-row:last-child {
        border-bottom: none;
    }

.public-portal .info-panel-label {
    color: var(--pe-mute);
    font-size: .75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.public-portal .info-panel-value {
    color: var(--pe-ink);
    font-weight: 600;
    text-align: right;
}

/* ── BACK BUTTON ────────────────────────────────────────────── */
/*
   Phase 4 sets border-radius: 9999px.
   We define the base display/padding/color here.
*/

.public-portal .btn-back {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1.125rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--pe-ink);
    border: 1.5px solid var(--pe-hairline);
    background: var(--pe-canvas);
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
    /* border-radius: 9999px set by Phase 4 */
}

    .public-portal .btn-back:hover {
        border-color: var(--pe-ink);
        background: var(--pe-cloud);
        color: var(--pe-ink);
        text-decoration: none;
    }

/* ── EVENT CARD ─────────────────────────────────────────────── */

.public-portal .event-card {
    display: flex;
    overflow: hidden;
    border: 1px solid var(--pe-hairline-soft);
    margin-bottom: 1.75rem;
}

.public-portal .event-card-accent {
    width: 4px;
    flex-shrink: 0;
    background: var(--bs-primary);
}

.public-portal .event-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
}

.public-portal .event-item {
    display: flex;
    align-items: flex-start;
    gap: .875rem;
    font-size: .9375rem;
    color: var(--pe-ink);
}

.public-portal .event-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pe-cloud);
    color: var(--bs-primary);
    font-size: .875rem;
    flex-shrink: 0;
}

/* ── PROSE (article body) ───────────────────────────────────── */

.public-portal .prose {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--pe-ink);
    max-width: 72ch;
}

    .public-portal .prose h2 {
        font-size: 1.375rem;
        font-weight: 800;
        letter-spacing: -.02em;
        margin: 2rem 0 .75rem;
        color: var(--pe-ink);
    }

    .public-portal .prose h3 {
        font-size: 1.125rem;
        font-weight: 700;
        margin: 1.5rem 0 .5rem;
        color: var(--pe-ink);
    }

    .public-portal .prose p {
        margin: 0 0 1rem;
    }

    .public-portal .prose ul,
    .public-portal .prose ol {
        padding-left: 1.5rem;
        margin: 0 0 1rem;
    }

    .public-portal .prose li {
        margin-bottom: .375rem;
    }

    .public-portal .prose a {
        color: var(--bs-primary);
        text-underline-offset: 3px;
    }

    .public-portal .prose blockquote {
        border-left: 3px solid var(--pe-ink);
        margin: 1.5rem 0;
        padding: .75rem 1.25rem;
        color: var(--pe-mute);
        font-style: italic;
    }

    .public-portal .prose img {
        max-width: 100%;
        display: block;
        margin: 1.5rem 0;
        /* border-radius: 0 set by Phase 4 */
    }

    .public-portal .prose table {
        width: 100%;
        border-collapse: collapse;
        margin: 1.5rem 0;
        font-size: .9375rem;
    }

    .public-portal .prose th,
    .public-portal .prose td {
        padding: .625rem .875rem;
        border: 1px solid var(--pe-hairline-soft);
        text-align: left;
    }

    .public-portal .prose th {
        font-weight: 700;
        background: var(--pe-cloud);
        color: var(--pe-ink);
    }

/* ── GALLERY ────────────────────────────────────────────────── */

.public-portal .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .5rem;
}

.public-portal .gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    display: block;
    background: var(--pe-cloud);
    /* border-radius: 0 set by Phase 3 */
}

    .public-portal .gallery-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .3s ease;
    }

    .public-portal .gallery-item:hover img {
        transform: scale(1.04);
    }

.public-portal .gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
    opacity: 0;
    transition: opacity .2s ease;
}

.public-portal .gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.public-portal .gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: .375rem .625rem;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: .6875rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── ANIMATE FADE UP (used on related post cards) ───────────── */

.public-portal .animate-fade-up {
    animation: peCardFadeUp .45s cubic-bezier(.22,.61,.36,1) both;
}

@keyframes peCardFadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .public-portal .animate-fade-up {
        animation: none;
    }
}

/* ==========================================================================
 This rule uses a higher- specificity selector to guarantee transparent wins everywhere.
   ========================================================================== */

/* Force hero background fully transparent — belt + suspenders */
.public-portal .post-detail-hero,
.public-portal main .post-detail-hero,
body.public-portal .post-detail-hero {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
}

/* The outermost bare <div> wrapper in Post/Detail.cshtml (no class) can
   inherit a stacking context color from the primary brand. Clear it. */
.public-portal main > div:not([class]) {
    background: transparent;
}

/* Ensure the hero padding area doesn't show through any parent background.
   The gap between navbar and hero content should be the page body color. */
.public-portal .post-detail-hero {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--pe-hairline-soft);
    margin-bottom: 0;
}

/* ==========================================================================
   Prevents nav items from wrapping to a second line on desktop.
   ========================================================================== */

.public-portal .navbar .navbar-nav .nav-link {
    padding-left: .4rem;
    padding-right: .4rem;
    font-size: .8rem;
    white-space: nowrap;
}

.public-portal .navbar .nav-link .nav-label {
    font-size: .8rem;
}

.public-portal .navbar .nav-link i + .nav-label {
    margin-left: .175rem !important;
}

/* Brand: fixed width, no shrink */
.public-portal .navbar .navbar-brand {
    margin-right: .75rem;
    flex-shrink: 0;
    min-width: 0;
}

    /* Brand text: allow it to truncate before collapsing nav */
    .public-portal .navbar .navbar-brand .site-title-dynamic {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 140px;
    }

/* Collapse row: no wrap, items can shrink */
.public-portal .navbar .navbar-collapse {
    flex-wrap: nowrap;
    min-width: 0;
}

.public-portal .navbar .navbar-nav {
    flex-wrap: nowrap;
    align-items: center;
    min-width: 0;
}

    /* Left nav: can shrink if needed */
    .public-portal .navbar .navbar-nav.me-auto {
        flex-shrink: 1;
        min-width: 0;
    }

    /* Right nav: no shrink — user dropdown must always be fully visible */
    .public-portal .navbar .navbar-nav.ms-auto {
        flex-shrink: 0;
        margin-left: auto !important;
    }

        /* Username in dropdown toggle: cap width, ellipsis if long */
        .public-portal .navbar .navbar-nav.ms-auto .nav-link {
            max-width: 160px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            display: inline-flex;
            align-items: center;
            gap: .25rem;
        }

/* ── Responsive tiers ───────────────────────────────────────── */

/* 992–1199px (lg only) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .public-portal .navbar .navbar-nav .nav-link {
        padding-left: .3rem;
        padding-right: .3rem;
        font-size: .775rem;
    }

    .public-portal .navbar .nav-link .nav-label {
        font-size: .775rem;
    }

    .public-portal .navbar .navbar-brand {
        margin-right: .5rem;
    }

        .public-portal .navbar .navbar-brand .site-title-dynamic {
            max-width: 110px;
        }

    .public-portal .navbar .navbar-nav.ms-auto .nav-link {
        max-width: 120px;
    }
}

/* 1200–1399px (xl) — minor tighten */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .public-portal .navbar .navbar-nav .nav-link {
        padding-left: .45rem;
        padding-right: .45rem;
    }
}

/* ==========================================================================
   PHASE 10 — Global Search (Search/Index.cshtml)
   These class names had no CSS anywhere, so they were rendering as bare
   default-styled anchors/inputs (hence the all-red look — default link
   color resolves to the brand primary, which is red for this LGU).
   ========================================================================== */

/* ── Filter pills ───────────────────────────────────────────── */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .9rem;
    border: 1.5px solid var(--pe-hairline, #cacacb);
    border-radius: 9999px;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--pe-mute, #707072);
    background: var(--pe-canvas, #fff);
    text-decoration: none;
    transition: border-color .15s, color .15s, background .15s;
    white-space: nowrap;
}

    .filter-pill:hover {
        border-color: var(--pe-ink, #111113);
        color: var(--pe-ink, #111113);
        text-decoration: none;
    }

    .filter-pill .pill-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 1.25rem;
        height: 1.25rem;
        padding: 0 .35rem;
        border-radius: 9999px;
        background: var(--pe-cloud, #f5f5f5);
        color: inherit;
        font-size: .6875rem;
        font-weight: 700;
    }

    .filter-pill.active,
    .filter-pill.active-ordinances,
    .filter-pill.active-resolutions,
    .filter-pill.active-documents,
    .filter-pill.active-laws {
        background: var(--bs-primary);
        border-color: var(--bs-primary);
        color: #fff;
    }

        .filter-pill.active .pill-count,
        .filter-pill.active-ordinances .pill-count,
        .filter-pill.active-resolutions .pill-count,
        .filter-pill.active-documents .pill-count,
        .filter-pill.active-laws .pill-count {
            background: rgba(255, 255, 255, .25);
            color: #fff;
        }

/* ── Search input icon + clear button ──────────────────────── */
.search-bar-wrapper .search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pe-stone, #9e9ea0);
    font-size: .875rem;
    pointer-events: none;
}

.search-bar-wrapper input#searchInput {
    width: 100%;
    height: 100%;
    border: 1.5px solid var(--pe-hairline, #cacacb);
    border-radius: 9999px;
    background: var(--pe-canvas, #fff);
    color: var(--pe-ink, #111113);
    padding: .65rem 2.5rem .65rem 2.75rem;
    font-size: 1rem;
    outline: none;
}

    .search-bar-wrapper input#searchInput:focus {
        border-color: var(--pe-ink, #111113);
        box-shadow: 0 0 0 4px var(--pe-cloud, #f5f5f5);
    }

.search-bar-wrapper .clear-btn {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--pe-stone, #9e9ea0);
    cursor: pointer;
    padding: .25rem;
    font-size: .8125rem;
}

    .search-bar-wrapper .clear-btn:hover {
        color: var(--pe-ink, #111113);
    }

/* ── Result badge color variants ───────────────────────────── */
.result-badge {
    display: inline-flex;
    align-items: center;
    padding: .15rem .5rem;
    border-radius: 4px;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

    .result-badge.ordinance {
        background: #dbeafe;
        color: #1d4ed8;
    }

    .result-badge.resolution {
        background: #dcfce7;
        color: #166534;
    }

    .result-badge.document {
        background: #e0f2fe;
        color: #0369a1;
    }

    .result-badge.law {
        background: #fef9c3;
        color: #854d0e;
    }

/* ── "No results" browse shortcuts (2-col) ─────────────────── */
.browse-shortcut {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.1rem;
    border: 1.5px solid var(--pe-hairline-soft, #e5e5e5);
    background: var(--pe-canvas, #fff);
    text-decoration: none;
    color: var(--pe-ink, #111113);
    font-weight: 600;
    font-size: .875rem;
    transition: border-color .15s, background .15s;
}

    .browse-shortcut i {
        font-size: 1.125rem;
        flex-shrink: 0;
    }

    .browse-shortcut:hover {
        border-color: var(--pe-ink, #111113);
        text-decoration: none;
        color: var(--pe-ink, #111113);
    }

    .browse-shortcut.blue i {
        color: #1d4ed8;
    }

    .browse-shortcut.green i {
        color: #166534;
    }

    .browse-shortcut.cyan i {
        color: #0369a1;
    }

    .browse-shortcut.amber i {
        color: #b45309;
    }

/* ── Empty/initial-state browse cards ──────────────────────── */
.browse-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
    padding: 1.5rem;
    border: 1.5px solid var(--pe-hairline-soft, #e5e5e5);
    background: var(--pe-canvas, #fff);
    text-align: left;
    transition: border-color .15s;
}

    .browse-card i {
        font-size: 1.5rem;
        margin-bottom: .75rem;
    }

    .browse-card:hover {
        border-color: var(--pe-ink, #111113);
    }

/* ==========================================================================
   PHASE 11 — Footer polish, global focus ring, mobile tightening
   ========================================================================== */

/* Replace browser's OS-accent-colored default outline with a consistent,
   brand-aware ring everywhere on the public portal. */
.public-portal *:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

.public-portal .btn:focus-visible,
.public-portal .nav-link:focus-visible,
.public-portal a:focus-visible {
    outline-offset: 3px;
}

/* Footer — quieter section divider, tighter link rhythm */
.public-portal .footer-main {
    background: #15171c;
}

.public-portal .footer-heading {
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    margin-bottom: 1rem;
}

.public-portal .footer-links li {
    margin-bottom: .55rem;
}

.public-portal .footer-links a {
    color: rgba(255,255,255,.75);
    font-size: .875rem;
    text-decoration: none;
}

    .public-portal .footer-links a:hover {
        color: #fff;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

.public-portal .footer-description {
    color: rgba(255,255,255,.6);
    font-size: .875rem;
    line-height: 1.6;
}

.public-portal .footer-bottom {
    background: #0e0f12;
    border-top: 1px solid rgba(255,255,255,.08);
}

.public-portal .footer-bottom-text {
    color: rgba(255,255,255,.55);
}

.public-portal .footer-powered-link {
    color: rgba(255,255,255,.85);
}

.public-portal .footer-social-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.08);
    color: #fff;
}

    .public-portal .footer-social-icon:hover {
        background: var(--bs-primary);
    }

/* Footer brand block — title/tagline were inheriting dark body text color,
   making them nearly invisible against the dark footer background. */
.public-portal .footer-brand-title {
    color: #fff;
}

.public-portal .footer-brand-tagline {
    color: rgba(255,255,255,.55);
    font-size: .8125rem;
}

/* Footer contact column — address/plain text was using default dark color;
   only the linked phone/email were visible (since links use --bs-primary). */
.public-portal .footer-body p,
.public-portal .footer-body address {
    color: rgba(255,255,255,.7);
}

.public-portal .footer-body i {
    color: rgba(255,255,255,.5);
}

/* Footer Contact Us — match Quick Links / Information column sizing */
.public-portal .footer-body address,
.public-portal .footer-body address p,
.public-portal .footer-body p {
    font-size: .875rem;
    line-height: 1.7;
}

    .public-portal .footer-body address a,
    .public-portal .footer-body p a {
        font-size: .875rem;
    }

/* Mobile tightening */
@media (max-width: 575.98px) {
    .public-portal .pe-display {
        font-size: clamp(1.875rem, 1rem + 6vw, 2.5rem);
    }

    .public-portal .pe-section {
        padding-block: 1.75rem;
    }

    .public-portal .footer-body {
        text-align: center;
    }

    .public-portal .content-sidebar-layout {
        gap: 1rem;
    }
}

/* ==========================================================================
   PHASE 12 — Footer Contact Us address line (light mode invisibility)
   Targets only the line containing the location-pin icon, since that's the
   one line still resolving to a dark/invisible color in light mode.
   ========================================================================== */
.public-portal footer .fa-location-dot,
.public-portal footer .fa-map-marker-alt {
    color: rgba(255, 255, 255, .6) !important;
}

    .public-portal footer .fa-location-dot ~ *,
    .public-portal footer p:has(.fa-location-dot),
    .public-portal footer p:has(.fa-map-marker-alt) {
        color: rgba(255, 255, 255, .8) !important;
    }

/* ==========================================================================
   PHASE 13 — News & Events toolbar refinement
   ========================================================================== */

/* Toolbar wrapper: filter tabs row + search row, breathing room between */
.public-portal .filter-tabs {
    margin-bottom: 1.25rem;
}

/* Search row: align search bar, sort select, and button on one baseline */
.public-portal .search-bar {
    height: 44px;
}

.public-portal .custom-select {
    height: 44px;
    min-width: 150px;
}

.public-portal .btn-action {
    height: 44px;
    width: 44px;
    padding: 0;
    border-radius: 9999px;
}

/* Search bar — match the pill search used on the home hero */
.public-portal .search-bar-input {
    border-radius: 9999px;
}

.public-portal .search-bar-clear {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pinned badge inside the "Pinned" filter tab */
.public-portal .filter-tab .badge {
    transform: translateY(-1px);
}

/* Responsive: stack search row on small screens, full-width search input */
@media (max-width: 575.98px) {
    .public-portal .filter-tabs {
        gap: .4rem;
    }

    .public-portal .filter-tab {
        flex: 1 1 calc(50% - .4rem);
        justify-content: center;
        text-align: center;
    }

    .public-portal .search-bar,
    .public-portal .custom-select,
    .public-portal .btn-action {
        height: 42px;
    }

    .public-portal .d-flex.gap-2.flex-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .public-portal .custom-select {
        width: 100%;
        min-width: 0;
    }

    .public-portal .btn-action {
        width: 100%;
        border-radius: 9999px;
    }
}

/* ==========================================================================
   PHASE 14 — Comprehensive mobile responsive overhaul
   Covers navbar/offcanvas, hero, search, cards/grids, stats, footer, and
   forms at the 767px and 575px breakpoints. Builds on Phase 11/13's partial
   mobile work without duplicating it.
   ========================================================================== */

@media (max-width: 767.98px) {

    /* ── Hero ─────────────────────────────────────────────── */
    .public-portal .pe-stage {
        padding: 1.25rem;
    }

    .public-portal .pe-search {
        flex-wrap: wrap;
        padding: 0.5rem;
    }

        .public-portal .pe-search input {
            flex-basis: 100%;
            order: 1;
            padding: .5rem 0;
        }

        .public-portal .pe-search .btn {
            order: 2;
            width: 100%;
        }

    /* ── Quick Services grid — 2 cols on phones instead of cramped 4 ── */
    .public-portal .row.g-3 > .col-6.col-md-3 .pe-card {
        padding: 1.25rem .75rem !important;
    }

        .public-portal .row.g-3 > .col-6.col-md-3 .pe-card i {
            font-size: 1.375rem !important;
        }

        .public-portal .row.g-3 > .col-6.col-md-3 .pe-card .pe-card__name {
            font-size: .8125rem;
        }

    /* ── Stat blocks — stack with reduced top-margin ─────────── */
    .public-portal .pe-stat__value {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    /* ── Officials / Officers grid tighter gutters ───────────── */
    .public-portal .row.g-4 {
        --bs-gutter-x: 1rem;
    }

    /* ── Tabs (legislation home tabs) wrap & scroll ──────────── */
    .public-portal .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

        .public-portal .nav-tabs::-webkit-scrollbar {
            display: none;
        }

        .public-portal .nav-tabs .nav-link {
            white-space: nowrap;
        }

    /* ── Offcanvas mobile nav: tighten padding, fit small screens ── */
    .public-portal .offcanvas-body .mobile-nav-link {
        padding-top: .65rem !important;
        padding-bottom: .65rem !important;
    }

    /* ── Forms / sidebars on listing pages stack with spacing ── */
    .public-portal .row.g-4 > .col-12.col-lg-3,
    .public-portal .row.g-4 > .col-12.col-lg-9 {
        margin-bottom: 1rem;
    }

    /* ── Pagination — smaller tap targets that still meet 36px+ ── */
    .public-portal .pagination .page-link {
        padding: .4rem .65rem;
        font-size: .8125rem;
    }

    /* ── Detail page info-panel/back-button row spacing ──────── */
    .public-portal .info-panel-row {
        flex-wrap: wrap;
    }

        .public-portal .info-panel-row .info-panel-value {
            text-align: left;
            width: 100%;
        }
}

@media (max-width: 575.98px) {

    /* ── Quick Services — full width single column on very small phones ── */
    .public-portal .row.g-3 > .col-6.col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* ── Officer / org-chart cards already handled in officers.css;
       just tighten section padding here ── */
    .public-portal .pe-section {
        padding-left: .25rem;
        padding-right: .25rem;
    }

    /* ── Breadcrumb wraps cleanly, smaller font ──────────────── */
    .public-portal .breadcrumb {
        font-size: .75rem;
        flex-wrap: wrap;
    }

    /* ── Buttons in flex rows go full width to avoid cramped pairs ── */
    .public-portal .d-flex.flex-wrap.justify-content-center.gap-2 > .btn {
        flex: 1 1 100%;
    }

    /* ── Modal — full-bleed on phones for readability ────────── */
    .public-portal .modal-dialog {
        margin: .5rem;
    }

    /* ── Table-heavy pages (meeting calendar, etc.) scroll horizontally
       instead of squeezing columns illegibly ── */
    .public-portal .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    /* ── Back-to-top button doesn't overlap footer content ───── */
    #backToTop {
        bottom: 76px;
    }
}

/* ── Universal: prevent horizontal overflow from any fixed-width
   inline styles left over in older partials ─────────────────────── */
.public-portal {
    overflow-x: hidden;
}

    .public-portal img {
        max-width: 100%;
        height: auto;
    }

    /* ==========================================================================
   PHASE 15 — Search results: base card foundation (was missing entirely)
   Phase 3 only added hover/radius overrides assuming this base existed.
   Without it, <a class="result-card"> rendered as a bare underlined link —
   no box, no padding, badges collapsing into inline text.
   ========================================================================== */

    .public-portal a.result-card {
        display: block;
        padding: 1.1rem 1.25rem;
        background: var(--pe-canvas);
        border: 1.5px solid var(--pe-hairline-soft);
        text-decoration: none;
        color: inherit;
        transition: border-color .15s ease, background-color .15s ease;
    }

        .public-portal a.result-card:hover {
            text-decoration: none;
            color: inherit;
            background: var(--pe-cloud);
        }

        .public-portal a.result-card .result-card-title,
        .public-portal a.result-card > .fw-semibold.lh-base {
            color: var(--pe-ink);
            text-decoration: none;
            font-size: 1.0625rem;
        }

        .public-portal a.result-card:hover .fw-semibold.lh-base {
            color: var(--bs-primary);
        }

        .public-portal a.result-card p,
        .public-portal a.result-card .text-muted {
            color: var(--pe-mute) !important;
        }

        .public-portal a.result-card .small.fw-semibold {
            color: var(--pe-ink);
        }

    /* Badge — give it a real pill box even with no matched content-type class,
   and make sure it never inherits the surrounding link's underline/color. */
    .public-portal .result-badge {
        text-decoration: none;
        border: 1px solid transparent;
    }

        .public-portal .result-badge:not(.ordinance):not(.resolution):not(.document):not(.law) {
            background: var(--pe-cloud);
            color: var(--pe-mute);
            border-color: var(--pe-hairline);
        }

    /* Stack rhythm between result cards */
    .public-portal .d-flex.flex-column.gap-3 > a.result-card {
        margin: 0;
    }

@media (max-width: 575.98px) {
    .public-portal a.result-card {
        padding: 0.9rem 1rem;
    }
}

/* ==========================================================================
   PHASE 16 — Navbar breakpoint fix
   The full desktop nav (logo + 5 items + Help + user dropdown) doesn't fit
   between 992-1199px no matter how much it's shrunk — at 1024px the
   username and E-Library link were overlapping. Moving the collapse
   breakpoint from lg to xl (see _Layout.cshtml: d-lg-none/d-lg-flex →
   d-xl-none/d-xl-flex) means the hamburger menu now owns everything below
   1200px, where it has room to be readable. This replaces the old
   992-1199.98px squeeze tier with the real tightest range: 1200-1399px.
   ========================================================================== */

/* Retire the old lg-only squeeze tier — no longer reachable now that the
   navbar-collapse only renders at xl+, but kept as a no-op override in case
   any cached build still has d-lg-flex; harmless either way. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .public-portal .navbar .navbar-nav .nav-link {
        padding-left: .3rem;
        padding-right: .3rem;
        font-size: .775rem;
    }
}

/* The real tightest range now: 1200-1399px (xl, before xxl breathing room) */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .public-portal .navbar .navbar-nav .nav-link {
        padding-left: .35rem;
        padding-right: .35rem;
        font-size: .78rem;
    }

    .public-portal .navbar .nav-link .nav-label {
        font-size: .78rem;
    }

    .public-portal .navbar .navbar-brand {
        margin-right: .5rem;
    }

        .public-portal .navbar .navbar-brand .site-title-dynamic {
            max-width: 120px;
        }

    .public-portal .navbar .navbar-nav.ms-auto .nav-link {
        max-width: 130px;
    }

    .public-portal .navbar .navbar-nav.me-auto {
        gap: .1rem;
    }
}

/* 1400px+ gets the full default spacing already defined earlier in this file. */

/* ==========================================================================
   PHASE 17 — Icon-only navbar at the lg tier (992-1199.98px)
   At this width the full nav (logo + 5 items + Help + Sign In) can't fit
   with text labels without overlapping. Instead of falling back to the
   hamburger menu, hide the text labels and show icons only, with enough
   padding/gap to stay tappable and unambiguous.
   ========================================================================== */

@media (min-width: 992px) and (max-width: 1199.98px) {

    /* Hide every nav-label (top-level items + dropdown items use this too,
       but dropdown MENUS aren't affected — only the top-level bar). */
    .public-portal .navbar > .container > .navbar-collapse .nav-label {
        display: none !important;
    }

    /* Brand text can also go — the logo mark alone is enough at this size */
    .public-portal .navbar .navbar-brand .site-title-dynamic {
        display: none;
    }

    .public-portal .navbar .navbar-brand {
        margin-right: .5rem;
    }

    /* Icon-only nav-links: square tap targets, centered icon, no caret label gap */
    .public-portal .navbar .navbar-nav .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0 !important;
        margin: 0 .15rem;
        border-radius: 8px;
        font-size: 1rem;
    }

        .public-portal .navbar .navbar-nav .nav-link i:first-child {
            margin-right: 0 !important;
            font-size: 1.05rem;
        }

        .public-portal .navbar .navbar-nav .nav-link:hover {
            background: rgba(255, 255, 255, 0.14);
        }

    /* Dropdown caret — shrink and tuck closer instead of disappearing
       (keeps the "this opens a menu" affordance) */
    .public-portal .navbar .nav-link.dropdown-toggle::after {
        margin-left: .2rem;
        font-size: .65rem;
        vertical-align: 1px;
    }

    .public-portal .navbar .nav-link.dropdown-toggle.show::after,
    .public-portal .navbar .nav-link.dropdown-toggle:hover::after {
        opacity: .85;
    }

    /* Row gap tightened since icons need far less horizontal room */
    .public-portal .navbar .navbar-nav {
        gap: 0;
    }

        .public-portal .navbar .navbar-nav.me-auto {
            flex-shrink: 0; /* no longer needs to shrink — icons always fit */
        }

        /* User dropdown trigger (displayName / "Sign In" text) → icon only too */
        .public-portal .navbar .navbar-nav.ms-auto .nav-link {
            max-width: none;
        }

            .public-portal .navbar .navbar-nav.ms-auto .nav-link span:not(.nav-label) {
                display: none;
            }

            /* Keep the user/lock icon visible and centered even though the
           markup has icon + text together (e.g. <i class="fa-user"></i> Name) */
            .public-portal .navbar .navbar-nav.ms-auto .nav-link.dropdown-toggle {
                gap: 0;
            }

        /* Sign In specifically (anonymous users) — icon-only pill */
        .public-portal .navbar .navbar-nav.ms-auto li:last-child .nav-link:not(.dropdown-toggle) {
            width: 42px;
        }
}

/* ==========================================================================
   Transparency / Category page fixes
   Append to public-editorial.css (Phase 18+), all scoped under .public-portal
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Sidebar category list — .sidebar-menu had NO CSS anywhere, so it was
      rendering as a bare default bullet list (hence the underlined blue
      links with bullet points in the screenshot).
   -------------------------------------------------------------------------- */
.public-portal .sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .public-portal .sidebar-menu li {
        border-bottom: 1px solid var(--pe-hairline-soft);
    }

        .public-portal .sidebar-menu li:last-child {
            border-bottom: none;
        }

        .public-portal .sidebar-menu li.active .sidebar-link {
            background: var(--bs-primary-bg-subtle);
            color: var(--bs-primary);
            font-weight: 700;
            border-left: 3px solid var(--bs-primary);
        }

.public-portal .sidebar-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .65rem 1rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--pe-ink);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

    .public-portal .sidebar-link:hover {
        background: var(--pe-cloud);
        color: var(--pe-ink);
        text-decoration: none;
    }

    .public-portal .sidebar-link i {
        width: 16px;
        text-align: center;
        flex-shrink: 0;
        color: var(--pe-stone);
    }

.public-portal .sidebar-menu li.active .sidebar-link i {
    color: var(--bs-primary);
}

/* --------------------------------------------------------------------------
   2. Controls bar overflow fix — search-bar needs min-width:0 so it can
      actually shrink inside the flex row instead of forcing the row past
      the card edge (this is why "Filter"/"Reset" were getting clipped).
   -------------------------------------------------------------------------- */
.public-portal .card-body > .d-flex.gap-2.flex-wrap {
    row-gap: .65rem;
}

.public-portal .card-body .search-bar {
    min-width: 0;
    flex-basis: 220px;
}

.public-portal .card-body .custom-select {
    flex-shrink: 0;
}

.public-portal .card-body .btn-action {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 767.98px) {
    .public-portal .card-body > .d-flex.gap-2.flex-wrap {
        flex-direction: column;
        align-items: stretch;
    }

        .public-portal .card-body > .d-flex.gap-2.flex-wrap .search-bar,
        .public-portal .card-body > .d-flex.gap-2.flex-wrap .custom-select,
        .public-portal .card-body > .d-flex.gap-2.flex-wrap .btn-action {
            width: 100%;
            flex-basis: auto;
        }
}

/* --------------------------------------------------------------------------
   3. DataTable — give the results table / pagination / "no records" state
      the same editorial language as the rest of the page instead of raw
      default Bootstrap-DataTables chrome.
   -------------------------------------------------------------------------- */
.public-portal #docsTable_wrapper .dataTables_info,
.public-portal #docsTable_wrapper .dataTables_length,
.public-portal #docsTable_wrapper .dataTables_filter {
    font-size: .8125rem;
    color: var(--pe-mute);
}

.public-portal #docsTable_wrapper .dataTables_paginate .page-link {
    border-radius: 0;
    border-color: var(--pe-hairline-soft);
    color: var(--pe-ink);
}

.public-portal #docsTable_wrapper .dataTables_paginate .page-item.active .page-link {
    background: var(--bs-primary);
    border-color: var(--bs-primary);
    color: #fff;
}

.public-portal #docsTable_wrapper .dataTables_paginate .page-item.disabled .page-link {
    color: var(--pe-stone);
}

/* doc-row — link rows DataTables renders via the custom render() function */
.public-portal .doc-row {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--pe-hairline-soft);
    text-decoration: none;
    color: inherit;
    transition: background-color .12s ease;
}

    .public-portal .doc-row:hover {
        background: var(--pe-cloud);
        text-decoration: none;
        color: inherit;
    }

.public-portal .file-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pe-cloud);
    color: var(--bs-primary);
    font-size: 1.1rem;
}

.public-portal .doc-row-info {
    flex: 1;
    min-width: 0;
}

.public-portal .doc-row-name {
    font-weight: 600;
    font-size: .9375rem;
    color: var(--pe-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.public-portal .doc-row-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-shrink: 0;
}

.public-portal .file-badge {
    padding: .15rem .5rem;
    border-radius: 4px;
    font-size: .6875rem;
    font-weight: 700;
    background: var(--pe-cloud);
    color: var(--pe-mute);
}

/* "No records found" empty state — DataTables' default raw text row */
.public-portal #docsTable_wrapper td.dataTables_empty {
    padding: 3.5rem 1rem !important;
    text-align: center;
    color: var(--pe-mute);
    font-size: .9375rem;
    border: none;
}