/* Smarting HOME — blog: wpis, archiwa, karty (ładowane tylko na stronach bloga, inc/blog.php) */

:root {
  --shb-navy: #0B1221;
  --shb-bg: #181A1F;
  --shb-cyan: #00B4D8;
  --shb-green: #00E676;
  --shb-text: #C0C7D4;
  --shb-muted: #9BA4B5;
  --shb-line: rgba(255, 255, 255, 0.08);
  --shb-card: rgba(255, 255, 255, 0.03);
}

body.sh-blog { background-color: var(--shb-bg) !important; color: var(--shb-text); }
body.sh-blog .site-header, body.sh-blog .site-footer { display: none !important; }

/* Wspólny nagłówek przyklejony do góry także poza Elementorem */
body.sh-blog #sh-header-root { position: sticky; top: 0; z-index: 1000; }
body.admin-bar.sh-blog #sh-header-root { top: 32px; }
@media (max-width: 782px) { body.admin-bar.sh-blog #sh-header-root { top: 0; } }

body.sh-blog main.site-main { max-width: none; width: 100%; padding: 0; margin: 0; }
body.sh-blog .sh-footer { margin-top: 0; }

/* ---------- Okruszki ---------- */
.sh-breadcrumbs {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--shb-muted);
  margin: 0 0 20px;
  line-height: 1.5;
}
.sh-breadcrumbs a { color: var(--shb-muted); text-decoration: none; }
.sh-breadcrumbs a:hover { color: var(--shb-green); }
.sh-breadcrumbs .breadcrumb_last { color: #E2E8F0; }

/* ---------- Hero wpisu ---------- */
.sh-single-hero-area {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: 56px 20px 32px;
}
.sh-single-hero-area .sh-cat-badge {
  display: inline-block;
  background: rgba(0, 230, 118, 0.15);
  color: var(--shb-green);
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
  text-decoration: none;
}
.sh-single-hero-area .sh-cat-badge:hover { background: rgba(0, 230, 118, 0.25); }
.sh-single-hero-area h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  color: #fff;
  line-height: 1.2;
  margin: 0 0 20px;
  overflow-wrap: anywhere;
}
.sh-post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  margin: 0;
  color: var(--shb-muted);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
}
.sh-post-meta span + span::before { content: '·'; margin-right: 18px; color: rgba(255, 255, 255, 0.25); }
.sh-post-meta a { color: #E2E8F0; text-decoration: none; }
.sh-post-meta a:hover { color: var(--shb-green); }
@media (max-width: 600px) {
  .sh-single-hero-area { padding-top: 32px; }
  .sh-post-meta { gap: 4px 14px; font-size: 0.82rem; }
  .sh-post-meta span + span::before { content: none; }
}

/* Tabele w treści: przewijanie w poziomie na wąskich ekranach */
.sh-table-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; }
.sh-table-scroll > table { margin: 0; }
.sh-table-wrap .sh-table-scroll { margin: 0; }

.sh-featured-img-wrap { max-width: 900px; margin: 0 auto 40px; padding: 0 20px; }
.sh-featured-img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

/* ---------- Spis treści ---------- */
.sh-toc {
  margin: 32px 0 40px;
  background: rgba(0, 180, 216, 0.06);
  border: 1px solid rgba(0, 180, 216, 0.2);
  border-radius: 14px;
  padding: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.sh-toc__title {
  cursor: pointer;
  list-style: none;
  padding: 16px 22px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sh-toc__title::-webkit-details-marker { display: none; }
.sh-toc__title::after {
  content: '▾';
  margin-left: auto;
  color: var(--shb-cyan);
  transition: transform 0.2s;
}
.sh-toc[open] .sh-toc__title::after { transform: rotate(180deg); }
.sh-toc__count {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  color: var(--shb-cyan);
  background: rgba(0, 180, 216, 0.12);
  border-radius: 999px;
  padding: 2px 9px;
}
body.sh-single-post .entry-content .sh-toc__list,
.sh-toc__list { margin: 0; padding: 0 22px 18px 44px; }
body.sh-single-post .entry-content .sh-toc ol ol { margin: 6px 0 4px; padding-left: 20px; list-style: lower-alpha; }
body.sh-single-post .entry-content .sh-toc li { margin-bottom: 6px; }
body.sh-single-post .entry-content .sh-toc a { color: var(--shb-text); text-decoration: none; }
body.sh-single-post .entry-content .sh-toc a:hover { color: var(--shb-green); }
body.sh-single-post .entry-content h2[id],
body.sh-single-post .entry-content h3[id] { scroll-margin-top: 96px; }

/* ---------- FAQ ---------- */
.sh-faq { margin: 48px 0; }
.sh-faq__item {
  border: 1px solid var(--shb-line);
  background: var(--shb-card);
  border-radius: 12px;
  margin-bottom: 12px;
}
.sh-faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 48px 16px 20px;
  position: relative;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.08rem;
  color: #fff;
  line-height: 1.4;
}
.sh-faq__item summary::-webkit-details-marker { display: none; }
.sh-faq__item summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--shb-green);
  font-size: 1.4rem;
  font-weight: 400;
}
.sh-faq__item[open] summary::after { content: '−'; }
.sh-faq__item summary:focus-visible { outline: 2px solid var(--shb-cyan); outline-offset: 2px; border-radius: 12px; }
.sh-faq__a { padding: 0 20px 16px; }
.sh-faq__a p:last-child { margin-bottom: 0 !important; }

/* ---------- CTA ---------- */
.sh-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
  margin: 40px 0;
  padding: 28px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.08), rgba(0, 180, 216, 0.08));
  border: 1px solid rgba(0, 230, 118, 0.25);
  font-family: 'Inter', sans-serif;
}
.sh-cta--pro, .sh-cta--zestaw { border-color: rgba(0, 180, 216, 0.35); }
.sh-cta__body { flex: 1 1 320px; min-width: 0; }
.sh-cta__badge {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--shb-green);
  margin-bottom: 8px;
}
.sh-cta--pro .sh-cta__badge, .sh-cta--zestaw .sh-cta__badge { color: var(--shb-cyan); }
body.sh-blog .sh-cta .sh-cta__title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.3;
}
body.sh-blog .sh-cta .sh-cta__text { margin: 0; color: var(--shb-text); font-size: 1rem; line-height: 1.6; }
.sh-cta__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex: 0 1 auto; }
.sh-cta__price { font-family: 'Roboto Mono', monospace; font-size: 1.25rem; font-weight: 700; color: #fff; }
.sh-cta__price del { opacity: 0.5; font-size: 0.85em; margin-right: 6px; }
.sh-cta__price ins { text-decoration: none; }
body.sh-blog .sh-cta a.sh-cta__btn {
  display: inline-block;
  background: var(--shb-green);
  color: var(--shb-navy) !important;
  text-decoration: none !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  padding: 12px 22px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 230, 118, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
body.sh-blog .sh-cta a.sh-cta__btn:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0, 230, 118, 0.55); }
body.sh-blog .sh-cta a.sh-cta__link { color: var(--shb-cyan); font-size: 0.95rem; text-decoration: none; }
body.sh-blog .sh-cta a.sh-cta__link:hover { color: #fff; }
@media (max-width: 600px) {
  .sh-cta { padding: 22px 20px; }
  .sh-cta__actions { width: 100%; }
  body.sh-blog .sh-cta a.sh-cta__btn { width: 100%; text-align: center; white-space: normal; }
}

/* ---------- Po treści: CTA, autor, powiązane ---------- */
.sh-article-after { max-width: 800px; margin: 0 auto; padding: 0 20px; }
.sh-article-after .sh-cta { margin-top: 0; }

.sh-author-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  margin: 0 0 56px;
  border-radius: 16px;
  background: var(--shb-card);
  border: 1px solid var(--shb-line);
  font-family: 'Inter', sans-serif;
}
.sh-author-box__avatar {
  flex: 0 0 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--shb-cyan), var(--shb-green));
  color: var(--shb-navy);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
}
.sh-author-box p { margin: 0; }
.sh-author-box__label { font-family: 'Roboto Mono', monospace; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--shb-muted); }
.sh-author-box__name { font-family: 'Outfit', sans-serif; font-size: 1.25rem; font-weight: 600; margin: 2px 0 6px !important; }
.sh-author-box__name a { color: #fff; text-decoration: none; }
.sh-author-box__bio { color: var(--shb-text); font-size: 0.98rem; line-height: 1.6; }
.sh-author-box__links { margin-top: 10px !important; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.92rem; }
.sh-author-box__links a { color: var(--shb-cyan); text-decoration: none; }
.sh-author-box__links a:hover { color: #fff; }
@media (max-width: 480px) { .sh-author-box { flex-direction: column; } }

.sh-related { margin: 0 0 56px; }
.sh-related__title, .sh-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  color: #fff;
  margin: 0 0 24px;
}
.sh-article-after .sh-post-grid--3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.sh-article-after .sh-pcard__excerpt { display: none; }

/* ---------- Nawigacja poprzedni/następny ---------- */
.sh-post-navigation {
  max-width: 800px;
  margin: 0 auto 64px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.sh-post-navigation a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  line-height: 1.35;
  padding: 16px 20px;
  border: 1px solid rgba(0, 180, 216, 0.3);
  border-radius: 12px;
  transition: all 0.3s;
}
.sh-post-navigation a.is-next { grid-column: 2; text-align: right; }
.sh-post-navigation a span { display: block; font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.8rem; color: var(--shb-cyan); margin-bottom: 6px; }
.sh-post-navigation a:hover { background: rgba(0, 180, 216, 0.1); border-color: var(--shb-cyan); }
@media (max-width: 600px) {
  .sh-post-navigation { grid-template-columns: 1fr; }
  .sh-post-navigation a.is-next { grid-column: 1; }
}

/* Komentarze w szerokości treści */
body.sh-single-post .comments-area { max-width: 800px; margin: 0 auto 48px; }

/* ---------- Archiwa: hero ---------- */
.sh-bhero {
  text-align: center;
  padding: 72px 20px 40px;
  background: radial-gradient(circle at top, rgba(0, 180, 216, 0.1), transparent 70%);
}
.sh-bhero .sh-breadcrumbs { margin-bottom: 18px; }
.sh-bhero__kicker {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--shb-green);
  margin-bottom: 10px;
}
.sh-bhero__title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  color: #fff;
  margin: 0 0 16px;
  font-weight: 600;
  line-height: 1.15;
}
.sh-bhero__intro { max-width: 680px; margin: 0 auto; color: var(--shb-muted); font-size: 1.1rem; line-height: 1.65; }
.sh-bhero__intro p { margin: 0 0 10px; }

/* ---------- Lista: wyszukiwarka i filtr ---------- */
.sh-blog-list { max-width: 1200px; margin: 0 auto; padding: 0 20px 80px; font-family: 'Inter', sans-serif; }
.sh-blog-toolbar { display: flex; flex-direction: column; align-items: center; gap: 20px; margin: 0 0 44px; }
.sh-blog-search { display: flex; width: 100%; max-width: 520px; gap: 8px; margin: 0; }
.sh-blog-search input[type="search"] {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #fff;
  padding: 12px 16px;
  font: inherit;
  font-size: 1rem;
}
.sh-blog-search input[type="search"]::placeholder { color: #7D8696; }
.sh-blog-search input[type="search"]:focus { outline: none; border-color: var(--shb-cyan); box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.18); }
.sh-blog-search button {
  background: var(--shb-cyan);
  color: var(--shb-navy);
  border: 0;
  border-radius: 10px;
  padding: 0 20px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.sh-blog-search button:hover { background: #33C6E3; }
.sh-blog-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sh-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  color: #C9D1DD;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.25s;
}
.sh-chip:hover { background: rgba(255, 255, 255, 0.09); color: #fff; border-color: rgba(255, 255, 255, 0.2); }
.sh-chip.is-active { background: var(--shb-green); color: var(--shb-navy); border-color: var(--shb-green); }
.sh-chip__n { font-size: 0.75rem; opacity: 0.6; }
.sh-blog-result-count, .sh-blog-empty { text-align: center; color: var(--shb-muted); margin: 0 0 28px; }
.sh-blog-empty { padding: 40px 0; }

.sh-pinned { margin-bottom: 56px; }

/* ---------- Karty ---------- */
.sh-post-grid { display: grid; gap: 28px; margin: 0 0 48px; }
.sh-post-grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sh-post-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (min-width: 1100px) { .sh-post-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .sh-post-grid--4 { grid-template-columns: 1fr; } }
@media (max-width: 380px) { .sh-post-grid--3, .sh-post-grid--4 { grid-template-columns: 1fr; } }

.sh-pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--shb-card);
  border: 1px solid var(--shb-line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  min-width: 0;
}
.sh-pcard:hover { transform: translateY(-6px); border-color: rgba(0, 180, 216, 0.4); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4); }
.sh-pcard__media { aspect-ratio: 16 / 9; overflow: hidden; background: #10151F; }
.sh-pcard__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.sh-pcard:hover .sh-pcard__img { transform: scale(1.04); }
.sh-pcard__img--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  background: radial-gradient(circle at 30% 20%, rgba(0, 180, 216, 0.25), transparent 60%), radial-gradient(circle at 80% 80%, rgba(0, 230, 118, 0.18), transparent 60%), #0F1624;
}
.sh-pcard__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.sh-pcard__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 0 0 12px;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  color: var(--shb-muted);
}
.sh-pcard__cat {
  position: relative;
  z-index: 2;
  background: rgba(0, 230, 118, 0.14);
  color: var(--shb-green);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 9px;
  border-radius: 5px;
  text-decoration: none;
}
.sh-pcard__cat:hover { background: rgba(0, 230, 118, 0.28); }
.sh-pcard__title {
  font-family: 'Outfit', sans-serif !important;
  font-size: 1.2rem !important;
  line-height: 1.35 !important;
  font-weight: 600 !important;
  margin: 0 0 10px !important;
  color: #fff !important;
  overflow-wrap: anywhere;
}
.sh-pcard__title a { color: #fff !important; text-decoration: none !important; }
.sh-pcard__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: 16px; }
.sh-pcard__title a:focus-visible { outline: none; }
.sh-pcard__title a:focus-visible::after { outline: 2px solid var(--shb-cyan); outline-offset: -2px; }
.sh-pcard__excerpt { color: var(--shb-muted) !important; font-size: 0.95rem !important; line-height: 1.6 !important; margin: 0 0 16px !important; }
.sh-pcard__more { margin-top: auto; color: var(--shb-cyan); font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 0.95rem; }
.sh-pcard--compact .sh-pcard__body { padding: 16px 18px 18px; }
.sh-pcard--compact .sh-pcard__title { font-size: 1.05rem !important; }

/* ---------- Paginacja ---------- */
.sh-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.sh-pagination li { margin: 0; }
.sh-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #C9D1DD;
  text-decoration: none;
  font-weight: 500;
}
.sh-pagination a.page-numbers:hover { border-color: var(--shb-cyan); color: #fff; }
.sh-pagination .page-numbers.current { background: var(--shb-green); border-color: var(--shb-green); color: var(--shb-navy); font-weight: 700; }
.sh-pagination .page-numbers.dots { border: 0; background: none; min-width: 24px; padding: 0; }

/* Strona /blog/ (Elementor): lista wewnątrz kontenera widgetu */
.sh-blog-page-container .sh-blog-list { padding-bottom: 20px; }

/* Telefon: tematy w jednym przewijanym rzędzie zamiast 6 linii przycisków */
@media (max-width: 600px) {
  .sh-blog-toolbar { align-items: stretch; margin-bottom: 32px; }
  .sh-blog-chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -20px;
    padding: 2px 20px 6px;
  }
  .sh-blog-chips::-webkit-scrollbar { display: none; }
  .sh-chip { flex: 0 0 auto; white-space: nowrap; }
  .sh-bhero { padding: 40px 20px 28px; }
}

/* Bloki „krok po kroku” z długim kodem rozpychały kolumnę poza ekran telefonu */
body.sh-single-post .entry-content .sh-step-block > div { flex: 1 1 auto; min-width: 0; }
body.sh-single-post .entry-content :not(pre) > code { overflow-wrap: anywhere; }
body.sh-single-post .entry-content pre { max-width: 100%; }
