:root {
    --ink: #10211b;
    --ink-soft: #40534b;
    --paper: #f4f5ef;
    --surface: #ffffff;
    --surface-2: #eaeee7;
    --line: #dce2da;
    --brand: #164f3b;
    --brand-2: #0c3528;
    --signal: #d7ff55;
    --signal-dark: #789900;
    --warning: #ffb703;
    --danger: #e84831;
    --radius-sm: 14px;
    --radius: 22px;
    --radius-lg: 30px;
    --shadow: 0 16px 44px rgba(16, 33, 27, .08);
    --shadow-hover: 0 22px 54px rgba(16, 33, 27, .14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    min-width: 320px;
    margin: 0;
    padding-bottom: 60px;
    background:
        radial-gradient(circle at 100% 0, rgba(215,255,85,.20), transparent 30rem),
        var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
a:hover { color: var(--brand-2); }

.container { --bs-gutter-x: 1.25rem; }

.top-nav {
    position: sticky;
    top: 0;
    z-index: 1040;
    padding: .75rem 0 !important;
    border: 0;
    background: rgba(244,245,239,.88);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.top-nav::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.brand { gap: .65rem !important; color: var(--ink) !important; }
.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 8px 24px rgba(22,79,59,.25);
    font-size: 18px;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-size: 1.02rem; font-weight: 900; letter-spacing: -.04em; }
.brand-tagline { margin-top: .25rem; color: var(--ink-soft); font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.navbar-toggler {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: none !important;
}

.top-nav .navbar-collapse {
    margin-top: .75rem !important;
    padding: .65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.top-nav .nav-link {
    margin: .1rem 0;
    padding: .72rem .85rem;
    border-radius: 12px;
    color: var(--ink-soft);
    font-size: .88rem;
    font-weight: 750;
}
.top-nav .nav-link:hover,
.top-nav .nav-link.active { color: var(--brand-2); background: var(--signal); }

.site-main { padding: 1rem 0 2.5rem; }

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
    padding: 1.35rem;
    border-radius: var(--radius-lg);
    background: var(--brand-2);
    color: #fff;
    box-shadow: 0 18px 48px rgba(12,53,40,.20);
}
.page-hero::after {
    content: "";
    position: absolute;
    right: -3.5rem;
    bottom: -5rem;
    width: 12rem;
    height: 12rem;
    border: 2.5rem solid rgba(215,255,85,.16);
    border-radius: 50%;
}
.page-hero > * { position: relative; z-index: 1; }
.page-kicker { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: .7rem; color: var(--signal); font-size: .7rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.page-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px rgba(215,255,85,.12); }
.page-hero h1 { max-width: 18ch; margin: 0; color: #fff; font-size: clamp(1.75rem, 8vw, 3.35rem); font-weight: 900; letter-spacing: -.055em; line-height: .98; }
.page-hero p { max-width: 42rem; margin: .85rem 0 0; color: rgba(255,255,255,.70) !important; font-size: .9rem; }
.page-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.meta-chip { display: inline-flex; align-items: center; min-height: 34px; padding: .45rem .7rem; border: 1px solid rgba(255,255,255,.13); border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; font-size: .72rem; font-weight: 750; }

.card-flat {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.card-flat .card-body { padding: 1.15rem; }
.content-feed .card-flat:hover { transform: translateY(-2px); border-color: #c7d1c5; box-shadow: var(--shadow-hover); }
.card-title a, .card-flat h2 a, .card-flat h3 a { color: var(--ink); }
.card-flat h2, .card-flat h3 { letter-spacing: -.025em; line-height: 1.2; }

.badge-category {
    padding: .45rem .65rem;
    border: 0;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--brand);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .03em;
}

.filter-panel { margin-top: -1.2rem; position: relative; z-index: 2; }
.filter-panel .card-body { padding: .9rem; }
.form-label { margin-bottom: .35rem; color: var(--ink-soft); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.form-control, .form-select {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background-color: var(--paper);
    color: var(--ink);
    font-size: .9rem;
}
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(22,79,59,.10); }
.btn { border-radius: 14px; font-weight: 800; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-2); --bs-btn-hover-border-color: var(--brand-2); min-height: 46px; }
.btn-outline-secondary { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--ink); }

#traffic-map, #road-assistance-map {
    height: 330px;
    border: 4px solid var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.leaflet-control-zoom { border: 0 !important; box-shadow: var(--shadow) !important; }
.leaflet-control-zoom a { color: var(--ink) !important; }

.news-card { position: relative; }
.news-card::before { content: ""; position: absolute; top: 1.15rem; bottom: 1.15rem; left: 0; width: 4px; border-radius: 0 4px 4px 0; background: var(--signal); }
.news-card .card-body { padding-left: 1.35rem; }
.news-time { display: flex; align-items: center; gap: .4rem; color: var(--ink-soft); font-size: .72rem; font-weight: 650; }
.news-time::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }

.article-card .card-body { padding: 1.3rem; }
.article-card h1 { margin-top: .65rem; font-size: clamp(1.75rem, 7vw, 3.1rem); font-weight: 900; letter-spacing: -.055em; line-height: 1.02; }
.article-card > .card-body > p { color: #283b33; font-size: 1.02rem; line-height: 1.8; white-space: pre-line; }

.sidebar-stack { display: grid; gap: 1rem; }
.sidebar-stack .card { margin: 0 !important; }
.sidebar-stack h2 { font-weight: 900; letter-spacing: -.02em; }
.sidebar-stack .btn-light { border: 0; border-radius: 12px; background: var(--paper); color: var(--ink); font-size: .82rem; font-weight: 750; }
.sidebar-stack .text-bg-primary { background: var(--brand) !important; }
.sidebar-stack .list-group-item { padding: .85rem 0 !important; border-color: var(--line); }

.pagination { gap: .35rem; flex-wrap: wrap; }
.page-link { min-width: 40px; min-height: 40px; display: grid; place-items: center; border: 0; border-radius: 12px !important; background: var(--surface); color: var(--ink); font-weight: 800; }
.active > .page-link { background: var(--brand); }

.share-btn { border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-weight: 750; }
.share-btn:hover { background: var(--signal); color: var(--brand-2); }

.site-footer { padding: 2rem 0 6.5rem; background: var(--ink); color: rgba(255,255,255,.7); }
.site-footer a { color: #fff; }
.footer-brand { color: #fff; font-size: 1.2rem; font-weight: 900; letter-spacing: -.04em; }

.mobile-dock {
    position: fixed;
    right: .4rem;
    bottom: .4rem;
    left: .4rem;
    z-index: 1050;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .2rem;
    padding: .28rem;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 17px;
    background: rgba(16,33,27,.94);
    box-shadow: 0 18px 48px rgba(0,0,0,.28);
    backdrop-filter: blur(18px);
}
.mobile-dock a { display: flex; min-height: 42px; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; border-radius: 13px; color: rgba(255,255,255,.65); text-decoration: none; font-size: .55rem; font-weight: 800; }
.mobile-dock a.active { background: var(--signal); color: var(--brand-2); }
.mobile-dock-icon { font-size: .95rem; line-height: 1; }
.is-toll-page { padding-bottom: 0; }
.is-toll-page .mobile-dock { display: none; }
.traffic-passes-appbar__title { margin-bottom: 0; }

.status-badge { border-radius: 999px; padding: .45rem .65rem; font-size: .68rem; font-weight: 850; }
.text-bg-success { background: var(--brand) !important; }

.action-btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .65rem .85rem;
    border: 1px solid transparent;
    border-radius: 13px;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 850;
    line-height: 1;
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.action-btn:hover { transform: translateY(-1px); }
.action-btn-icon { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; font-size: .85rem; font-weight: 900; }
.action-btn-call { border-color: #bfcac2; background: #fff; color: var(--brand); }
.action-btn-call .action-btn-icon { background: var(--surface-2); }
.action-btn-call:hover { border-color: var(--brand); background: var(--surface-2); color: var(--brand-2); }
.action-btn-route { background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(22,79,59,.16); }
.action-btn-route .action-btn-icon { background: rgba(255,255,255,.14); }
.action-btn-route:hover { background: var(--brand-2); color: #fff; box-shadow: 0 10px 22px rgba(12,53,40,.22); }
.action-btn-main { min-height: 48px; padding: .75rem 1rem; font-size: .88rem; }

@media (max-width: 575.98px) {
    .article-card .d-flex.flex-wrap.gap-2:has(.action-btn) { display: grid !important; grid-template-columns: 1fr 1fr; }
    .action-btn { width: 100%; }
    .action-btn-main { width: 100%; }
}

@media (max-width: 767.98px) {
    .top-nav { position: relative; }
    .site-footer { padding-bottom: 5rem; }
}

@media (min-width: 768px) {
    body { padding-bottom: 0; }
    .container { --bs-gutter-x: 2rem; }
    .site-main { padding: 1.6rem 0 4rem; }
    .page-hero { margin-bottom: 1.5rem; padding: 2.2rem; }
    .filter-panel { margin-top: -2.2rem; margin-right: 1.1rem; margin-left: 1.1rem; }
    .filter-panel .card-body { padding: 1rem; }
    .card-flat .card-body { padding: 1.35rem; }
    #traffic-map, #road-assistance-map { height: 470px; }
    .article-card .card-body { padding: 2rem; }
    .mobile-dock { display: none; }
    .site-footer { padding-bottom: 2rem; }
}

@media (min-width: 992px) {
    .top-nav { padding: .9rem 0 !important; }
    .top-nav .navbar-collapse { margin-top: 0 !important; padding: 0; border: 0; background: transparent; box-shadow: none; }
    .top-nav .nav-link { margin: 0 .08rem; padding: .6rem .72rem; font-size: .78rem; }
    .site-main .row > aside { position: sticky; top: 92px; height: max-content; }
    .page-hero { padding: 2.7rem; }
}

@media (min-width: 1200px) {
    .content-feed > .col-12 { width: 50%; flex: 0 0 auto; }
    .content-feed .card-flat { height: 100%; }
    .content-feed .card-text { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
    .page-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 3rem; }
    .page-hero .page-kicker, .page-hero h1, .page-hero > p { grid-column: 1; }
    .page-hero .page-meta { grid-column: 2; grid-row: 1 / span 3; align-self: center; flex-direction: column; min-width: 230px; }
    .page-hero .meta-chip { justify-content: center; }
}

@media (min-width: 1400px) {
    .container { max-width: 1480px; }
    .site-main { padding-top: 2rem; }
    .page-hero { min-height: 300px; padding: 3.4rem; }
    .page-hero h1 { font-size: 3.8rem; }
    #traffic-map, #road-assistance-map { height: 520px; }
    .content-feed { --bs-gutter-x: 1.25rem; --bs-gutter-y: 1.25rem; }
    .content-feed .card-flat .card-body { padding: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
