/* ============================================================
   ZMIENNE KOLORÓW (jasny motyw — domyślny)
   ============================================================ */
:root {
    --bg:            #ffffff;
    --bg-alt:        #f9f9f7;
    --bg-card:       #ffffff;
    --bg-header:     #ffffff;
    --bg-ad:         #f5f5f5;
    --bg-hero:       #f0f0f0;

    --text:          #1a1a1a;
    --text-body:     #222222;
    --text-heading:  #111111;
    --text-muted:    #666666;
    --text-meta:     #888888;

    --border:        #e0e0e0;
    --border-light:  #e8e8e8;

    --accent:        #2d5016;
    --accent-dark:   #1e3a0e;
    --accent-soft:   #eef4e9;
    --accent-border: #d6e3c8;

    --footer-bg:     #1a1a1a;
    --footer-text:   #cccccc;
    --footer-border: #333333;

    --menu-text:     #ffffff;
    --menu-hover:    #1e3a0e;

    --danger:        #b91c1c;
}

/* ============================================================
   CIEMNY MOTYW
   ============================================================ */
html[data-theme="dark"] {
    --bg:            #14181c;
    --bg-alt:        #1c2127;
    --bg-card:       #1c2127;
    --bg-header:     #14181c;
    --bg-ad:         #1c2127;
    --bg-hero:       #1f262e;

    --text:          #e6e8eb;
    --text-body:     #d5d9dd;
    --text-heading:  #ffffff;
    --text-muted:    #9aa1a9;
    --text-meta:     #7a8087;

    --border:        #2a3038;
    --border-light:  #252b32;

    --accent:        #7fb069;
    --accent-dark:   #3a6620;
    --accent-soft:   #1f2a1a;
    --accent-border: #2f4a25;

    --footer-bg:     #0d1014;
    --footer-text:   #9aa1a9;
    --footer-border: #1c2127;

    --menu-text:     #ffffff;
    --menu-hover:    #3a6620;

    --danger:        #ef4444;
}

/* ============================================================
   RESET + PODSTAWY
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Wspólne przejścia kolorów dla elementów */
.site-topbar,
.site-header,
.card,
.side-box,
.ad-slot,
.toc-box,
.tag-pill,
.article-body,
.article-tags,
.article-share,
.share-btn,
.site-footer,
.theme-toggle,
.search-form,
.pagination a,
.pagination span,
.simple-list li,
.side-list li {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ============================================================
   STICKY HEADER
   ============================================================ */
.site-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-header);
}
.site-topbar.is-scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 22px 0 10px;
    background: var(--bg-header);
    transition: padding 0.25s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 34px;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -1px;
    transition: font-size 0.25s ease, letter-spacing 0.25s ease, color 0.3s ease;
}
.header-tagline {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: italic;
    max-height: 40px;
    opacity: 1;
    overflow: hidden;
    transition: opacity 0.2s ease,
                max-height 0.25s ease,
                margin-top 0.25s ease,
                padding 0.25s ease,
                color 0.3s ease;
}

/* Stan po przewinięciu */
.site-topbar.is-scrolled .logo {
    font-size: 22px;
    letter-spacing: -0.5px;
}
.site-topbar.is-scrolled .header-tagline {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
}
.site-topbar.is-scrolled .site-header {
    padding: 10px 0 4px;
}

/* ── Search form ── */
.search-form {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 2px;
    overflow: hidden;
    background: var(--bg);
}
.search-form input {
    border: 0;
    padding: 8px 12px;
    font-size: 14px;
    width: 220px;
    outline: none;
    font-family: inherit;
    background: transparent;
    color: var(--text);
}
.search-form input::placeholder { color: var(--text-meta); }
.search-form button {
    background: var(--accent);
    color: #fff;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    transition: background-color 0.2s ease;
}
.search-form button:hover { background: var(--accent-dark); }
.search-form button svg { display: block; }

/* ── Theme toggle ── */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    padding: 0;
    flex-shrink: 0;
}
.theme-toggle:hover {
    background: var(--accent-soft);
    color: var(--accent);
    transform: rotate(15deg);
}
.theme-toggle svg { display: block; }
.theme-toggle .icon-sun  { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ============================================================
   MENU
   ============================================================ */
.site-menu {
    background: var(--accent);
    border-top: 3px solid var(--accent-dark);
}
.site-menu ul {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}
.site-menu a {
    display: block;
    color: var(--menu-text);
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-decoration: none;
}
.site-menu a:hover,
.site-menu a.active {
    background: var(--menu-hover);
    color: var(--menu-text);
    text-decoration: none;
}

/* Menu mobile (hamburger) */
.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: var(--menu-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 12px 0;
    align-items: center;
    gap: 8px;
}
.menu-toggle svg { display: block; }

/* ============================================================
   REKLAMY
   ============================================================ */
.ad-slot {
    padding: 20px 0;
    text-align: center;
    background: var(--bg-ad);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 20px 0;
}
.ad-slot--sidebar {
    padding: 20px 0;
    background: var(--bg-ad);
    border: 1px solid var(--border);
    margin: 0 0 24px;
    text-align: center;
}
.ad-slot--top { margin-top: 0; }

/* ============================================================
   GŁÓWNY UKŁAD
   ============================================================ */
.main-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding-top: 30px;
    padding-bottom: 30px;
}
.main-col { min-width: 0; }

.main-wrap > .sidebar {
    align-self: start;
    position: sticky;
    top: 140px;
    transition: top 0.25s ease;
}
.site-topbar:not(.is-scrolled) ~ .main-wrap > .sidebar {
    top: 220px;
}

/* ============================================================
   HERO (home)
   ============================================================ */
.hero { margin-bottom: 40px; }
.hero-card {
    display: block;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.hero-card:hover { text-decoration: none; }
.hero-img {
    width: 100%;
    height: 380px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-hero);
}
.hero-body { padding: 24px 28px; }
.hero-body h2 {
    font-family: Georgia, serif;
    font-size: 30px;
    line-height: 1.2;
    margin: 10px 0;
    color: var(--text-heading);
}
.hero-card:hover h2 { color: var(--accent); }
.hero-body p { color: var(--text-muted); font-size: 15px; margin-bottom: 12px; }

/* ============================================================
   SEKCJE
   ============================================================ */
.section { margin-bottom: 44px; }
.section-title {
    font-family: Georgia, serif;
    font-size: 22px;
    border-bottom: 3px solid var(--accent);
    padding-bottom: 8px;
    margin-bottom: 20px;
    display: inline-block;
    color: var(--text-heading);
}
.section-title a { color: inherit; }
.section-title a:hover { color: var(--accent); }
.section-more {
    margin-top: 16px;
    text-align: right;
    font-size: 14px;
    font-weight: 700;
}

/* ============================================================
   GRID + KARTY
   ============================================================ */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s, background-color 0.3s ease, border-color 0.3s ease;
}
.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.card-img {
    display: block;
    width: 100%;
    height: 170px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-hero);
    border-bottom: 1px solid var(--border-light);
}
.card-body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 {
    font-family: Georgia, serif;
    font-size: 17px;
    line-height: 1.3;
    margin: 8px 0;
    color: var(--text-heading);
}
.card-body h3 a { color: inherit; }
.card-body h3 a:hover { color: var(--accent); }
.card-body p { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; flex: 1; }
.meta { font-size: 11px; color: var(--text-meta); text-transform: uppercase; letter-spacing: 0.5px; }

.cat-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}
.cat-badge--sm { font-size: 10px; padding: 2px 6px; }

/* ============================================================
   ARTYKUŁ
   ============================================================ */
.article { max-width: 100%; }
.article-title {
    font-family: Georgia, serif;
    font-size: 38px;
    line-height: 1.15;
    margin-bottom: 14px;
    color: var(--text-heading);
}
.article-meta {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    margin-bottom: 24px;
}
.article-hero {
    width: 100%;
    margin-bottom: 24px;
    border-radius: 2px;
}
.article-body {
    font-size: 17px;
    line-height: 1.75;
    color: var(--text-body);
}
.article-body p { margin-bottom: 18px; }
.article-body h2 {
    font-family: Georgia, serif;
    font-size: 26px;
    margin: 32px 0 14px;
    color: var(--text-heading);
    scroll-margin-top: 120px;
}
.article-body h3 {
    font-family: Georgia, serif;
    font-size: 17px;
    margin: 24px 0 10px;
    color: var(--text-heading);
    scroll-margin-top: 120px;
}
.article-body ul, .article-body ol { margin: 0 0 18px 24px; }
.article-body li { margin-bottom: 6px; }
.article-body img { margin: 20px 0; border-radius: 2px; }
.article-body blockquote {
    border-left: 4px solid var(--accent);
    padding: 8px 20px;
    margin: 20px 0;
    background: var(--bg-alt);
    font-style: italic;
    color: var(--text-muted);
}
.article-body a { color: var(--accent); }

.article-tags {
    margin-top: 32px;
    padding-top: 20px;
    padding-bottom: 10px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text);
}

/* ============================================================
   TOC
   ============================================================ */
.toc-box {
    background: var(--bg-alt);
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    margin: 0 0 28px;
    border-radius: 2px;
}
.toc-title {
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.toc-item {
    position: relative;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.4;
    padding-left: 14px;
}
.toc-item::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 11px;
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
}
.toc-item a {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.toc-item a:hover {
    background: var(--accent-soft);
    color: var(--accent);
    text-decoration: none;
}
.toc-item.is-active a {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}
.toc-item.is-active::before { background: #fff; }

.toc-inline { display: block; margin-bottom: 28px; }
.side-box--toc { display: none; }
@media (min-width: 901px) {
    .toc-inline { display: none; }
    .side-box--toc { display: block; }
}

/* ============================================================
   TAGI
   ============================================================ */
.tag-pill {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    margin: 0 6px 6px 0;
    border: 1px solid var(--accent-border);
}
.tag-pill:hover {
    background: var(--accent);
    color: #fff;
    text-decoration: none;
}
.tag-pill span { opacity: 0.6; font-size: 10px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 4px; }

/* ============================================================
   LISTY PROSTE
   ============================================================ */
.simple-list { list-style: none; }
.simple-list li {
    border-bottom: 1px solid var(--border-light);
    padding: 16px 0;
}
.simple-list li:first-child { padding-top: 0; }
.simple-list a {
    font-family: Georgia, serif;
    font-size: 18px;
    color: var(--text-heading);
}
.simple-list a:hover { color: var(--accent); }
.simple-list p { color: var(--text-muted); font-size: 14px; margin: 6px 0; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { min-width: 0; }
.side-box {
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    padding: 18px;
    margin-bottom: 24px;
}
.side-title {
    font-family: Georgia, serif;
    font-size: 16px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
    margin-bottom: 14px;
    color: var(--text-heading);
}
.side-list { list-style: none; }
.side-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}
.side-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.side-list a {
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    display: block;
}
.side-list a:hover { color: var(--accent); }
.side-meta { font-size: 11px; color: var(--text-meta); margin-top: 4px; }

/* Lista z miniaturkami */
.side-list--thumbs li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}
.side-list--thumbs li:first-child { padding-top: 0; }
.side-list--thumbs li:last-child { border-bottom: 0; padding-bottom: 0; }

.side-thumb-link {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px;
    align-items: flex-start;
    color: inherit;
    text-decoration: none;
    width: 100%;
}
.side-thumb-link:hover { text-decoration: none; }

.side-thumb {
    display: block !important;
    flex: 0 0 60px;
    width: 60px !important;
    height: 60px !important;
    min-width: 60px;
    max-width: 60px;
    background-color: var(--bg-hero);
    background-size: cover;
    background-position: center;
    border-radius: 3px;
    transition: transform 0.2s ease;
}
.side-thumb-link:hover .side-thumb { transform: scale(1.05); }

.side-thumb-body {
    flex: 1;
    min-width: 0;
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    justify-content: flex-start;
}
.side-thumb-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-heading);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.side-thumb-link:hover .side-thumb-title { color: var(--accent); }

/* ============================================================
   BREADCRUMBS / PAGE TITLE
   ============================================================ */
.breadcrumbs {
    font-size: 13px;
    color: var(--text-meta);
    margin-bottom: 14px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--accent); }

.page-title {
    font-family: Georgia, serif;
    font-size: 34px;
    margin-bottom: 6px;
    color: var(--text-heading);
}
.page-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

/* ============================================================
   PAGINACJA
   ============================================================ */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 32px 0;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border);
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
}
.pagination a:hover {
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-color: var(--accent);
}
.pagination .current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* ============================================================
   404
   ============================================================ */
.error-404 { text-align: center; padding: 80px 20px; }
.error-404 h1 {
    font-family: Georgia, serif;
    font-size: 100px;
    color: var(--accent);
    line-height: 1;
}
.error-404 p { font-size: 18px; color: var(--text-muted); margin: 20px 0; }
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 10px 22px;
    font-weight: 700;
    font-size: 14px;
}
.btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
    padding: 40px 20px;
}
.footer-grid h4 {
    font-family: Georgia, serif;
    color: #fff;
    margin-bottom: 14px;
    font-size: 15px;
}
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid a { color: var(--footer-text); font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { font-size: 13px; line-height: 1.6; }
.footer-bottom {
    border-top: 1px solid var(--footer-border);
    padding: 16px 0;
    font-size: 12px;
    text-align: center;
    color: var(--text-meta);
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 46px;
    height: 46px;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s, transform 0.15s, background 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 999;
}
.scroll-top.is-visible { opacity: 1; visibility: visible; }
.scroll-top:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}
.scroll-top svg { display: block; width: 20px; height: 20px; }

/* ============================================================
   SHARE BUTTONS
   ============================================================ */
.article-share {
    margin-top: 14px;
    padding-top: 0;
    padding-bottom: 0px;
    border-top: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}
.article-share-label {
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 6px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    font-family: inherit;
    text-decoration: none;
    padding: 0;
}
.share-btn svg { display: block; }
.share-btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: #fff;
    border-color: transparent;
}
.share-btn--fb:hover   { background: #1877f2; }
.share-btn--tw:hover   { background: #000; }
.share-btn--wa:hover   { background: #25d366; }
.share-btn--li:hover   { background: #0a66c2; }
.share-btn--mail:hover { background: #ea4335; }
.share-btn--copy:hover { background: var(--accent); }

.share-btn--copy {
    width: auto;
    padding: 0 14px;
    border-radius: 18px;
}
.share-btn--copy .share-btn-text {
    font-size: 13px;
    font-weight: 700;
}
.share-btn--copy.is-copied {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
}

/* ============================================================
   RESPONSYWNOŚĆ
   ============================================================ */
@media (max-width: 900px) {
    .main-wrap { grid-template-columns: 1fr; gap: 30px; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-img { height: 240px; }
    .hero-body h2 { font-size: 22px; }
    .article-title { font-size: 28px; }

    .main-wrap > .sidebar { position: static; top: auto; }
}

@media (max-width: 768px) {
    .site-menu ul {
        display: none;
        flex-direction: column;
        flex-wrap: nowrap;
    }
    .site-menu ul.is-open { display: flex; }
    .menu-toggle { display: flex; }
    .site-menu a {
        padding: 12px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 13px;
    }
    .site-menu a.active { background: var(--menu-hover); }

    .article-body h2,
    .article-body h3 { scroll-margin-top: 150px; }
}

@media (max-width: 600px) {
    .header-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .search-form input { width: 100%; }
    .grid-3 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .site-menu a { padding: 10px 12px; font-size: 12px; }
    .scroll-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

@media (max-width: 480px) {
    .article-body h2,
    .article-body h3 { scroll-margin-top: 170px; }
}
/* ============================================================
   Czas czytania
   ============================================================ */
.read-time {
    color: var(--text-meta);
}

/* ============================================================
   Poprzedni / następny artykuł
   ============================================================ */
.article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 23px 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.article-nav-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: var(--bg-alt);
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.article-nav-item:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    text-decoration: none;
    transform: translateY(-2px);
}
.article-nav-item--next { text-align: right; }
.article-nav-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
}
.article-nav-title {
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-heading);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-nav-empty { display: block; }

@media (max-width: 600px) {
    .article-nav { grid-template-columns: 1fr; }
    .article-nav-item--next { text-align: left; }
}

/* ============================================================
   Progress bar czytania (na górze strony, pod sticky header)
   ============================================================ */
.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    z-index: 1001;
    transition: width 0.1s linear;
    pointer-events: none;
}
/* ============================================================
   STRONA KATEGORII — bez sidebara, siatka magazynowa
   ============================================================ */

/* Układ główny — pełna szerokość bez sidebara */
.main-wrap--full {
    grid-template-columns: 1fr;
}

/* Siatka kategorii: 4 kolumny */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 24px;
}

/* Mała karta — 1/4 szerokości (domyślnie) */
.card-cat {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card-cat:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.card-cat--small {
    grid-column: span 1;
}
/* Duża karta — 1/2 szerokości */
.card-cat--big {
    grid-column: span 2;
    flex-direction: row;
}

/* Obrazek */
.card-cat-img {
    display: block;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-hero);
    flex-shrink: 0;
}
.card-cat--small .card-cat-img {
    height: 170px;
    border-bottom: 1px solid var(--border-light);
}
.card-cat--big .card-cat-img {
    width: 50%;
    height: 100%;
    min-height: 260px;
    border-right: 1px solid var(--border-light);
}

/* Treść karty */
.card-cat-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.card-cat--big .card-cat-body {
    padding: 22px 24px;
    justify-content: center;
}

.card-cat-title {
    font-family: Georgia, serif;
    font-size: 17px;
    line-height: 1.3;
    margin: 0;
    color: var(--text-heading);
}
.card-cat--big .card-cat-title {
    font-size: 24px;
}
.card-cat-title a {
    color: inherit;
    text-decoration: none;
}
.card-cat-title a:hover {
    color: var(--accent);
    text-decoration: none;
}

.card-cat-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-cat-meta {
    font-size: 11px;
    color: var(--text-meta);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
}

/* Responsywność */
@media (max-width: 1024px) {
    /* Tablet: 2 kolumny, duże karty = pełna szerokość */
    .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .card-cat--big {
        grid-column: span 2;
        flex-direction: column;
    }
    .card-cat--big .card-cat-img {
        width: 100%;
        height: 240px;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border-light);
    }
    .card-cat--big .card-cat-title { font-size: 20px; }
    .card-cat--big .card-cat-body { padding: 16px 18px 20px; }
}

@media (max-width: 600px) {
    /* Mobile: 1 kolumna, wszystko pełna szerokość */
    .cat-grid { grid-template-columns: 1fr; gap: 16px; }
    .card-cat--big { flex-direction: column; }
    .card-cat--big .card-cat-img {
        width: 100%;
        height: 200px;
        border-right: 0;
        border-bottom: 1px solid var(--border-light);
    }
    .card-cat--big .card-cat-title { font-size: 18px; }
}
/* ============================================================
   HOME — górna siatka + sekcje kategorii
   ============================================================ */
.home-top {
    margin-bottom: 48px;
}

/* Siatka 4 kolumn w sekcjach kategorii */
.cat-grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Nagłówek sekcji (tytuł + link „Więcej") */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--accent);
    padding-bottom: 8px;
    flex-wrap: wrap;
}
.section-header .section-title {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    display: inline-block;
}
.section-more-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    text-decoration: none;
}
.section-more-link:hover {
    text-decoration: underline;
}

/* Responsywność — sekcje kategorii */
@media (max-width: 1024px) {
    .cat-grid--4 {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .cat-grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .cat-grid--4 {
        grid-template-columns: 1fr;
    }
}