/* ============================================================
   Blog — style (karty postów, strona pojedynczego posta, paginacja)
   ============================================================ */

/* --- Blog Header --- */
.blog-header-section {
  padding: calc(var(--header-height) + 4rem) 0 3rem;
  background: var(--dark);
  text-align: center;
}

.blog-main-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.blog-header-desc {
  font-size: 1.05rem;
  color: var(--text-lighter);
  max-width: 600px;
  margin: 1rem auto 0;
  line-height: 1.6;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 1rem 0;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}

.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
  font-size: 0.85rem;
}

.breadcrumb li {
  color: var(--text-light);
}

.breadcrumb li:not(:last-child)::after {
  content: '›';
  margin: 0 0.5rem;
  color: var(--border);
}

.breadcrumb a {
  color: var(--gold-dark);
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb li[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* --- Category Filters --- */
.blog-categories {
  padding: 1.5rem 0;
}

.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.cat-badge {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-light);
  transition: all var(--transition);
  text-decoration: none;
}

.cat-badge:hover,
.cat-badge.active {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
}

/* --- Posts Grid (listing) --- */
.blog-posts {
  padding-top: 2rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
  transform: translateY(-3px);
}

.post-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--dark-lighter);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.post-card:hover .post-card-image img {
  transform: scale(1.03);
}

.post-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.post-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.post-card-title a {
  color: var(--dark);
}

.post-card-title a:hover {
  color: var(--gold-dark);
}

.post-card-excerpt {
  font-size: 0.92rem;
  color: var(--text-light);
  line-height: 1.65;
  margin-bottom: 1rem;
  flex: 1;
}

.post-card-meta {
  font-size: 0.82rem;
  color: var(--text-lighter);
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  text-decoration: none;
}

.page-link:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.page-link.current {
  background: var(--gold);
  color: var(--dark);
  border-color: var(--gold);
  pointer-events: none;
}

/* --- Single Post --- */
.single-post {
  padding-top: var(--header-height);
}

.single-post-header {
  padding: 3rem 0 2rem;
  background: var(--dark);
}

.single-post-image {
  max-width: var(--max-width);
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  aspect-ratio: 2 / 1;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.single-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-post-category {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

.single-post-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.single-post-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.88rem;
  color: var(--text-lighter);
}

.single-post-content {
  padding: 3rem 1.5rem;
}

.post-body {
  max-width: 750px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4 {
  font-family: var(--font-heading);
  color: var(--dark);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.post-body h2 { font-size: 1.5rem; }
.post-body h3 { font-size: 1.25rem; }

.post-body p {
  margin-bottom: 1.25rem;
}

.post-body ul,
.post-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }

.post-body li {
  margin-bottom: 0.5rem;
}

.post-body blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: var(--off-white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-light);
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.post-body strong {
  color: var(--dark);
}

.post-body a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body a:hover {
  color: var(--gold);
}

/* --- Author Box --- */
.author-box {
  max-width: 750px;
  margin: 3rem auto 0;
  padding: 1.5rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.35rem;
}

.author-bio {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* --- Recent Posts --- */
.recent-posts {
  background: var(--off-white);
}

.recent-posts-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark);
  text-align: center;
  margin-bottom: 2rem;
}

.recent-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.recent-post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
}

.recent-post-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}

.recent-post-date {
  font-size: 0.78rem;
  color: var(--text-lighter);
  display: block;
  margin-bottom: 0.35rem;
}

.recent-post-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
}

.recent-post-card:hover .recent-post-title {
  color: var(--gold-dark);
}

/* --- Blog CTA --- */
.blog-cta-section {
  text-align: center;
}

.blog-cta-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1rem;
}

.blog-cta-text {
  font-size: 1rem;
  color: var(--text-lighter);
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* --- Blog Empty --- */
.blog-empty {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-light);
  font-size: 1.1rem;
}

/* --- Responsive --- */
@media (min-width: 600px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .recent-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .post-body {
    font-size: 1.1rem;
  }
}
