/* =========================================================
   PKW — Sejm Roleplay · wspólny system stylów
   ========================================================= */

:root {
    /* Marka */
    --pkw-red: #a50e2d;
    --pkw-red-bright: #ce1126;
    --pkw-red-dark: #7e0a22;
    /* Historyczna nazwa — obecnie ciemna czerwień (paleta biało-czerwona) */
    --pkw-blue: #7c1023;
    --pkw-blue-deep: #520a18;
    --pkw-gold: #c9a227;

    /* Neutralne */
    --ink: #16202b;
    --text: #37424f;
    --muted: #6b7684;
    --bg: #f7f7f8;
    --card: #ffffff;
    --border: #e2e7ee;
    --border-strong: #cdd5df;

    /* Aliasowane nazwy używane historycznie w podstronach */
    --pkw-dark: #2b333d;
    --pkw-light-gray: #f2f4f7;
    --pkw-border: #e2e7ee;
    --white: #ffffff;
    --text-main: #16202b;

    --radius: 6px;
    --radius-sm: 4px;
    --shadow-sm: 0 1px 2px rgba(16, 32, 51, .06), 0 1px 3px rgba(16, 32, 51, .08);
    --shadow-md: 0 6px 18px rgba(16, 32, 51, .10);
    --shadow-lg: 0 18px 45px rgba(16, 32, 51, .16);
    --font-gov: 'Open Sans', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-gov);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Liczby wykryte przez iOS jako numery telefonów — bez stylu linku */
a[href^="tel:"], a[x-apple-data-detectors] {
    color: inherit !important;
    text-decoration: none !important;
    font-weight: inherit !important;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 28px;
    width: 100%;
}

::selection { background: var(--pkw-red); color: #fff; }

/* =========================================================
   NAGŁÓWEK
   ========================================================= */

.gov-stripe {
    height: 4px;
    background: var(--pkw-red);
}

header.site-header {
    background: var(--card);
    width: 100%;
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 50;
}

.header-top {
    padding: 26px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.header-pkw-signature {
    display: flex;
    align-items: center;
    gap: 26px;
    text-decoration: none;
}

.header-logo { height: 56px; width: auto; }

.bip-box { display: flex; align-items: center; gap: 12px; }

.bip-square {
    background: var(--pkw-red);
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    padding: 6px 9px;
    border-radius: 4px;
    line-height: 1;
    text-transform: lowercase;
    letter-spacing: .02em;
    box-shadow: var(--shadow-sm);
}

.bip-text {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.25;
    max-width: 105px;
    color: var(--ink);
    letter-spacing: .04em;
}

/* --- Pasek nawigacji --- */

.nav-bar {
    background: linear-gradient(180deg, var(--pkw-red) 0%, #97102b 100%);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 3px 14px rgba(126, 10, 34, .35);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 54px;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, .92);
    font-weight: 700;
    font-size: .82rem;
    letter-spacing: .05em;
    padding: 18px 20px;
    position: relative;
    display: block;
    text-transform: uppercase;
    transition: color .2s, background-color .2s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 3px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .25s ease-out;
    border-radius: 2px 2px 0 0;
}

.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-links a.active {
    color: #fff;
    background: rgba(255, 255, 255, .09);
}
.nav-links a.active::after { transform: scaleX(1); }

.nav-links a:first-child { padding-left: 0; }
.nav-links a:first-child::after { left: 0; }
.nav-links a:first-child.active { background: transparent; }

.nav-right { display: flex; align-items: center; gap: 12px; }

.discord-btn {
    background: #5865F2;
    color: #fff;
    font-weight: 800;
    font-size: .76rem;
    letter-spacing: .04em;
    padding: 9px 18px;
    border-radius: 4px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color .2s;
}
.discord-btn:hover { background: #4752C4; }

.admin-link {
    background: #fff;
    color: var(--pkw-red);
    font-weight: 800;
    font-size: .76rem;
    letter-spacing: .04em;
    padding: 9px 18px;
    border-radius: 4px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background-color .2s;
}
.admin-link:hover { background: #f4e5e8; }

.logout-link {
    color: rgba(255,255,255,.85);
    font-weight: 700;
    font-size: .76rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.logout-link:hover { color: #fff; text-decoration: underline; }

/* --- Hamburger (mobile) --- */

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    margin: 8px 0;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    border-radius: 2px;
    transition: transform .25s, opacity .2s;
}

/* =========================================================
   HERO (strona główna)
   ========================================================= */

.hero {
    background:
        radial-gradient(900px 420px at 90% -20%, rgba(255, 255, 255, .1), transparent 60%),
        linear-gradient(160deg, var(--pkw-blue-deep) 0%, var(--pkw-blue) 70%, #8c1126 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid #fff;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("orzel.svg");
    background-repeat: no-repeat;
    background-position: right -60px center;
    background-size: 420px;
    opacity: .1;
    filter: grayscale(1) brightness(4);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    padding: 76px 0 104px;
    max-width: 660px;
}

.hero-badges {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    margin-top: 34px;
    border-top: 1px solid rgba(255,255,255,.18);
    padding-top: 18px;
}
.hero-chip {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.65);
    padding-right: 26px;
    margin-right: 26px;
    border-right: 1px solid rgba(255,255,255,.18);
}
.hero-chip:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.hero-chip b { color: #fff; font-weight: 800; }

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255,255,255,.75);
    margin-bottom: 18px;
}
.hero-kicker::before {
    content: "";
    width: 34px;
    height: 3px;
    border-radius: 2px;
    background: var(--pkw-red-bright);
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(1.9rem, 4vw, 2.9rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.01em;
}

.hero p.lead {
    margin: 0 0 30px;
    font-size: 1.05rem;
    line-height: 1.75;
    color: rgba(255,255,255,.82);
    max-width: 540px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 800;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-gov);
    transition: transform .15s, box-shadow .2s, background-color .2s;
}
.btn:hover { transform: translateY(-2px); }

.btn-red { background: var(--pkw-red-bright); color: #fff; box-shadow: 0 8px 22px rgba(206, 17, 38, .38); }
.btn-red:hover { background: #b30e20; }

.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }

.btn-navy { background: var(--pkw-blue); color: #fff; box-shadow: 0 6px 16px rgba(124, 16, 35, .3); }
.btn-navy:hover { background: #8c1126; }

/* Szybkie kafelki pod hero */

.quick-links {
    position: relative;
    z-index: 5;
    margin-top: -52px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.quick-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 26px 28px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    border-top: 4px solid var(--pkw-red);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform .2s, box-shadow .25s;
}
.quick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }

.quick-card .qc-icon {
    width: 46px;
    height: 46px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pkw-red);
    background: #fdf0f2;
    border: 1px solid #f2d9de;
}
.quick-card .qc-icon svg { width: 22px; height: 22px; }
.quick-card h3 { margin: 4px 0 0; font-size: 1.05rem; font-weight: 800; color: var(--pkw-blue); }
.quick-card p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.6; }
.quick-card .qc-more {
    margin-top: auto;
    padding-top: 10px;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--pkw-red);
}

/* =========================================================
   SEKCJE / TYPOGRAFIA
   ========================================================= */

.main-content { background: var(--bg); padding: 56px 0 72px; flex: 1; }

.section-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin: 0 0 26px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.section-title::before {
    content: "";
    width: 6px;
    height: 24px;
    background: var(--pkw-red);
    flex-shrink: 0;
}
.section-title::after { content: ""; flex-grow: 1; height: 1px; background: var(--border-strong); }

.section-sub {
    margin: -16px 0 26px 22px;
    color: var(--muted);
    font-size: .92rem;
}

/* =========================================================
   AKTUALNOŚCI — karty (strona główna)
   ========================================================= */

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.news-card {
    background: var(--card);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .25s, border-color .2s;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--pkw-red);
}

.news-image {
    height: 120px;
    position: relative;
    background: linear-gradient(130deg, var(--pkw-blue-deep), var(--pkw-blue) 60%, #93122a);
    display: flex;
    align-items: center;
    justify-content: center;
}
.news-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("orzel.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 74px;
    opacity: .5;
    filter: grayscale(1) brightness(4);
}
.news-image::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pkw-red-bright), transparent 70%);
}

.news-image.cat-uchwala { background: linear-gradient(130deg, #40060f, #6d0819 60%, #8c1126); }
.news-image.cat-doc { background: linear-gradient(130deg, #313a45, #47525f 60%, #5a6673); }

.news-content { padding: 20px 22px 22px; flex-grow: 1; display: flex; flex-direction: column; }
.news-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.news-date { font-size: .76rem; color: var(--muted); font-weight: 700; letter-spacing: .03em; }

.news-tag {
    background: var(--bg);
    color: var(--pkw-dark);
    padding: 4px 10px;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-radius: 4px;
}

.news-card h3 { margin: 0 0 10px; font-size: 1.06rem; line-height: 1.45; color: var(--pkw-blue); font-weight: 700; }
.news-card p {
    margin: 0;
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================================
   AKTUALNOŚCI — lista (podstrona)
   ========================================================= */

.category-group { margin-bottom: 56px; }

.list-wrapper { display: flex; flex-direction: column; gap: 14px; }

.item-row {
    background: var(--card);
    padding: 20px 26px;
    border: 1px solid var(--border);
    border-left: 4px solid transparent;
    border-radius: var(--radius-sm);
    display: grid;
    grid-template-columns: 110px 1fr 130px;
    gap: 18px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, border-color .2s, box-shadow .25s;
}

.item-row:hover {
    border-left-color: var(--pkw-red);
    box-shadow: var(--shadow-md);
}

.item-date { color: var(--muted); font-weight: 700; font-size: .82rem; letter-spacing: .02em; }

.item-info h3 { margin: 0 0 4px; font-size: 1.08rem; color: var(--pkw-blue); font-weight: 700; line-height: 1.4; }
.item-info p {
    margin: 0;
    font-size: .9rem;
    color: var(--muted);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-tag {
    justify-self: end;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    text-align: center;
    width: 110px;
}

.tag-news { background: #fdeef1; color: var(--pkw-red); }
.tag-uchwala { background: var(--pkw-red); color: #fff; }
.tag-doc { background: #eef1f5; color: #46525f; }

.empty-note { padding: 18px 22px; color: var(--muted); font-style: italic; background: var(--card); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }

/* =========================================================
   KARTY OGÓLNE
   ========================================================= */

.card {
    background: var(--card);
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.card h3 {
    margin: 0 0 18px;
    color: var(--pkw-blue);
    font-size: 1.18rem;
    font-weight: 800;
    border-bottom: 2px solid var(--pkw-red);
    padding-bottom: 12px;
}

.card h4 { color: var(--ink); margin: 22px 0 10px; font-size: 1rem; }

/* =========================================================
   WYBORY
   ========================================================= */

.election-section { margin-bottom: 56px; }

.info-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 26px; align-items: start; }

.step-list { padding-left: 20px; margin: 0 0 16px; }
.step-list li { margin-bottom: 13px; line-height: 1.7; font-size: .94rem; }

.doc-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 15px;
    background: var(--bg);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    font-size: .9rem;
    margin-bottom: 9px;
    transition: border-color .2s, background-color .2s, color .2s, transform .15s;
}
.doc-link:hover {
    background: #fff;
    border-color: var(--pkw-red);
    color: var(--pkw-red);
    transform: translateX(3px);
}

.apply-section { margin-top: 26px; text-align: right; }

/* --- Wyniki --- */

.results-container { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.tura-card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tura-title {
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
    padding: 16px 26px;
    border-bottom: 1px solid var(--border);
    margin: 0;
    font-size: 1.02rem;
    color: var(--pkw-blue);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.status-badge {
    font-size: .64rem;
    background: var(--pkw-blue);
    color: #fff;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 800;
    letter-spacing: .06em;
    white-space: nowrap;
}

.tura-body { padding: 26px; }

.stat-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1.3fr;
    gap: 14px;
    margin-bottom: 26px;
}
.stat-mini {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    border: 1px solid var(--border);
}
.stat-mini label {
    display: block;
    font-size: .62rem;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 800;
    letter-spacing: .07em;
    margin-bottom: 4px;
}
.stat-mini span { font-size: 1.05rem; font-weight: 800; color: var(--ink); }

.candidate-row { margin-bottom: 18px; }
.candidate-row:last-child { margin-bottom: 0; }

.candidate-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 7px;
    font-weight: 700;
}
.candidate-name { font-size: .93rem; color: var(--ink); }
.candidate-votes { font-size: .82rem; color: var(--muted); margin-left: auto; }
.candidate-percent { color: var(--pkw-red); font-size: .95rem; min-width: 64px; text-align: right; }

.progress-bg { background: #e6eaf0; height: 10px; border-radius: 6px; overflow: hidden; }
.progress-fill {
    background: #8a94a1;
    height: 100%;
    border-radius: 6px;
    transition: width 2s cubic-bezier(.1, 0, .2, 1);
}
.candidate-row:first-of-type .progress-fill {
    background: linear-gradient(90deg, var(--pkw-red-dark), var(--pkw-red-bright));
}

.winner-box {
    margin-top: 24px;
    padding: 18px;
    background: linear-gradient(135deg, #fdf6f7, #f8eaed);
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--border);
}
.winner-box small {
    text-transform: uppercase;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: .08em;
    font-size: .66rem;
}
.winner-box strong { display: block; margin-top: 6px; font-size: 1.3rem; color: var(--pkw-blue); }

/* --- Archiwum --- */

.archive-card {
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.archive-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.archive-table th {
    background: var(--pkw-blue);
    color: #fff;
    text-align: left;
    padding: 15px 18px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: .74rem;
    letter-spacing: .06em;
}
.archive-table td { padding: 16px 18px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.archive-table tbody tr:last-child td { border-bottom: none; }
.archive-table tbody tr { transition: background-color .15s; }
.archive-table tbody tr:hover { background: #f7f9fc; }

.protocol-btn {
    color: var(--pkw-red);
    text-decoration: none;
    font-weight: 800;
    border: 1px solid var(--pkw-red);
    padding: 6px 13px;
    border-radius: 5px;
    font-size: .74rem;
    letter-spacing: .03em;
    transition: background-color .2s, color .2s;
    white-space: nowrap;
}
.protocol-btn:hover { background: var(--pkw-red); color: #fff; }

/* =========================================================
   SKŁAD KOMISJI
   ========================================================= */

.pyramid-container { display: flex; flex-direction: column; align-items: center; gap: 18px; }

.level { display: flex; justify-content: center; gap: 18px; width: 100%; flex-wrap: wrap; }

.person-card {
    background: var(--card);
    padding: 28px 26px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-top: 4px solid var(--pkw-blue);
    text-align: center;
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .25s;
}
.person-card:hover { box-shadow: var(--shadow-md); }

.person-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pkw-blue), #93122a);
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    letter-spacing: .02em;
    box-shadow: 0 4px 12px rgba(124, 16, 35, .3);
}

.person-card.chair { border-top-color: var(--pkw-red); }
.person-card.chair .person-avatar { background: linear-gradient(135deg, var(--pkw-red-dark), var(--pkw-red-bright)); box-shadow: 0 4px 12px rgba(165, 14, 45, .35); }

.person-card .role {
    color: var(--pkw-red);
    font-weight: 800;
    text-transform: uppercase;
    font-size: .68rem;
    letter-spacing: .08em;
}

.person-card h3 { margin: 4px 0 4px; color: var(--pkw-blue); font-size: 1.25rem; font-weight: 800; }
.person-card .bio { font-size: .88rem; line-height: 1.6; color: var(--muted); margin: 0; }

.level-members .person-card { width: 270px; padding: 22px 20px 20px; }
.level-members .person-avatar { width: 46px; height: 46px; font-size: .95rem; }
.level-members .person-card h3 { font-size: 1.05rem; }

.person-card.kbw-card { border-top-color: var(--pkw-dark); margin-top: 10px; }
.person-card.kbw-card .person-avatar { background: linear-gradient(135deg, #2b333d, #4a5560); box-shadow: 0 4px 12px rgba(43, 51, 61, .3); }

/* =========================================================
   KONTAKT
   ========================================================= */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-bottom: 26px; }

.contact-info-item { margin-bottom: 16px; display: flex; flex-direction: column; }
.contact-info-item:last-child { margin-bottom: 0; }
.contact-info-item label {
    font-size: .68rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--pkw-red);
    letter-spacing: .07em;
    margin-bottom: 4px;
}
.contact-info-item span { font-size: 1.02rem; font-weight: 600; color: var(--ink); }

.info-strip-blue {
    background:
        radial-gradient(700px 300px at 90% -30%, rgba(206, 17, 38, .35), transparent 65%),
        linear-gradient(135deg, var(--pkw-blue-deep), var(--pkw-blue));
    color: #fff;
    padding: 40px 44px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow-md);
}
.info-strip-content h4 { margin: 0 0 8px; font-size: 1.35rem; font-weight: 800; }
.info-strip-content p { margin: 0; opacity: .8; line-height: 1.6; }

.btn-discord-strip {
    background: #fff;
    color: var(--pkw-blue);
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: .85rem;
    letter-spacing: .04em;
    transition: transform .15s, box-shadow .2s;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}
.btn-discord-strip:hover { transform: translateY(-2px) scale(1.02); }

/* =========================================================
   ARTYKUŁ / STRONY TEKSTOWE
   ========================================================= */

.article-container {
    background: var(--card);
    padding: 48px 52px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    box-shadow: var(--shadow-md);
}

.article-meta {
    color: var(--pkw-red);
    font-weight: 800;
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .08em;
    margin-bottom: 12px;
    display: block;
}

.article-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--pkw-blue);
    margin: 0 0 26px;
    border-bottom: 3px solid var(--pkw-red);
    padding-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.article-content {
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--text);
    white-space: pre-wrap;
}

.article-footer {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 22px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
    font-size: .86rem;
    transition: color .2s;
}
.back-link:hover { color: var(--pkw-red); }

.disclaimer-box {
    background: #fdf0f2;
    border-left: 4px solid var(--pkw-red);
    padding: 18px 22px;
    margin-bottom: 30px;
    font-weight: 600;
    color: var(--pkw-red-dark);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    line-height: 1.6;
    font-size: .94rem;
}

.policy-content h3 { color: var(--pkw-blue); margin: 28px 0 10px; font-size: 1.15rem; }
.policy-content p, .policy-content li { font-size: .97rem; line-height: 1.75; color: var(--text); }

.alert-error {
    background: #fdf0f2;
    border-left: 5px solid var(--pkw-red);
    color: var(--pkw-red-dark);
    padding: 16px 20px;
    margin-bottom: 26px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    line-height: 1.6;
}

.alert-success {
    background: #eefaf1;
    border-left: 5px solid #1d9d50;
    color: #14683a;
    padding: 14px 20px;
    margin-bottom: 22px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-weight: 700;
}

/* =========================================================
   FORMULARZE / ADMIN
   ========================================================= */

.form-label { display: block; font-weight: 700; font-size: .85rem; color: var(--ink); margin-bottom: 7px; }

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: var(--font-gov);
    font-size: .95rem;
    color: var(--ink);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--pkw-red);
    box-shadow: 0 0 0 3px rgba(165, 14, 45, .12);
}

.form-row { display: flex; gap: 16px; }
.form-row > * { flex: 1; }
.form-group { margin-bottom: 18px; }

.btn-submit {
    background: linear-gradient(180deg, var(--pkw-red-bright), var(--pkw-red));
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: .9rem;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-family: var(--font-gov);
    transition: filter .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 6px 16px rgba(165, 14, 45, .3);
}
.btn-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }

.btn-submit.blue {
    background: linear-gradient(180deg, #8c1126, var(--pkw-blue));
    box-shadow: 0 6px 16px rgba(124, 16, 35, .3);
}

.admin-panel { max-width: 1000px; margin: 0 auto; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    background: var(--pkw-blue);
    color: #fff;
    text-align: left;
    padding: 12px 14px;
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.admin-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.admin-table tbody tr:hover { background: #f7f9fc; }

.table-tag {
    font-size: .66rem;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--muted);
}

.action-edit { color: var(--pkw-blue); text-decoration: none; font-weight: 800; font-size: .78rem; margin-right: 14px; letter-spacing: .03em; }
.action-delete { color: var(--pkw-red); text-decoration: none; font-weight: 800; font-size: .78rem; letter-spacing: .03em; }
.action-edit:hover, .action-delete:hover { text-decoration: underline; }

/* =========================================================
   STOPKA
   ========================================================= */

footer.site-footer {
    background: var(--pkw-blue-deep);
    color: rgba(255,255,255,.8);
    margin-top: auto;
    border-top: 4px solid var(--pkw-red);
}

.footer-main {
    padding-top: 56px;
    padding-bottom: 46px;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 44px;
}

.footer-brand { display: flex; flex-direction: column; gap: 12px; }
.footer-brand-sign { border-left: 4px solid var(--pkw-red-bright); padding-left: 16px; }
.footer-brand-sign h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.3;
    letter-spacing: .02em;
}
.footer-brand-sign p { margin: 6px 0 0; color: rgba(255,255,255,.55); font-size: .86rem; line-height: 1.6; }

.footer-col strong {
    color: #fff;
    display: block;
    margin-bottom: 14px;
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .1em;
}
.footer-col { font-size: .88rem; line-height: 2; }
.footer-col a { color: rgba(255,255,255,.75); text-decoration: none; transition: color .2s; display: block; }
.footer-col a:hover { color: #fff; text-decoration: underline; }

.footer-black-bar {
    background: rgba(0, 0, 0, .28);
    color: rgba(255,255,255,.6);
    padding: 20px 0;
    font-size: .8rem;
}
.footer-black-bar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-black-bar strong { color: rgba(255,255,255,.85); }

.footer-link { color: rgba(255,255,255,.65); text-decoration: none; transition: color .2s; }
.footer-link:hover { color: #fff; text-decoration: underline; }

.footer-sim-badge {
    font-weight: 800;
    letter-spacing: .08em;
    font-size: .68rem;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 20px;
    padding: 5px 13px;
    color: rgba(255,255,255,.7);
}

/* =========================================================
   KALENDARZ WYBORCZY — oś czasu
   ========================================================= */

.timeline { position: relative; padding-left: 26px; max-width: 760px; }
.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border-strong);
}

.timeline-item { position: relative; padding: 0 0 26px 22px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: -26px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--border-strong);
    box-sizing: border-box;
    margin-left: 2px;
}

.timeline-item .tl-date {
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    display: block;
    margin-bottom: 3px;
}
.timeline-item h4 { margin: 0 0 4px; font-size: 1.02rem; color: var(--ink); font-weight: 700; }
.timeline-item p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.6; }

.timeline-item.done { opacity: .55; }
.timeline-item.done::before { background: var(--border-strong); }

.timeline-item.next::before {
    background: var(--pkw-red-bright);
    border-color: #f4c6cd;
    box-shadow: 0 0 0 4px rgba(206, 17, 38, .12);
}
.timeline-item.next .tl-date { color: var(--pkw-red); }
.timeline-item.next h4 { color: var(--pkw-red-dark); }

/* =========================================================
   REJESTR KOMITETÓW / KANDYDATÓW — statusy
   ========================================================= */

.st-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}
.st-zgloszony { background: #eef1f5; color: #46525f; border: 1px solid #d8dee6; }
.st-zarejestrowany { background: #eefaf1; color: #14683a; border: 1px solid #bfe8cc; }
.st-odrzucony { background: #fdeef1; color: var(--pkw-red); border: 1px solid #f2d0d7; }

/* =========================================================
   PODGLĄD FORMATOWANIA (panel)
   ========================================================= */

.md-hint {
    font-size: .76rem;
    color: var(--muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 13px;
    margin-top: 8px;
    line-height: 1.7;
}
.md-hint code {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: .72rem;
}

.md-preview {
    display: none;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    margin-top: 10px;
    background: #fff;
    font-size: .95rem;
    line-height: 1.7;
    color: var(--text);
}
.md-preview.visible { display: block; }
.md-preview h3 { color: var(--pkw-blue); margin: 10px 0 6px; font-size: 1.05rem; }
.md-preview ul { margin: 6px 0; padding-left: 22px; }

.article-content h3 { color: var(--pkw-blue); margin: 22px 0 8px; font-size: 1.15rem; }
.article-content ul { margin: 8px 0; padding-left: 24px; }
.article-content a { color: var(--pkw-red); font-weight: 600; }

/* =========================================================
   PRZEGLĄDARKA DOKUMENTÓW GOOGLE
   ========================================================= */

.doc-viewer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.doc-viewer-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--pkw-blue);
    border-left: 5px solid var(--pkw-red);
    padding-left: 14px;
}
.doc-viewer-actions { display: flex; gap: 8px; }
.doc-viewer-actions .btn-small { padding: 10px 18px; }

.doc-viewer-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.doc-viewer-frame {
    display: block;
    width: 100%;
    height: 78vh;
    min-height: 480px;
    border: none;
    background: #fff;
}

@media (max-width: 850px) {
    .doc-viewer-frame { height: 68vh; }
    .doc-viewer-actions { width: 100%; }
    .doc-viewer-actions .btn-small { flex: 1; text-align: center; }

    /* Nagłówek karty wyników: nazwa tury + plakietka statusu potrafią
       razem nie zmieścić się w jednym wierszu na wąskim ekranie —
       pozwól plakietce zejść pod tekst zamiast wylewać się poza kartę. */
    .tura-title { flex-wrap: wrap; row-gap: 8px; align-items: flex-start; }
    .status-badge { white-space: normal; }
}

/* =========================================================
   ANIMACJE WEJŚCIA
   ========================================================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: no-preference) {
    .hero-inner, .main-content { animation: fadeIn .35s ease both; }
}

/* =========================================================
   PANEL ADMINA — zakładki i kafelki
   ========================================================= */

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 28px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.admin-tab {
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--muted);
    font-weight: 800;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    transition: background-color .2s, color .2s;
}
.admin-tab:hover { background: var(--bg); color: var(--ink); }
.admin-tab.active {
    background: linear-gradient(180deg, var(--pkw-red-bright), var(--pkw-red));
    color: #fff;
    box-shadow: 0 4px 12px rgba(165, 14, 45, .3);
}

.stat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-tile {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--pkw-red);
}
.stat-tile label {
    display: block;
    font-size: .64rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 800;
    margin-bottom: 4px;
}
.stat-tile span { font-size: 1.5rem; font-weight: 800; color: var(--ink); }

.round-admin-card { margin-bottom: 24px; }
.round-admin-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.round-admin-head h4 { margin: 0; color: var(--pkw-blue); font-size: 1.05rem; }
.round-meta { font-size: .8rem; color: var(--muted); margin-bottom: 14px; }

.btn-small {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-gov);
    transition: filter .2s, transform .15s;
}
.btn-small:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-small.red { background: var(--pkw-red); color: #fff; }
.btn-small.navy { background: var(--pkw-blue); color: #fff; }
.btn-small.gray { background: #e8ecf1; color: var(--ink); }

.winner-chip {
    display: inline-block;
    background: #eefaf1;
    color: #14683a;
    border: 1px solid #bfe8cc;
    font-size: .64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 3px 9px;
    border-radius: 20px;
}

.inline-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    align-items: end;
    margin-bottom: 4px;
}
.inline-form-grid .form-group { margin-bottom: 0; }

/* =========================================================
   RESPONSYWNOŚĆ
   ========================================================= */

@media (max-width: 1000px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .info-grid, .results-container { grid-template-columns: 1fr; }
    .quick-links { grid-template-columns: 1fr; margin-top: -40px; }
    .footer-main { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 850px) {
    .header-top { padding: 18px 0; }
    .header-logo { height: 44px; }
    .bip-text { display: none; }

    .nav-toggle { display: block; }
    .nav-container { flex-wrap: wrap; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 3;
        padding-bottom: 10px;
    }
    .nav-bar.nav-open .nav-links { display: flex; }
    .nav-links a { padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
    .nav-links a::after { display: none; }
    .nav-links a.active { background: transparent; color: #fff; padding-left: 10px; border-left: 3px solid #fff; }
    .nav-right { margin-left: auto; order: 2; }

    .hero-inner { padding: 52px 0 84px; }
    .hero::before { background-size: 300px; background-position: right -80px bottom -40px; }

    .news-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .stat-summary { grid-template-columns: 1fr 1fr; }
    .item-row { grid-template-columns: 1fr; gap: 8px; padding: 18px 20px; }
    .item-tag { justify-self: start; }
    .item-row:hover { transform: translateY(-3px); }
    .person-card, .level-members .person-card { width: 100%; }
    .info-strip-blue { flex-direction: column; text-align: center; padding: 32px 26px; }
    .btn-discord-strip { width: 100%; text-align: center; }
    .article-container { padding: 30px 24px; }
    .form-row { flex-direction: column; gap: 0; }
    .footer-main { grid-template-columns: 1fr; gap: 26px; padding-top: 38px; padding-bottom: 30px; }
    .footer-col { line-height: 1.9; font-size: .86rem; }
    .footer-black-bar .container { flex-direction: column; text-align: center; }
    .apply-section { text-align: center; }
    .apply-section .btn { width: 100%; }
    .stat-tiles { grid-template-columns: 1fr 1fr; }
    .admin-tabs { flex-direction: column; }
}
