/* ============================================
   Bonjour Verbs — Blog styles
   Loaded alongside styles.css. Brand tokens come from :root in styles.css.
   ============================================ */

/* ─── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
    background: var(--color-bg);
    padding: 0.75rem 0;
    padding-top: 88px;
    /* clear the fixed header */
    border-bottom: 1px solid var(--color-border);
}

.breadcrumb-list {
    display: flex;
    flex-wrap: nowrap;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    max-width: 100%;
    overflow: hidden;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
}

.breadcrumb-list li:last-child {
    display: block;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text-light);
}

.breadcrumb-list li:not(:last-child)::after {
    content: "›";
    margin: 0 0.5rem;
    color: var(--color-text-muted);
}

.breadcrumb-list a {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

/* ─── Blog hero ────────────────────────────────────────────── */
.blog-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 140px 0 60px;
    text-align: center;
}

.blog-hero h1 {
    color: #fff;
    margin-bottom: 12px;
}

.blog-hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.92);
    max-width: 640px;
    margin: 0 auto;
}

/* ─── Blog list ────────────────────────────────────────────── */
.blog-list {
    padding: 56px 0 80px;
    background: var(--color-bg-alt);
    min-height: 50vh;
}

.blog-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--color-border);
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.blog-card-content {
    padding: 24px;
}

.blog-card-meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.blog-card h2 {
    font-size: 1.375rem;
    margin-bottom: 8px;
    color: var(--color-text);
    font-weight: 700;
}

.blog-card p {
    color: var(--color-text-light);
    margin-bottom: 12px;
    line-height: 1.6;
}

.read-more {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.meta-divider {
    color: var(--color-border);
}

.post-category {
    background: rgba(0, 80, 199, 0.1);
    color: var(--color-primary-dark);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    white-space: nowrap;
}

/* ─── Blog post ────────────────────────────────────────────── */
.blog-post {
    padding: 32px 0 56px;
    background: var(--color-bg);
}

.post-header {
    margin-bottom: 32px;
    text-align: center;
}

.post-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.25;
    margin-bottom: 12px;
    color: var(--color-text);
    font-weight: 800;
}

.post-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 16px;
    font-weight: 500;
}

/* ─── Post content (Markdown-rendered) ─────────────────────── */
.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text);
}

.post-content>p:first-of-type {
    font-size: 1.2rem;
    color: var(--color-text-light);
}

.post-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
    font-weight: 700;
}

.post-content h3 {
    font-size: 1.375rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    font-weight: 600;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid var(--color-primary);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--color-bg-alt);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--color-text-light);
    font-style: italic;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content code {
    background: var(--color-bg-deep);
    color: var(--color-text);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 1rem;
}

.post-content th,
.post-content td {
    border: 1px solid var(--color-border);
    padding: 0.7rem 1rem;
    text-align: left;
}

.post-content th {
    background: var(--color-bg-alt);
    font-weight: 600;
}

.post-content tr:nth-child(even) td {
    background: var(--color-bg-alt);
}

.post-content a {
    color: var(--color-primary);
    text-decoration: underline;
    font-weight: 500;
}

.post-content a:hover {
    text-decoration: none;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

/* Inline emphasis for French verb examples (`*je dormais*`) */
.post-content em {
    color: var(--color-primary-dark);
    font-style: italic;
}

/* ─── Post CTA box ─────────────────────────────────────────── */
.post-cta {
    background: linear-gradient(135deg, var(--color-bg-alt) 0%, var(--color-bg-deep) 100%);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-align: center;
    margin: 48px 0;
    border: 1px solid var(--color-border);
}

.post-cta h3 {
    margin-bottom: 8px;
    color: var(--color-text);
}

.post-cta p {
    color: var(--color-text-light);
    margin-bottom: 20px;
}

.post-cta .store-buttons {
    justify-content: center;
}

.post-cta .hero-cta-link {
    background: var(--color-primary);
    color: #fff;
}

.post-cta .hero-cta-link:hover {
    background: var(--color-primary-dark);
}

/* ─── Post navigation ──────────────────────────────────────── */
.post-nav {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.back-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

/* ─── Recent posts ─────────────────────────────────────────── */
.recent-posts {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border);
}

.recent-posts h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 24px;
}

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

.recent-post-card {
    background: var(--color-bg-alt);
    border-radius: var(--radius-md);
    padding: 20px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    border: 1px solid var(--color-border);
    color: inherit;
}

.recent-post-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    background: var(--color-bg);
}

.recent-post-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.recent-post-card p {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    font-weight: 500;
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .blog-hero {
        padding: 110px 0 40px;
    }

    .blog-hero h1 {
        font-size: 1.75rem;
    }

    .post-header h1 {
        font-size: 1.5rem;
    }

    .post-content {
        font-size: 1rem;
        line-height: 1.7;
    }

    .post-content h2 {
        font-size: 1.5rem;
    }

    .post-content h3 {
        font-size: 1.2rem;
    }

    .post-content table {
        font-size: 0.9rem;
    }

    .post-content th,
    .post-content td {
        padding: 0.5rem 0.6rem;
    }
}