﻿:root {
    --brand: #623e2a;
    --brand2: #9D5A4D;
    --bg: #fbf6f3;
    --card: #ffffff;
    --line: #eadfd8;
    --muted: #8a6b55;
    --shadow: 0 10px 26px rgba(0,0,0,.06);
    --radius: 18px;
}

body {
    background: var(--bg);
    font-family: 'Anuphan', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.blog-wrap {
    padding: 26px 0 40px;
}

/* Breadcrumb */
.crumb {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

    .crumb:hover {
        text-decoration: underline;
    }

.crumb-sep {
    margin: 0 6px;
    color: #b79a86;
}

/* Headline */
.post-title {
    color: var(--brand);
    font-weight: 800;
    letter-spacing: .2px;
    line-height: 1.15;
    margin: 10px 0 14px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #f3ebe5;
    color: var(--brand);
    text-decoration: none;
    border: 1px solid #f1e6df;
    font-size: 13px;
    white-space: nowrap;
}

    .pill:hover {
        background: #efe3dc;
    }

/* Hero image */
.hero {
    background: var(--card);
    border: 1px solid #f1e6df;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

    .hero img {
        width: 100%;
        height: 320px;
        object-fit: cover;
        background: #f3ebe5;
    }

@media (max-width: 576px) {
    .hero img {
        height: 220px;
    }
}

/* Article card */
.article-card {
    background: var(--card);
    border: 1px solid #f1e6df;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.article-body {
    padding: 18px 18px 10px;
}

    .article-body p {
        color: #6f5240;
        font-size: 15px;
        line-height: 1.8;
        margin-bottom: 14px;
    }

/* Section block (เหมือนตัวอย่างมีหัวข้อย่อย) */
.section-card {
    margin-top: 16px;
    border-radius: var(--radius);
    border: 1px solid #f1e6df;
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow);
}

.section-head {
    padding: 14px 16px;
    background: #faf3ef;
    border-bottom: 1px solid #f1e6df;
    color: var(--brand);
    font-weight: 800;
    display: flex;
    gap: 10px;
    align-items: center;
}

.section-number {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: #f3ebe5;
    border: 1px solid #f1e6df;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--brand);
    flex: 0 0 auto;
}




.section-body {
    padding: 14px 16px;
    padding-bottom: 10px;
}

    .section-body p {
        margin: 0;
    }

/* Sidebar */
.side-card {
    background: var(--card);
    border: 1px solid #f1e6df;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.side-head {
    padding: 14px 16px;
    font-weight: 800;
    color: var(--brand);
    border-bottom: 1px solid #f1e6df;
    background: #faf3ef;
}

.side-body {
    padding: 14px 16px;
}

.side-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #f1e6df;
    border-radius: 14px;
    text-decoration: none;
    color: #5b3a29;
    background: #fff;
    margin-bottom: 10px;
}

    .side-link:hover {
        background: #f7f1ed;
    }

/* Search */
.search-wrap {
    position: relative;
}

.search-input {
    border-radius: 14px;
    border: 1px solid #f1e6df;
    padding: 12px 44px 12px 14px;
    width: 100%;
    outline: none;
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    font-size: 18px;
    color: #8a6b55;
    padding: 6px;
    cursor: pointer;
}

/* Latest posts */
.mini-post {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5ebe5;
}

    .mini-post:last-child {
        border-bottom: none;
    }

.mini-thumb {
    width: 86px;
    height: 62px;
    border-radius: 12px;
    object-fit: cover;
    background: #f3ebe5;
    border: 1px solid #f1e6df;
    flex: 0 0 auto;
}

.mini-title {
    font-weight: 800;
    font-size: 13px;
    line-height: 1.25;
    color: #3a251a;
    text-decoration: none;
    display: block;
}

    .mini-title:hover {
        text-decoration: underline;
    }

.mini-meta {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

/* spacing between cards */
.stack-16 > * {
    margin-bottom: 16px;
}

    .stack-16 > *:last-child {
        margin-bottom: 0;
    }
/* cover ติดกับเนื้อหา */
.article-cover {
    margin: 0 0 14px 0;
}

    .article-cover img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 16px; /* ปรับตามดีไซน์ */
    }

/* sections ต่อเนื่อง ไม่แยกการ์ด */
.article-section {
    margin-top: 18px;
}

.section-title {
    margin: 0 0 10px 0;
    font-weight: 800;
    line-height: 1.25;
    /* สีหัวข้อ section */
    color: var(--brand);
}



.section-body > :first-child {
    margin-top: 0;
}

.section-body > :last-child {
    margin-bottom: 0;
}
/* ===== Markdown content styling (section body) ===== */

.section-body {
    color: #6f5240; /* สีเดียวกับ article-body p */
    font-size: 15px;
    line-height: 1.8;
}

    /* paragraph */
    .section-body p {
        color: #6f5240;
        margin-bottom: 14px;
    }

    /* headings ภายใน markdown (h3, h4, ...) */
    .section-body h2,
    .section-body h3,
    .section-body h4 {
        color: var(--brand);
        font-weight: 800;
        margin: 22px 0 10px;
    }

    /* list */
    .section-body ul,
    .section-body ol {
        padding-left: 22px;
        margin-bottom: 14px;
    }

    .section-body li {
        margin-bottom: 6px;
        color: #6f5240;
    }

    /* link */
    .section-body a {
        color: var(--brand2);
        text-decoration: underline;
    }

        .section-body a:hover {
            color: var(--brand);
        }

    /* strong / bold */
    .section-body strong {
        color: #5b3a29;
        font-weight: 800;
    }

    /* blockquote (ถ้าใช้ markdown > ) */
    .section-body blockquote {
        border-left: 4px solid #eadfd8;
        padding-left: 14px;
        color: #7a5a47;
        margin: 14px 0;
    }

    /* image จาก markdown */
    .section-body img {
        max-width: 100%;
        border-radius: 14px;
        margin: 14px 0;
        display: block;
    }

    /* table (ถ้ามี) */
    .section-body table {
        width: 100%;
        border-collapse: collapse;
        margin: 16px 0;
        font-size: 14px;
    }

    .section-body th,
    .section-body td {
        border: 1px solid #eadfd8;
        padding: 8px 10px;
    }

    .section-body th {
        background: #faf3ef;
        color: var(--brand);
        font-weight: 800;
    }
