﻿body {
    background-color: #E6DAD1;
}

.container-style {
    background-color: #F6F1EE;
    padding: 30px;
}


.col-style {
    padding-top: 10px;
    padding-bottom: 10px;
}

:root {
    --brand: #623e2a;
    --brand-2: #9D5A4D;
    --bg: #fbf6f3;
    --line: #eadfd8;
    --card: #ffffff;
    --muted: #8a6b55;
}

body {
    background: var(--bg);
}

/* Title section */
.blog-hero {
    padding: 32px 0 14px;
}


.blog-title {
    display: inline-block;
    margin: 0;
    padding: 0 18px;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: .10px;
}

/* Category pills */
.cat-bar {
    display: flex;
    gap: 10px;
    padding: 8px 16px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

    /* ซ่อน scrollbar */
    .cat-bar::-webkit-scrollbar {
        display: none;
    }

.cat-bar {
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
}
/* mobile: horizontal scroll */
@media (max-width: 576px) {
    .cat-bar {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        margin-left: -16px; /* ดึงให้ชิดขอบจอ */
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

        .cat-bar::-webkit-scrollbar {
            display: none;
        }
}

.cat-pill {
    flex-shrink: 0;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--brand);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
}

    .cat-pill:hover {
        background: #f7f1ed;
    }

    .cat-pill.active {
        background: var(--brand);
        border-color: var(--brand);
        color: #fff;
    }

/* Card */
.post-card {
    background: var(--card);
    border: 1px solid #f1e6df;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0,0,0,0.04);
    height: 100%;
}

.post-thumb {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: #f3ebe5;
}

@media (max-width: 576px) {
    .post-thumb {
        height: 200px;
    }
}

.post-body {
    padding: 16px 16px 18px;
}

.badge-cat {
    display: inline-block;
    background: #f3ebe5;
    color: var(--brand);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    text-decoration: none;
}

.post-title {
    margin: 10px 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #3a251a;
    line-height: 1.25;
}

    .post-title a {
        color: inherit;
        text-decoration: none;
    }

        .post-title a:hover {
            text-decoration: underline;
        }

.post-meta {
    color: var(--muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-excerpt {
    margin: 10px 0 14px;
    color: #7a5a46;
    font-size: 14px;
    line-height: 1.55;
    /* จำกัด 2 บรรทัดให้ใกล้ภาพตัวอย่าง */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-read {
    background: var(--brand);
    border: none;
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
}

    .btn-read:hover {
        opacity: .92;
    }

/* Pagination */
.blog-pagination .page-item.disabled .page-link {
    color: #c2b1a6;
    background: #f7f1ed;
    border-color: #eadfd8;
    cursor: not-allowed;
    pointer-events: none;
}

.blog-pagination .page-item {
    padding: 0px 3px 0px 3px;
}

.blog-pagination .page-link {
    color: var(--brand);
    border-radius: 12px;
    margin: 0 3px;
}

.blog-pagination .page-item.active .page-link {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
