:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --text: #172033;
    --muted: #667085;
    --border: #e4e7ec;

    --brand: #172554;
    --brand2: #263e83;

    --yes: #137a4d;
    --no: #b42318;
    --abstain: #667085;

    --shadow: 0 8px 28px rgba(16, 24, 40, 0.07);
}


/* =========================================================
   GRUNDEINSTELLUNGEN
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;

    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    line-height: 1.55;
}

a {
    color: inherit;
}

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


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 72px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 24px;
}

.brand {
    text-decoration: none;

    font-weight: 850;
    font-size: 1.35rem;

    letter-spacing: -0.02em;

    color: var(--brand);
}

nav {
    display: flex;
    gap: 22px;
}

nav a,
.site-footer a {
    text-decoration: none;

    color: var(--muted);

    font-weight: 650;
}

nav a:hover,
.site-footer a:hover {
    color: var(--brand);
}


/* =========================================================
   HINWEIS
   ========================================================= */

.disclaimer {
    background: #fff8e7;

    border-bottom: 1px solid #f4dfaa;

    color: #7a5412;

    font-size: 0.9rem;

    padding: 9px 0;
}


/* =========================================================
   STARTSEITE
   ========================================================= */

.page-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        310px;

    gap: 30px;

    padding-top: 38px;
    padding-bottom: 56px;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    background:
        linear-gradient(
            135deg,
            var(--brand),
            var(--brand2)
        );

    color: white;

    border-radius: 22px;

    padding: 42px;

    box-shadow: var(--shadow);
}

.hero h1,
.poll-detail h1,
.legal-page h1 {
    margin: 6px 0 12px;

    letter-spacing: -0.035em;
}

.hero h1 {
    font-size: clamp(
        2rem,
        5vw,
        3.7rem
    );

    line-height: 1.02;
}

.hero p {
    color: rgba(255, 255, 255, 0.8);

    max-width: 720px;

    margin-bottom: 0;

    font-size: 1.06rem;
}

.eyebrow {
    text-transform: uppercase;

    letter-spacing: 0.11em;

    font-size: 0.73rem;

    font-weight: 850;

    color: #6676a8;
}

.hero .eyebrow {
    color: #c8d2ff;
}


/* =========================================================
   WERBEFLÄCHEN
   ========================================================= */

.ad-slot {
    border: 1px dashed #aab3c4;

    background: #eef1f6;

    color: #7c8799;

    display: flex;

    align-items: center;
    justify-content: center;

    text-align: center;

    font-size: 0.75rem;

    letter-spacing: 0.08em;

    font-weight: 800;

    border-radius: 12px;
}

.ad-wide {
    min-height: 100px;

    margin: 26px 0;
}

.ad-rectangle {
    min-height: 250px;
}


/* =========================================================
   ABSCHNITTSÜBERSCHRIFT
   ========================================================= */

.section-heading {
    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    margin: 30px 0 16px;
}

.section-heading h2 {
    margin: 3px 0 0;
}


/* =========================================================
   ABSTIMMUNGSKARTEN
   ========================================================= */

.poll-grid {
    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 18px;
}

.poll-card,
.side-card,
.poll-detail,
.results {
    background: var(--surface);

    border: 1px solid var(--border);

    box-shadow: var(--shadow);

    border-radius: 18px;
}

.poll-card {
    padding: 24px;

    display: flex;

    flex-direction: column;
}

.poll-card h3 {
    margin: 8px 0;
}

.poll-card p {
    color: var(--muted);

    flex-grow: 1;
}

.poll-category {
    display: inline-flex;

    align-self: flex-start;

    background: #edf0ff;

    color: #34468f;

    padding: 4px 9px;

    border-radius: 999px;

    font-size: 0.75rem;

    font-weight: 800;
}

.poll-meta {
    color: var(--muted);

    font-size: 0.88rem;

    margin: 12px 0 16px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.button {
    display: inline-block;

    text-align: center;

    padding: 11px 15px;

    border-radius: 10px;

    background: var(--brand);

    color: white;

    text-decoration: none;

    font-weight: 800;
}

.button:hover {
    background: var(--brand2);
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    display: flex;

    flex-direction: column;

    gap: 22px;
}

.side-card {
    padding: 22px;
}

.side-card h3 {
    margin-top: 0;
}

.side-card p {
    color: var(--muted);

    margin-bottom: 0;
}


/* =========================================================
   EINZELNE ABSTIMMUNG
   ========================================================= */

.poll-page {
    max-width: 920px;

    padding-top: 30px;
    padding-bottom: 60px;
}

.back-link {
    display: inline-block;

    margin-bottom: 14px;

    color: var(--muted);

    text-decoration: none;

    font-weight: 700;
}

.poll-detail {
    padding: 34px;
}

.poll-detail h1 {
    margin-top: 12px;

    font-size: clamp(
        1.7rem,
        4vw,
        2.65rem
    );

    line-height: 1.15;
}

.poll-description {
    color: var(--muted);
}


/* =========================================================
   ABSTIMMUNGSBUTTONS
   ========================================================= */

.vote-form {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;

    margin-top: 28px;
}

.vote-button {
    min-height: 58px;

    border: 0;

    border-radius: 12px;

    color: white;

    font-weight: 850;

    font-size: 1rem;

    cursor: pointer;

    transition:
        transform 0.1s ease,
        opacity 0.1s ease;
}

.vote-button:hover {
    opacity: 0.92;
}

.vote-button:active {
    transform: scale(0.98);
}

.vote-button.yes {
    background: var(--yes);
}

.vote-button.no {
    background: var(--no);
}

.vote-button.abstain {
    background: var(--abstain);
}


/* =========================================================
   MELDUNGEN
   ========================================================= */

.notice {
    background: #fff6ed;

    border: 1px solid #ffd6ae;

    padding: 14px 16px;

    border-radius: 10px;

    margin: 18px 0;
}

.notice.success {
    background: #ecfdf3;

    border-color: #abefc6;
}


/* =========================================================
   ERGEBNISSE
   ========================================================= */

.results {
    margin-top: 22px;

    padding: 30px;
}

.result-row {
    margin: 19px 0;
}

.result-top {
    display: flex;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 6px;
}

.bar {
    height: 12px;

    background: #e9edf3;

    border-radius: 999px;

    overflow: hidden;
}

.bar-fill {
    height: 100%;

    border-radius: inherit;
}

.bar-fill.yes {
    background: var(--yes);
}

.bar-fill.no {
    background: var(--no);
}

.bar-fill.abstain {
    background: var(--abstain);
}

.result-row small {
    color: var(--muted);
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    background: var(--surface);

    border-top: 1px solid var(--border);
}

.footer-inner {
    min-height: 80px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    color: var(--muted);

    font-size: 0.9rem;
}

.footer-inner div {
    display: flex;

    gap: 18px;
}


/* =========================================================
   IMPRESSUM / DATENSCHUTZ
   ========================================================= */

.legal-page {
    max-width: 800px;

    padding-top: 55px;
    padding-bottom: 70px;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 850px) {

    .page-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: grid;

        grid-template-columns:
            1fr
            1fr;
    }

    .ad-rectangle {
        min-height: 180px;
    }
}


/* =========================================================
   SMARTPHONE
   ========================================================= */

@media (max-width: 650px) {

    body {
        font-size: 16px;
    }


    /* Container */

    .container {
        width: calc(100% - 20px);
    }


    /* Header */

    .header-inner {
        min-height: auto;

        flex-direction: column;

        align-items: flex-start;

        gap: 10px;

        padding: 14px 0;
    }

    .brand {
        font-size: 1.3rem;
    }

    nav {
        width: 100%;

        display: flex;

        flex-wrap: wrap;

        gap: 10px 16px;

        font-size: 0.9rem;
    }


    /* Hinweis */

    .disclaimer {
        font-size: 0.8rem;

        line-height: 1.4;

        padding: 8px 0;
    }


    /* Layout */

    .page-layout {
        padding-top: 20px;

        gap: 20px;
    }


    /* Hero */

    .hero {
        padding: 24px 18px;

        border-radius: 16px;
    }

    .hero h1 {
        font-size: 2rem;

        line-height: 1.08;
    }

    .hero p {
        font-size: 0.98rem;
    }


    /* Abstimmungen */

    .poll-grid {
        grid-template-columns: 1fr;

        gap: 14px;
    }

    .poll-card {
        padding: 20px;
    }

    .poll-card h3 {
        font-size: 1.2rem;
    }


    /* Buttons */

    .button {
        width: 100%;

        padding: 14px 16px;

        font-size: 1rem;

        min-height: 48px;
    }


    /* Abstimmungsseite */

    .poll-page {
        width: calc(100% - 20px);

        padding-top: 20px;
        padding-bottom: 40px;
    }

    .poll-detail {
        padding: 20px;

        border-radius: 15px;
    }

    .poll-detail h1 {
        font-size: 1.65rem;

        line-height: 1.2;
    }

    .poll-description {
        font-size: 0.95rem;
    }


    /* Abstimmungsbuttons */

    .vote-form {
        grid-template-columns: 1fr;

        gap: 10px;

        margin-top: 22px;
    }

    .vote-button {
        width: 100%;

        min-height: 58px;

        font-size: 1.05rem;
    }


    /* Ergebnisse */

    .results {
        padding: 20px;

        border-radius: 15px;
    }

    .result-top {
        font-size: 1rem;
    }

    .bar {
        height: 14px;
    }


    /* Sidebar */

    .sidebar {
        grid-template-columns: 1fr;
    }

    .side-card {
        padding: 18px;
    }


    /* Werbung */

    .ad-wide {
        min-height: 80px;

        margin: 18px 0;
    }

    .ad-rectangle {
        min-height: 180px;
    }


    /* Footer */

    .footer-inner {
        flex-direction: column;

        align-items: flex-start;

        justify-content: center;

        gap: 10px;

        padding: 20px 0;
    }

    .footer-inner div {
        flex-wrap: wrap;
    }
}


/* =========================================================
   SEHR KLEINE SMARTPHONES
   ========================================================= */

@media (max-width: 380px) {

    .hero h1 {
        font-size: 1.75rem;
    }

    .poll-detail h1 {
        font-size: 1.45rem;
    }

    .poll-card {
        padding: 17px;
    }

    .poll-detail {
        padding: 17px;
    }

    .results {
        padding: 17px;
    }

    nav {
        font-size: 0.85rem;
    }
}
/* =========================================================
   NEUE ÖFFENTLICHE STARTSEITE
   ========================================================= */

.public-home {
    max-width: 1050px;

    padding-top: 38px;
    padding-bottom: 60px;
}


/* =========================================================
   STARTSEITEN INTRO
   ========================================================= */

.home-intro {
    max-width: 760px;

    margin-bottom: 26px;
}

.home-intro h1 {
    margin: 6px 0 12px;

    font-size: clamp(
        2rem,
        5vw,
        3.4rem
    );

    line-height: 1.08;

    letter-spacing: -0.04em;

    color: var(--brand);
}

.home-intro p {
    max-width: 680px;

    margin: 0;

    color: var(--muted);

    font-size: 1.05rem;

    line-height: 1.7;
}


/* =========================================================
   ABSTIMMUNGSBEREICH
   ========================================================= */

.poll-section {
    margin-top: 36px;
}

.poll-section-header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}

.poll-section-header h2 {
    margin: 4px 0 0;

    font-size: 1.8rem;
}

.poll-counter {
    color: var(--muted);

    font-size: 0.9rem;

    font-weight: 700;
}


/* =========================================================
   ABSTIMMUNGSKARTEN
   ========================================================= */

.poll-number {
    color: var(--muted);

    font-size: 0.75rem;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 0.08em;
}

.poll-card h3 {
    margin-top: 8px;

    font-size: 1.25rem;

    color: var(--brand);
}

.poll-question {
    font-size: 1rem;

    line-height: 1.6;

    margin-bottom: 22px;
}


/* =========================================================
   WERBUNG INNERHALB DER ABSTIMMUNGEN
   ========================================================= */

.ad-grid {
    grid-column: 1 / -1;

    min-height: 100px;

    margin: 8px 0;
}


/* =========================================================
   LEERE STARTSEITE
   ========================================================= */

.empty-polls {
    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 16px;

    padding: 30px;

    text-align: center;

    color: var(--muted);

    margin-bottom: 30px;
}


/* =========================================================
   STARTSEITE SMARTPHONE
   ========================================================= */

@media (max-width: 650px) {

    .public-home {
        padding-top: 24px;
        padding-bottom: 40px;
    }


    .home-intro {
        margin-bottom: 20px;
    }


    .home-intro h1 {
        font-size: 2rem;
    }


    .home-intro p {
        font-size: 0.95rem;
    }


    .poll-section {
        margin-top: 26px;
    }


    .poll-section-header {
        flex-direction: column;

        align-items: flex-start;

        gap: 6px;
    }


    .poll-section-header h2 {
        font-size: 1.5rem;
    }


    .poll-card {
        padding: 20px;
    }


    .poll-card h3 {
        font-size: 1.15rem;
    }


    .poll-question {
        font-size: 0.96rem;
    }


    .ad-grid {
        min-height: 80px;
    }

}
/* =========================================================
   MOBILE FIX – NICHTS DARF ÜBER DEN BILDSCHIRM HINAUS
   ========================================================= */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

.container,
.public-home,
.poll-section,
.poll-grid,
.poll-card,
.poll-detail,
.results,
.ad-slot,
.home-intro {
    min-width: 0;
    max-width: 100%;
}

.poll-card h3,
.poll-card p,
.poll-detail h1,
.home-intro h1,
.home-intro p {
    overflow-wrap: anywhere;
    word-break: normal;
}


/* =========================================================
   SMARTPHONE FIX
   ========================================================= */

@media (max-width: 650px) {

    .container {
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        margin-left: auto;
        margin-right: auto;
    }

    .public-home {
        width: calc(100% - 20px);
        max-width: calc(100% - 20px);
        margin-left: auto;
        margin-right: auto;
    }

    .poll-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
    }

    .poll-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .ad-slot {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .ad-grid {
        grid-column: 1;
        width: 100%;
        max-width: 100%;
    }

    .button {
        width: 100%;
        max-width: 100%;
    }

    .vote-form {
        width: 100%;
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr);
    }

    .vote-button {
        width: 100%;
        max-width: 100%;
    }

    .header-inner {
        width: 100%;
    }

    nav {
        width: 100%;
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}