/* ───────────────────────────────────────────────────────
   Blog (Razor-based v2) — additions on top of the legacy
   blog.css that was copied from the old static blog. New
   class names match Pages/Blog/Index.razor and Post.razor.
   ─────────────────────────────────────────────────────── */

.blog-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    color: #fff;
    padding: 64px 24px 48px;
    text-align: center;
    margin: -1.1rem calc(-50vw + 50%) 32px calc(-50vw + 50%);
    width: 100vw;
}

.blog-hero-inner { max-width: 880px; margin: 0 auto; }

.blog-hero-title {
    font-size: 40px;
    font-weight: 700;
    margin: 8px 0 12px;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.blog-hero-lede {
    font-size: 17px;
    line-height: 1.55;
    color: #cbd5e1;
    max-width: 720px;
    margin: 0 auto;
}

.blog-hero-meta {
    margin-top: 16px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.blog-pill {
    display: inline-block;
    background: rgba(43, 196, 138, 0.16);
    color: #2bc48a;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.blog-pill-small {
    padding: 2px 8px;
    font-size: 0.7rem;
}

.blog-link-on-dark { color: #2bc48a; }

.blog-locale-switch {
    margin-top: 20px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.blog-locale-chip {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}

.blog-locale-chip:hover { background: rgba(255, 255, 255, 0.15); }
.blog-locale-chip.active { background: #2bc48a; border-color: #2bc48a; color: #0f172a; font-weight: 600; }

.blog-list-wrapper {
    max-width: 1080px;
    margin: 0 auto 64px;
    padding: 0 20px;
}

.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.blog-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.18s, transform 0.18s;
}

.blog-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
    text-decoration: none;
}

.blog-card-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #f1f5f9;
}

.blog-card-body { padding: 18px 20px 20px; }

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.blog-card-title {
    font-size: 1.1rem;
    margin: 0 0 8px;
    color: #0f172a;
    line-height: 1.35;
}

.blog-card-desc {
    color: #475569;
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0 0 12px;
}

.blog-card-more {
    color: #2bc48a;
    font-size: 0.85rem;
    font-weight: 600;
}

.blog-empty {
    text-align: center;
    color: #64748b;
    padding: 40px 20px;
}

.blog-cover {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: 14px;
    margin: 0 auto 32px;
    display: block;
}

.blog-prose {
    max-width: 760px;
    margin: 0 auto;
    color: #0f172a;
    line-height: 1.7;
    font-size: 1.02rem;
}

.blog-prose h2 { font-size: 1.55rem; margin: 1.8em 0 0.6em; color: #0f172a; }
.blog-prose h3 { font-size: 1.2rem; margin: 1.4em 0 0.5em; color: #1e293b; }
.blog-prose p { margin: 0 0 1em; }
.blog-prose ul, .blog-prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.blog-prose li { margin-bottom: 6px; }
.blog-prose blockquote {
    border-left: 4px solid #2bc48a;
    padding: 4px 16px;
    color: #475569;
    margin: 1em 0;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}
.blog-prose code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.92em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.blog-prose pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 16px 18px;
    border-radius: 10px;
    overflow-x: auto;
    font-size: 0.9rem;
}
.blog-prose pre code { background: transparent; color: inherit; padding: 0; }
.blog-prose img { max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; }
.blog-prose a { color: #0d9488; text-decoration: underline; }
.blog-prose a:hover { color: #0f766e; }
.blog-prose strong { color: #0f172a; font-weight: 600; }
.blog-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: 0.95rem;
}
.blog-prose th, .blog-prose td {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
}
.blog-prose th { background: #f8fafc; font-weight: 600; }

.blog-cta {
    max-width: 760px;
    margin: 48px auto 0;
    background: #0f172a;
    color: #fff;
    padding: 32px 28px;
    border-radius: 14px;
    text-align: center;
}

.blog-cta h3 { color: #fff; font-size: 1.35rem; margin: 0 0 8px; }
.blog-cta p { color: #cbd5e1; margin: 0 0 18px; }

.blog-cta-btn {
    display: inline-block;
    background: #2bc48a;
    color: #0f172a;
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s;
}

.blog-cta-btn:hover { background: #34d399; text-decoration: none; color: #0f172a; }

.blog-foot-nav {
    max-width: 760px;
    margin: 32px auto 0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.95rem;
}

.blog-foot-nav a { color: #0d9488; text-decoration: none; }
.blog-foot-nav a:hover { text-decoration: underline; }

/* Related posts under each article */
.blog-related {
    max-width: 980px;
    margin: 48px auto 0;
    padding: 0 16px;
}
.blog-related-title {
    font-size: 1.1rem;
    margin: 0 0 16px;
    color: #0f172a;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}
.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.blog-related-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.18s, transform 0.18s;
}
.blog-related-card:hover {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
    text-decoration: none;
}
.blog-related-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #f1f5f9;
}
.blog-related-card > div { padding: 14px 16px 16px; }
.blog-related-card h3 {
    font-size: 0.98rem;
    margin: 8px 0 6px;
    color: #0f172a;
    line-height: 1.35;
}
.blog-related-card time { color: #64748b; font-size: 0.82rem; }

.blog-draft-banner {
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    color: #92400e;
    padding: 10px 24px;
    text-align: center;
    font-size: 0.92rem;
}

/* Inline-image chips in the admin editor */
.blog-img-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 4px 8px 4px 4px;
    font-size: 0.8rem;
    color: #0f172a;
    max-width: 240px;
}
.blog-img-chip img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}
.blog-img-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.blog-img-chip button {
    border: none;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.blog-img-chip button:hover { background: #ef4444; color: #fff; }

/* Header nav text link (Blog) — matches existing icon links */
.header-nav-text {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.15s;
}
.header-nav-text:hover { background: rgba(255, 255, 255, 0.08); text-decoration: none; color: #fff; }

@media (max-width: 640px) {
    .blog-hero { padding: 40px 18px 32px; }
    .blog-hero-title { font-size: 28px; }
    .blog-prose { padding: 0 18px; }
}
