/* ─── Famello Blog Styles ───────────────────────────
   Uses base color tokens from base_colors.css:
   --g-900 deep green, --r-800 red, --o-500 orange,
   --c-100 cream, --surface, --border, --text, --muted
   ─────────────────────────────────────────────────── */

/* ─── Hero ──────────────────────────────────────────── */
.blog-hero {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  padding: 36px 24px 28px;
  text-align: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.blog-hero-inner {
  position: relative;
  z-index: 1;
}

.blog-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.blog-hero-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--o-500);
  box-shadow: 0 0 0 4px rgba(245, 130, 74, 0.18);
}

.blog-hero-title {
  margin: 0 0 18px;
  font-size: clamp(38px, 5.6vw, 56px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -0.4px;
  color: var(--text);
}

.blog-hero-title .blog-hero-accent {
  background: linear-gradient(135deg, var(--o-500), #ffb88a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.blog-hero-sub {
  margin: 0 auto;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.65;
  color: var(--muted);
  max-width: 56ch;
}

.blog-hero-divider {
  max-width: 1120px;
  margin: 0 auto;
  border: 0;
  border-top: 1px solid var(--border);
  opacity: 0.6;
}

/* ─── Page wrapper ──────────────────────────────────── */
.blog-page {
  padding: 48px 0 80px;
}

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

.blog-container--narrow {
  max-width: 880px;
}

/* ─── Card grid ─────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 56px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-shadow: var(--shadow-sm);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  border-color: rgba(245, 130, 74, 0.3);
}

.blog-card-img-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

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

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

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

.blog-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(360px 200px at 30% 20%, rgba(245, 130, 74, 0.18), transparent 60%),
    linear-gradient(135deg, var(--surface-2), var(--surface));
  color: var(--muted);
}

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

.blog-card-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(245, 130, 74, 0.12);
  color: var(--o-500);
  border: 1px solid rgba(245, 130, 74, 0.30);
  margin-bottom: 12px;
}

.blog-card-title {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 10px;
  color: var(--text);
}

.blog-card-title a {
  color: inherit;
  text-decoration: none;
}

.blog-card-title a:hover {
  color: var(--o-500);
  opacity: 1;
}

.blog-card-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 18px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.blog-card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--o-500);
  text-decoration: none;
  transition: gap 0.15s ease, opacity 0.15s ease;
}

.blog-card-link:hover {
  opacity: 0.85;
}

/* ─── Pagination ────────────────────────────────────── */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 32px 0 16px;
  flex-wrap: wrap;
}

.blog-pagination-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.blog-pagination-btn:hover {
  background: var(--surface-2);
  border-color: rgba(245, 130, 74, 0.4);
}

.blog-pagination-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.blog-pagination-info {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* ─── Empty state ───────────────────────────────────── */
.blog-empty {
  text-align: center;
  padding: 80px 20px;
}

.blog-empty h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 8px;
}

.blog-empty p {
  font-size: 15px;
}

/* ─── Detail page ───────────────────────────────────── */
.blog-back {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.12s ease;
}

.blog-back:hover {
  color: var(--o-500);
  opacity: 1;
}

.blog-article {
  margin-bottom: 48px;
}

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

.blog-article-tag {
  margin-bottom: 16px;
}

.blog-article-title {
  font-size: 38px;
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: 0.2px;
  margin: 0 0 16px;
  color: var(--text);
}

.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.blog-article-meta-sep {
  opacity: 0.6;
}

.blog-article-views {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

.blog-article-hero {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 36px;
  border: 1px solid var(--border);
}

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

/* ─── Article typography ────────────────────────────── */
.blog-article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
}

.blog-article-content > *:first-child {
  margin-top: 0;
}

.blog-article-content h2 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.3;
  margin: 48px 0 16px;
  color: var(--text);
  letter-spacing: 0.2px;
}

.blog-article-content h3 {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
  margin: 36px 0 12px;
  color: var(--text);
}

.blog-article-content p {
  margin: 0 0 20px;
  font-size: 18px;
  line-height: 1.75;
}

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

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

.blog-article-content li > ul,
.blog-article-content li > ol {
  margin-top: 8px;
  margin-bottom: 0;
}

.blog-article-content a {
  color: var(--o-500);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: opacity 0.12s ease;
}

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

.blog-article-content strong {
  font-weight: 800;
  color: var(--text);
}

.blog-article-content em {
  font-style: italic;
}

.blog-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 28px 0;
  display: block;
}

.blog-article-content blockquote {
  margin: 28px 0;
  padding: 18px 24px;
  border-left: 4px solid var(--o-500);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text);
}

.blog-article-content blockquote p {
  margin: 0;
}

.blog-article-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.blog-article-content pre {
  background: #0a0e0c;
  color: rgba(237, 228, 194, 0.92);
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 28px 0;
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.6;
}

.blog-article-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

.blog-article-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ─── Tables ────────────────────────────────────────── */
.blog-article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  display: block;
  overflow-x: auto;
}

.blog-article-content thead {
  background: var(--surface-2);
  color: var(--text);
}

.blog-article-content th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.blog-article-content tbody tr {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.blog-article-content tbody tr:nth-child(even) {
  background: var(--surface-2);
}

.blog-article-content td {
  padding: 12px 16px;
  vertical-align: top;
  color: var(--text);
}

/* ─── CTA box ───────────────────────────────────────── */
.blog-cta {
  margin: 48px 0;
  padding: 40px 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.blog-cta-title {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 850;
  color: var(--text);
  letter-spacing: 0.2px;
}

.blog-cta-desc {
  margin: 0 auto 22px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 520px;
}

.blog-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--o-500), rgba(237, 228, 194, 0.95));
  color: #1a1a1a;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.2px;
  padding: 12px 26px;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 10px 30px rgba(245, 130, 74, 0.20);
}

.blog-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(245, 130, 74, 0.30);
  opacity: 1;
}

/* ─── Related posts ─────────────────────────────────── */
.blog-related {
  margin: 56px 0 40px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.blog-related-title {
  margin: 0 0 22px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

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

.blog-related-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.blog-related-card:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 130, 74, 0.4);
  background: var(--surface-2);
  opacity: 1;
}

.blog-related-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.blog-related-card-date {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
  .blog-related-grid {
    grid-template-columns: 1fr;
  }
  .blog-article-title {
    font-size: 32px;
  }
}

@media (max-width: 600px) {
  .blog-hero {
    padding: 24px 20px 20px;
  }
  .blog-page {
    padding: 24px 0 60px;
  }
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .blog-article-title {
    font-size: 28px;
    line-height: 1.22;
  }
  .blog-article-content {
    font-size: 17px;
  }
  .blog-article-content p {
    font-size: 17px;
  }
  .blog-article-content h2 {
    font-size: 24px;
    margin-top: 36px;
  }
  .blog-article-content h3 {
    font-size: 20px;
    margin-top: 28px;
  }
  .blog-article-content table {
    font-size: 13px;
  }
  .blog-article-content th,
  .blog-article-content td {
    padding: 10px 12px;
  }
  .blog-cta {
    padding: 32px 22px;
  }
  .blog-cta-title {
    font-size: 22px;
  }
  .blog-related {
    padding: 24px 20px;
  }
  .blog-pagination {
    gap: 10px;
  }
  .blog-pagination-btn {
    padding: 9px 14px;
    font-size: 12.5px;
  }
}
