/* ============================================================
   BLOG — style
   Scope: /blog/* (blog index + article pages)
   ============================================================ */

/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --blog-blue:    #1565C0;
  --blog-green:   #2E7D32;
  --blog-red:     #C62828;
  --blog-purple:  #6A1B9A;
  --blog-orange:  #E65100;
  --blog-gray:    #455A64;
  --blog-bg:      #F8FAFC;
  --blog-surface: #FFFFFF;
  --blog-border:  #E2E8F0;
  --blog-text:    #1A202C;
  --blog-muted:   #64748B;
  --blog-max-w:   1100px;
  --blog-art-w:   760px;
  --blog-radius:  12px;
  --blog-shadow:  0 2px 12px rgba(0,0,0,.08);
  --blog-shadow-hover: 0 8px 32px rgba(21,101,192,.15);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--blog-bg);
  color: var(--blog-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blog-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Utility ───────────────────────────────────────────────── */
.container { max-width: var(--blog-max-w); margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Site header ───────────────────────────────────────────── */
.blog-site-header {
  background: #1565C0;
  border-bottom: 1px solid rgba(0,0,0,.1);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,.1);
}

.blog-site-header nav {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 60px;
}

.blog-site-header .brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-site-header .brand::before {
  content: '💰';
  font-size: 1.2rem;
}

.blog-site-header .btn-cta {
  color: rgba(255,255,255,.85);
}

.blog-site-header .btn-cta:hover {
  color: #fff;
}

.blog-site-header .spacer { flex: 1; }

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--blog-blue);
  color: #fff;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}

.btn-cta:hover { background: #0D47A1; text-decoration: none; transform: translateY(-1px); }

/* ── Breadcrumbs ───────────────────────────────────────────── */
.blog-breadcrumbs {
  padding: 12px 0;
  font-size: .82rem;
  color: var(--blog-muted);
}

.blog-breadcrumbs a { color: var(--blog-muted); }
.blog-breadcrumbs a:hover { color: var(--blog-blue); text-decoration: none; }
.blog-breadcrumbs span { margin: 0 6px; }

/* ── Blog hero (index page) ───────────────────────────────── */
.blog-hero {
  background: linear-gradient(135deg, var(--blog-blue) 0%, #0D47A1 100%);
  color: #fff;
  padding: 64px 0 48px;
  margin-bottom: 48px;
}

.blog-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin: 0 0 12px;
  line-height: 1.2;
}

.blog-hero p {
  font-size: 1.1rem;
  opacity: .88;
  max-width: 520px;
  margin: 0 0 24px;
}

/* ── Category filters ──────────────────────────────────────── */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.filter-btn {
  padding: 7px 16px;
  border-radius: 100px;
  border: 2px solid var(--blog-border);
  background: #fff;
  color: var(--blog-gray);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--blog-blue);
  background: var(--blog-blue);
  color: #fff;
}

/* ── Article grid ──────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  margin-bottom: 56px;
}

/* Featured article — full width */
.blog-grid .article-card.featured {
  grid-column: 1 / -1;
}

/* ── Article card ──────────────────────────────────────────── */
/* Karta jest <article> (nie <a>) — klikalność przez stretched link pattern */
.article-card {
  background: var(--blog-surface);
  border-radius: var(--blog-radius);
  border: 1px solid var(--blog-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
  position: relative; /* wymagane dla stretched link */
}

.article-card:hover {
  box-shadow: var(--blog-shadow-hover);
  transform: translateY(-3px);
}

.article-card.featured {
  flex-direction: row;
}

/* Stretched link — główny link (tytuł) pokrywa całą kartę */
.card-main-link {
  color: var(--blog-text);
  text-decoration: none;
}

.card-main-link::after {
  content: '';
  position: absolute;
  inset: 0; /* top:0 right:0 bottom:0 left:0 */
  z-index: 0;
}

.card-main-link:hover { text-decoration: none; color: var(--blog-blue); }

/* Tagi muszą być nad stretched linkiem */
.article-card .tag-pill,
.article-card .read-more {
  position: relative;
  z-index: 1;
}

.article-card-img {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--blog-blue) 0%, #42A5F5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
}

.article-card.featured .article-card-img {
  width: 380px;
  aspect-ratio: auto;
  min-height: 240px;
}

.article-card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.category-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.reading-time {
  font-size: .8rem;
  color: var(--blog-muted);
}

.article-card h2,
.article-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--blog-text);
  line-height: 1.4;
}

.article-card.featured h2 {
  font-size: 1.5rem;
}

.article-card p {
  font-size: .9rem;
  color: var(--blog-muted);
  margin: 0 0 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.article-date {
  font-size: .8rem;
  color: var(--blog-muted);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-pill {
  padding: 2px 9px;
  background: var(--blog-bg);
  border: 1px solid var(--blog-border);
  border-radius: 100px;
  font-size: .75rem;
  color: var(--blog-muted);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.tag-pill:hover {
  background: var(--blog-blue);
  color: #fff;
  border-color: var(--blog-blue);
  text-decoration: none;
}

.read-more {
  font-size: .85rem;
  font-weight: 600;
  color: var(--blog-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.read-more::after { content: ' →'; }
.read-more:hover { text-decoration: underline; }

/* ── Empty / loading state ─────────────────────────────────── */
.blog-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--blog-muted);
  grid-column: 1 / -1;
}

/* ── Article page ──────────────────────────────────────────── */
.article-page {
  max-width: var(--blog-art-w);
  margin: 0 auto;
  padding: 0 20px 80px;
}

.article-header {
  margin-bottom: 36px;
}

.article-header h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  margin: 16px 0 12px;
  color: var(--blog-text);
}

.article-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--blog-muted);
  font-size: .875rem;
  border-bottom: 1px solid var(--blog-border);
  padding-bottom: 20px;
  margin-bottom: 8px;
}

.article-header-meta .category-badge { font-size: .78rem; }

.meta-dot { color: var(--blog-border); }

/* ── Article content typography ────────────────────────────── */
.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #2D3748;
}

.article-content .article-lead {
  font-size: 1.2rem;
  color: #4A5568;
  line-height: 1.65;
  margin-bottom: 2rem;
  font-weight: 400;
}

.article-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--blog-text);
  margin: 2.5rem 0 .8rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--blog-border);
  line-height: 1.3;
}

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blog-text);
  margin: 1.8rem 0 .6rem;
}

.article-content p { margin: 0 0 1.2rem; }

.article-content ul,
.article-content ol {
  margin: 0 0 1.2rem;
  padding-left: 1.6rem;
}

.article-content li { margin-bottom: .5rem; }

.article-content strong { color: var(--blog-text); font-weight: 600; }

.article-content pre {
  background: #F1F5F9;
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  font-size: .9rem;
  margin: 1.2rem 0;
}

.article-content code {
  background: #F1F5F9;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
}

.article-content pre code {
  background: none;
  padding: 0;
}

/* ── Tip box ───────────────────────────────────────────────── */
.article-tip {
  background: #EBF4FF;
  border-left: 4px solid var(--blog-blue);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 1.8rem 0;
  font-size: .95rem;
  color: #1E3A5F;
}

/* ── CTA box ───────────────────────────────────────────────── */
.article-cta {
  background: linear-gradient(135deg, var(--blog-blue) 0%, #0D47A1 100%);
  border-radius: var(--blog-radius);
  padding: 24px 28px;
  margin: 2.5rem 0 0;
  color: #fff;
  font-size: 1rem;
}

.article-cta p { margin: 0; color: rgba(255,255,255,.95); }
.article-cta a { color: #FFD54F; font-weight: 600; }
.article-cta a:hover { color: #FFECB3; }

/* ── Article tags (footer of article) ─────────────────────── */
.article-tags-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--blog-border);
}

.article-tags-section h3 {
  font-size: .85rem;
  font-weight: 600;
  color: var(--blog-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 10px;
}

/* ── Related articles ──────────────────────────────────────── */
.related-articles {
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  border-radius: var(--blog-radius);
  padding: 28px;
  margin-top: 2.5rem;
}

.related-articles h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--blog-text);
  border: none;
  padding: 0;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.related-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-decoration: none;
  color: var(--blog-text);
  padding: 10px;
  border-radius: 8px;
  transition: background .15s;
}

.related-item:hover { background: var(--blog-bg); text-decoration: none; }

.related-item-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.related-item-title {
  font-weight: 600;
  font-size: .9rem;
  line-height: 1.4;
  margin: 0 0 3px;
}

.related-item-meta {
  font-size: .78rem;
  color: var(--blog-muted);
}

/* ── Footer ────────────────────────────────────────────────── */
.blog-footer {
  background: #212121;
  color: #9E9E9E;
  padding: 36px 0;
  font-size: .875rem;
  margin-top: 48px;
}

.blog-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

.blog-footer a { color: #BDBDBD; }
.blog-footer a:hover { color: #fff; text-decoration: none; }
.blog-footer .footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ── "Latest on blog" widget (used on homepage) ─────────────── */
.blog-preview-section {
  background: #fff;
  padding: 64px 0;
  border-top: 1px solid var(--blog-border);
}

.blog-preview-section .section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-preview-section h2 {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0;
  color: var(--blog-text);
}

.blog-preview-section .see-all {
  font-size: .9rem;
  font-weight: 600;
  color: var(--blog-blue);
  text-decoration: none;
  white-space: nowrap;
}

.blog-preview-section .see-all:hover { text-decoration: underline; }

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

/* ── Progress bar ──────────────────────────────────────────── */
.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--blog-blue);
  width: 0%;
  z-index: 200;
  transition: width .1s linear;
}

/* ── Table of contents ─────────────────────────────────────── */
.article-toc {
  background: var(--blog-bg);
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 2rem 0;
  font-size: .9rem;
}

.article-toc h4 {
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--blog-muted);
  margin: 0 0 10px;
}

.article-toc ol {
  margin: 0;
  padding-left: 1.4rem;
}

.article-toc li { margin-bottom: 5px; }
.article-toc a { color: var(--blog-blue); font-size: .88rem; }

/* ── Key takeaways ─────────────────────────────────────────── */
.article-key-takeaways {
  background: linear-gradient(135deg, rgba(21,101,192,.05) 0%, rgba(46,125,50,.05) 100%);
  border-left: 4px solid var(--blog-blue);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 2rem 0;
}

.article-key-takeaways h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--blog-text);
}

.article-key-takeaways ul {
  margin: 0;
  padding-left: 1.8rem;
  list-style: none;
}

.article-key-takeaways li {
  margin-bottom: 8px;
  color: var(--blog-gray);
  font-size: .95rem;
  position: relative;
  padding-left: 0;
}

.article-key-takeaways li::before {
  content: "✓";
  position: absolute;
  left: -1.5rem;
  color: var(--blog-green);
  font-weight: bold;
}

/* ── Info boxes ────────────────────────────────────────────── */
.article-info-box {
  border-radius: 8px;
  padding: 16px 20px;
  margin: 1.5rem 0;
  border-left: 4px solid;
  background-color: rgba(255,255,255,.6);
  font-size: .95rem;
  line-height: 1.6;
}

.article-info-box strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.article-info-box.warning {
  border-color: var(--blog-red);
  background: rgba(198,40,40,.05);
}

.article-info-box.example {
  border-color: var(--blog-purple);
  background: rgba(106,27,154,.05);
}

.article-info-box.important {
  border-color: var(--blog-orange);
  background: rgba(230,81,0,.05);
}

.article-info-box.success {
  border-color: var(--blog-green);
  background: rgba(46,125,50,.05);
}

/* ── Comparison table ──────────────────────────────────────── */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--blog-surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--blog-shadow);
  font-size: .95rem;
}

.comparison-table thead {
  background: linear-gradient(135deg, #1565C0, #2E7D32);
  color: white;
}

.comparison-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: none;
  white-space: nowrap;
}

.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--blog-border);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody tr:nth-child(odd) {
  background: rgba(245,245,245,.5);
}

.comparison-table tbody tr:hover {
  background: rgba(21,101,192,.05);
}

/* ── FAQ items (structured) ────────────────────────────────── */
.article-faq-items {
  margin: 2rem 0;
}

.article-faq-item {
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.article-faq-question {
  background: var(--blog-bg);
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background .2s;
}

.article-faq-question:hover {
  background: rgba(21,101,192,.1);
}

.article-faq-question::after {
  content: "▼";
  font-size: .75rem;
  color: var(--blog-blue);
  transition: transform .2s;
}

.article-faq-item.open .article-faq-question {
  background: rgba(21,101,192,.1);
}

.article-faq-item.open .article-faq-question::after {
  transform: rotate(180deg);
}

.article-faq-answer {
  display: none;
  padding: 16px 20px;
  background: var(--blog-surface);
  color: var(--blog-gray);
  border-top: 1px solid var(--blog-border);
  line-height: 1.8;
}

.article-faq-item.open .article-faq-answer {
  display: block;
}

/* ── Details/Summary for FAQ ────────────────────────────────── */
details {
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  margin: 12px 0;
  overflow: hidden;
}

summary {
  background: var(--blog-bg);
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
  user-select: none;
}

summary:hover {
  background: rgba(21, 101, 192, 0.1);
}

summary::marker {
  color: var(--blog-blue);
}

details[open] > summary {
  background: rgba(21, 101, 192, 0.1);
  border-bottom: 1px solid var(--blog-border);
}

details > p {
  padding: 16px 20px;
  background: var(--blog-surface);
  margin: 0;
  line-height: 1.8;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .article-card.featured { flex-direction: column; }
  .article-card.featured .article-card-img { width: 100%; min-height: 160px; }

  .blog-grid { grid-template-columns: 1fr; }
  .blog-grid .article-card.featured { grid-column: auto; }

  .blog-hero { padding: 40px 0 32px; }

  .article-content { font-size: 1rem; }
  .article-content h2 { font-size: 1.25rem; }
  .article-header h1 { font-size: 1.5rem; }

  .blog-footer .container { flex-direction: column; align-items: flex-start; gap: 12px; }

  .comparison-table { font-size: .9rem; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; }
}

@media (max-width: 480px) {
  .blog-filters { gap: 6px; }
  .filter-btn { font-size: .78rem; padding: 5px 12px; }
  .article-card-body { padding: 16px 18px 18px; }
  .related-articles { padding: 20px; }

  .article-key-takeaways { padding: 16px; }
  .article-info-box { padding: 14px 16px; }
}

/* ── Related Tools Section ──────────────────────────────────── */
.related-tools-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.related-tool-item {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.05) 0%, rgba(21, 101, 192, 0.02) 100%);
  border: 1px solid rgba(21, 101, 192, 0.2);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.related-tool-item:hover {
  background: linear-gradient(135deg, rgba(21, 101, 192, 0.12) 0%, rgba(21, 101, 192, 0.08) 100%);
  border-color: rgba(21, 101, 192, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(21, 101, 192, 0.15);
}

.tool-icon {
  font-size: 2rem;
  min-width: 50px;
  text-align: center;
  line-height: 1;
}

.tool-name {
  font-weight: 600;
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.tool-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

@media (max-width: 768px) {
  .related-tools-list {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }

  .related-tool-item {
    padding: 14px 16px;
    gap: 12px;
  }

  .tool-icon {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .related-tools-list {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .related-tool-item {
    padding: 12px 14px;
    gap: 10px;
  }

  .tool-name {
    font-size: 0.9rem;
  }

  .tool-desc {
    font-size: 0.8rem;
  }
}

/* ── Pinterest pins section ────────────────────────────────── */
.article-trust-layer {
  margin: 1.75rem 0;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--blog-border);
  border-left: 4px solid var(--blog-primary, #1565c0);
  border-radius: 10px;
  background: var(--blog-surface);
}
.article-trust-layer h2 { margin: 0 0 .5rem; font-size: 1.2rem; }
.article-trust-layer h3 { margin: 1rem 0 .35rem; font-size: 1rem; }
.article-trust-layer .trust-meta { margin: 0 0 .9rem; color: var(--blog-muted); font-size: .88rem; line-height: 1.6; }
.article-trust-layer summary { cursor: pointer; font-weight: 700; }
.article-trust-layer details p { line-height: 1.65; }
.article-trust-layer .trust-sources { margin: .35rem 0 0; padding-left: 1.25rem; }
.article-trust-layer .trust-disclaimer { margin: 1rem 0 0; padding-top: .8rem; border-top: 1px solid var(--blog-border); font-size: .88rem; line-height: 1.55; }

.article-pinterest-pins-section {
  max-width: var(--blog-art-w);
  margin: 3rem auto 0;
  padding: 2rem 0;
  border-top: 2px solid var(--blog-border);
}

.article-pinterest-pins-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: var(--blog-text);
  text-align: center;
}

.pinterest-pins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.pinterest-pin-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--blog-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: var(--blog-surface);
  cursor: pointer;
}

.pinterest-pin-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--blog-shadow-hover);
  text-decoration: none;
}

.pinterest-pin-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: filter 0.2s ease;
}

.pinterest-pin-item:hover img {
  filter: brightness(0.95);
}

@media (max-width: 768px) {
  .pinterest-pins-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .pinterest-pins-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

/* ============================================================
   ETAP 8b: Stitch design system (Deep Terminal dark)
   Nadpisanie jasnych tokenów bloga na ciemny motyw Stitch.
   Pokrywa /blog/* i /piny/ (oba używają blog.css).
   Zasada: Stitch = wzorzec UI, treść/SEO bez zmian.
   ============================================================ */
:root {
  --blog-blue:    #88d982;
  --blog-green:   #10B981;
  --blog-red:     #F43F5E;
  --blog-purple:  #ffb1c7;
  --blog-orange:  #F59E0B;
  --blog-gray:    #64748B;
  --blog-bg:      #10150f;
  --blog-surface: #111418;
  --blog-border:  #40493d;
  --blog-text:    #e0e4da;
  --blog-muted:   #bfcaba;
  --blog-shadow:  none;
  --blog-shadow-hover: 0 0 12px 0 rgba(136,217,130,.12);
}

body {
  background: var(--blog-bg);
  color: var(--blog-text);
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

a { color: var(--blog-blue); }
a:hover { color: var(--stitch-primary, #88d982); }

/* Public nav aligned with landing page */
.fbo-public-nav {
  min-height: 64px;
  background: rgba(16, 21, 15, 0.96) !important;
  border-bottom: 1px solid var(--blog-border) !important;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: none !important;
  backdrop-filter: blur(12px);
}
.fbo-public-nav-inner {
  width: 100%;
  max-width: 1280px;
  min-height: 64px;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.fbo-public-brand {
  color: var(--blog-text) !important;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}
.fbo-public-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.fbo-public-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  color: var(--blog-muted) !important;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 14px;
  text-decoration: none !important;
}
.fbo-public-links a:hover,
.fbo-public-links a:focus-visible {
  color: var(--blog-blue) !important;
  background: var(--blog-surface);
  border-color: var(--blog-border);
  outline: none;
}
.fbo-public-links a[aria-current="page"] {
  color: var(--blog-blue) !important;
  font-weight: 700;
}
.fbo-public-links .material-symbols-outlined {
  font-size: 18px;
}

/* Nagłówki */
.blog-site-header,
.ch-site-header,
.blog-header {
  background: var(--blog-surface);
  border-bottom: 1px solid var(--blog-border);
  box-shadow: none;
}
.blog-site-header .brand,
.ch-site-header .brand { color: var(--blog-text); font-family: "Space Grotesk", sans-serif; }
.blog-site-header .brand::before,
.ch-site-header .brand::before { background: var(--blog-blue); }

/* Karty artykułów / pinów */
.article-card,
.blog-card,
.pinterest-pin-card,
.post-card {
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  border-radius: 8px;
  box-shadow: none;
}
.article-card:hover,
.blog-card:hover,
.pinterest-pin-card:hover,
.post-card:hover {
  box-shadow: var(--blog-shadow-hover);
  border-color: var(--blog-blue);
}
.article-card h2,
.article-card h3,
.blog-card h2,
.blog-card h3,
.post-card h2,
.post-card h3 {
  font-family: "Space Grotesk", sans-serif;
  color: var(--blog-text);
}
.article-card p,
.article-card-meta,
.blog-card p,
.blog-card-meta,
.post-card p,
.post-card-meta {
  color: var(--blog-muted);
}

/* Tagi / pigułki */
.tag-pill,
.category-badge,
.article-tags .tag-pill {
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  color: var(--blog-muted);
}
.tag-pill:hover,
.category-badge:hover { border-color: var(--blog-blue); color: var(--blog-blue); }

/* Hero / ch-template */
.blog-hero,
.blog-article-hero {
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
}
.blog-hero h1,
.blog-article-hero h1 { font-family: "Space Grotesk", sans-serif; color: var(--blog-text); }
.blog-hero p,
.blog-article-hero p { color: var(--blog-muted); }

/* Treść artykułu */
.article-content,
.article-body {
  color: var(--blog-text);
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  border-radius: 8px;
}
.article-content h1,
.article-content h2,
.article-content h3,
.article-body h1,
.article-body h2,
.article-body h3 { color: var(--blog-text); }
.article-content p,
.article-content li,
.article-body p,
.article-body li { color: var(--blog-muted); }

/* Tabele */
.article-content table,
.article-body table {
  background: var(--blog-surface);
  border-color: var(--blog-border);
}
.article-content th,
.article-body th {
  background: #262b25;
  color: var(--blog-blue);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 12px;
}
.article-content td,
.article-body td {
  background: #1c211b;
  color: var(--blog-muted);
  border-color: var(--blog-border);
}

/* Inputy / formularze (jeśli występują) */
.blog-search input,
.blog-search select,
.blog-newsletter input {
  background: #0A0C10;
  color: var(--blog-text);
  border: 1px solid var(--blog-border);
  border-radius: 4px;
}
.blog-search input:focus,
.blog-search select:focus,
.blog-newsletter input:focus {
  border-color: var(--blog-blue);
  outline: none;
  box-shadow: 0 0 0 1px #2E7D32;
}

/* Przyciski */
.blog-btn,
.btn-cta,
.blog-site-header .btn-cta {
  background: #2E7D32;
  color: #cbffc2;
  border: none;
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  box-shadow: none;
}
.blog-btn:hover,
.btn-cta:hover,
.blog-site-header .btn-cta:hover {
  background: #a3f69c;
  color: #002204;
}

/* Breadcrumbs / meta */
.blog-breadcrumbs,
.article-header-meta,
.article-date,
.ch-meta {
  color: var(--blog-muted);
}
.blog-breadcrumbs a { color: var(--blog-blue); }

/* STOPKA */
.blog-footer,
.site-footer {
  background: #0b0f0a;
  color: var(--blog-muted);
  border-top: 1px solid var(--blog-border);
}
.blog-footer a,
.site-footer a { color: var(--blog-muted); }
.blog-footer a:hover,
.site-footer a:hover { color: var(--blog-blue); }

/* PINY header */
.piny-header {
  background: #111418 !important;
  border-bottom: 1px solid var(--blog-border);
  box-shadow: none;
}
.piny-header h1 { font-family: "Space Grotesk", sans-serif; color: var(--blog-text); }
.piny-header p { color: var(--blog-muted); }

/* Stitch polish: blog pagination */
.pagination {
  max-width: var(--blog-max-w);
  margin: 0 auto 64px;
  padding: 0 20px;
}
.pagination ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pagination a,
.pagination .current {
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  background: var(--blog-surface) !important;
  border: 1px solid var(--blog-border) !important;
  border-radius: 4px;
  color: var(--blog-muted) !important;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
}
.pagination a[rel="prev"],
.pagination a[rel="next"] {
  min-width: 118px;
  color: var(--blog-blue) !important;
}
.pagination a:hover,
.pagination a:focus-visible {
  background: #1c211b !important;
  border-color: var(--blog-blue) !important;
  color: var(--blog-blue) !important;
  outline: none;
  text-decoration: none !important;
}
.pagination .current {
  background: var(--blog-blue) !important;
  border-color: var(--blog-blue) !important;
  color: #002204 !important;
}

/* Stitch polish: article width and borderless reading surface */
.article-page {
  max-width: 900px !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}
.article-page > .article-content,
.article-content .article-content,
.article-body {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.article-content .article-content {
  padding: 0 !important;
}
.article-content {
  color: var(--blog-text) !important;
}
.article-content p,
.article-content li,
.article-body p,
.article-body li {
  color: #d1dacb !important;
}
@media (max-width: 768px) {
  .pagination {
    margin-bottom: 48px;
    padding: 0 16px;
  }
  .pagination ul {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }
  .pagination a,
  .pagination .current {
    flex: 0 0 auto;
  }
  .article-page {
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
