/*
Theme Name: Szablon Drogowy
Theme URI: https://szablon-drogowy.pl
Author: szablon-drogowy.pl
Author URI: https://szablon-drogowy.pl
Description: Newsowy szablon WordPress dla serwisu o drogach, autostradach, obwodnicach i inwestycjach drogowych w Polsce. Zoptymalizowany pod SEO i mobile.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: suplementovo
Tags: blog, news, roads, infrastructure, seo-friendly, responsive-layout, dark-header
*/

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  /* Paleta: drogi i infrastruktura */
  --color-primary:         #0C2340;
  --color-primary-mid:     #163B5A;
  --color-primary-light:   #1A4A7A;
  --color-primary-hover:   #1E5498;
  --color-primary-subtle:  #E8F0F8;
  --color-primary-muted:   #A8C4E0;

  /* Akcent – znaki drogowe, pomarańczowy */
  --color-accent:          #E8821A;
  --color-accent-hover:    #D4711A;
  --color-accent-dark:     #B55D10;
  --color-accent-subtle:   #FFF3E0;
  --color-accent-muted:    #F4C088;

  /* Semantyczne */
  --color-breaking:        #C62828;
  --color-breaking-subtle: #FFEBEE;
  --color-success:         #2E7D32;
  --color-warning:         #E65100;
  --color-info:            #0277BD;

  /* Neutralne */
  --color-bg:              #F5F7FA;
  --color-bg-alt:          #EDF2F7;
  --color-surface:         #FFFFFF;
  --color-border:          #E2E8F0;
  --color-border-dark:     #CBD5E1;

  /* Tekst */
  --color-text:            #1A202C;
  --color-text-muted:      #4A5568;
  --color-text-light:      #718096;
  --color-text-inverse:    #FFFFFF;

  /* Typografia */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-xs:   0.6875rem;
  --text-sm:   0.8125rem;
  --text-base: 1rem;
  --text-md:   1.0625rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  --leading-tight:   1.2;
  --leading-snug:    1.35;
  --leading-normal:  1.5;
  --leading-relaxed: 1.65;
  --leading-loose:   1.8;

  --font-normal:   400;
  --font-medium:   500;
  --font-semibold: 600;
  --font-bold:     700;
  --font-black:    800;

  /* Odstępy */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Układ */
  --container-max:    1200px;
  --container-narrow: 860px;
  --gutter:           1.5rem;
  --gutter-sm:        1rem;

  /* Zaokrąglenia */
  --radius-xs:   2px;
  --radius-sm:   4px;
  --radius:      6px;
  --radius-lg:   10px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Cienie */
  --shadow-xs: 0 1px 2px rgba(12,35,64,.05);
  --shadow-sm: 0 2px 6px rgba(12,35,64,.08);
  --shadow:    0 4px 12px rgba(12,35,64,.10);
  --shadow-md: 0 6px 20px rgba(12,35,64,.12);
  --shadow-lg: 0 12px 32px rgba(12,35,64,.16);

  /* Przejścia */
  --transition-fast: 100ms ease;
  --transition:      180ms ease;
  --transition-slow: 300ms ease;

  /* Nagłówek */
  --header-top:   52px;
  --header-nav:   40px;
  --header-total: 92px;
}

/* ============================================
   RESET + BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video, canvas, iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--color-accent-hover); }
a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

ul, ol { list-style: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

p { margin: 0; }

/* ============================================
   UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  padding: var(--space-2) var(--space-5);
  background: var(--color-accent);
  color: white;
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus { top: 0; color: white; }

/* ============================================
   SITE HEADER – dwie belki, dark navy
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
}

/* Belka górna: logo + akcje */
.site-header__top {
  background: var(--color-primary);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  height: var(--header-top);
}

/* Branding */
.site-branding { flex-shrink: 0; }
.site-branding a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: white;
}
.site-branding a:hover { opacity: .88; color: white; }

.site-branding__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.site-branding__logo svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.site-branding__name {
  font-size: var(--text-lg);
  font-weight: var(--font-black);
  letter-spacing: -.025em;
  color: white;
  line-height: 1.1;
}
.site-branding__name span { color: var(--color-accent); }

.site-branding .custom-logo {
  height: 36px;
  width: auto;
  max-width: 160px;
}

/* Akcje w nagłówku */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.75);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.search-toggle:hover { background: rgba(255,255,255,.14); color: white; }
.search-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

/* Belka nawigacji – kategorie */
.site-header__nav-bar {
  background: var(--color-primary-mid);
  border-top: 1px solid rgba(255,255,255,.05);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.site-header__nav-bar::-webkit-scrollbar { display: none; }

/* Primary nav */
.primary-nav { display: none; }

@media (min-width: 900px) {
  .primary-nav {
    display: flex;
    align-items: center;
    height: var(--header-nav);
  }
}

.primary-nav ul,
#primary-menu {
  display: flex;
  align-items: center;
  list-style: none;
  height: var(--header-nav);
}

.primary-nav ul li,
#primary-menu li { position: relative; }

.primary-nav ul a,
#primary-menu a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-4);
  height: var(--header-nav);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: rgba(255,255,255,.75);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.primary-nav ul a:hover,
#primary-menu a:hover,
.primary-nav ul li.current-menu-item > a,
.primary-nav ul li.current-cat > a {
  color: white;
  border-bottom-color: var(--color-accent);
  background: rgba(255,255,255,.04);
}

/* Dropdown */
.primary-nav .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-primary);
  border: 1px solid rgba(255,255,255,.08);
  border-top: 2px solid var(--color-accent);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 10;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.primary-nav .sub-menu li { width: 100%; }
.primary-nav .sub-menu a {
  width: 100%;
  height: auto;
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  border-bottom: none;
  border-left: 2px solid transparent;
}
.primary-nav .sub-menu a:hover {
  background: rgba(255,255,255,.06);
  border-left-color: var(--color-accent);
  border-bottom-color: transparent;
}

/* Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: var(--space-2);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-sm);
}
@media (min-width: 900px) { .menu-toggle { display: none; } }
.menu-toggle span {
  display: block;
  height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 1px;
  transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Panel wyszukiwania (zwijany) */
.header-search {
  background: var(--color-primary-mid);
  border-top: 1px solid rgba(255,255,255,.07);
  padding: var(--space-4) 0;
}
.header-search[hidden] { display: none; }
.header-search .search-form { display: flex; gap: var(--space-2); }
.header-search .search-field {
  flex: 1;
  height: 40px;
  padding: 0 var(--space-4);
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius-sm);
  color: white;
  font-size: var(--text-base);
  outline: none;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.header-search .search-field::placeholder { color: rgba(255,255,255,.38); }
.header-search .search-field:focus {
  background: rgba(255,255,255,.15);
  border-color: var(--color-accent);
}
.header-search .search-submit {
  height: 40px;
  padding: 0 var(--space-5);
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: var(--font-semibold);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.header-search .search-submit:hover { background: var(--color-accent-hover); }

/* Szuflada mobile */
.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-primary);
  border-top: 1px solid rgba(255,255,255,.07);
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - var(--header-total));
  overflow-y: auto;
  z-index: 99;
}
.mobile-nav[hidden] { display: none; }

.mobile-nav ul { padding: var(--space-3) 0; list-style: none; }
.mobile-nav ul li { border-bottom: 1px solid rgba(255,255,255,.05); }
.mobile-nav ul li:last-child { border-bottom: none; }
.mobile-nav ul a {
  display: block;
  padding: var(--space-4) var(--gutter);
  color: rgba(255,255,255,.82);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: color var(--transition-fast), background var(--transition-fast);
}
.mobile-nav ul a:hover { color: white; background: rgba(255,255,255,.05); }
.mobile-nav .sub-menu { padding-left: var(--space-4); }
.mobile-nav .sub-menu a { font-size: var(--text-sm); padding-block: var(--space-3); }

.mobile-submenu-toggle {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.07);
  border: none;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.6);
  cursor: pointer;
}
.mobile-submenu-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition);
}
.mobile-submenu-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-6);
}
.breadcrumb__link {
  color: var(--color-text-muted);
  text-decoration: none;
}
.breadcrumb__link:hover { color: var(--color-accent); }
.breadcrumb__sep { color: var(--color-border-dark); }
.breadcrumb__current { color: var(--color-text-muted); }

/* ============================================
   STRONA GŁÓWNA – SIATKA AKTUALNOŚCI (ATF)
   ============================================ */
.news-hero {
  background: var(--color-surface);
  padding-block: var(--space-6) var(--space-8);
  border-bottom: 3px solid var(--color-primary);
}

.news-hero__header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.news-hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-black);
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-accent);
}
.news-hero__label::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .55; transform: scale(1.2); }
}

.news-hero__date {
  margin-left: auto;
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

/* Siatka: 1 duży + 3 kompaktowe */
.news-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}
@media (min-width: 760px) {
  .news-hero__grid { grid-template-columns: 1fr 320px; gap: var(--space-6); }
}
@media (min-width: 1024px) {
  .news-hero__grid { grid-template-columns: 1fr 360px; }
}

/* Główna featured story */
.featured-story {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow var(--transition), transform var(--transition);
}
.featured-story:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.featured-story__image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-primary-subtle);
  flex-shrink: 0;
}
.featured-story__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.featured-story:hover .featured-story__image img { transform: scale(1.025); }

.featured-story__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary-subtle), #d0e4f5);
  min-height: 200px;
}
.featured-story__placeholder svg {
  width: 48px;
  height: 48px;
  fill: var(--color-primary-muted);
}

.featured-story__body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-3);
}

.featured-story__category {
  display: inline-flex;
  align-self: flex-start;
  padding: 3px var(--space-3);
  background: var(--color-accent-subtle);
  color: var(--color-accent-dark);
  font-size: var(--text-xs);
  font-weight: var(--font-black);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.featured-story__category:hover { background: var(--color-accent); color: white; }

.featured-story__title {
  font-size: var(--text-2xl);
  font-weight: var(--font-black);
  line-height: var(--leading-snug);
  letter-spacing: -.025em;
  color: var(--color-text);
}
@media (min-width: 760px) { .featured-story__title { font-size: var(--text-3xl); } }
.featured-story__title a {
  color: inherit;
  text-decoration: none;
}
.featured-story__title a:hover { color: var(--color-accent); }

.featured-story__excerpt {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-story__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-light);
  margin-top: auto;
}
.featured-story__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.featured-story__meta-item svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  flex-shrink: 0;
}

/* Kompaktowe karty w kolumnie bocznej */
.news-hero__aside {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.compact-story {
  display: flex;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.compact-story:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-border-dark);
}

.compact-story__thumb {
  flex-shrink: 0;
  width: 80px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-primary-subtle);
}
.compact-story__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.compact-story__thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary-subtle), #d0e4f5);
}
.compact-story__thumb-placeholder svg {
  width: 20px;
  height: 20px;
  fill: var(--color-primary-muted);
}

.compact-story__body { flex: 1; min-width: 0; }

.compact-story__category {
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--font-black);
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--color-accent);
  text-decoration: none;
  margin-bottom: 3px;
}
.compact-story__category:hover { color: var(--color-accent-hover); }

.compact-story__title {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  line-height: var(--leading-snug);
  letter-spacing: -.01em;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}
.compact-story__title a { color: inherit; text-decoration: none; }
.compact-story__title a:hover { color: var(--color-accent); }

.compact-story__date {
  font-size: var(--text-xs);
  color: var(--color-text-light);
}

/* ============================================
   SEKCJE KATEGORII (poniżej ATF na homepage)
   ============================================ */
.category-sections {
  padding-block: var(--space-10);
  background: var(--color-bg);
}

.category-section {
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--color-border);
}
.category-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.category-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.category-section__title {
  font-size: var(--text-xl);
  font-weight: var(--font-black);
  letter-spacing: -.025em;
  color: var(--color-text);
  position: relative;
  padding-left: var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.category-section__title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10%;
  height: 80%;
  width: 3px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}
.category-section__title a {
  color: inherit;
  text-decoration: none;
}
.category-section__title a:hover { color: var(--color-accent); }

.category-section__all {
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: gap var(--transition-fast), color var(--transition-fast);
}
.category-section__all:hover { color: var(--color-accent-hover); gap: var(--space-2); }
.category-section__all svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.category-section__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 600px) {
  .category-section__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .category-section__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================
   KARTY WPISÓW (post-card)
   ============================================ */
.post-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.post-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  border-color: var(--color-border-dark);
}

/* Featured modifier */
.post-card--featured {
  grid-column: 1 / -1;
}
@media (min-width: 900px) {
  .post-card--featured {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    border-radius: var(--radius-xl);
  }
  .post-card--featured .post-card__thumbnail {
    aspect-ratio: auto;
    height: 100%;
    min-height: 260px;
  }
}

/* Miniatura */
.post-card__thumbnail-link { display: block; overflow: hidden; }
.post-card__thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-primary-subtle);
  position: relative;
}
.post-card__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.post-card:hover .post-card__thumbnail img { transform: scale(1.03); }

.post-card__thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary-subtle), #d0e4f5);
  min-height: 160px;
}
.post-card__thumbnail-placeholder svg {
  width: 32px;
  height: 32px;
  fill: var(--color-primary-muted);
}

/* Treść karty */
.post-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--space-3);
}

.post-card__categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.post-card__category {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  background: var(--color-accent-subtle);
  color: var(--color-accent-dark);
  font-size: var(--text-xs);
  font-weight: var(--font-black);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.post-card__category:hover { background: var(--color-accent); color: white; }

.post-card__title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  line-height: var(--leading-snug);
  letter-spacing: -.02em;
  color: var(--color-text);
  margin: 0;
}
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover { color: var(--color-accent); }

.post-card--featured .post-card__title { font-size: var(--text-2xl); }

.post-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-light);
  margin-top: auto;
  flex-wrap: wrap;
}
.post-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-card__meta-item svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  flex-shrink: 0;
}

.post-card__read-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-accent);
  text-decoration: none;
  margin-top: var(--space-1);
  transition: gap var(--transition-fast), color var(--transition-fast);
}
.post-card__read-more:hover { color: var(--color-accent-hover); gap: var(--space-2); }
.post-card__read-more svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

/* ============================================
   SIATKA WPISÓW
   ============================================ */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 560px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================
   NAGŁÓWEK BLOGA (/blog/)
   ============================================ */
.blog-header {
  background: var(--color-primary);
  padding-block: var(--space-8) var(--space-6);
}

.blog-header__eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.blog-header__title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: var(--font-black);
  color: white;
  letter-spacing: -.03em;
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.blog-header__desc {
  font-size: var(--text-base);
  color: rgba(255,255,255,.6);
  max-width: 52ch;
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* Pasek filtrowania kategorii */
.category-filter {
  background: var(--color-surface);
  border-bottom: 2px solid var(--color-border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.category-filter::-webkit-scrollbar { display: none; }

.category-filter__inner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--gutter);
  min-height: 52px;
}

.category-filter__link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid var(--color-border);
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.category-filter__link:hover,
.category-filter__link--active {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

/* ============================================
   LAYOUT: KOLUMNA + SIDEBAR
   ============================================ */
.site-main { padding-block: var(--space-8); }

.home-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  align-items: start;
}
@media (min-width: 900px) {
  .home-layout { grid-template-columns: 1fr 280px; }
}
@media (min-width: 1100px) {
  .home-layout { grid-template-columns: 1fr 320px; }
}

.posts-column { min-width: 0; }

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar { min-width: 0; }

.widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}
.widget:last-child { margin-bottom: 0; }

.widget__title {
  font-size: var(--text-xs);
  font-weight: var(--font-black);
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-text-light);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-accent);
}

.widget ul { list-style: none; }
.widget ul li {
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--space-2);
}
.widget ul li:last-child { border-bottom: none; }

.widget ul a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  text-decoration: none;
  line-height: var(--leading-normal);
  transition: color var(--transition-fast);
}
.widget ul a:hover { color: var(--color-accent); }

.widget ul .count {
  font-size: var(--text-xs);
  background: var(--color-bg-alt);
  color: var(--color-text-light);
  padding: 1px var(--space-2);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.widget ul .post-date {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  display: block;
  margin-top: 2px;
}

.widget-about p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
}

/* ============================================
   SINGLE – ARTYKUŁ
   ============================================ */
.single-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  padding-block: var(--space-8);
  align-items: start;
}
@media (min-width: 900px) {
  .single-layout { grid-template-columns: 1fr 300px; }
}
@media (min-width: 1100px) {
  .single-layout { grid-template-columns: 1fr 320px; }
}

.entry {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-10);
  min-width: 0;
}
@media (max-width: 599px) {
  .entry { padding: var(--space-6) var(--space-5); border-radius: var(--radius-lg); }
}

/* Post header */
.post-header { margin-bottom: var(--space-6); }

.post-header__categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.post-category-tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  background: var(--color-accent);
  color: white;
  font-size: var(--text-xs);
  font-weight: var(--font-black);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-radius: var(--radius-xs);
  text-decoration: none;
  transition: background var(--transition-fast);
}
.post-category-tag:hover { background: var(--color-accent-hover); }

.post-header__title {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  font-weight: var(--font-black);
  line-height: var(--leading-tight);
  letter-spacing: -.03em;
  color: var(--color-text);
  margin-bottom: var(--space-5);
}

.post-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-light);
  padding-block: var(--space-4);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.post-header__meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.post-header__meta-item svg { fill: currentColor; }
.post-header__meta-item a { color: var(--color-text-muted); text-decoration: none; }
.post-header__meta-item a:hover { color: var(--color-accent); }

/* Featured image */
.post-featured-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-primary-subtle);
  margin-bottom: var(--space-8);
}
.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Treść artykułu */
.entry-content {
  font-size: var(--text-md);
  line-height: var(--leading-loose);
  color: var(--color-text);
  max-width: 72ch;
}
.entry-content > * + * { margin-top: var(--space-5); }

.entry-content h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  letter-spacing: -.02em;
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  color: var(--color-primary);
  padding-left: var(--space-4);
  border-left: 3px solid var(--color-accent);
}
.entry-content h3 {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  letter-spacing: -.01em;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}
.entry-content h4 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

.entry-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.entry-content a:hover { color: var(--color-accent-hover); }

.entry-content ul,
.entry-content ol {
  padding-left: var(--space-6);
  list-style: revert;
}
.entry-content li { margin-bottom: var(--space-2); }

.entry-content blockquote {
  padding: var(--space-6);
  background: var(--color-primary-subtle);
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  font-size: var(--text-lg);
  color: var(--color-primary);
  font-style: italic;
}

.entry-content pre {
  background: var(--color-primary);
  color: #e2e8f0;
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-size: var(--text-sm);
  line-height: 1.7;
  position: relative;
}
.entry-content code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: .9em;
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  padding: 1px 4px;
  border-radius: var(--radius-xs);
}
.entry-content pre code { background: none; color: inherit; padding: 0; }

.entry-content img {
  border-radius: var(--radius-lg);
  max-width: 100%;
  height: auto;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.entry-content th,
.entry-content td {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  text-align: left;
}
.entry-content th {
  background: var(--color-primary);
  color: white;
  font-weight: var(--font-semibold);
}
.entry-content tr:nth-child(even) td { background: var(--color-bg-alt); }

/* Tagi */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding-block: var(--space-6);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-top: var(--space-8);
}
.post-tags__label {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text-muted);
}
.tag-link {
  display: inline-flex;
  padding: var(--space-1) var(--space-3);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.tag-link:hover {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

/* Autor */
.author-box {
  display: flex;
  gap: var(--space-5);
  background: var(--color-primary-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  margin-top: var(--space-8);
  align-items: flex-start;
}
@media (max-width: 499px) { .author-box { flex-direction: column; } }

.author-box__avatar img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid var(--color-primary-muted);
  flex-shrink: 0;
}
.author-box__name {
  font-weight: var(--font-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}
.author-box__bio {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin: 0;
}

/* Powiązane */
.related-posts { margin-top: var(--space-10); }
.section-title {
  font-size: var(--text-xl);
  font-weight: var(--font-black);
  letter-spacing: -.02em;
  margin-bottom: var(--space-6);
  padding-left: var(--space-4);
  border-left: 3px solid var(--color-accent);
}

/* Pasek postępu */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--color-accent);
  z-index: 200;
  width: 0;
  will-change: width;
  border-radius: 0 2px 2px 0;
}

/* ============================================
   ARCHIWUM
   ============================================ */
.archive-header {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  border-top: 3px solid var(--color-accent);
}

.archive-title {
  font-size: var(--text-3xl);
  font-weight: var(--font-black);
  letter-spacing: -.03em;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.archive-description {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin-top: var(--space-3);
}
.archive-description p { margin: 0; }

/* Ogólny page-header (wyszukiwanie itp.) */
.page-header {
  background: var(--color-primary);
  padding-block: var(--space-8);
  margin-bottom: 0;
}
.page-header__eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.page-header__title {
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  font-weight: var(--font-black);
  color: white;
  letter-spacing: -.03em;
  line-height: var(--leading-tight);
}
.page-header__description {
  font-size: var(--text-base);
  color: rgba(255,255,255,.62);
  max-width: 52ch;
  line-height: var(--leading-relaxed);
  margin-top: var(--space-3);
}

/* ============================================
   STOPKA
   ============================================ */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,.75);
  margin-top: var(--space-16);
  padding-top: var(--space-12);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}
@media (min-width: 600px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand {}

.footer-brand__logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  text-decoration: none;
}
.footer-brand__icon {
  width: 30px;
  height: 30px;
  background: var(--color-accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.footer-brand__icon svg { width: 18px; height: 18px; fill: white; }

.footer-brand__name {
  font-size: var(--text-lg);
  font-weight: var(--font-black);
  color: white;
  letter-spacing: -.02em;
}

.footer-brand__tagline {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.45);
  line-height: var(--leading-relaxed);
  max-width: 30ch;
  margin: 0;
}

.footer-col__title {
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.38);
  margin-bottom: var(--space-4);
}

.footer-col ul { list-style: none; }
.footer-col ul li { padding-block: var(--space-2); }
.footer-col ul a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-col ul a:hover { color: white; }
.footer-col .sub-menu { display: none; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-6);
  margin-top: var(--space-10);
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: var(--text-xs);
  color: rgba(255,255,255,.32);
}
.footer-bottom a { color: rgba(255,255,255,.5); text-decoration: none; }
.footer-bottom a:hover { color: white; }

/* ============================================
   PRZYCISKI
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  font-family: inherit;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }

.btn--primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-primary-mid);
  border-color: var(--color-primary-mid);
  color: white;
}

.btn--accent {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}
.btn--accent:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: white;
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover { background: var(--color-primary); color: white; }

.btn--outline-white {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,.38);
}
.btn--outline-white:hover {
  background: rgba(255,255,255,.1);
  border-color: white;
  color: white;
}

.btn--sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.btn--lg { padding: var(--space-4) var(--space-8); font-size: var(--text-base); }

/* ============================================
   FORMULARZE + WYSZUKIWANIE
   ============================================ */
.search-form { display: flex; gap: var(--space-2); }
.search-field {
  flex: 1;
  height: 44px;
  padding: 0 var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-field::placeholder { color: var(--color-text-light); }
.search-field:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
}
.search-submit {
  height: 44px;
  padding: 0 var(--space-6);
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.search-submit:hover { background: var(--color-accent-hover); }

/* ============================================
   PAGINACJA
   ============================================ */
.pagination {
  margin-top: var(--space-8);
  display: flex;
  justify-content: center;
}
.pagination .page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}
.pagination .page-numbers a,
.pagination .page-numbers span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.pagination .page-numbers a:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.pagination .page-numbers .current {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
  font-weight: var(--font-bold);
}
.pagination .page-numbers .dots {
  background: none;
  border-color: transparent;
}

/* ============================================
   KOMENTARZE
   ============================================ */
.comments-area {}
.comments-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-black);
  letter-spacing: -.02em;
  margin-bottom: var(--space-6);
  padding-left: var(--space-4);
  border-left: 3px solid var(--color-accent);
}

.comment-list {
  list-style: none;
  margin-bottom: var(--space-8);
}
.comment-list .comment {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border);
}
.comment-list .comment:last-child { border-bottom: none; }

.comment-body {
  display: flex;
  gap: var(--space-4);
}
@media (max-width: 499px) { .comment-body { flex-direction: column; } }

.comment-meta__avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  flex-shrink: 0;
}
.comment-meta__info { flex: 1; min-width: 0; }
.comment-author-name {
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.comment-meta__date {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  margin-bottom: var(--space-3);
}
.comment-content p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-relaxed);
  margin: 0;
}
.comment-reply-link {
  font-size: var(--text-xs);
  color: var(--color-accent);
  text-decoration: none;
  font-weight: var(--font-semibold);
  margin-top: var(--space-2);
  display: inline-block;
}

.comment-respond {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-top: var(--space-6);
}
.comment-reply-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-5);
}
.comment-notes { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-4); }

.comment-form .comment-form-author,
.comment-form .comment-form-email,
.comment-form .comment-form-comment { margin-bottom: var(--space-4); }

.comment-form label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border-dark);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-subtle);
}
.comment-form textarea { min-height: 130px; resize: vertical; }

.form-submit .submit {
  background: var(--color-accent);
  color: white;
  border: none;
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.form-submit .submit:hover { background: var(--color-accent-hover); }

.comment-awaiting-moderation {
  font-size: var(--text-xs);
  color: var(--color-warning);
  background: #fff3e0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  margin-top: var(--space-2);
}

/* ============================================
   STRONA 404
   ============================================ */
.error-404 {
  text-align: center;
  padding-block: var(--space-20);
}
.error-404__number {
  font-size: 8rem;
  font-weight: var(--font-black);
  color: var(--color-primary-subtle);
  line-height: 1;
  margin-bottom: var(--space-4);
  letter-spacing: -.04em;
}
.error-404__title {
  font-size: var(--text-3xl);
  font-weight: var(--font-black);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}
.error-404__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 38ch;
  margin-inline: auto;
}
.error-404__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

/* ============================================
   RESPONSYWNOŚĆ
   ============================================ */
@media (max-width: 899px) {
  :root { --gutter: 1rem; }

  .site-header__nav-bar { display: none; }

  .news-hero__grid { grid-template-columns: 1fr; }

  .home-layout { grid-template-columns: 1fr; }
  .single-layout { grid-template-columns: 1fr; }
  .post-card--featured { display: flex; flex-direction: column; }
  .entry { padding: var(--space-6) var(--space-5); }
  .entry-content { max-width: 100%; }
}

@media (max-width: 599px) {
  .footer-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .category-section__grid { grid-template-columns: 1fr; }
}

/* ============================================
   ANIMACJE
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
  .post-card         { animation: fadeUp .28s ease both; }
  .post-card:nth-child(2) { animation-delay: .05s; }
  .post-card:nth-child(3) { animation-delay: .1s;  }
  .post-card:nth-child(4) { animation-delay: .15s; }
  .post-card:nth-child(5) { animation-delay: .2s;  }
  .post-card:nth-child(6) { animation-delay: .25s; }
  .compact-story     { animation: fadeUp .25s ease both; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   DRUK
   ============================================ */
@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .reading-progress,
  .related-posts,
  .comments-section,
  .post-tags,
  .category-filter,
  .news-hero__aside,
  .menu-toggle,
  .search-toggle {
    display: none !important;
  }
  body { font-size: 12pt; color: #000; background: white; }
  .entry { border: none; padding: 0; box-shadow: none; }
  a { color: #000; text-decoration: underline; }
  .entry-content h2 { border-left: none; padding-left: 0; color: #000; }
}
