/* ==========================================================================
   Livpero Blog — extends the main style.css (same tokens, no overrides)
   ========================================================================== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Hero ------------------------------------------------------------------- */
.blog-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-height) + 72px) 0 56px;
  border-bottom: 1px solid var(--border);
}
.blog-hero-inner { position: relative; z-index: 1; }
.blog-hero-inner > * { max-width: 820px; }
.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 14px 0 16px;
}
.blog-hero-sub { color: var(--text-muted); font-size: 1.08rem; max-width: 620px; margin-bottom: 30px; }

.blog-search {
  display: flex; align-items: center; gap: 10px;
  max-width: 460px;
  padding: 0 16px;
  height: 50px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition: border-color .2s;
}
.blog-search:focus-within { border-color: var(--accent); }
.blog-search svg { width: 18px; height: 18px; color: var(--text-faint); flex-shrink: 0; }
.blog-search input {
  flex: 1; min-width: 0; height: 100%;
  background: none; border: 0; outline: none;
  color: var(--text); font: inherit; font-size: 0.95rem;
}
.blog-search input::placeholder { color: var(--text-faint); }

/* Body -------------------------------------------------------------------- */
.blog-body { padding: 48px 0 100px; }

.cat-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.cat-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color .2s, border-color .2s, background .2s;
}
.cat-pill span { font-size: 0.75rem; color: var(--text-faint); }
.cat-pill:hover { color: var(--text); border-color: var(--border-strong); }
.cat-pill.active { color: #04110F; background: var(--accent); border-color: var(--accent); }
.cat-pill.active span { color: rgba(4, 17, 15, 0.65); }

.blog-result-note { color: var(--text-muted); margin: -16px 0 28px; font-size: 0.92rem; }
.blog-result-note a { color: var(--accent); }

/* Meta + category tag */
.post-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  font-size: 0.82rem; color: var(--text-faint);
  margin-bottom: 12px;
}
.post-cat {
  color: var(--accent);
  font-weight: 600; font-size: 0.74rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.post-cat:hover { text-decoration: underline; }

/* Image placeholder when a post has no image */
.post-media-fallback {
  display: block; width: 100%; height: 100%;
  background:
    radial-gradient(circle at 30% 30%, var(--accent-glow), transparent 60%),
    linear-gradient(135deg, var(--surface-2), var(--bg-raised));
}

/* Featured post */
.post-featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  margin-bottom: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.post-featured-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.post-featured-media img, .post-card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.post-featured:hover .post-featured-media img,
.post-card:hover .post-card-media img { transform: scale(1.03); }
.post-featured-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.post-featured-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.18; letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.post-featured-body p { color: var(--text-muted); margin-bottom: 22px; }

/* Card grid */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color .25s, transform .25s var(--ease);
}
.post-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.post-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.post-card-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.15rem; line-height: 1.3;
  margin-bottom: 10px;
}
.post-card-body p { color: var(--text-muted); font-size: 0.93rem; margin-bottom: 18px; flex: 1; }
.post-card-body h3 a:hover, .post-featured-body h2 a:hover { color: var(--accent); }

.blog-empty { text-align: center; padding: 70px 20px; }
.blog-empty h1, .blog-empty h2 { font-family: var(--font-display); font-size: 1.8rem; margin: 10px 0; }
.blog-empty p { color: var(--text-muted); margin-bottom: 24px; }
.blog-404 { padding-top: calc(var(--nav-height) + 60px); }

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 52px; }
.pagination a {
  min-width: 42px; height: 42px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-muted); font-size: 0.9rem;
}
.pagination a:hover { color: var(--text); border-color: var(--border-strong); }
.pagination a.active { background: var(--accent); border-color: var(--accent); color: #04110F; font-weight: 600; }

/* Single post ----------------------------------------------------------- */
.post-header {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-height) + 56px) 0 36px;
}
.post-container { position: relative; z-index: 1; max-width: 820px; }
.breadcrumb { display: flex; gap: 10px; font-size: 0.86rem; color: var(--text-faint); margin-bottom: 22px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.draft-banner {
  display: inline-block; margin-bottom: 16px; padding: 6px 12px;
  font-size: 0.8rem; color: #F5C451;
  border: 1px solid rgba(245, 196, 81, 0.35); border-radius: 999px;
}
.post-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.1; letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.post-lead { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 22px; }
.post-image { margin: 0 auto 44px; }
.post-image img {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9; object-fit: cover;
}

.post-content { font-size: 1.07rem; line-height: 1.8; color: #D6D6DC; }
.post-content > * + * { margin-top: 1.25em; }
.post-content h2 {
  font-family: var(--font-display); color: var(--text);
  font-size: 1.65rem; line-height: 1.25; margin-top: 2em;
}
.post-content h3 { font-family: var(--font-display); color: var(--text); font-size: 1.3rem; margin-top: 1.7em; }
.post-content ul, .post-content ol { padding-left: 1.3em; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-top: 0.45em; }
.post-content li::marker { color: var(--accent); }
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-content strong { color: var(--text); }
.post-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 22px;
  color: var(--text); font-size: 1.15rem;
}

.post-share {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 52px 0 90px; padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
}
.post-share span { color: var(--text-faint); margin-right: 6px; }
.post-share a, .post-share button {
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-muted); background: none; font: inherit; cursor: pointer;
}
.post-share a:hover, .post-share button:hover { color: var(--text); border-color: var(--accent); }

.related { padding-top: 0; }
.related-title { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 26px; }

/* Responsive ----------------------------------------------------------- */
@media (max-width: 1024px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .post-featured { grid-template-columns: 1fr; }
  .post-featured-body { padding: 30px; }
}
@media (max-width: 640px) {
  .blog-hero { padding: calc(var(--nav-height) + 44px) 0 40px; }
  .blog-body { padding: 32px 0 72px; }
  .post-grid { grid-template-columns: 1fr; }
  .post-featured-body { padding: 24px; }
  .cat-pills { flex-wrap: nowrap; overflow-x: auto; margin: 0 -24px 32px; padding: 0 24px 4px; scrollbar-width: none; }
  .cat-pills::-webkit-scrollbar { display: none; }
  .cat-pill { flex-shrink: 0; }
  .post-header { padding: calc(var(--nav-height) + 36px) 0 28px; }
  .post-content { font-size: 1.02rem; }
  .post-image { margin-bottom: 32px; }
  .post-image img { border-radius: var(--radius-md); }
}
