/* ═══════════════════════════════════════════════════════════
   blog.css — styles for /blog listing and /blog/[slug] articles
   Design tokens: same as main site (Inter, #FF5C28, dark bg)
════════════════════════════════════════════════════════════ */

/* ── LISTING PAGE ─────────────────────────────────────────── */

.blog-hero {
  padding: 80px 24px 48px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.blog-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.blog-hero p {
  color: rgba(255,255,255,.55);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 0 24px 48px;
  max-width: 900px;
  margin: 0 auto;
}

.filter-tab {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,.12);
  background: transparent;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.filter-tab:hover {
  border-color: rgba(255,255,255,.3);
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.04);
}

.filter-tab.active {
  background: #FF5C28;
  border-color: #FF5C28;
  color: #fff;
}

/* Articles grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Blog card */
.blog-card {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.07);
  background: #181818;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,.5);
  border-color: rgba(255,255,255,.12);
}

.blog-card-image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #222;
  flex-shrink: 0;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

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

.blog-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 50%, #242424 100%);
  position: relative;
}

.blog-card-image-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 30px 30px;
}

.blog-card-image-placeholder-icon {
  position: relative;
  z-index: 1;
  opacity: .35;
}

.blog-card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: .04em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 2;
}

.blog-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.35);
  font-size: 12px;
}

.blog-card-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  flex-shrink: 0;
}

.blog-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0;
}

.blog-card-excerpt {
  color: rgba(255,255,255,.5);
  font-size: 0.875rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.blog-card-arrow {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #FF5C28;
  font-size: 13px;
  font-weight: 600;
}

/* No results state */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,.3);
  font-size: 0.95rem;
  display: none;
}

/* Blog bottom CTA */
.blog-cta-section {
  background: rgba(255,255,255,.03);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 80px 24px;
  text-align: center;
}

/* Card fade-in animation */
@keyframes card-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.blog-card.fade-in {
  animation: card-fade-in 0.3s ease forwards;
}

/* ── ARTICLE PAGE ─────────────────────────────────────────── */

.blog-article-outer {
  background: #111;
  min-height: 100vh;
}

.blog-article-cover {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  background: #181818;
  position: relative;
}

.blog-article-cover img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.blog-article-cover-placeholder {
  width: 100%;
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #141414 0%, #1c1c1c 100%);
  position: relative;
}

.blog-article-cover-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 40px 40px;
}

.blog-article-wrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: rgba(255,255,255,.35);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: rgba(255,255,255,.35);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: rgba(255,255,255,.7);
}

.breadcrumb-sep {
  color: rgba(255,255,255,.2);
  font-size: 10px;
}

/* Article header */
.article-category-pill {
  display: inline-block;
  background: rgba(255,92,40,.12);
  color: #FF5C28;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.article-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 0 0 24px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 36px;
}

.article-meta-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.1);
  flex-shrink: 0;
}

.article-meta-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.article-meta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-meta-name {
  color: rgba(255,255,255,.8);
  font-size: 14px;
  font-weight: 600;
}

.article-meta-details {
  color: rgba(255,255,255,.35);
  font-size: 12px;
}

/* Answer box — GEO featured snippet */
.answer-box {
  background: rgba(255,255,255,.04);
  border-left: 4px solid #FF5C28;
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 36px;
}

.answer-box-label {
  display: block;
  color: rgba(255,255,255,.4);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 10px;
}

.answer-box p {
  color: rgba(255,255,255,.75);
  font-size: 0.975rem;
  line-height: 1.75;
  margin: 0;
}

/* Table of contents */
.toc {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 48px;
}

.toc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.35);
  margin-bottom: 14px;
}

.toc ol {
  padding-left: 18px;
  margin: 0;
}

.toc li {
  margin-bottom: 7px;
}

.toc a {
  color: rgba(255,255,255,.55);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}

.toc a:hover {
  color: #FF5C28;
}

/* Article body */
.article-content {
  color: rgba(255,255,255,.7);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 52px 0 16px;
  scroll-margin-top: 80px;
  line-height: 1.25;
  padding-top: 4px;
}

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  margin: 32px 0 12px;
  scroll-margin-top: 80px;
}

.article-content p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
  color: rgba(255,255,255,.7);
}

.article-content ul,
.article-content ol {
  padding-left: 24px;
  margin-bottom: 1.25rem;
}

.article-content li {
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255,255,255,.7);
  margin-bottom: 6px;
}

.article-content img {
  width: 100%;
  border-radius: 8px;
  display: block;
  margin: 28px 0;
}

.article-content blockquote {
  border-left: 4px solid #FF5C28;
  margin: 28px 0;
  padding: 14px 20px;
  background: rgba(255,92,40,.06);
  border-radius: 0 6px 6px 0;
  color: rgba(255,255,255,.65);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.75;
}

/* FAQ section */
.faq-section {
  margin: 48px 0;
}

.faq-item {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  background: transparent;
  transition: background 0.2s;
}

.faq-item[open] {
  background: rgba(255,255,255,.025);
}

.faq-item summary {
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color 0.2s;
  user-select: none;
}

.faq-item summary:hover {
  color: #fff;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: rgba(255,255,255,.4);
  transition: transform 0.25s ease;
}

.faq-item[open] summary .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 2px 20px 18px;
  color: rgba(255,255,255,.6);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* Article CTA box */
.article-cta {
  text-align: center;
  padding: 40px 36px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  margin: 48px 0;
}

.article-cta h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.article-cta p {
  color: rgba(255,255,255,.5);
  font-size: 0.95rem;
  margin: 0 0 24px;
}

/* Related articles */
.related-articles {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.related-articles h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.related-card {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  padding: 18px 20px;
  background: #181818;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, transform 0.2s;
}

.related-card:hover {
  border-color: rgba(255,255,255,.15);
  transform: translateY(-2px);
}

.related-card-cat {
  font-size: 11px;
  font-weight: 600;
  color: #FF5C28;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.related-card h3 {
  font-size: 0.925rem;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  line-height: 1.4;
  margin: 0;
}

.related-card-placeholder {
  color: rgba(255,255,255,.2);
  font-size: 0.875rem;
  font-style: italic;
}

/* ── RESPONSIVE ────────────────────────────────────────────── */

@media (max-width: 640px) {
  .blog-hero {
    padding: 56px 16px 32px;
  }

  .filter-tabs {
    padding: 0 16px 32px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-tabs::-webkit-scrollbar { display: none; }

  .filter-tab { flex-shrink: 0; }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 16px 60px;
  }

  .blog-cta-section {
    padding: 56px 16px;
  }

  .blog-article-wrapper {
    padding: 24px 16px 60px;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .article-cta {
    padding: 28px 20px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .answer-box {
    padding: 16px 18px;
  }

  .toc {
    padding: 16px 18px;
  }

  .article-content h2 {
    font-size: 1.3rem;
    margin: 40px 0 12px;
  }
}
