/*
 Theme Name:   Mobiwersum Growly Pro
 Theme URI:    https://mobiwersum.pl
 Description:  Profesjonalny, czytelny i nowoczesny szablon SEO/LLM Ready dla serwisów z recenzjami, testami i newsami technologicznymi.
 Author:       Mobiwersum
 Version:      15.0.0
 Requires at least: 6.4
 Requires PHP: 8.0
 Text Domain:  mobiwersum_pl
 Tags:         blog, news, custom-logo, translation-ready, accessibility-ready
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
*/

/* ----------------------------------------------------
   FONT INTER — self-hosted (RODO: brak wywołań do fonts.googleapis.com / fonts.gstatic.com)
---------------------------------------------------- */
/* inter-100 - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100;
  src: url('fonts/inter-v20-latin-100.woff2') format('woff2');
}
/* inter-100italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100;
  src: url('fonts/inter-v20-latin-100italic.woff2') format('woff2');
}
/* inter-200 - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 200;
  src: url('fonts/inter-v20-latin-200.woff2') format('woff2');
}
/* inter-200italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: italic;
  font-weight: 200;
  src: url('fonts/inter-v20-latin-200italic.woff2') format('woff2');
}
/* inter-300 - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  src: url('fonts/inter-v20-latin-300.woff2') format('woff2');
}
/* inter-300italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: italic;
  font-weight: 300;
  src: url('fonts/inter-v20-latin-300italic.woff2') format('woff2');
}
/* inter-regular - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/inter-v20-latin-regular.woff2') format('woff2');
}
/* inter-italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: italic;
  font-weight: 400;
  src: url('fonts/inter-v20-latin-italic.woff2') format('woff2');
}
/* inter-500 - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  src: url('fonts/inter-v20-latin-500.woff2') format('woff2');
}
/* inter-500italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: italic;
  font-weight: 500;
  src: url('fonts/inter-v20-latin-500italic.woff2') format('woff2');
}
/* inter-600 - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  src: url('fonts/inter-v20-latin-600.woff2') format('woff2');
}
/* inter-600italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: italic;
  font-weight: 600;
  src: url('fonts/inter-v20-latin-600italic.woff2') format('woff2');
}
/* inter-700 - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  src: url('fonts/inter-v20-latin-700.woff2') format('woff2');
}
/* inter-700italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: italic;
  font-weight: 700;
  src: url('fonts/inter-v20-latin-700italic.woff2') format('woff2');
}
/* inter-800 - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  src: url('fonts/inter-v20-latin-800.woff2') format('woff2');
}
/* inter-800italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: italic;
  font-weight: 800;
  src: url('fonts/inter-v20-latin-800italic.woff2') format('woff2');
}
/* inter-900 - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: normal;
  font-weight: 900;
  src: url('fonts/inter-v20-latin-900.woff2') format('woff2');
}
/* inter-900italic - latin */
@font-face {
  font-display: swap;
  font-family: 'Inter';
  font-style: italic;
  font-weight: 900;
  src: url('fonts/inter-v20-latin-900italic.woff2') format('woff2');
}

:root {
    color-scheme: light;

    /* --- MARKA (paleta 2026) --- */
    --color-primary: #2B3A8C;           /* Głęboki Granat Portalu — duże nagłówki sekcji specjalnych, ikony brandingowe, tła elementów wyróżnionych (nagłówek, hero bez zdjęcia, drawer) */
    --color-accent: #4F5FD1;            /* Żywy Błękit — kolor interakcji: linki, CTA, hover kart, aktywne zakładki menu, obramowania fokusa */
    --color-accent-hover: var(--color-primary); /* Ściemnienie akcentu przy hover/focus — reużywa granatu marki zamiast osobnego odcienia */
    --color-hot: #FF3B30;               /* Aksamitna Czerwień/Koral — "PILNE", pulsująca kropka LIVE, wskaźniki ważności */

    /* Tekst/ikony leżące na ciemnych/kolorowych powierzchniach (nagłówek, hero, drawer, banery) */
    --color-on-dark: #ffffff;
    --color-on-dark-muted: rgba(255, 255, 255, 0.78);

    /* Stała jasna "pigułka" wyszukiwarki w nagłówku */
    --surface-fixed-light: #ffffff;
    --color-on-fixed-light: var(--color-accent);

    /* Stałe, zawsze czytelne pary tło/tekst dla odznak kategorii i widżetów */
    --badge-default-bg: #E3EBFA;
    --badge-default-ink: #2B3B66;

    /* --- Tło i powierzchnie strony --- */
    --color-bg: #F8FAFC;                /* Chłodne Szare Tło strony */
    --color-surface: #ffffff;           /* Czysta Biel — tło kart, sidebaru, rozwijanego menu */
    --color-heading: var(--color-primary); /* Kolor nagłówków / akcentów tekstowych */
    --color-border: #E2E8F0;            /* Subtelna Szarość — obramowania kart, linie, siatki */
    --color-fill-soft: #D0E7E6;          /* Dekoracyjne tło (placeholdery, chmura tagów, ikony social) — bez zmian względem poprzedniej palety */
    --color-dark-zone: #0B132B;          /* Ciemny Granat Nocny — strefy specjalne (Color Zoning), stopka, karuzele */
    --color-text-body: #0F172A;          /* Ciemny Grafit (Slate) — zastępuje czysty czarny, mniej męczy wzrok */
    --color-text-muted: #64748B;         /* Stonowany Szary — daty, czas czytania, autor, meta-dane */

    /* Fonty zapasowe o zbliżonych proporcjach do Inter — mniejszy skok układu, jeśli Inter podmieni się z opóźnieniem */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    /* Font tytułów publicystycznych (nagłówki newsów, karty, hero) — kontrast budowany wagą i światłem liter,
       bo w /fonts/ mamy tylko Inter (self-hosted, bez wywołań do Google Fonts — patrz zasada RODO powyżej) */
    --font-headline: var(--font-main);

    --container-max: 1400px;
    --container-content: 1200px;
    --radius-lg: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

.site-main { flex: 1; }

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--color-heading); transition: color 0.3s ease; text-decoration: none; }
a:hover { color: var(--color-accent); }

/* Dostępność: ukryty tekst widoczny tylko dla czytników ekranu / po focusie */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}
.skip-link.screen-reader-text:focus {
    position: fixed;
    top: 10px; left: 10px;
    width: auto; height: auto;
    clip: auto;
    z-index: 100000;
    background: var(--color-primary);
    color: var(--color-on-dark);
    padding: 14px 22px;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Widoczne obramowanie focus dla klawiatury (a11y) */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.ct-button {
    background: var(--color-accent); color: var(--color-on-dark) !important;
    padding: 12px 24px; border-radius: 50px; font-weight: 600;
    display: inline-block; border: none; cursor: pointer; transition: 0.3s;
}
.ct-button:hover { background: var(--color-accent-hover); }

/* WSPÓLNE KONTENERY */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 20px; }
.content-container { width: 100%; max-width: var(--container-content); margin: 0 auto; padding: 0 20px; }

/* ----------------------------------------------------
   PŁYWAJĄCY NAGŁÓWEK (FLOATING PILL) & ANIMACJA
---------------------------------------------------- */
.header-wrapper {
    position: sticky;
    top: 25px;
    z-index: 999;
    padding: 0 20px;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.3, 1, 0.3, 1);
}

.header-wrapper.header-hidden { transform: translateY(-150%); }

.admin-bar .header-wrapper { top: calc(25px + 32px); }

.site-header {
    max-width: var(--container-max);
    margin: 0 auto;
    background-color: var(--color-primary);
    border-radius: 50px;
    padding: 12px 24px;
    box-shadow: 0 20px 40px rgba(79, 95, 209, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Efekt "liquid glass" — szkło z rozmyciem tła, z bezpiecznym fallbackiem dla starszych przeglądarek */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .site-header {
        background-color: rgba(79, 95, 209, 0.94);
        backdrop-filter: blur(20px) saturate(160%);
        -webkit-backdrop-filter: blur(20px) saturate(160%);
    }
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.site-branding { width: 25%; }
.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-on-dark);
}
.site-title { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }

.main-menu {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}
.main-menu ul { display: flex; gap: 35px; list-style: none; }
.main-menu a {
    color: var(--color-on-dark-muted);
    font-weight: 500;
    font-size: 15px;
}
.main-menu a:hover { color: var(--color-on-dark); }
.main-menu li.current-menu-item a { color: var(--color-on-dark); font-weight: 700; }

.header-right { width: 25%; display: flex; justify-content: flex-end; align-items: center; }

.header-search .search-form {
    display: flex;
    align-items: center;
    background-color: var(--surface-fixed-light);
    border-radius: 50px;
    padding: 8px 18px;
    height: 44px;
    transition: all 0.3s ease;
}
.header-search .search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(79, 95, 209, 0.35);
}

.header-search .search-field {
    border: none;
    background: transparent;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-on-fixed-light);
    width: 90px;
    transition: width 0.3s ease;
}
.header-search .search-field::placeholder { color: var(--color-text-muted); font-weight: 500; }
.header-search .search-field:focus { width: 150px; }

.header-search .search-submit {
    background: none; border: none; padding: 0; margin-left: 6px;
    color: var(--color-on-fixed-light); cursor: pointer; display: flex;
}
.header-search .search-submit:hover { color: var(--color-accent); }

.mobile-toggle-btn {
    display: none; background: none; border: none; color: var(--color-on-dark);
    cursor: pointer; margin-left: 15px; padding: 10px; min-width: 44px; min-height: 44px;
    align-items: center; justify-content: center;
}

/* ----------------------------------------------------
   WSKAŹNIK "NA ŻYWO / GORĄCE" — pulsująca kropka (czysty CSS)
---------------------------------------------------- */
.meta-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--color-hot);
}
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-hot);
    animation: pulse-live 1.8s infinite;
    flex-shrink: 0;
}
@keyframes pulse-live {
    0%   { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(255, 59, 48, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .live-dot { animation: none; }
}

/* ----------------------------------------------------
   SKELETON LOADER (SHIMMER) — placeholder dla obrazków w trakcie ładowania
   Użycie: dodaj klasę "skeleton" do .post-card-img-wrap / img, dopóki obraz się nie załaduje.
---------------------------------------------------- */
.skeleton { position: relative; background: var(--color-fill-soft); overflow: hidden; }
.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    animation: skeleton-shimmer 1.4s infinite;
}
@keyframes skeleton-shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
    .skeleton::after { animation: none; display: none; }
}

/* ----------------------------------------------------
   STRONA GŁÓWNA & ARCHIWA (GRID + SIDEBAR)
---------------------------------------------------- */
.hero-section { text-align: center; padding: 60px 0 30px; }
.hero-section h1 {
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    font-weight: 800;
    color: var(--color-heading);
    letter-spacing: -1px;
}
.hero-subtitle { margin-top: 14px; font-size: clamp(1rem, 2vw, 1.15rem); color: var(--color-text-muted); font-weight: 500; }
.archive-description { margin-top: 14px; color: var(--color-text-muted); font-size: 1.05rem; }

/* ----------------------------------------------------
   OKRUSZKI (BREADCRUMBS)
---------------------------------------------------- */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    width: fit-content;
    max-width: calc(100% - 40px);
    margin: 48px auto 0;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid rgba(226, 232, 240, 0.35);
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(79, 95, 209, 0.05);
}
.breadcrumbs a { color: var(--color-text-muted); font-weight: 600; }
.breadcrumbs a:hover { color: var(--color-accent); }
.breadcrumbs .breadcrumb-sep { color: var(--color-border); }
.breadcrumbs .breadcrumb-current { color: var(--color-heading); font-weight: 700; }

/* ----------------------------------------------------
   ODZNAKI KATEGORII (NEWS / RECENZJA / TEST)
---------------------------------------------------- */
.cat-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
/* Kolory odznak są celowo STAŁE (nie zależą od motywu) — zapewnia to jednakowy, gwarantowany kontrast w trybie jasnym i ciemnym */
.cat-badge.badge-default { background: var(--badge-default-bg); color: var(--badge-default-ink); }
.cat-badge.badge-news    { background: #DCE9FB; color: #1D4FA6; }
.cat-badge.badge-review  { background: #F3E3FF; color: #7A2FC0; }
.cat-badge.badge-test    { background: #FFE9D2; color: #B5590A; }
.cat-badge:hover { filter: brightness(0.95); }

.single-hero .cat-badge { font-size: 12px; padding: 6px 18px; }
.single-hero .badge-default { background: var(--color-accent); color: var(--color-on-dark); }
.single-hero .badge-news    { background: var(--color-accent); color: var(--color-on-dark); }
.single-hero .badge-review  { background: #9B4FE0; color: var(--color-on-dark); }
.single-hero .badge-test    { background: #E07B18; color: var(--color-on-dark); }

.main-content-wrapper {
    display: flex;
    gap: 50px;
    margin-bottom: 80px;
    align-items: flex-start;
}
.posts-column { flex: 1; min-width: 0; }
.sidebar-column { width: 320px; flex-shrink: 0; }

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

/* ----------------------------------------------------
   PAGINACJA — stylizacja domyślnego znacznika the_posts_pagination()
---------------------------------------------------- */
.pagination { margin-top: 50px; display: flex; justify-content: center; }
.pagination .nav-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 42px; height: 42px; padding: 0 16px;
    border-radius: 50px; font-weight: 600; font-size: 14px;
    background: var(--color-surface); color: var(--color-heading);
    border: 1px solid var(--color-border);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.pagination .page-numbers:hover { background: var(--color-accent); color: var(--color-on-dark); border-color: var(--color-accent); }
.pagination .page-numbers.current { background: var(--color-primary); color: var(--color-on-dark); border-color: var(--color-primary); }
.pagination .page-numbers.dots { background: transparent; border: none; }

.post-card {
    display: flex; flex-direction: column;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(79, 95, 209, 0.06);
    height: 100%;
    border: 1px solid rgba(226, 232, 240, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(79, 95, 209, 0.12); }
.post-card-img-wrap { overflow: hidden; }
.post-card-img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; transition: transform 0.5s ease; }
.post-card:hover .post-card-img { transform: scale(1.05); }
.placeholder-img {
    width: 100%; aspect-ratio: 4/3;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-fill-soft); color: var(--color-text-muted);
    font-size: 14px; font-weight: 600;
}

.post-card-body { padding: 28px; display: flex; flex-direction: column; flex-grow: 1; }
.entry-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; list-style: none; font-size: 13px; margin-bottom: 12px; color: var(--color-text-muted); }
.meta-sep { color: var(--color-border); }
.post-card-title { font-size: 1.4rem; line-height: 1.3; font-weight: 700; margin: 0; }
.post-card-title a { color: var(--color-heading); }
.post-card-title a:hover { color: var(--color-accent); }
.post-card-excerpt { margin-top: 12px; font-size: 0.95rem; color: var(--color-text-muted); line-height: 1.6; }

/* ----------------------------------------------------
   TYPOGRAFIA PUBLICYSTYCZNA — kontrast z UI budowany wagą i światłem liter
   (jedyny dostępny font w /fonts/ to Inter — zamiast osobnego kroju szeryfowego,
   "dziennikarski ciężar" tytułów uzyskujemy grubszą wagą (800) i ciaśniejszym
   trackingiem niż tekst interfejsu (menu, etykiety, przyciski zostają na 500-700))
---------------------------------------------------- */
.post-card-title,
.hero-section h1,
.page-title,
.related-posts-title,
.single-hero .post-title {
    font-family: var(--font-headline);
    font-weight: 800;
    letter-spacing: -0.6px;
}
.post-card-title         { line-height: 1.28; }
.hero-section h1,
.page-title,
.single-hero .post-title { line-height: 1.1; }

/* Wyróżniona karta pierwszego wpisu (styl serwisu newsowego) */
.post-card-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: stretch;
}
.post-card-featured .post-card-img-wrap { height: 100%; }
.post-card-featured .post-card-img { height: 100%; aspect-ratio: auto; }
.post-card-featured .post-card-title { font-size: clamp(1.4rem, 2.5vw, 2rem); }
.post-card-featured .post-card-body { justify-content: center; }
@media (max-width: 900px) {
    .post-card-featured { grid-template-columns: 1fr; }
    .post-card-featured .post-card-img { aspect-ratio: 16/9; }
}

/* Strona główna (pierwsza strona): najnowszy wpis pełną szerokością (.post-card-featured powyżej),
   reszta w stałej siatce 2-kolumnowej — niezależnie od szerokości ekranu (bez auto-fill). */
.posts-grid-2col { grid-template-columns: repeat(2, 1fr); }

.ct-widget {
    background: var(--color-surface); padding: 28px; border-radius: var(--radius-lg);
    margin-bottom: 30px; box-shadow: 0 10px 30px rgba(79, 95, 209, 0.06);
    border: 1px solid rgba(226, 232, 240, 0.3);
}
.widget-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; color: var(--color-heading); }
.badge-pill { display: inline-block; background: var(--badge-default-bg); color: var(--badge-default-ink); padding: 5px 15px; border-radius: 50px; font-size: 12px; font-weight: 700; margin-bottom: 15px; }

/* ----------------------------------------------------
   SIDEBAR — NEWSLETTER
---------------------------------------------------- */
.widget-newsletter { background: linear-gradient(155deg, var(--color-primary), var(--color-accent)); }
.widget-newsletter .badge-pill { background: rgba(255, 255, 255, 0.18); color: var(--color-on-dark); }
.widget-newsletter h3 { color: var(--color-on-dark); font-size: 1.3rem; margin-bottom: 10px; }
.widget-newsletter p { color: var(--color-on-dark-muted); font-size: 0.9rem; line-height: 1.6; margin-bottom: 18px; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input[type="email"] {
    padding: 12px 16px; border: none; border-radius: 10px; font-family: inherit; font-size: 14px;
    background: rgba(255, 255, 255, 0.92); color: var(--color-on-fixed-light);
}
.newsletter-form input[type="email"]::placeholder { color: var(--color-text-muted); }
.newsletter-form .ct-button { background: var(--color-on-dark); color: var(--color-primary) !important; }
.newsletter-form .ct-button:hover { background: rgba(255, 255, 255, 0.85); }
.newsletter-message { color: var(--color-on-dark); font-weight: 600; background: rgba(255, 255, 255, 0.15); padding: 12px 16px; border-radius: 10px; font-size: 0.9rem; }
.newsletter-message.is-error { background: rgba(255, 59, 48, 0.25); }
/* Honeypot: pole niewidoczne dla ludzi, ale dostępne dla botów wypełniających formularze automatycznie */
.hp-field { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* ----------------------------------------------------
   SIDEBAR — POPULARNE / POLECANE WPISY
---------------------------------------------------- */
.popular-posts-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.popular-post-item { display: flex; gap: 14px; align-items: flex-start; }
.popular-post-thumb, .popular-post-thumb-placeholder {
    flex-shrink: 0; width: 64px; height: 64px; border-radius: 12px; overflow: hidden;
    background: var(--color-fill-soft); display: block;
}
.popular-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.popular-post-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.popular-post-body .cat-badge { font-size: 10px; padding: 3px 10px; align-self: flex-start; }
.popular-post-title { color: var(--color-heading); font-weight: 700; font-size: 0.92rem; line-height: 1.4; }
.popular-post-title:hover { color: var(--color-accent); }

/* ----------------------------------------------------
   SIDEBAR — KATEGORIE
---------------------------------------------------- */
.sidebar-cat-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sidebar-cat-list li { border-bottom: 1px solid rgba(226, 232, 240, 0.25); }
.sidebar-cat-list li:last-child { border-bottom: none; }
.sidebar-cat-list a {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 10px 2px; color: var(--color-text-body); font-weight: 600; font-size: 0.95rem;
}
.sidebar-cat-list a:hover { color: var(--color-accent); }

/* ----------------------------------------------------
   SIDEBAR — CHMURA TAGÓW
---------------------------------------------------- */
.tagcloud-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud-wrap a {
    display: inline-block; padding: 6px 14px; border-radius: 50px; font-weight: 600 !important;
    background: var(--color-fill-soft); color: var(--color-heading);
}
.tagcloud-wrap a:hover { background: var(--color-accent); color: var(--color-on-dark); }

/* ----------------------------------------------------
   SIDEBAR — SOCIAL MEDIA
---------------------------------------------------- */
.social-icons-row { display: flex; gap: 10px; flex-wrap: wrap; }
.social-icon {
    width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--color-fill-soft); color: var(--color-heading); transition: 0.25s;
}
.social-icon:hover { background: var(--color-accent); color: var(--color-on-dark); transform: translateY(-2px); }

/* ----------------------------------------------------
   BOX HERO DLA WPISÓW (SINGLE.PHP) — zawsze ciemna powierzchnia, niezależna od motywu strony
---------------------------------------------------- */
.single-hero {
    position: relative;
    width: 100%;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin: 40px 0 60px 0;
    padding: 60px 30px;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}
.single-hero.no-bg {
    background-color: var(--color-primary);
}
.single-hero-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
}
.single-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(5px);
    transform: scale(1.04);
}
.single-hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 20, 40, 0.6);
    z-index: 2;
}
.single-hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin: 0 auto;
    color: var(--color-on-dark);
}
.single-hero .post-meta-categories {
    margin-bottom: 25px;
}
.single-hero .post-meta-categories a.cat-badge:hover {
    filter: brightness(1.1);
}
.single-hero .post-title {
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    line-height: 1.25;
    font-weight: 800;
    color: var(--color-on-dark);
    margin: 0 0 20px 0;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
    letter-spacing: -1px;
}
.post-byline {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-on-dark-muted);
}
.post-byline .post-author { font-weight: 700; color: var(--color-on-dark); }
.post-byline .byline-sep { color: rgba(255, 255, 255, 0.5); }

/* ----------------------------------------------------
   CZYSTY NAGŁÓWEK DLA STRON (PAGE.PHP)
---------------------------------------------------- */
.page-header {
    text-align: center;
    margin: 60px auto 40px auto;
}
.page-header .page-title {
    font-size: clamp(1.9rem, 4vw, 3.2rem);
    line-height: 1.2;
    font-weight: 800;
    color: var(--color-heading);
    letter-spacing: -1px;
}

/* Typografia Wnętrza Tekstu */
.post-content, .page-content { font-size: clamp(1rem, 1vw, 1.125rem); color: var(--color-text-body); margin-bottom: 80px; }
.post-content p, .page-content p { margin-bottom: 1.5em; line-height: 1.75; }
.post-content h2, .page-content h2 { font-size: clamp(1.35rem, 2.4vw, 1.9rem); margin: 2.2em 0 0.9em; color: var(--color-heading); letter-spacing: -0.5px; font-weight: 800; }
.post-content h3, .page-content h3 { font-size: clamp(1.15rem, 1.8vw, 1.45rem); margin: 1.8em 0 0.8em; color: var(--color-heading); font-weight: 700; }
.post-content ul, .page-content ul { margin: 0 0 1.5em 20px; padding-left: 20px; line-height: 1.75; }
.post-content li, .page-content li { margin-bottom: 8px; }
.post-content a, .page-content a { color: var(--color-accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post-content a:hover, .page-content a:hover { color: var(--color-heading); }
.post-content blockquote { font-size: 1.2rem; font-weight: 500; font-style: italic; border-left: 5px solid var(--color-accent); padding-left: 30px; margin: 45px 0; color: var(--color-heading); line-height: 1.6; }
.post-content img, .page-content img { border-radius: 14px; }

/* ----------------------------------------------------
   TAGI POD ARTYKUŁEM — te same "pigułki" co chmura tagów w sidebarze (.tagcloud-wrap)
---------------------------------------------------- */
.post-footer { margin: 40px 0 0; }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.post-tags strong { color: var(--color-heading); font-weight: 700; }
.post-tags a {
    display: inline-block; padding: 6px 14px; border-radius: 50px; font-weight: 600;
    font-size: 0.9rem; text-decoration: none;
    background: var(--color-fill-soft); color: var(--color-heading);
}
.post-tags a:hover { background: var(--color-accent); color: var(--color-on-dark); }

/* ----------------------------------------------------
   STOPKA — strefa ciemna (Color Zoning), zgodnie z nową paletą
---------------------------------------------------- */
.site-footer {
    background: var(--color-dark-zone);
    padding: 30px 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--color-on-dark-muted);
}
.footer-legal-links { display: flex; gap: 20px; list-style: none; }
.footer-legal-links a { color: var(--color-on-dark-muted); }
.footer-legal-links a:hover { color: var(--color-on-dark); }

/* ----------------------------------------------------
   COOKIE BANNER — zawsze ciemna, szklana powierzchnia (niezależna od motywu strony)
---------------------------------------------------- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background-color: var(--color-primary);
    color: var(--color-on-dark);
    padding: 20px 30px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(79, 95, 209, 0.35);
    z-index: 10000;
    max-width: 800px;
    width: calc(100% - 40px);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .cookie-banner {
        background-color: rgba(79, 95, 209, 0.94);
        backdrop-filter: blur(24px) saturate(160%);
        -webkit-backdrop-filter: blur(24px) saturate(160%);
    }
}
.cookie-banner.is-visible { transform: translateX(-50%) translateY(0); }
.cookie-banner p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--color-on-dark-muted); }
.cookie-banner a { color: var(--color-on-dark); text-decoration: underline; }
.cookie-banner .ct-button { margin-left: 20px; flex-shrink: 0; padding: 8px 24px; background: var(--color-accent); color: var(--color-on-dark) !important; }

/* ----------------------------------------------------
   SCROLL TO TOP BUTTON
---------------------------------------------------- */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-accent);
    color: var(--color-on-dark);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(79, 95, 209, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 990;
}
.scroll-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-to-top:hover { background-color: var(--color-primary); transform: translateY(-5px); box-shadow: 0 8px 20px rgba(79, 95, 209, 0.4); }

/* ----------------------------------------------------
   MENU MOBILNE (DRAWER) — zawsze ciemna, szklana powierzchnia
---------------------------------------------------- */
.mobile-drawer {
    position: fixed; top: 0; right: -100%;
    width: min(300px, 85vw); height: 100vh; height: 100dvh;
    background: var(--color-primary);
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: -5px 0 25px rgba(0,0,0,0.25);
    padding: 30px;
    overflow-y: auto;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
    .mobile-drawer {
        background: rgba(79, 95, 209, 0.94);
        backdrop-filter: blur(26px) saturate(160%);
        -webkit-backdrop-filter: blur(26px) saturate(160%);
    }
}
.mobile-drawer.is-open { right: 0; }
.drawer-close {
    background: none; border: none; font-size: 32px; cursor: pointer; float: right;
    color: var(--color-on-dark); padding: 6px 10px; line-height: 1;
}
.mobile-menu ul { list-style: none; margin-top: 60px; }
.mobile-menu li { margin-bottom: 10px; }
.mobile-menu a { display: block; padding: 10px 0; font-size: 20px; font-weight: 700; color: var(--color-on-dark); }

/* ----------------------------------------------------
   BLOKI GUTENBERGA (align-wide / align-full)
---------------------------------------------------- */
.post-content .alignwide { width: 100%; max-width: calc(var(--container-content) + 200px); margin-left: 50%; transform: translateX(-50%); }
.post-content .alignfull { width: 100vw; margin-left: calc(50% - 50vw); max-width: 100vw; }
.post-content .alignfull img { width: 100%; border-radius: 0; }

/* ----------------------------------------------------
   POWIĄZANE WPISY
---------------------------------------------------- */
.related-posts { margin: 60px auto 80px; }
.related-posts-title { font-size: clamp(1.4rem, 2.5vw, 1.8rem); font-weight: 800; color: var(--color-heading); margin-bottom: 30px; letter-spacing: -0.5px; }

/* ----------------------------------------------------
   STRONA 404
---------------------------------------------------- */
.error-404-wrapper { text-align: center; padding: 100px 20px 120px; }
.error-404-code { font-size: clamp(4rem, 12vw, 8rem); font-weight: 800; color: var(--color-fill-soft); line-height: 1; letter-spacing: -4px; }
.error-404-wrapper .page-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 10px 0 15px; color: var(--color-heading); }
.error-404-text { color: var(--color-text-muted); font-size: 1.1rem; max-width: 500px; margin: 0 auto 35px; }
.error-404-search { max-width: 420px; margin: 0 auto 25px; display: flex; gap: 10px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 50px; padding: 8px 8px 8px 24px; }
.error-404-search input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 15px; background: transparent; color: var(--color-text-body); }
.no-results { text-align: center; color: var(--color-text-muted); padding: 40px 0; }

/* ----------------------------------------------------
   RESPONSYWNOŚĆ
---------------------------------------------------- */
@media (max-width: 1024px) {
    .main-content-wrapper { flex-direction: column; }
    .sidebar-column { width: 100%; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .header-wrapper { padding: 0 15px; top: 15px; }
    .admin-bar .header-wrapper { top: calc(15px + 46px); }

    .site-branding { width: auto; }
    .main-menu { display: none; }
    .header-right { width: auto; }
    .header-search { display: none; }
    .mobile-toggle-btn { display: flex; }

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

    .breadcrumbs { margin-top: 28px; padding: 8px 16px; font-size: 12px; max-width: calc(100% - 30px); }

    .single-hero { min-height: 300px; padding: 40px 20px; margin: 20px 0 40px 0; border-radius: 16px; }

    .footer-bottom-row { flex-direction: column; gap: 15px; text-align: center; }

    .cookie-banner { flex-direction: column; text-align: center; gap: 15px; padding: 20px; }
    .cookie-banner .ct-button { margin-left: 0; width: 100%; }
    /* Przycisk "powrót na górę" ukryty na mobile — na małym ekranie przewijanie jest krótkie,
       a stały przycisk w rogu tylko zasłania treść. */
    .scroll-to-top { display: none; }

    .post-card-featured .post-card-title { font-size: 1.5rem; }

    .related-posts { margin: 40px auto 50px; }

    .error-404-wrapper { padding: 60px 20px 80px; }
}
