/*
Theme Name: Referendum Civic
Theme URI: https://referendum.pl/
Author: Referendum.pl
Description: Lightweight civic portal theme for Referendum.pl.
Version: 0.1.0
Text Domain: referendum-civic
*/

:root {
    --rc-bg: #fbfaf8;
    --rc-paper: #ffffff;
    --rc-ink: #171717;
    --rc-muted: #5f6368;
    --rc-line: #e7dfd8;
    --rc-red: #c83a3a;
    --rc-red-dark: #9f2d2d;
    --rc-navy: #161b26;
    --rc-gold: #d6b36a;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--rc-bg);
    color: var(--rc-ink);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: var(--rc-red-dark);
}

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

.rc-site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    border-bottom: 1px solid rgba(200, 58, 58, 0.18);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.admin-bar .rc-site-header {
    top: 32px;
}

.rc-site-header::before {
    display: block;
    height: 8px;
    background:
        linear-gradient(180deg, #ffffff 0 50%, var(--rc-red) 50% 100%),
        repeating-linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0) 28px, rgba(255,255,255,0.25) 28px, rgba(255,255,255,0.25) 30px);
    content: "";
}

.rc-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(1180px, calc(100% - 36px));
    min-height: 72px;
    margin: 0 auto;
}

.rc-brand {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: var(--rc-ink);
    text-decoration: none;
}

.rc-brand-mark {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(200, 58, 58, 0.18);
}

.rc-brand-mark img {
    width: 30px;
    height: 30px;
}

.rc-brand-text {
    display: grid;
    gap: 1px;
}

.rc-brand strong {
    font-size: 22px;
    line-height: 1;
    letter-spacing: 0;
    text-transform: uppercase;
}

.rc-brand span {
    color: var(--rc-muted);
    font-size: 13px;
}

.rc-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}

.rc-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rc-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border-radius: 8px;
    padding: 0 12px;
    color: var(--rc-ink);
    font-weight: 700;
    text-decoration: none;
}

.rc-nav a:hover,
.rc-nav .current-menu-item > a {
    background: #f4e5e2;
    color: var(--rc-red-dark);
}

.rc-main {
    min-height: calc(100vh - 160px);
}

.rc-content {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

.home .rc-content,
.front-page .rc-content {
    width: 100%;
    padding: 0;
}

.rc-page-title {
    margin: 0 0 22px;
    font-size: clamp(30px, 5vw, 54px);
    line-height: 1.06;
    letter-spacing: 0;
}

.rc-kicker {
    margin: 0 0 8px;
    color: var(--rc-red-dark);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.rc-not-found {
    display: grid;
    gap: 12px;
    min-height: 60vh;
    align-content: center;
    border-top: 10px solid var(--rc-red);
    padding: 42px 0;
}

.rc-not-found p {
    max-width: 640px;
    margin: 0;
    color: var(--rc-muted);
}

.rc-link-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.rc-link-grid a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    border-radius: 8px;
    padding: 0 14px;
    background: var(--rc-red);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.rc-footer {
    border-top: 1px solid var(--rc-line);
    background: linear-gradient(180deg, #ffffff 0 48%, #f4e5e2 48% 100%);
    color: var(--rc-muted);
}

.rc-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 22px 0;
    font-size: 14px;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

@media (max-width: 782px) {
    .admin-bar .rc-site-header {
        top: 46px;
    }
}

@media (max-width: 720px) {
    .rc-header-inner,
    .rc-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .rc-nav {
        justify-content: flex-start;
    }
}
