/* blog.css — shared styles for the blog index and articles.
   Every URL inside /blog is served by Cloudflare Pages without a .html
   extension, so blog pages must use root-absolute paths (/blog, /assets/...)
   rather than relative ones, which would resolve against /blog/ and break. */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* ===== Header ===== */
.blog-nav {
    background: #374151;
    padding: 0.9rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-nav .logo {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.blog-nav .logo:hover {
    color: #1DCFAA;
}

.blog-nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.blog-nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.blog-nav-links a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.blog-nav-links a.nav-cta {
    background: #ff6b6b;
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.1rem;
}

.blog-nav-links a.nav-cta:hover {
    background: #ff5252;
}

/* ===== Page header ===== */
.blog-header {
    background: #374151;
    color: white;
    padding: 3rem 1.5rem;
    text-align: center;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.blog-header p {
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.85);
}

/* ===== Post list ===== */
.post-list {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    display: grid;
    gap: 1.5rem;
}

.post-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.post-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.post-card h2 a {
    color: #374151;
    text-decoration: none;
}

.post-card h2 a:hover {
    color: #ff6b6b;
}

.post-card p {
    color: #4b5563;
    margin-bottom: 1rem;
}

.post-meta {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

.read-more {
    color: #ff6b6b;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.read-more:hover {
    text-decoration: underline;
}

/* ===== Article ===== */
.article-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.breadcrumb {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

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

.article-wrap h1 {
    font-size: 2.25rem;
    line-height: 1.25;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

.article-wrap .post-meta {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.article-wrap h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin: 2.5rem 0 0.85rem;
    line-height: 1.3;
}

.article-wrap h3 {
    font-size: 1.15rem;
    color: #374151;
    margin: 1.75rem 0 0.6rem;
}

.article-wrap p {
    margin-bottom: 1.15rem;
    color: #374151;
    font-size: 1.05rem;
}

.article-wrap ul,
.article-wrap ol {
    margin: 0 0 1.25rem 1.35rem;
    color: #374151;
    font-size: 1.05rem;
}

.article-wrap li {
    margin-bottom: 0.6rem;
}

.article-wrap a {
    color: #d94f4f;
}

.article-wrap a:hover {
    text-decoration: none;
}

.article-wrap strong {
    color: #1f2937;
}

.lead {
    font-size: 1.15rem !important;
    color: #4b5563 !important;
}

blockquote {
    border-left: 4px solid #1DCFAA;
    background: #f0fdfa;
    padding: 1rem 1.25rem;
    margin: 1.75rem 0;
    border-radius: 0 8px 8px 0;
}

blockquote p {
    margin: 0 !important;
    color: #115e59 !important;
}

.callout {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #ff6b6b;
    border-radius: 0 8px 8px 0;
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
}

.callout p:last-child {
    margin-bottom: 0;
}

/* End-of-article call to action */
.article-cta {
    background: #374151;
    color: white;
    border-radius: 10px;
    padding: 2rem 1.75rem;
    margin: 3rem 0 1rem;
    text-align: center;
}

.article-cta h2 {
    color: white !important;
    margin: 0 0 0.6rem !important;
    font-size: 1.35rem !important;
}

.article-cta p {
    color: rgba(255, 255, 255, 0.85) !important;
    margin-bottom: 1.5rem !important;
}

.article-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    background: #ff6b6b;
    color: white !important;
    padding: 0.85rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.article-cta a:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

/* Related posts */
.related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.related h2 {
    font-size: 1.25rem !important;
    margin: 0 0 1rem !important;
}

.related ul {
    list-style: none;
    margin-left: 0;
}

.related a {
    color: #374151;
    font-weight: 600;
    text-decoration: none;
}

.related a:hover {
    color: #ff6b6b;
    text-decoration: underline;
}

/* ===== Footer ===== */
.site-footer {
    background: #f3f4f6;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    padding: 1.75rem 1.5rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-link {
    color: #4b5563;
    text-decoration: none;
}

.footer-link:hover {
    color: #374151;
    text-decoration: underline;
}

.footer-divider {
    color: #d1d5db;
    font-size: 0.8rem;
}

.footer-copyright {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
    .blog-header {
        padding: 2.25rem 1.25rem;
    }
    .blog-header h1 {
        font-size: 1.85rem;
    }
    .blog-header p {
        font-size: 1rem;
    }
    .article-wrap h1 {
        font-size: 1.7rem;
    }
    .article-wrap h2 {
        font-size: 1.3rem;
    }
    .article-wrap p,
    .article-wrap ul,
    .article-wrap ol {
        font-size: 1rem;
    }
    .post-card {
        padding: 1.35rem;
    }
    .post-card h2 {
        font-size: 1.25rem;
    }
    .blog-nav {
        padding: 0.75rem 1rem;
    }
    .blog-nav .logo {
        font-size: 1.1rem;
    }
    .blog-nav-links a {
        font-size: 0.9rem;
        padding: 0.5rem 0.6rem;
    }
}
