/* ==========================================================================
   Blog styles — listing page, article page, and verification-page strip.
   Uses the shared design tokens from styles.css (:root variables).
   ========================================================================== */

/* --- Blog listing hero --- */
.blog-hero {
    background: var(--gradient-hero);
    color: var(--text-white);
    padding: 8rem 0 3.5rem;
    text-align: center;
}
.blog-hero .section-header h1 {
    color: var(--text-white);
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0.75rem 0 0.75rem;
}
.blog-hero .section-header p {
    color: rgba(255, 255, 255, 0.85);
    max-width: 620px;
    margin: 0 auto;
}
.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-white);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- Listing grid --- */
.blog-listing-section { padding: 3.5rem 0 5rem; background: var(--bg-light); }
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
}
.blog-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-light);
}
.blog-empty i { font-size: 2.5rem; margin-bottom: 1rem; color: var(--border-light); }

/* --- Blog card (shared by grid + strip) --- */
.blog-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-light);
}
.blog-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.blog-card:hover .blog-card-thumb img { transform: scale(1.05); }
.blog-card-noimg {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--gradient-primary);
    color: rgba(255, 255, 255, 0.8);
    font-size: 2rem;
}
.blog-card-body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.blog-card-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
    font-size: 0.8rem; color: var(--text-light); margin-bottom: 0.6rem;
}
.blog-tag {
    background: rgba(3, 149, 218, 0.1);
    color: var(--primary-color);
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.72rem;
}
.blog-card-title { font-size: 1.15rem; line-height: 1.35; margin: 0 0 0.5rem; }
.blog-card-title a { color: var(--text-dark); text-decoration: none; }
.blog-card-title a:hover { color: var(--primary-color); }
.blog-card-excerpt {
    color: var(--text-light); font-size: 0.92rem; line-height: 1.55;
    margin: 0 0 1rem; flex: 1;
}
.blog-card-link {
    color: var(--primary-color); font-weight: 600; text-decoration: none;
    font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.4rem;
    margin-top: auto;
}
.blog-card-link i { transition: transform 0.2s ease; }
.blog-card-link:hover i { transform: translateX(3px); }

/* --- Article page --- */
.blog-article { background: var(--bg-white); padding: 7rem 0 4rem; }
.blog-article-container { max-width: 780px; }
.blog-breadcrumb { font-size: 0.85rem; color: var(--text-light); margin-bottom: 1.5rem; }
.blog-breadcrumb a { color: var(--primary-color); text-decoration: none; }
.blog-breadcrumb span { margin: 0 0.25rem; }
.blog-article-header h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    line-height: 1.2; color: var(--text-dark); margin: 0.75rem 0 1rem;
}
.blog-article-author { font-weight: 600; }
.blog-article-lead {
    font-size: 1.2rem; color: var(--text-light); line-height: 1.6; margin: 0 0 1.75rem;
}
.blog-article-hero-img {
    border-radius: 16px; overflow: hidden; margin-bottom: 2.25rem;
    box-shadow: var(--shadow-md);
}
.blog-article-hero-img img { width: 100%; display: block; }

/* Rendered markdown content */
.blog-article-content { font-size: 1.06rem; line-height: 1.75; color: #374151; }
.blog-article-content h2 { font-size: 1.6rem; margin: 2.25rem 0 0.9rem; color: var(--text-dark); }
.blog-article-content h3 { font-size: 1.3rem; margin: 1.75rem 0 0.75rem; color: var(--text-dark); }
.blog-article-content h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; color: var(--text-dark); }
.blog-article-content p { margin: 0 0 1.25rem; }
.blog-article-content ul, .blog-article-content ol { margin: 0 0 1.25rem 1.5rem; }
.blog-article-content li { margin-bottom: 0.5rem; }
.blog-article-content a { color: var(--primary-color); text-decoration: underline; }
.blog-article-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 1.5rem 0; }
.blog-article-content blockquote {
    border-left: 4px solid var(--primary-color);
    background: var(--bg-light);
    padding: 1rem 1.25rem; margin: 1.5rem 0; border-radius: 0 8px 8px 0;
    color: var(--text-dark); font-style: italic;
}
.blog-article-content code {
    background: var(--bg-light); padding: 0.15rem 0.4rem; border-radius: 5px;
    font-size: 0.9em; color: #b91c1c;
}
.blog-article-content pre {
    background: #1f2937; color: #e5e7eb; padding: 1.25rem; border-radius: 12px;
    overflow-x: auto; margin: 1.5rem 0;
}
.blog-article-content pre code { background: none; color: inherit; padding: 0; }
.blog-article-content hr { border: none; border-top: 1px solid var(--border-light); margin: 2rem 0; }

.blog-article-cta {
    margin-top: 3rem; padding: 2rem; text-align: center;
    background: var(--bg-light); border: 1px solid var(--border-light); border-radius: 16px;
}
.blog-article-cta h2 { font-size: 1.4rem; margin: 0 0 0.5rem; color: var(--text-dark); }
.blog-article-cta p { color: var(--text-light); margin: 0 0 1.25rem; }
.blog-article-cta .quote-btn { text-decoration: none; display: inline-block; }
.blog-back-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin-top: 2.5rem; color: var(--primary-color); font-weight: 600; text-decoration: none;
}

/* --- Horizontal strip on the verification page --- */
.blog-strip-section { padding: 3.5rem 0 1rem; background: var(--bg-light); }
.blog-strip-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.blog-strip-header h2 { font-size: 1.6rem; margin: 0 0 0.25rem; color: var(--text-dark); }
.blog-strip-header p { color: var(--text-light); margin: 0; font-size: 0.95rem; }
.blog-strip-all {
    color: var(--primary-color); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.blog-strip-scroller {
    display: flex; gap: 1.25rem; overflow-x: auto; padding: 0.5rem 0.25rem 1.5rem;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.blog-strip-scroller .blog-card {
    flex: 0 0 300px; max-width: 300px; scroll-snap-align: start;
}
.blog-strip-scroller::-webkit-scrollbar { height: 8px; }
.blog-strip-scroller::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 999px; }
.blog-strip-empty { color: var(--text-light); padding: 1rem 0 2rem; }
.blog-strip-section[hidden] { display: none; }

@media (max-width: 600px) {
    .blog-strip-scroller .blog-card { flex-basis: 82%; max-width: 82%; }
    .blog-article { padding-top: 6rem; }
}
