/* Blog article layer
   Ładuj po style.css:
   <link rel="stylesheet" href="/style.css" />
   <link rel="stylesheet" href="/blog.css" />
*/

:root {
  --blog-measure: 920px;
  --blog-toc-width: 240px;
  --blog-gap: 40px;
  --blog-content-width: 820px;
}

/* Page */
.page-blog-post {
  background: var(--bg-dark);
}

.blog-hero::before {
  content: none;
}

.page-blog-post main {
  overflow: clip;
}

/* Hero */
.blog-hero {
  position: relative;
  padding-top: 128px;
  padding-bottom: 48px;
  text-align: center;
}

.blog-hero .content-max-800 > * + * {
  margin-top: 0;
}

.blog-hero .breadcrumbs,
.blog-hero .breadcrumbs--hero {
  margin-bottom: 64px;
}

.blog-hero .content-max-800 {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.blog-hero h1 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08em;
  margin: 0 auto 18px;
  max-width: 1200px;
  font-size: clamp(38px, 5.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-align: center;
  text-wrap: initial;
}

.blog-hero h1 .gold-text {
  display: block;
}

.blog-hero .text-muted-650 {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto 26px;
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.8;
  text-align: center;
}

.hero-keypoints {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.hero-keypoint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid rgba(197, 160, 89, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: #f1e6cc;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-hero .text-muted-650::after {
  content: "";
  display: block;
  width: 120px;
  height: 1px;
  margin: 20px auto 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(197, 160, 89, 0.4) 50%,
    transparent 100%
  );
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Main article area */
.blog-article {
  padding-bottom: 12px;
}

.blog-article .content-max-800 {
  max-width: 1280px;
  margin: 0 auto;
}

.article-layout {
  display: grid;
  grid-template-columns: var(--blog-toc-width) minmax(0, 1fr);
  gap: var(--blog-gap);
  align-items: start;
}

.article-toc {
  position: sticky;
  top: 108px;
  align-self: start;
  justify-self: start;
  width: 100%;
  max-width: var(--blog-toc-width);
  margin: 0;
  padding: 16px 16px 14px;
  border: 1px solid rgba(197, 160, 89, 0.12);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.02) 0%, rgba(197, 160, 89, 0.04) 100%);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.article-content {
  min-width: 0;
  width: 100%;
  max-width: var(--blog-content-width);
  margin: 0 auto;
}

.article-content > :first-child {
  margin-top: 0;
}

.article-content > * + * {
  margin-top: 1.15em;
}

/* TOC */
.article-toc .section-note {
  margin: 0 0 8px;
  padding: 0 0 7px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.22);
  color: var(--gold);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-align: left;
  white-space: normal;
}

.article-toc ul,
.article-toc ol,
.article-toc .list-muted-clean {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article-toc li {
  margin: 0;
}

.article-toc li + li {
  margin-top: 0;
}

.article-toc a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  color: var(--text-gray);
  text-decoration: none;
  font-size: 0.94rem;
  line-height: 1.2;
  transition: color 0.2s ease, transform 0.2s ease;
}

.article-toc a::before {
  content: "›";
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 1rem;
  line-height: 1;
  opacity: 0.95;
  transform: translateX(0);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.article-toc a:hover,
.article-toc a:focus-visible {
  color: var(--gold);
  transform: translateX(4px);
}

.article-toc a:hover::before,
.article-toc a:focus-visible::before {
  opacity: 1;
  transform: translateX(2px);
}

.article-toc a[aria-current="true"] {
  color: var(--gold);
  font-weight: 600;
}
/* Typography */
.article-lead {
  color: #ece5d8;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.85;
}

.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  color: var(--gold);
  letter-spacing: -0.02em;
  scroll-margin-top: 120px;
  text-wrap: normal;
  text-align: left;
}

.article-content h2 {
  margin-top: 1.7em;
  margin-bottom: 0.48em;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.14;
}

.article-content h3 {
  margin-top: 1.35em;
  margin-bottom: 0.5em;
  font-size: clamp(23px, 2.8vw, 29px);
  line-height: 1.2;
}

.article-content h4 {
  margin-top: 1.2em;
  margin-bottom: 0.45em;
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.28;
}

.article-content p,
.article-content li,
.article-content td,
.article-content th,
.article-content figcaption {
  color: #d4d4d4;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.9;
}

.article-content p {
  overflow-wrap: break-word;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.article-summary {
  margin: 1.8em 0 2em;
  padding: 28px;
  border: 1px solid rgba(197, 160, 89, 0.14);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(197, 160, 89, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  box-shadow: var(--shadow-soft);
}

.article-summary__header {
  margin-bottom: 18px;
}

.article-summary__header h2 {
  margin: 0;
}

.article-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 760px;
}

.article-summary-card {
  padding: 18px 20px 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  background: rgba(12, 12, 12, 0.42);
}

.article-summary-card h3 {
  margin-top: 0;
  margin-bottom: 0.35em;
  font-size: clamp(20px, 2vw, 23px);
}

.article-summary-card p {
  max-width: 58ch;
  margin: 0;
}

.article-box--tip,
.article-box--decision,
.article-box--warning,
.article-checklist {
  position: relative;
  overflow: hidden;
}

.article-box--tip {
  border-color: rgba(197, 160, 89, 0.18);
  background: linear-gradient(145deg, rgba(197, 160, 89, 0.1) 0%, rgba(18, 18, 18, 0.95) 100%);
}

.article-checklist {
  margin: 1.4em 0 0;
  padding: 22px 24px;
  border: 1px solid rgba(197, 160, 89, 0.14);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
}

.article-checklist h4 {
  margin-top: 0;
}

.article-content strong,
.article-content b {
  color: var(--text-light);
  font-weight: 700;
}

.article-content em {
  color: #efe2c5;
}

.article-content a {
  color: var(--gold-bright);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color 0.25s ease, text-decoration-color 0.25s ease;
}

.article-content a:hover {
  color: #f1ca72;
  text-decoration-color: currentColor;
}

/* Lists */
.article-content ul,
.article-content ol {
  margin: 1.25em 0;
}

.article-content ul {
  padding-left: 0;
  list-style: none;
}

.article-content ul li {
  position: relative;
  padding-left: 1.5em;
}

.article-content ul li::before {
  content: "";
  position: absolute;
  top: 0.78em;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(197, 160, 89, 0.1);
}

.article-content ol {
  padding-left: 1.3em;
}

.article-content ol li::marker {
  color: var(--gold);
  font-weight: 700;
}

.article-content li + li {
  margin-top: 0.7em;
}

/* Quote */
.article-content blockquote {
  margin: 1.8em 0;
  padding: 24px 26px;
  border: 1px solid rgba(197, 160, 89, 0.16);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.015) 0%, rgba(197, 160, 89, 0.05) 100%);
  box-shadow: var(--shadow-soft);
}

.article-content blockquote,
.article-content blockquote p {
  color: #eee6d7;
  font-size: clamp(18px, 1.8vw, 21px);
  line-height: 1.8;
  text-align: left;
}

/* Info box */
.article-box {
  margin: 1.8em 0;
  padding: 24px 26px;
  border: var(--border-subtle);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #121212 0%, #181818 100%);
  box-shadow: var(--shadow-soft);
}

.article-box h3,
.article-box h4 {
  margin-top: 0;
  margin-bottom: 0.35em;
}

.article-box p:last-child {
  margin-bottom: 0;
}

.article-box,
.article-box p,
.article-box .section-note,
.article-box h3,
.article-box h4,
.article-box ul,
.article-box li {
  text-align: left;
}

.article-box__stack {
  display: grid;
  gap: 18px;
}

.article-box__section {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.article-box__label {
  margin-bottom: 0;
}

.article-impact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.article-impact-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 108px;
  padding: 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(197, 160, 89, 0.08), transparent 45%),
    linear-gradient(135deg, rgba(18, 18, 18, 0.96), rgba(10, 10, 10, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 10px 30px rgba(0,0,0,0.20);
  text-align: left;
}

.article-impact-card strong {
  display: block;
  color: #fff;
  font-size: clamp(20px, 1.6vw, 28px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}

.article-impact-card span,
.article-impact-card p {
  display: block;
  margin: 0;
  color: #f3efe7;
  font-size: clamp(15px, 1.05vw, 19px);
  line-height: 1.3;
  font-weight: 500;
  text-wrap: balance;
}

.article-impact-card strong + span,
.article-impact-card strong + p {
  margin-top: 2px;
}

/* Gdy w kaflu jest tylko jeden element, np. "Zakres projektu" */
.article-impact-card:has(strong:only-child) {
  justify-content: flex-start;
  padding-top: 22px;
}

.article-impact-card:has(strong:only-child) strong {
  max-width: 14ch;
  font-size: clamp(19px, 1.45vw, 24px);
  line-height: 1.16;
  font-weight: 700;
}

/* Sekcja z cenami */
.article-impact-card strong:first-child:not(:only-child) {
  max-width: 9ch;
}

/* Tablet */
@media (max-width: 980px) {
  .article-impact-grid {
    grid-template-columns: 1fr;
  }

  .article-impact-card {
    min-height: auto;
  }

  .article-impact-card:has(strong:only-child) strong,
  .article-impact-card strong:first-child:not(:only-child) {
    max-width: none;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .article-impact-grid {
    gap: 12px;
  }

  .article-impact-card {
    padding: 16px 14px;
    border-radius: 18px;
    gap: 6px;
  }

  .article-impact-card strong {
    font-size: 22px;
  }

  .article-impact-card span,
  .article-impact-card p {
    font-size: 16px;
  }

  .article-impact-card:has(strong:only-child) strong {
    font-size: 20px;
  }
}

/* Media */
.article-content img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
}

.article-content figure {
  margin: 1.8em 0;
}

.article-content figcaption {
  margin-top: 12px;
  color: var(--text-gray);
  font-size: 13px;
  line-height: 1.7;
}

/* Tables */
.article-table-wrap {
  margin: 1.5em 0;
  overflow-x: auto;
  border: var(--border-subtle);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #121212 0%, #171717 100%);
  box-shadow: var(--shadow-soft);
}

.article-content table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
}

.article-content th,
.article-content td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  vertical-align: top;
}

.article-content th {
  color: var(--text-light);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(197, 160, 89, 0.06);
}

.article-content tr:last-child td {
  border-bottom: 0;
}

.article-content td {
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.65;
}

/* Code */
.article-content pre,
.article-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.article-content code {
  padding: 0.18em 0.42em;
  border: 1px solid rgba(197, 160, 89, 0.18);
  border-radius: 8px;
  background: rgba(197, 160, 89, 0.08);
  color: #f2d696;
  font-size: 0.92em;
}

.article-content pre {
  margin: 1.5em 0;
  overflow-x: auto;
  padding: 20px 22px;
  border: var(--border-subtle);
  border-radius: var(--radius-xl);
  background: #0d0d0d;
}

.article-content pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: #eaeaea;
  font-size: 15px;
}

/* Divider */
.article-content hr {
  height: 1px;
  margin: 2.6em 0;
  border: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(197, 160, 89, 0.26) 20%,
    rgba(197, 160, 89, 0.26) 80%,
    transparent 100%
  );
}

/* CTA */
.cta-panel {
  padding: 52px 40px;
  margin: 0;
}

.cta-panel h2 {
  margin: 0 0 18px;
}

.cta-panel .copy-muted-md {
  margin: 0 0 28px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 0;
}

.cta-actions .btn,
.cta-actions .btn-main,
.cta-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  height: auto;
  padding: 16px 28px;
  box-sizing: border-box;
  line-height: 1;
  text-align: center;
}

.cta-actions .btn-main,
.cta-actions .btn-secondary {
  min-width: 300px;
}

/* Related posts */
.related-posts .blog-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.related-posts .blog-card .blog-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  align-content: flex-start;
  gap: 8px 10px;
  min-height: 56px;
  margin-bottom: 18px;
  text-align: center;
}

.related-posts .blog-card h2 {
  margin-top: 0;
  margin-bottom: 18px;
  min-height: 3.6em;
  text-align: center;
}

.related-posts .blog-card p {
  margin-top: 0;
  text-align: center;
}

.related-posts .blog-card .read-more {
  margin-top: auto;
  text-align: center;
}

.related-posts .section-header {
  max-width: 920px;
  margin: 0 auto 28px;
  text-align: center;
}

/* Section spacing */
.page-blog-post main > .blog-article + .section-shell,
.page-blog-post main > .section-shell + .section-shell {
  padding-top: 48px;
}

.page-blog-post .section-shell.section-shell-centered {
  padding-bottom: 48px;
}

.page-blog-post .section-shell.related-posts {
  padding-top: 48px;
}

/* Responsive */
@media (max-width: 1180px) {
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }

  .article-toc {
    position: relative;
    top: 0;
    max-width: none;
  }

}

@media (max-width: 768px) {
  .blog-hero {
    padding-top: 116px;
    padding-bottom: 40px;
  }

  .blog-hero .breadcrumbs,
  .blog-hero .breadcrumbs--hero {
    margin-bottom: 40px;
  }

  .blog-meta {
    gap: 8px;
    margin-bottom: 16px;
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .blog-hero .text-muted-650 {
    margin-bottom: 28px;
  }

  .hero-keypoints {
    gap: 10px;
  }

  .hero-keypoint {
    font-size: 12px;
  }

  .blog-hero .text-muted-650::after {
    margin-top: 28px;
  }

  .article-content p,
  .article-content li,
  .article-content td,
  .article-content th,
  .article-content figcaption {
    font-size: 16px;
    line-height: 1.82;
  }

  .article-content blockquote,
  .article-box,
  .article-content pre,
  .article-summary,
  .article-checklist {
    padding: 22px 20px;
    border-radius: var(--radius-lg);
  }

  .article-content th,
  .article-content td {
    padding: 14px;
  }

  .cta-panel {
    padding: 36px 20px;
  }

  .cta-panel h2 {
    margin-bottom: 14px;
  }

  .cta-panel .copy-muted-md {
    margin-bottom: 22px;
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .cta-actions .btn,
  .cta-actions .btn-secondary,
  .cta-actions .btn-main {
    width: 100%;
    max-width: 420px;
    min-width: 0;
    min-height: 56px;
    padding: 14px 24px;
  }

  .page-blog-post main > .blog-article + .section-shell,
  .page-blog-post main > .section-shell + .section-shell,
  .page-blog-post .section-shell.section-shell-centered,
  .page-blog-post .section-shell.related-posts {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .related-posts .section-header {
    margin-bottom: 22px;
  }
}

@media (max-width: 480px) {
  .blog-hero {
    padding-bottom: 34px;
  }

  .article-toc {
    padding: 14px;
  }

  .article-content ul li {
    padding-left: 1.35em;
  }

  .article-content ul li::before {
    width: 7px;
    height: 7px;
  }
}

/* Article utility blocks */
.article-answer,
.article-audience,
.article-mini-nav {
  margin: 1.2rem 0 1.6rem;
  padding: 18px 20px;
  border: 1px solid rgba(197, 160, 89, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.article-answer p,
.article-audience p,
.article-mini-nav p {
  margin: 0;
}

.article-answer strong,
.article-audience strong,
.article-mini-nav strong {
  color: #fff7e7;
}

.article-audience ul,
.article-mini-nav ul {
  margin: 0.8rem 0 0;
}

.article-mini-nav a {
  font-weight: 600;
}

.article-table-wrap caption {
  caption-side: top;
  text-align: left;
  padding: 14px 14px 10px;
  color: #f0e4ca;
  font-size: 0.98rem;
  line-height: 1.35;
  font-weight: 600;
}

@media (max-width: 900px) {
  .hero-keypoints {
    gap: 8px;
  }

  .hero-keypoint {
    font-size: 13px;
  }
}
