/**
 * Epicurus One Blog — Styles
 * 
 * Inherits landing page variables (--l-*) from landing.css.
 * Clean editorial design for SEO/AEO/GEO content blog.
 */

/* ─── Blog Navbar Override ────────────────────────── */

.navbar {
  background: rgba(248, 249, 252, 0.97);
  border-bottom: 1px solid var(--l-border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

/* ─── Layout ──────────────────────────────────────── */

.blog-container {
  max-width: var(--l-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Hero ────────────────────────────────────────── */

.blog-hero {
  padding: 120px 0 40px;
  text-align: center;
}

.blog-hero h1 {
  font-size: 42px;
  font-weight: 800;
  color: var(--l-text);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.blog-hero-sub {
  font-size: 18px;
  color: var(--l-text-secondary);
  font-weight: 400;
}

.seo-color { color: #00d2a0; }
.aeo-color { color: #0099ff; }
.geo-color { color: #f59e0b; }

/* ─── Card Grid ───────────────────────────────────── */

.blog-listing {
  padding: 24px 0 80px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--l-bg-white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--l-border);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.blog-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--l-bg-alt);
}

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

.blog-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--l-accent-bg), var(--l-bg-alt));
}

.blog-card-img-placeholder i {
  font-size: 32px;
  color: var(--l-accent);
  opacity: 0.4;
}

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

.blog-keyword-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--l-accent);
  background: var(--l-accent-bg);
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  width: fit-content;
}

.blog-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--l-text);
  line-height: 1.4;
  margin-bottom: 8px;
}

.blog-card-excerpt {
  font-size: 14px;
  color: var(--l-text-secondary);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.blog-card-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--l-text-muted);
}

/* ─── Pagination ──────────────────────────────────── */

.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.blog-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--l-text-secondary);
  background: var(--l-bg-white);
  border: 1px solid var(--l-border);
  text-decoration: none;
  transition: all 0.15s ease;
}

.blog-page-btn:hover {
  background: var(--l-accent-bg);
  color: var(--l-accent);
  border-color: var(--l-accent);
}

.blog-page-btn.active {
  background: var(--l-accent);
  color: #fff;
  border-color: var(--l-accent);
}

/* ─── Empty State ─────────────────────────────────── */

.blog-empty {
  text-align: center;
  padding: 80px 0;
}

.blog-empty i {
  font-size: 48px;
  color: var(--l-accent);
  opacity: 0.3;
  margin-bottom: 20px;
}

.blog-empty h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--l-text);
  margin-bottom: 8px;
}

.blog-empty p {
  font-size: 16px;
  color: var(--l-text-secondary);
}

/* ─── Article Page ────────────────────────────────── */

.blog-article {
  padding: 100px 0 60px;
}

.blog-article-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

.blog-article-header {
  margin-bottom: 32px;
}

.blog-article-header h1 {
  font-size: 38px;
  font-weight: 800;
  color: var(--l-text);
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--l-text-muted);
}

.blog-article-meta i {
  margin-right: 5px;
  color: var(--l-accent);
  opacity: 0.6;
}

.blog-article-hero-img {
  margin-bottom: 36px;
  border-radius: 16px;
  overflow: hidden;
}

.blog-article-hero-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── Article Content Typography ──────────────────── */

.blog-article-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--l-text);
}

.blog-article-content h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--l-text);
  letter-spacing: -0.3px;
}

.blog-article-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 12px;
  color: var(--l-text);
}

.blog-article-content p {
  margin-bottom: 18px;
}

.blog-article-content a {
  color: var(--l-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-article-content a:hover {
  opacity: 0.8;
}

.blog-article-content ul,
.blog-article-content ol {
  margin: 16px 0 24px 24px;
}

.blog-article-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.blog-article-content blockquote {
  border-left: 4px solid var(--l-accent);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--l-accent-bg);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--l-text-secondary);
}

.blog-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
  display: block;
}

.blog-article-content figure {
  margin: 24px 0;
}

.blog-article-content figure img {
  margin: 0 0 8px;
}

.blog-article-content figcaption {
  font-size: 13px;
  color: var(--l-text-muted);
  text-align: center;
}

.blog-article-content .video-embed {
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
}

.blog-article-content .video-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

/* ─── Article Footer ──────────────────────────────── */

.blog-article-footer {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--l-border);
}

.blog-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--l-accent);
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.blog-back-link:hover {
  opacity: 0.7;
}

/* ─── Webhook Guide ──────────────────────────────── */

.webhook-guide-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--l-accent);
  background: var(--l-accent-bg);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}

.webhook-guide-badge i {
  margin-right: 6px;
}

.wg-toc {
  background: var(--l-bg-alt);
  border: 1px solid var(--l-border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 40px;
}

.wg-toc h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--l-text);
  margin: 0 0 14px;
}

.wg-toc h3 i {
  margin-right: 8px;
  color: var(--l-accent);
  opacity: 0.6;
}

.wg-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
}

.wg-toc li a {
  font-size: 14px;
  color: var(--l-text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
  line-height: 1.8;
}

.wg-toc li a:hover {
  color: var(--l-accent);
}

.webhook-guide pre {
  background: #1a1a2e;
  color: #e0e0e0;
  border-radius: 12px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 16px 0 28px;
  font-size: 13.5px;
  line-height: 1.7;
  border: 1px solid rgba(136, 61, 255, 0.15);
}

.webhook-guide pre code {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', Consolas, monospace;
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.webhook-guide code {
  font-family: 'SF Mono', 'Fira Code', 'JetBrains Mono', Consolas, monospace;
  background: var(--l-accent-bg);
  color: var(--l-accent);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.88em;
}

.webhook-guide h2 {
  padding-top: 8px;
}

.webhook-guide h2 i {
  margin-right: 10px;
  color: var(--l-accent);
  opacity: 0.5;
  font-size: 0.85em;
}

.wg-table-wrap {
  overflow-x: auto;
  margin: 16px 0 28px;
}

.wg-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid var(--l-border);
  border-radius: 12px;
  overflow: hidden;
}

.wg-table thead {
  background: var(--l-bg-alt);
}

.wg-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--l-text);
  border-bottom: 1px solid var(--l-border);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.wg-table td {
  padding: 10px 16px;
  color: var(--l-text-secondary);
  border-bottom: 1px solid var(--l-border);
  vertical-align: top;
}

.wg-table tr:last-child td {
  border-bottom: none;
}

/* ─── Responsive ──────────────────────────────────── */

/* Related articles — internal linking for SEO */
.blog-related {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid #e5e7eb;
}
.blog-related-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 24px;
}
.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.blog-related-grid .blog-card {
  border-radius: 12px;
}
.blog-related-grid .blog-card-title {
  font-size: 16px;
  -webkit-line-clamp: 2;
}
.blog-related-grid .blog-card-excerpt {
  font-size: 13px;
  -webkit-line-clamp: 2;
}

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .blog-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 100px 0 24px;
  }

  .blog-hero h1 {
    font-size: 30px;
  }

  .blog-hero-sub {
    font-size: 15px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .blog-article {
    padding: 80px 0 40px;
  }

  .blog-article-header h1 {
    font-size: 28px;
  }

  .blog-article-content {
    font-size: 16px;
  }

  .blog-article-content h2 {
    font-size: 22px;
  }

  .blog-article-content h3 {
    font-size: 18px;
  }

  .blog-article-meta {
    gap: 12px;
    font-size: 13px;
  }

  .wg-toc ul {
    grid-template-columns: 1fr;
  }

  .webhook-guide pre {
    font-size: 12px;
    padding: 16px;
  }

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