/* 
  CINEMATIC SINGLE COLUMN LAYOUT
  Dark Hero, Centered Content, High Readability.
*/

:root {
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Inter", sans-serif;
  
  /* Colors */
  --c-bg-dark: #1a1a1a;       /* Ciemne tło hero */
  --c-text-light: #f4f4f4;    /* Tekst na ciemnym */
  --c-accent: #d4af37;        /* Złoty akcent (opcjonalny) */
  
  --c-text-main: #222222;
  --c-text-muted: #555555;
  --c-bg-page: #ffffff;
  --c-border: #eeeeee;
  --c-cta-bg: #f8f9fa;
  
  /* Sizes */
  --w-content: 740px;         /* Optymalna szerokość tekstu */
  --w-wide: 1200px;
}

body.article-page {
  background: var(--c-bg-page);
  color: var(--c-text-main);
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
}

/* --- PROGRESS BAR --- */
.reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 9999;
}

.reading-progress-bar {
  height: 4px;
  background: var(--c-text-main); /* Lub kolor akcentu */
  width: 0%;
  transition: width 0.1s;
}

/* --- DARK HERO SECTION --- */
.hero-section {
  background-color: var(--c-bg-dark);
  color: var(--c-text-light);
  padding: 6rem 1.5rem 8rem; /* Extra padding bottom for image overlap */
  text-align: center;
  position: relative;
}

.hero-container {
  max-width: 900px;
  margin: 0 auto;
}

.hero-meta {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.hero-category {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.hero-category:hover { color: #fff; }
.hero-sep { margin: 0 0.5rem; opacity: 0.4; }

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  line-height: 1.1;
  margin: 0 0 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

/* Author Block in Hero */
.author-block {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  padding: 2px; /* Border effect */
}
.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.author-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.author-name {
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
}

.author-reading-time {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}


/* --- MAIN WRAPPER --- */
.post-wrapper {
  max-width: var(--w-content);
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  position: relative;
}

/* --- ILLUSTRATION (Overlap) --- */
.post-illustration {
  margin: -5rem auto 3.5rem; /* Negative margin to pull up into hero */
  width: 100%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}

.post-illustration img {
  width: 100%;
  height: auto;
  display: block;
}


/* --- CONTENT STYLES --- */

/* TOC */
.post-toc {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  margin-bottom: 3rem;
}

.toc-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-family: var(--font-sans);
  font-size: 1.1rem;
}

.toc-icon { font-size: 1.2rem; }

.post-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-toc li {
  margin-bottom: 0.25rem;
}

.post-toc a {
  text-decoration: none;
  color: var(--c-text-muted);
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}

.post-toc a:hover {
  color: var(--c-text-main);
  border-bottom-color: var(--c-text-main);
}

/* Inline CTA */
.cta-box-inline {
  background: var(--c-bg-dark);
  color: #fff;
  padding: 2rem;
  border-radius: 8px;
  margin: 3rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  .cta-box-inline {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }
}

.cta-content h3 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.cta-content p { margin: 0; color: rgba(255,255,255,0.8); font-size: 0.95rem; }

.btn-cta {
  background: #fff;
  color: var(--c-bg-dark);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.2s;
}
.btn-cta:hover { transform: translateY(-2px); }


/* PROSE (Typography) */
.prose {
  font-size: 1.125rem; /* 18px */
  line-height: 1.8;
  color: #333;
  font-family: "Georgia", serif; /* Serif for reading body */
}

.prose p { margin-bottom: 1.8rem; }

.prose h2 {
  font-family: var(--font-sans);
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 3.5rem;
  margin-bottom: 1rem;
  color: var(--c-text-main);
  letter-spacing: -0.02em;
}

.prose h3 {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.prose a {
  color: var(--c-text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose a:hover { background-color: #f0f0f0; }

/* Lists */
.prose ul { 
  margin-bottom: 2rem;
  list-style: disc;
  padding-left: 1.5rem;
}
.prose li { margin-bottom: 0.5rem; }

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  font-size: 1rem;
  font-family: var(--font-sans);
  border: 1px solid var(--c-border);
}

.prose th, .prose td {
  padding: 1rem;
  border: 1px solid var(--c-border);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background-color: #f8f9fa;
  font-weight: 700;
  color: var(--c-text-main);
}

.prose tr:nth-child(even) {
  background-color: #fdfdfd;
}

/* STEP CARDS (Styled Ordered List) */
.prose ol {
  counter-reset: section;
  list-style: none;
  padding: 0;
  margin: 2.5rem 0;
}

.prose ol li {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 4rem; /* Space for number */
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
  transition: transform 0.2s;
}

.prose ol li:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.06);
}

.prose ol li::before {
  counter-increment: section;
  content: counter(section);
  position: absolute;
  left: 1rem;
  top: 1.5rem;
  width: 32px;
  height: 32px;
  background: var(--c-bg-dark);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 32px;
  font-weight: 700;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

.prose ol li strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
  color: var(--c-text-main);
}

.prose blockquote {
  border-left: 4px solid var(--c-bg-dark);
  margin: 2.5rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  font-style: italic;
  font-size: 1.25rem;
  color: #444;
  background: transparent;
}

/* --- FOOTER TAGS --- */
.post-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-border);
}

.tags-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--c-text-muted);
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag-chip {
  background: #f0f0f0;
  color: #333;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.2s;
}
.tag-chip:hover { background: #e0e0e0; cursor: default; }


/* --- READ NEXT (DARK) --- */
.read-next-section {
  background: var(--c-bg-dark);
  color: #fff;
  padding: 5rem 0;
  margin-top: 0;
}

.read-next-container {
  max-width: var(--w-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.read-next-heading {
  text-align: center;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  margin-bottom: 3rem;
  opacity: 0.7;
}

.read-next-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.read-next-card {
  text-decoration: none;
  color: inherit;
  group: group;
}

.card-image-wrap {
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1.2rem;
  background: #333;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.read-next-card:hover .card-image-wrap img {
  transform: scale(1.05);
}

.card-date {
  font-size: 0.8rem;
  opacity: 0.6;
  display: block;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  font-family: var(--font-sans);
}

@media (max-width: 768px) {
  .hero-title { font-size: 2.4rem; }
  .post-illustration { margin-top: -3rem; }
  .prose { font-size: 1.05rem; }
  .prose ol li { padding-left: 1.5rem; }
  .prose ol li::before { position: static; margin-bottom: 0.5rem; display: inline-block; }
}
