/* ========================================
   Blog page — detailed layout
   ======================================== */

.page-blog .header { top: 4px; }

.blog-page-hero {
  padding: clamp(4rem, 10vw, 5.5rem) 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.blog-page-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.blog-page-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}
.blog-page-desc {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 560px;
}

/* ----- Featured post ----- */
.blog-featured {
  padding: clamp(2.5rem, 6vw, 3.5rem) 0;
  background: var(--color-bg);
}
.blog-section-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.25rem;
}
.blog-featured-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.blog-featured-card:hover {
  border-color: var(--color-accent-muted);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.08);
}
.blog-featured-link {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  color: inherit;
  text-decoration: none;
}
.blog-featured-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-surface-2);
}
.blog-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out-expo);
}
.blog-featured-card:hover .blog-featured-image img {
  transform: scale(1.05);
}
.blog-featured-body {
  padding: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.blog-featured-date {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}
.blog-featured-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-text);
  margin: 0 0 1rem;
}
.blog-featured-excerpt {
  font-size: 1rem;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0 0 1.25rem;
}
.blog-featured-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.blog-meta-author { font-weight: 500; }
.blog-meta-read { opacity: 0.85; }

@media (max-width: 900px) {
  .blog-featured-link { grid-template-columns: 1fr; }
  .blog-featured-body { padding: 2rem; }
}

/* ----- Blog list + sidebar ----- */
.blog-page-list.blog {
  padding: clamp(3rem, 8vw, 4.5rem) 0;
  background: var(--color-bg);
}
.blog-page-container {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}
.blog-sidebar {
  position: sticky;
  top: 6rem;
}
.blog-sidebar-block {
  margin-bottom: 2rem;
}
.blog-sidebar-block:last-child { margin-bottom: 0; }
.blog-sidebar-title {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 1rem;
}
.blog-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.blog-sidebar-list li { margin-bottom: 0.5rem; }
.blog-sidebar-link {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  transition: color 0.2s ease;
}
.blog-sidebar-link:hover { color: var(--color-accent); }
.blog-sidebar-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0 0 1rem;
}
.btn-secondary-sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.88rem;
}

.blog-list-title {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 1.5rem;
}
.blog-page-grid {
  grid-template-columns: repeat(2, 1fr);
}
.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}
.blog-card-body .blog-card-cta { margin-top: 0; }

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.blog-pagination-current {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

@media (max-width: 1000px) {
  .blog-page-container { grid-template-columns: 1fr; }
  .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
  }
}
@media (max-width: 600px) {
  .blog-sidebar { grid-template-columns: 1fr; }
  .blog-page-grid { grid-template-columns: 1fr; }
}

/* ========================================
   Single article page (read full story)
   ======================================== */

.page-blog-article .header { top: 4px; }

.blog-article-main {
  padding-bottom: 4rem;
  background: var(--color-bg);
  min-height: 60vh;
}

/* Hero block with full-bleed image */
.blog-article-hero {
  position: relative;
  margin-bottom: 0;
  min-height: 380px;
  overflow: hidden;
}

.blog-article-hero-image {
  position: absolute;
  inset: 0;
  background: var(--color-surface-2);
}

.blog-article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-article-hero-inner {
  position: relative;
  padding: clamp(5rem, 12vw, 8rem) 0 clamp(3rem);
  margin: 0 auto;
  width: var(--container);
  max-width: 100%;
  box-sizing: border-box;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.blog-article-hero-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 70%);
  pointer-events: none;
}

.blog-article-hero-inner > * {
  position: relative;
  z-index: 1;
}

.blog-article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 1.25rem;
  text-decoration: none;
  padding: 0.5rem 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.blog-article-back:hover {
  color: #fff;
  transform: translateX(-2px);
}

.blog-article-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: rgba(255, 255, 255, 0.15);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.blog-article-title {
  font-family: var(--font-head);
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: #fff;
  max-width: 20ch;
}

.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.blog-article-meta time {
  font-weight: 500;
}

.blog-article-meta .blog-article-author {
  font-style: italic;
}

.blog-article-meta .blog-article-read::before {
  content: '·';
  margin-right: 1rem;
  opacity: 0.7;
}

/* Body content: centered readable column */
.blog-article-body-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem clamp(1rem, 4vw, 2rem) 3rem;
}

.blog-article-body.prose {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text);
}

.blog-article-body.prose p {
  margin: 0 0 1.35rem;
}

.blog-article-body.prose p:first-child {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  line-height: 1.75;
}

.blog-article-body.prose h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
  color: var(--color-text);
}

.blog-article-body.prose h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--color-text);
}

.blog-article-body.prose h4 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--color-text);
}

.blog-article-body.prose ul,
.blog-article-body.prose ol {
  margin: 0 0 1.35rem;
  padding-left: 1.6rem;
}

.blog-article-body.prose li {
  margin-bottom: 0.4rem;
}

.blog-article-body.prose blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem 1.25rem 1.5rem;
  border-left: 4px solid var(--color-accent);
  background: var(--color-accent-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-text);
}

.blog-article-body.prose blockquote p:last-child {
  margin-bottom: 0;
}

.blog-article-body.prose a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.blog-article-body.prose a:hover {
  color: var(--color-accent-hover);
}

.blog-article-body.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  display: block;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.blog-article-body.prose hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: 2.5rem 0;
}

.blog-article-footer-cta {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.blog-article-footer-cta .btn-secondary {
  display: inline-flex;
}

@media (max-width: 768px) {
  .blog-article-hero { min-height: 320px; }
  .blog-article-hero-inner { width: 92vw; margin-left: 4vw; margin-right: 4vw; }
  .blog-article-title { max-width: none; }
  .blog-article-body-wrap { padding: 2rem 1.25rem 2.5rem; }
}
