/* ============================================================
   DOBRY UKŁAD — Blog CSS
   Shared base: css/style.css
   ============================================================ */

/* ---- Blog Hero ---- */
.blog-hero {
  padding: calc(var(--nav-h) + 4rem) 0 3.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.blog-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 300;
  color: var(--espresso);
  margin-bottom: 1.2rem;
  line-height: 1;
}
.blog-hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 54ch;
  line-height: 1.75;
}

/* ---- Articles Grid ---- */
.blog-list { padding: var(--space-xl) 0; background: var(--bg); }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: start;
}

/* Featured article: spans full width, horizontal layout */
.article-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  overflow: visible;
}
.article-card.featured .article-img-wrap {
  overflow: hidden;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  height: 440px;
}
.article-card.featured .article-img-wrap img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}
.article-card.featured .article-body {
  padding: 3rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.article-card.featured .article-title {
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  line-height: 1.2;
}
.article-card.featured .article-excerpt {
  -webkit-line-clamp: 4;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--dur-mid) var(--ease), transform var(--dur-mid) var(--ease);
  cursor: pointer;
}
.article-card:not(.featured):hover {
  box-shadow: 0 12px 40px rgba(30,22,15,0.10);
  transform: translateY(-3px);
}
.article-card.featured:hover {
  box-shadow: 0 16px 48px rgba(30,22,15,0.12);
}

.article-img-wrap { overflow: hidden; }
.article-img-wrap img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
  display: block;
}
.article-card:hover .article-img-wrap img { transform: scale(1.04); }

.article-body { padding: 1.8rem; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--taupe);
}
.article-meta .dot { color: var(--sand-mid); }

.article-category {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--sand-mid);
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--taupe-dark);
  margin-bottom: 0.9rem;
}

.article-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--espresso);
  line-height: 1.3;
  margin-bottom: 0.8rem;
}

.article-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--espresso);
  border-bottom: 1px solid var(--sand-mid);
  padding-bottom: 0.15rem;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  text-decoration: none;
}
.article-link:hover { border-color: var(--espresso); }
.article-link-arrow {
  display: inline-block;
  transition: transform var(--dur-fast) var(--ease);
}
.article-link:hover .article-link-arrow { transform: translateX(3px); }

/* ---- Blog CTA ---- */
.blog-cta {
  background: var(--bg-alt);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
}
.blog-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}
.blog-cta-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 400;
  color: var(--espresso);
  margin-bottom: 0.6rem;
}
.blog-cta-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ---- Admin hint ---- */
.add-article-hint {
  margin-top: var(--space-lg);
  padding: 1.5rem 2rem;
  background: var(--white);
  border: 1px dashed var(--sand-mid);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.add-article-hint code {
  background: var(--bg-alt);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  font-size: 0.82rem;
  color: var(--brown);
}

/* ---- Single Article Page ---- */
.article-page-hero {
  padding: calc(var(--nav-h) + 3rem) 0 3rem;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.article-breadcrumb {
  font-size: 0.78rem;
  color: var(--taupe);
  margin-bottom: 1.5rem;
}
.article-breadcrumb a {
  color: var(--taupe);
  transition: color var(--dur-fast) var(--ease);
}
.article-breadcrumb a:hover { color: var(--espresso); }
.article-breadcrumb span { margin: 0 0.5rem; }
.article-page-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 400;
  color: var(--espresso);
  line-height: 1.15;
  max-width: 22ch;
  margin-bottom: 1.5rem;
}
.article-page-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: var(--taupe);
  font-weight: 500;
  letter-spacing: 0.06em;
  flex-wrap: wrap;
}

.article-cover {
  width: 100%;
  height: clamp(280px, 40vh, 520px);
  object-fit: cover;
  display: block;
  margin-bottom: var(--space-lg);
}

.article-content {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-lg) clamp(1.5rem, 5vw, 4rem);
}
.article-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--espresso);
  margin: 3rem 0 1rem;
  line-height: 1.2;
}
.article-content h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--espresso);
  margin: 2rem 0 0.75rem;
}
.article-content p {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 1.4rem;
}
.article-content ul, .article-content ol {
  margin: 0 0 1.4rem 1.5rem;
}
.article-content li {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 0.5rem;
  list-style: initial;
}
.article-content ol li { list-style: decimal; }
.article-content blockquote {
  border-left: 3px solid var(--brass);
  padding: 0.5rem 0 0.5rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--brown);
  line-height: 1.65;
}
.article-content strong { color: var(--espresso); font-weight: 600; }
.article-content a {
  color: var(--brown);
  border-bottom: 1px solid var(--sand-mid);
  transition: border-color var(--dur-fast) var(--ease);
}
.article-content a:hover { border-color: var(--brown); }

.article-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem) var(--space-xl);
  border-top: 1px solid var(--border);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.article-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.author-name { font-size: 0.88rem; font-weight: 600; color: var(--espresso); }
.author-title { font-size: 0.75rem; color: var(--taupe); }

/* ---- Responsive Blog ---- */
@media (max-width: 1000px) {
  .articles-grid { grid-template-columns: 1fr 1fr; }
  .article-card.featured {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
  }
  .article-card.featured .article-img-wrap {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    height: 320px;
  }
  .article-card.featured .article-body {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 2rem;
  }
}
@media (max-width: 680px) {
  .articles-grid { grid-template-columns: 1fr; }
  .article-card.featured { grid-column: span 1; }
  .article-card.featured .article-img-wrap { height: 260px; }
  .blog-cta-inner { flex-direction: column; text-align: center; }
  .blog-cta-inner .btn { width: 100%; text-align: center; justify-content: center; }
}

/* Active page nav link */
.nav-link.active-page {
  color: var(--espresso) !important;
  border-bottom: 1px solid var(--espresso);
}
