/* =============================================================================
   Pan Busowski / oproznianie365.pl — BLOG (listing + article)
   Light theme, brand tokens.
   ============================================================================= */

/* =============================================================================
   TITLE
   ============================================================================= */
.bg-title {
  background: linear-gradient(180deg, #fff 0%, var(--pb-green-50) 100%);
  padding: 56px 0 36px;
  position: relative;
  overflow: hidden;
}
.bg-title::before {
  content: 'Pan Busowski';
  position: absolute; right: -40px; top: 0;
  font-family: var(--pb-font-display); font-weight: 800;
  font-size: 130px; line-height: .9;
  color: rgba(80,184,72,.06);
  transform: rotate(-8deg);
  pointer-events: none;
  white-space: nowrap;
  letter-spacing: -0.02em;
}
.bg-title-inner {
  text-align: center;
  position: relative;
  max-width: 960px; margin: 0 auto;
}
.bg-title-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--pb-font-body);
  font-size: 12px; font-weight: 700;
  color: var(--pb-green-700);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.bg-title-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--pb-green);
  animation: bg-pulse 2.4s infinite;
}
@keyframes bg-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(1.35); }
}
.bg-title h1 {
  font-family: var(--pb-font-display);
  font-size: 56px; line-height: 1.04; font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--pb-ink);
  margin: 14px 0 0;
}
.bg-title h1 .accent { color: var(--pb-green); }
.bg-title-br { display: inline; }
@media (min-width: 720px) { .bg-title-br { display: block; } }
@media (max-width: 720px) { .bg-title-br { display: none; } }
.bg-title h1 .underline { position: relative; white-space: nowrap; }
.bg-title h1 .underline::after {
  content: ''; position: absolute;
  left: 0; right: 0; bottom: 6px;
  height: 12px; background: var(--pb-yellow); opacity: .55;
  z-index: -1; border-radius: 4px;
}
.bg-title-sub {
  font-size: 17px; line-height: 1.55;
  color: var(--pb-text);
  margin: 18px auto 0;
  max-width: 56ch;
}

/* =============================================================================
   GRID
   ============================================================================= */
.bg-board { padding: 48px 0 24px; }
.bg-board-meta {
  display: flex; justify-content: flex-start; align-items: center;
  margin-bottom: 24px;
  padding: 6px 0;
  font-family: var(--pb-font-display);
  font-size: 15px; color: var(--pb-text-muted);
  line-height: 1.5;
}
.bg-board-meta b { color: var(--pb-ink); font-weight: 700; }

.bg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.bg-grid.is-empty {
  grid-template-columns: 1fr;
}

.bg-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--pb-line-soft);
  border-radius: var(--pb-r-xl);
  overflow: hidden;
  transition: 240ms var(--pb-ease-out);
  text-decoration: none;
  color: inherit;
}
.bg-card,
.bg-card:hover,
.bg-card:focus,
.bg-card:active {
  text-decoration: none;
}
.bg-card:hover {
  border-color: var(--pb-green);
  box-shadow: var(--pb-shadow-md);
  transform: translateY(-2px);
}
.bg-card-img {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(255,255,255,0.07) 18px 19px),
    linear-gradient(135deg, #b8d8b0 0%, #50b848 100%);
}
.bg-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 480ms var(--pb-ease-out);
}
.bg-card:hover .bg-card-img img { transform: scale(1.04); }

.bg-card-body {
  padding: 22px 22px 24px;
  display: flex; flex-direction: column; gap: 10px;
  flex: 1;
}
.bg-card-date {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--pb-font-mono);
  font-size: 11px; color: var(--pb-text-muted);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.bg-card-date svg {
  width: 12px; height: 12px;
  stroke: var(--pb-green-700); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.bg-card h3 {
  font-family: var(--pb-font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--pb-ink);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bg-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--pb-text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bg-card-more {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding-top: 6px;
  font-family: var(--pb-font-display);
  font-weight: 700; font-size: 14px;
  color: var(--pb-green-700);
}
.bg-card-more svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 200ms var(--pb-ease-out);
}
.bg-card:hover .bg-card-more svg { transform: translateX(3px); }

.bg-empty {
  background: #fff;
  border: 1px dashed var(--pb-line);
  border-radius: var(--pb-r-xl);
  padding: 64px 32px;
  text-align: center;
  color: var(--pb-text-muted);
}
.bg-empty h3 {
  font-family: var(--pb-font-display);
  font-size: 22px; font-weight: 700;
  color: var(--pb-ink);
  margin: 0 0 6px;
}

/* =============================================================================
   PAGINATION (kopia z realizacje, prefix bg-)
   ============================================================================= */
.bg-pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px;
  padding: 36px 0 12px;
}
.bg-pag-btn {
  min-width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff;
  border: 1px solid var(--pb-line);
  border-radius: var(--pb-r-md);
  font-family: var(--pb-font-display);
  font-weight: 700; font-size: 14px;
  color: var(--pb-ink);
  cursor: pointer;
  transition: 160ms;
  padding: 0 12px;
}
.bg-pag-btn:hover {
  border-color: var(--pb-green);
  color: var(--pb-green-700);
  background: var(--pb-green-50);
}
.bg-pag-btn.on {
  background: var(--pb-green);
  border-color: var(--pb-green);
  color: #fff;
  box-shadow: var(--pb-shadow-sm);
}
.bg-pag-btn.on:hover {
  background: var(--pb-green-600);
  border-color: var(--pb-green-600);
  color: #fff;
}
.bg-pag-btn:disabled {
  color: var(--pb-text-soft);
  cursor: not-allowed;
  background: var(--pb-surface-2);
}
.bg-pag-btn svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.bg-pag-ellipsis {
  width: 28px; text-align: center;
  font-family: var(--pb-font-display);
  color: var(--pb-text-soft);
  font-weight: 700;
}
.bg-pag-info {
  text-align: center;
  margin-top: 8px;
  font-family: var(--pb-font-mono);
  font-size: 11px; color: var(--pb-text-soft);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* =============================================================================
   ARTICLE PAGE
   ============================================================================= */
.bg-article-hero {
  background: linear-gradient(180deg, #fff 0%, var(--pb-green-50) 100%);
  padding: 56px 0 56px;
  position: relative;
  overflow: hidden;
}
.bg-article-hero-inner {
  max-width: 800px; margin: 0 auto;
  text-align: center;
}
.bg-article-meta {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--pb-font-mono);
  font-size: 12px; color: var(--pb-text-muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 16px;
}
.bg-article-meta .item { display: inline-flex; align-items: center; gap: 6px; }
.bg-article-meta .item svg {
  width: 13px; height: 13px;
  stroke: var(--pb-green-700); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.bg-article-meta .sep { color: var(--pb-text-soft); font-weight: 700; }
.bg-article-hero h1 {
  font-family: var(--pb-font-display);
  font-size: 44px; line-height: 1.1; font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--pb-ink);
  margin: 0 0 24px;
}
.bg-article-cover {
  display: block;
  width: 100%;
  max-width: 900px; margin: 28px auto 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--pb-r-xl);
  box-shadow: var(--pb-shadow-md);
}

.bg-article-body {
  padding: 56px 0;
  background: #fff;
}
.bg-article-body-inner {
  max-width: 760px; margin: 0 auto;
}

/* 2-column layout: prose + sticky sidebar */
.bg-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 56px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
}
.bg-article-layout .bg-prose { max-width: 760px; }
.bg-aside {
  position: sticky;
  top: 90px;
  display: flex; flex-direction: column;
  gap: 14px;
}
.bg-article-date {
  font-family: var(--pb-font-mono);
  font-size: 12px; color: var(--pb-text-muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin: 0 0 24px;
}
.bg-aside-cta {
  background: #fff;
  border: 1px solid var(--pb-line);
  border-radius: var(--pb-r-xl);
  padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--pb-shadow-sm);
}
.bg-aside-cta h3 {
  font-family: var(--pb-font-display);
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--pb-ink);
  margin: 0; line-height: 1.2;
}
.bg-aside-cta p {
  font-size: 14px; line-height: 1.5;
  color: var(--pb-text);
  margin: 0;
}
.bg-aside-cta .pb-btn { box-shadow: none; }
.bg-prose {
  font-family: var(--pb-font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--pb-text);
}
.bg-prose > * + * { margin-top: 1.1em; }
.bg-prose h2 {
  font-family: var(--pb-font-display);
  font-size: 30px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--pb-ink);
  margin-top: 1.8em; margin-bottom: 0.6em;
  line-height: 1.2;
}
.bg-prose h3 {
  font-family: var(--pb-font-display);
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--pb-ink);
  margin-top: 1.6em; margin-bottom: 0.5em;
  line-height: 1.3;
}
.bg-prose p { margin: 0; }
.bg-prose a {
  color: var(--pb-green-700);
  text-decoration: underline; text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.bg-prose a:hover { color: var(--pb-green); }
.bg-prose ul, .bg-prose ol {
  padding-left: 1.4em;
}
.bg-prose ul li, .bg-prose ol li { margin-bottom: 0.4em; }
.bg-prose ul { list-style: disc; }
.bg-prose ol { list-style: decimal; }
.bg-prose blockquote {
  border-left: 3px solid var(--pb-green);
  padding: 4px 18px;
  background: var(--pb-green-50);
  border-radius: 0 var(--pb-r-md) var(--pb-r-md) 0;
  font-style: italic;
  color: var(--pb-ink);
}
.bg-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--pb-r-md);
  margin: 1.4em 0;
  display: block;
}
.bg-prose strong { color: var(--pb-ink); font-weight: 700; }
.bg-prose code {
  background: var(--pb-surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--pb-font-mono);
  font-size: 0.92em;
}

/* small back-to-blog link */
.bg-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--pb-font-display);
  font-size: 13px; font-weight: 600;
  color: var(--pb-text-muted);
  text-decoration: none;
  margin-bottom: 18px;
}
.bg-back:hover { color: var(--pb-green-700); }
.bg-back svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */
@media (max-width: 1100px) {
  .bg-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .bg-title h1 { font-size: 40px; }
  .bg-article-hero h1 { font-size: 32px; }
  .bg-article-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .bg-aside { position: static; }
}
@media (max-width: 720px) {
  .bg-grid { grid-template-columns: 1fr; gap: 18px; }
  .bg-card-body { padding: 18px 18px 20px; }
  .bg-card h3 { font-size: 18px; }
  .bg-title { padding: 36px 0 28px; }
  .bg-title h1 { font-size: 30px; }
  .bg-article-hero h1 { font-size: 26px; }
  .bg-article-body { padding: 36px 0; }
  .bg-prose { font-size: 16px; }
  .bg-prose h2 { font-size: 24px; }
  .bg-prose h3 { font-size: 19px; }
}
