/*
 * Wspólny system tokenów i chrome (nagłówek/stopka) dla wszystkich
 * podstron czescbielsk.pl — index, /odpady/, /autobusy/.
 * Strony ładują ten plik przed swoim własnym arkuszem stylów.
 */

:root {
    --bg: #f6ecd9;
    --surface: #fffdf8;
    --surface-soft: #f4e9d4;
    --border: #e6d6b8;
    --text: #24392a;
    --muted: #6b6250;

    --accent: #9c3319;
    --accent-dark: #7c2812;
    --accent-soft: #f3ddd0;

    --teal: #24392a;
    --teal-soft: #e3ecdf;

    --gold: #c9942f;
    --gold-soft: #f7ecd3;

    --warn: #8a4b08;
    --warn-soft: #fdf1de;

    --danger: #b3261e;
    --danger-soft: #fbe4e1;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;

    --shadow: 0 10px 28px rgba(60, 40, 20, .1);
    --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: inherit;
}

h1, h2, h3, p {
    margin-top: 0;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin-inline: auto;
}

/* Site header / nav, shared by every page */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(246, 236, 217, .92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: block;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(36, 25, 10, .18);
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 1px;
}

.main-nav {
    display: flex;
    gap: 6px;
}

.main-nav a {
    text-decoration: none;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    color: var(--muted);
}

.main-nav a:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.main-nav a.active {
    background: var(--text);
    color: white;
}

.page-content {
    padding-block: 40px 64px;
}

.eyebrow {
    display: inline-block;
    color: var(--accent-dark);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .1em;
    margin-bottom: 8px;
}

/* Page hero banner — shared header treatment for subpages (e.g. /autobusy/, /odpady/) */

.page-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 30px 28px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--text) 0%, #3b4f2f 55%, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 16px 40px rgba(36, 25, 10, .22);
}

.page-hero:before,
.page-hero:after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: .16;
    pointer-events: none;
}

.page-hero:before {
    width: 220px;
    height: 220px;
    right: -40px;
    top: -70px;
    background: var(--teal);
}

.page-hero:after {
    width: 300px;
    height: 300px;
    left: -110px;
    bottom: -160px;
    background: var(--accent);
}

.page-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.page-hero .eyebrow {
    color: #fff;
    opacity: .78;
    margin-bottom: 0;
}

.page-hero h1 {
    font-size: clamp(28px, 5vw, 46px);
    line-height: 1.05;
    margin: 7px 0 10px;
    color: #fff;
}

.page-hero p {
    margin: 0;
    max-width: 760px;
    opacity: .9;
    font-size: 16px;
    color: #fff;
}

/* Informational note strip — source/accuracy disclaimers under a page hero */

.info-note {
    background: var(--surface-soft);
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 11px 13px;
    border-radius: var(--radius);
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.45;
}

.info-note a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
}

/* Change-watch alert — shown when a source page (odpady/autobusy/apteki) looks like it changed */

.watch-alert {
    background: var(--warn-soft);
    color: #6b4405;
    border: 1px solid #f1dfb6;
    padding: 11px 13px;
    border-radius: var(--radius);
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.45;
}

.watch-alert a {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

/* "Next event" highlight card — next waste pickup, next pharmacy duty, etc. */

.next-event {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding: 16px 18px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--text), var(--accent));
    color: #fff;
}

.next-event-label {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 800;
    opacity: .8;
}

.next-event-date {
    font-size: 1.5rem;
    font-weight: 900;
    margin: 3px 0 2px;
}

.next-event-sub {
    font-size: .84rem;
    opacity: .92;
}

.next-event-countdown {
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    font-size: .82rem;
    font-weight: 800;
    white-space: nowrap;
}

.next-event-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.next-event-pill {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    font-size: .78rem;
}

.next-event-pill strong {
    font-size: .82rem;
}

.next-event-pill small {
    color: var(--muted);
}

/* Mini pages — focused, picker-free views of a single item, linked to from the full page */

.mini-back {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
}

.mini-back:hover {
    text-decoration: underline;
}

.mini-link {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    text-align: right;
}

.mini-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 750;
    font-size: 13px;
}

.mini-link a:hover {
    text-decoration: underline;
}

.site-footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    padding: 24px 0 36px;
    font-size: 14px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

@media (max-width: 720px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding-block: 14px;
    }

    .main-nav {
        width: 100%;
    }

    .main-nav a {
        flex: 1;
        text-align: center;
    }

    .page-content {
        padding-top: 28px;
    }
}
