/* =========================================
   BLOG POST STYLES (Z SIDEBAREM)
   ========================================= */

/* Układ główny (Grid) */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
}

@media (min-width: 992px) {
  .blog-layout {
    grid-template-columns: 2.5fr 1fr; /* Artykuł zajmuje więcej miejsca niż sidebar */
    align-items: start;
  }
}

/* =========================================
   LEWA STRONA: ARTYKUŁ
   ========================================= */
.post-main-title {
  font-size: 2.2rem;
  line-height: 1.2;
  color: #1a202c;
  margin-bottom: 0.5rem;
}

.blog-meta {
  color: #718096;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 1rem;
}

.blog-back-link {
  display: inline-block;
  margin-top: 3rem;
  padding: 0.6rem 1.2rem;
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  color: #4a5568;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
}

.blog-back-link:hover {
  background-color: #e2e8f0;
  color: #1a202c;
}

/* =========================================
   FORMATOWANIE TREŚCI (.blog-content)
   ========================================= */
.blog-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #2d3748;
}

/* 1. Uatrakcyjnienie nagłówków */
.blog-content h1,
.blog-content h2 {
  font-size: 1.75rem;
  color: #1a202c;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.blog-content h3 {
  font-size: 1.35rem;
  color: #2d3748;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* 2. Lead artykułu (wyróżnienie pierwszego akapitu) */
.blog-content p:first-of-type {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #4a5568;
}

.blog-content p {
  margin-bottom: 1.5rem;
}

.blog-content strong {
  color: #1a202c;
  font-weight: 600;
}

/* 3. Efekt głębi na zdjęciach */
.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px; 
  margin-bottom: 2rem; 
  display: block; 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Subtelny cień */
}

/* 4. Nowoczesne listy wypunktowane i numerowane */
.blog-content ul {
  list-style-type: none; /* Ukrywa domyślne czarne kropki */
  padding-left: 0;
  margin-bottom: 2rem;
}

.blog-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

/* Własna, kolorowa kropka do list <ul> */
.blog-content ul li::before {
  content: "•";
  color: #3182ce; /* Kolor akcentu */
  font-weight: bold;
  font-size: 1.5rem;
  position: absolute;
  left: 0;
  top: -4px;
}

.blog-content ol {
  padding-left: 1.5rem;
  margin-bottom: 2rem;
}

.blog-content ol li {
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

/* Pokolorowanie numerów w listach <ol> */
.blog-content ol li::marker {
  color: #3182ce;
  font-weight: 600;
}

/* 5. Stylizacja Calloutów (wtrącenia <aside>) */
.blog-content aside {
  background-color: #ebf8ff; /* Jasnoniebieskie tło */
  border-left: 4px solid #3182ce; /* Gruba linia z lewej */
  padding: 1.25rem 1.5rem;
  margin: 2.5rem 0;
  border-radius: 0 8px 8px 0;
  color: #2c5282;
  font-size: 1.05rem;
}

.blog-content aside p {
  margin-bottom: 0;
}

.blog-content aside p:not(:last-child) {
  margin-bottom: 0.75rem;
}

/* 6. Spis treści (uporządkowany i zamieniony w "kafelek") */
.blog-content nav[aria-label="Table of contents"] {
  display: block;
  position: relative;
  height: auto;
  overflow: hidden; /* Zatrzymuje elementy przed wylewaniem się z ramki */
  clear: both; /* Czyści ewentualne floaty z globalnego CSS */
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.75rem 2rem;
  margin: 2.5rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.blog-content nav[aria-label="Table of contents"] h2 {
  display: block; /* Wymusza zepchnięcie listy do nowej linii */
  width: fit-content; /* Utrzymuje niebieską linię tylko pod tekstem */
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  border-bottom: 2px solid #3182ce;
  padding-bottom: 0.5rem;
  color: #1a202c;
}

.blog-content nav[aria-label="Table of contents"] ol {
  display: block;
  position: static;
  margin: 0;
  padding: 0;
  list-style-type: none; /* Ukrywa domyślne cyfry, zapobiegając dublowaniu */
}

.blog-content nav[aria-label="Table of contents"] li {
  display: block;
  position: static;
  margin-bottom: 0.8rem;
  padding-left: 0;
}

.blog-content nav[aria-label="Table of contents"] a {
  color: #3182ce;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s, text-decoration 0.2s;
  display: inline-block;
}

.blog-content nav[aria-label="Table of contents"] a:hover {
  color: #2b6cb0;
  text-decoration: underline;
}
/* =========================================
   PRAWA STRONA: SIDEBAR
   ========================================= */
.blog-sidebar {
  
  border: 1px;
  position: sticky;
  top: 2rem; /* Sidebar "przyklei się" podczas przewijania */
}

.sidebar-box h3 {
  font-size: 1.2rem;
  color: #1a202c;
  margin-top: 0;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #3182ce;
  padding-bottom: 0.5rem;
  display: inline-block;
}

.sidebar-post {
  margin-bottom: 1.2rem;
}

.sidebar-post a {
  display: block;
  font-weight: 600;
  color: #2d3748;
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 0.25rem;
  transition: color 0.2s;
}

.sidebar-post a:hover {
  color: #3182ce;
}

.sidebar-post span {
  font-size: 0.85rem;
  color: #a0aec0;
}