/* =========================================
   1) Base Vars & Typography
========================================= */
:root {
    --purple: #6c2c70;
    --light-purple: #f3ecfa;
    --white: #fff;
  	--black: #000;
    --dark-purple: #4a1f4b;

    /* UI palette */
    --primary: var(--purple);
    --text-main: #6c2c70;
    --text-muted: #6b7280;
}

body,
button,
input,
select,
textarea {
    font-family: 'Prompt', sans-serif;
}

.bg-primary {
    background: var(--purple) !important;
    color: #fff;
}

/* =========================================
     2) Navbar
  ========================================= */
.navbar {
    background: var(--white) !important;
    padding-bottom: 0;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.navbar .container {
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.navbar-brand {
    margin: 1.5rem 0 .4rem;
    display: block;
    text-align: center;
}

.navbar-brand img {
    max-height: 48px;
    width: auto;
}

/* Hamburger */
.navbar-toggler {
    width: 40px;
    height: 40px;
    background: var(--purple) !important;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 18px;
    right: 10px;
    z-index: 10;
}

.navbar-toggler-icon {
    filter: invert(1);
}

@media (min-width:992px) {
    .navbar-toggler {
        display: none !important;
    }
}

/* Collapse row */
.collapse.navbar-collapse {
    width: 100%;
    justify-content: center;
    margin-top: .5rem;
}

@media (min-width:992px) {
    .collapse.navbar-collapse {
        display: flex !important;
        justify-content: center !important;
    }
}

/* =========================================
     3) Main Menu
  ========================================= */
.navbar-nav {
    flex-direction: column !important;
    align-items: center !important;
    width: 100%;
    gap: 1rem;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  	border-bottom: 4px solid var(--purple);
}

@media (min-width:992px) {
    .navbar-nav {
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        width: auto !important;
        margin: 0 auto !important;
        gap: 2rem;
    }
}

/* Main links (เฉพาะระดับแรก) */
.navbar-nav>li,
.navbar-nav>.menu-item {
    position: relative;
    text-align: center;
    list-style: none !important;
}

.navbar-nav>li>a,
.navbar-nav>.menu-item>a,
.navbar-nav .nav-link {
    color: var(--black) !important;
    font-weight: 400;
    text-transform: uppercase;
    padding: .5rem 1.4rem;
    /*border-radius: 2rem;*/
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 1rem;
    transition: color .1s;
    text-decoration: none !important;
    display: inline-block;
}

.navbar-nav>li>a:hover,
.navbar-nav>.menu-item>a:hover{
	color: var(--purple) !important;
    text-decoration: none !important;
}

.navbar-nav>.menu-item.current-menu-item>a,
.navbar-nav>.menu-item.current_page_item>a {
  	background: var(--purple) !important;
    color: var(--white) !important;
    text-decoration: none !important;
}

/* Reset (อย่าแตะ .sub-menu) */
.navbar-nav ul,
.navbar-nav li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    /*background: none !important;*/
    border: none !important;
    box-shadow: none !important;
}

/* =========================================
     4) Submenu (Desktop float / Mobile block)
  ========================================= */
.navbar-nav .sub-menu,
.navbar-nav ul ul {
    display: none;
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    background: var(--purple) !important;
    min-width: 180px;
    /*border-radius: 12px;*/
    box-shadow: 0 4px 18px rgba(108, 44, 112, .13);
    padding: .7rem 0;
    z-index: 99;
    text-align: left;
}

.navbar-nav li:hover>.sub-menu,
.navbar-nav li:focus-within>.sub-menu {
    display: block;
}

/* ลิงก์ใน submenu เท่านั้น */
.navbar-nav .sub-menu a {
    color: var(--light-purple) !important;
    padding: .5rem 1.5rem;
    text-transform: none;
    border-radius: 6px;
    background: none !important;
    font-size: 1rem;
    font-weight: 500;
    display: block;
    text-decoration: none !important;
}

.navbar-nav .sub-menu a:hover {
    background: var(--light-purple) !important;
    color: var(--dark-purple) !important;
}

.navbar-nav .sub-menu li::marker,
.navbar-nav .sub-menu li::before {
    display: none !important;
    content: none !important;
}

/* caret */
.navbar-nav li.menu-item-has-children>a::after {
    content: "";
    display: inline-block;
    width: .5rem;
    height: .5rem;
    margin-left: .5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform .2s ease;
}

.navbar-nav li.menu-item-has-children:hover>a::after,
.navbar-nav li.menu-item-has-children:focus-within>a::after {
    transform: rotate(-135deg) translateY(1px);
}

/* Mobile submenu */
@media (max-width:991.98px) {

    .navbar-nav .sub-menu,
    .navbar-nav ul ul {
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        padding: .5rem 0 .2rem;
        min-width: 0;
        background: transparent;
        display: none;
    }

    .navbar-nav li.menu-item-has-children {
        position: relative;
    }

    .navbar-nav li.menu-item-has-children>a {
        padding-right: 2rem;
    }

    .navbar-nav li.menu-item-has-children>a::after {
        position: absolute;
        right: .75rem;
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
    }

    .navbar-nav li.menu-item-has-children.open>a::after {
        transform: translateY(-50%) rotate(-135deg);
    }
}

/* =========================================
     5) Title Section ก่อนแบนเนอร์
  ========================================= */
.hero-title {
    font-weight: 800;
    color: var(--purple);
}

.hero-excerpt {
    font-size: 1.1rem;
    color: var(--dark-purple);
    max-width: 720px;
    margin: 0 auto;
}

/* =========================================
     6) Hero (สองแบบให้เลือก)
  ========================================= */
/* 6.1 แบบเต็มกว้าง (break-out จาก container) */
.hero-featured {
    position: relative;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    margin: 3rem 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.hero-featured .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, .15));
}

.hero-featured .container {
    position: relative;
    z-index: 1;
}

@media (max-width:991.98px) {
    .hero-featured {
        width: 100%;
        margin-left: 0;
        padding: 1rem 0;
        margin: 1rem 0;
    }
}

/* 6.2 แบบการ์ดใน container */
.hero-card {
    position: relative;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .10);
    height: 420px;
}

@media (min-width:992px) {
    .hero-card {
        height: 530px;
    }
}

.hero-dim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .20) 0%, rgba(0, 0, 0, .45) 80%);
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    padding: 0 28px;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.hero-meta-top {
    margin-bottom: .5rem;
}

.chip {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    padding: .35rem .6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    backdrop-filter: saturate(120%) blur(2px);
}

.hero-headline {
    font-weight: 800;
    font-size: clamp(1.25rem, 2.2vw + .6rem, 2rem);
    margin: .25rem 0 .5rem;
}

.hero-headline a {
    color: #fff;
    text-decoration: none;
}

.hero-headline a:hover {
    text-decoration: underline;
}

.hero-meta-bottom {
    font-size: .9rem;
    opacity: .95;
    display: inline-flex;
    gap: .5rem;
    align-items: center;
}
/* ===== Hero thumbs: รูปซ้าย ข้อความขวา ===== */
.hero-thumbs .thumb-card{
    display: grid;
    grid-template-columns: 200px 1fr;  /* รูป 120px + เนื้อหา */
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
    transition: transform .15s ease, box-shadow .15s ease;
    text-decoration: none;
  }
  .hero-thumbs .thumb-card:hover{
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,.10);
  }
  
  .hero-thumbs .thumb-img img{
    /*width: 120px;
    height: 86px;*/
    object-fit: cover;
    border-radius: 10px;
    display: block;
  }
  
  /* ข้อความด้านขวา */
  .hero-thumbs .thumb-title{
    margin: 0;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--text-main, #1d1d1f);
    /* ตัดบรรทัดไม่ให้ยาวเกิน */
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  /* Responsive: หน้าจอเล็ก ลดขนาดรูปลงนิด */
  @media (max-width: 575.98px){
    .hero-thumbs .thumb-card{ grid-template-columns: 100px 1fr; gap: 10px; padding: 10px; }
    .hero-thumbs .thumb-img img{ width: 100px; height: 72px; }
    .hero-thumbs .thumb-title{ font-size: .95rem; }
  }
  

/* =========================================
     7) Latest Section (หัวข้อ + ปุ่ม + การ์ด)
  ========================================= */
/* หัวข้อสองฝั่งในบรรทัดเดียว */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
    position: relative;
}

.section-head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #ddd;
    /* เส้นเทาอ่อนยาวทั้งแถว */
    z-index: 0;
}


.section-title {
    position: relative;
    font-weight: 800;
    color: var(--purple);
    margin: 0;
}

.section-title.small {
    font-size: 1.125rem;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -.65rem;
    width: 64px;
    height: 4px;
    background: var(--purple);
    border-radius: 3px;
}

/* ปุ่ม VIEW ALL (outline ม่วง) */
.btn-outline-primary.view-all {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--primary);
    --bs-btn-active-border-color: var(--primary);
    border-radius: 999px;
    padding: .35rem 1rem;
    font-weight: 700;
    line-height: 1;
}

.latest-wrap .section-title {
    color: var(--purple);
    font-weight: 800;
}

.latest-wrap .tiny,
.latest-wrap .meta,
.latest-wrap time {
    color: var(--text-muted);
}

/* การ์ดเด่นซ้าย */
.feature-card {
    border: 0;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
    overflow: hidden;
    border-radius: 14px;
}

.feature-thumb img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

.feature-title {
    font-weight: 800;
    font-size: 1.25rem;
    margin: .25rem 0 .5rem;
}

.feature-title a {
    color: var(--text-main);
    text-decoration: none;
}

.feature-title a:hover {
    color: var(--purple);
    text-decoration: underline;
}

.feature-card .excerpt {
    color: #555;
}

/* mini cards (รูปบน > ชื่อ > วันที่) */
.mini-stack {
    display: grid;
    gap: 16px;
}

.mini-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.mini-card .thumb {
    width: 100%;
}

.mini-card .thumb img {
    /*width: 100%;
    height: 120px;*/
    object-fit: cover;
    border-radius: 10px;
    display: block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
}

.mini-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 800;
    color: var(--text-main);
}

.mini-title a {
    color: inherit;
    text-decoration: none;
}

.mini-title a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.mini-card .tiny,
.mini-card time {
    color: var(--text-muted);
    font-size: .85rem;
}

/* Popular list (คอลัมน์ขวา) */
.popular-list {
    display: grid;
    gap: 14px;
}

.popular-item {
    display: grid;
    grid-template-columns: 145px 1fr;  /*  82px 1fr */
    gap: 12px;
    align-items: center;
}

.popular-item .pi-thumb .img {
    /*width: 82px;
    height: 62px;*/
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.pi-title {
    font-weight: 800;
    font-size: .98rem;
    margin: 0 0 2px;
    color: var(--text-main);
}

.pi-title a {
    color: inherit;
    text-decoration: none;
}

.pi-title a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* เส้นแบ่งคอลัมน์ (ถ้าต้องการ) */
/* @media (min-width:992px){ .latest-wrap .row > .col-lg-8{ border-right:1px dashed rgba(108,44,112,.3); } } */

.main-title-mobile{
    display:none;
}



/* ===== Category Featured (Trending) ===== */
.trending-wrap {
    background: #efe6f5;
}

/* ม่วงอ่อนเต็มแถบ */

.trending-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    padding-bottom: .75rem;
    margin-bottom: 1rem;
}

/* .trending-head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: #ddd;
} */

.trending-title {
    position: relative;
    margin: 0;
    font-weight: 800;
    color: var(--purple);
}

.trending-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -.6rem;
    width: 64px;
    height: 4px;
    background: var(--purple);
    border-radius: 3px;
}

.trending-head .view-all {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-border-color: var(--primary);
    border-radius: 999px;
    padding: .35rem 1rem;
    font-weight: 700;
    line-height: 1;
}

/* Card */
.trending-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .10);
}

.trending-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
}

/*@media (min-width:992px) {
    .trending-img {
        height: 240px;
    }
}*/

.trending-dim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .65) 100%);
}

.trending-imglink {
    display: block;
    color: #fff;
    text-decoration: none;
}

.trending-imglink:hover .trending-posttitle {
    text-decoration: underline;
}

.trending-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    padding: 0 12px;
}

.trending-posttitle {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 .35rem;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-meta {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    opacity: .95;
}

.trending-meta .dot {
    opacity: .9;
}


/* การ์ดหมวด (ซ้าย) */
.cat-grid .post-card {
    border: 0;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
    border-radius: 12px;
    overflow: hidden;
}

.cat-grid .post-card .body {
    padding: .9rem 1rem 1.1rem;
}

.cat-grid .post-card .title {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 .35rem;
    color: var(--text-main);
}

.cat-grid .post-card .title a {
    color: inherit;
    text-decoration: none;
}

.cat-grid .post-card .title a:hover {
    color: var(--purple);
    text-decoration: underline;
}

/* ยอดนิยม (ขวา) — ถ้ายังไม่ได้ใส่ */
.popular-list {
    display: grid;
    gap: 14px;
}

.popular-item {
    display: grid;
    grid-template-columns: 145px 1fr;  /*  82px 1fr */
    gap: 12px;
    align-items: center;
}

.popular-item .pi-thumb .img {
    /*width: 82px;
    height: 62px;*/
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.pi-title {
    font-weight: 800;
    font-size: .98rem;
    margin: 0 0 2px;
    color: var(--text-main);
}

.pi-title a {
    color: inherit;
    text-decoration: none;
}

.pi-title a:hover {
    color: var(--primary);
    text-decoration: underline;
}


.site-footer {
    background-color: #6c2c70;
    /* ม่วงเข้ม */
    color: #fff;
    font-size: 0.95rem;
}

.footer-top {
    background-color: #8b3c8d;
    /* ม่วงอ่อนขึ้น */
    padding: 2rem 1rem;
}

.footer-desc {
    margin: 0;
    line-height: 1.6;
}

.footer-bottom {
    background-color: #6c2c70;
    /* เหมือน site-footer */
    padding: 0.8rem 1rem;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}


/* ====== Single Post Styling ====== */
.single-wrap .section-title {
    font-weight: 800;
    color: var(--purple, #6c2c70);
}

/* Featured image */
.single-wrap .ratio img {
    object-fit: cover;
    border-radius: 12px;
}

/* Article card */
.single-wrap article.card {
    border-radius: 14px;
    overflow: hidden;
}

/* Meta info */
.single-wrap .text-muted.small {
    font-size: 0.85rem;
    color: #888 !important;
}

/* Entry content */
.single-wrap .entry-content {
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
}

.single-wrap .entry-content p {
    margin-bottom: 1.2rem;
}

.single-wrap .entry-content h2,
.single-wrap .entry-content h3,
.single-wrap .entry-content h4 {
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.single-wrap .entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1.5rem 0;
    display: block;
}

.single-wrap .entry-content ul,
.single-wrap .entry-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.2rem;
}

.single-wrap .entry-content blockquote {
    background: #f8f6fa;
    border-left: 4px solid var(--purple, #6c2c70);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    border-radius: 8px;
}

/* Tags */
.single-wrap .tags a {
    background: #f2f2f2;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    color: #555;
    font-size: 0.85rem;
    text-decoration: none;
}

.single-wrap .tags a:hover {
    background: var(--purple, #6c2c70);
    color: #fff;
}

/* Share links */
.single-wrap .share a {
    font-size: 0.85rem;
    color: var(--purple, #6c2c70);
}

.single-wrap .share a:hover {
    text-decoration: underline;
}

/* Related posts */
.single-wrap .section-head h3 {
    font-weight: 800;
    color: var(--purple, #6c2c70);
}

.single-wrap .related .card {
    border: 0;
}

.single-wrap .related .ratio img {
    object-fit: cover;
    border-radius: 10px;
}

.single-wrap .related h6 {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.4;
}

.single-wrap .related time {
    font-size: 0.8rem;
    color: #888;
}

/* Responsive */
@media (max-width: 767.98px) {
    .single-wrap .entry-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

/* ===== Sidebar (ขวา) ===== */
.sidebar.widget-area {
    padding-left: 1rem;
    /* เว้นจากคอนเทนต์ซ้าย */
}

.sidebar .widget {
    margin-bottom: 1.25rem;
}

/* หัวข้อ widget */
.sidebar .widget-title {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--purple, #6c2c70);
    margin: 0 0 .35rem;
}

/* เส้นบางใต้หัวข้อ (จางๆ แบบในภาพ) */
.sidebar .widget-title+* {
    border-top: 1px solid rgba(0, 0, 0, .08);
    padding-top: .5rem;
}

/* ลิสต์ภายใน */
.sidebar .widget ul {
    margin: 0;
    padding-left: 1.2rem;
    /* ให้มีจุดนำหน้า */
    list-style: disc;
}

.sidebar .widget ul li {
    margin: .35rem 0;
    line-height: 1.45;
}

.sidebar .widget ul li a {
    color: #1d1d1f;
    text-decoration: none;
}

.sidebar .widget ul li a:hover {
    color: var(--purple, #6c2c70);
    text-decoration: underline;
}

/* Search form เหมือนภาพ (ช่องเล็ก + ปุ่มค้นหา) */
.sidebar .widget_search .search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .4rem;
}

.sidebar .widget_search .search-field {
    height: 36px;
    padding: .35rem .6rem;
    border: 1px solid #cfcfd4;
    border-radius: 6px;
    font-size: .95rem;
}

.sidebar .widget_search .search-submit {
    height: 36px;
    padding: 0 .75rem;
    border: 1px solid var(--purple, #6c2c70);
    background: var(--white, #fff);
    color: var(--purple, #6c2c70);
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

.sidebar .widget_search .search-submit:hover {
    background: var(--purple, #6c2c70);
    color: #fff;
}

/* ขนาดตัวอักษรของรายการ/นับจำนวน (…(6)) ให้เล็กลงนิด */
.sidebar .widget ul li,
.sidebar .widget time {
    font-size: .95rem;
}

/* ระยะชิดขอบภาพเด่นด้านซ้าย (ให้ sidebar ไม่ชน) */
@media (max-width: 991.98px) {
    .sidebar.widget-area {
        padding-left: 0;
        margin-top: 1.25rem;
    }
}


/* ===== Sidebar: เรื่องที่คุณอาจสนใจ ===== */
.widget-suggest .widget-title {
    font-weight: 800;
    color: var(--purple);
    margin: 0 0 .4rem;
    position: relative;
    padding-bottom: .35rem;
}

.widget-suggest .widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 44px;
    height: 4px;
    background: var(--purple);
    border-radius: 3px;
}

/* การ์ดเด่น */
.sb-feature {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .10);
    margin-bottom: .9rem;
}

.sb-feature-link {
    display: block;
    color: #fff;
    text-decoration: none;
    position: relative;
}

.sb-feature-img {
    width: 100%;
    /*height: 180px;*/
    object-fit: cover;
    display: block;
}

.sb-dim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .05) 30%, rgba(0, 0, 0, .70) 100%);
}

.sb-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    font-size: .75rem;
    font-weight: 700;
    padding: .25rem .5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, .18);
    backdrop-filter: saturate(130%) blur(2px);
}

.sb-feature-title {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 34px;
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.35;
    margin: 0;
}

.sb-meta {
    position: absolute;
    left: 10px;
    bottom: 10px;
    font-size: .82rem;
    opacity: .95;
    display: flex;
    gap: .4rem;
    align-items: center;
}

.sb-meta .dot {
    opacity: .9;
}

/* รายการย่อย */
.sb-mini-list {
    display: grid;
    gap: 12px;
}

.sb-mini {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    align-items: center;
}

.sb-mini-thumb .img {
    /*width: 72px;
    height: 72px;*/
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.sb-mini-body {
    min-width: 0;
}

.sb-chip {
    display: inline-block;
    font-size: .7rem;
    padding: .15rem .4rem;
    border-radius: 4px;
    background: #f1eef6;
    color: var(--purple);
    font-weight: 700;
    margin-bottom: 4px;
}

.sb-mini-title {
    margin: 0;
    font-size: .95rem;
    font-weight: 800;
    line-height: 1.35;
}

.sb-mini-title a {
    color: #1d1d1f;
    text-decoration: none;
}

.sb-mini-title a:hover {
    color: var(--purple);
    text-decoration: underline;
}

.sb-mini .tiny {
    font-size: .82rem;
    color: #6b7280;
}

/* responsive */
@media (max-width: 991.98px) {
    .sb-feature-img {
        height: 200px;
    }
}

a .fab {
    font-size: 1.2rem;
    color: #555;
    transition: color .2s ease;
  }
  a:hover .fab {
    color: var(--purple); /* หรือสีแบรนด์ของคุณ */
  }
  

  /* Archive featured */
.archive-feature .ratio img{ border-radius:12px; }
.archive-feature .card{ border-radius:12px; }

/* Grid cards */
.post-card{ border:0; background:#fff; box-shadow:0 8px 20px rgba(0,0,0,.06); border-radius:12px; overflow:hidden; }
.post-card .thumb img{ border-radius:12px; }
.post-card .title{ font-size:1rem; font-weight:800; line-height:1.35; }

/* Pagination tweak */
.pagination .page-link{ color:var(--purple,#6c2c70); border:0; }
.pagination .page-link:hover{ background:rgba(108,44,112,.08); }
.pagination .current{ background:var(--purple,#6c2c70); color:#fff!important; border-radius:.375rem; padding:.375rem .75rem; }



/* Responsive tweaks */
@media (max-width:991.98px) {
    .feature-thumb img {
        height: 240px;
    }

    .main-title-desktop{
        display: none;
    }
    .main-title-mobile{
        display:block;
        position: relative;
        font-weight: 800;
        color: var(--purple);
        margin: 0 0 30px 0;
    }
}


  /* ===== Mobile Bottom Bar ===== */
  .mobile-nav { display:none; }
  
  /* แสดงเฉพาะบนมือถือ */
  @media (max-width: 767px) {
    /* ซ่อน footer เดิมบนมือถือ เพื่อไม่ให้ซ้ำกับแถบล่าง */
	/* .site-footer { display:none; } */
  
    .mobile-nav{
      position:fixed; left:0; right:0; bottom:0;
      display:flex; justify-content:space-around; align-items:flex-end;
      padding:8px 10px calc(8px + env(safe-area-inset-bottom));
      background:#ffffff; border-top:1px solid #e5e5e5;
      z-index:9999;
      font-size:12px; line-height:1.1;
    }
  
    .mobile-nav a{
      text-decoration:none; color:#333; text-align:center;
      display:flex; flex-direction:column; align-items:center; gap:4px;
      min-width:56px;
    }
  
    .mobile-nav .mnav-item svg{ display:block; }
  
    /* ปุ่ม Home ตรงกลาง—ลอยขึ้นและใหญ่กว่า */
    .mobile-nav .mnav-home{
      position:relative; transform:translateY(-18px);
      display:flex; flex-direction:column; align-items:center; gap:4px;
    }
    .mobile-nav .mnav-home .mnav-home-btn{
      width:64px; height:64px; border-radius:50%;
      background:#111; color:#fff; display:flex; align-items:center; justify-content:center;
      box-shadow:0 6px 16px rgba(0,0,0,.2);
    }
    .mobile-nav .mnav-home span{ margin-top:2px; }
  }
  
  /* กันเนื้อหาถูกบังด้วยแถบล่างบนมือถือ */
  @media (max-width: 767px) {
    body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
    .mobile-nav i { font-size: 18px; line-height: 1; display: block; }
    .mobile-nav .mnav-home .mnav-home-btn i { font-size: 24px; }
  }
  
  /* เผื่อกรณีมี WP Admin Bar บนมือถือ */
  @media (max-width: 782px) {
    body.admin-bar .mobile-nav { bottom:0; }
  }
  
/* Scroll Up Button */
.scrollup{
    position: fixed;
    right: 16px;
    bottom: 24px; /* desktop */
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: #111;      /* โทนเดียวกับ footer */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0,0,0,.2);
    cursor: pointer;
    z-index: 10000;        /* อยู่เหนือ mobile bar */
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .scrollup i{ font-size: 18px; line-height: 1; }
  
  .scrollup.is-visible{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  /* มือถือ: ขยับขึ้นให้พ้น mobile-nav และรองรับ iPhone safe area */
  @media (max-width: 767px){
    .scrollup{
      right: 12px;
      bottom: calc(90px + env(safe-area-inset-bottom)); /* 90px ≈ ความสูง mobile bar */
      width: 48px;
      height: 48px;
    }
  }
  
  /* (ทางเลือก) ถ้าอยากให้กดที่คีย์บอร์ดเห็นโฟกัสชัดขึ้น */
  .scrollup:focus-visible{
    outline: 2px solid #4ade80; /* เขียวแบบ success */
    outline-offset: 2px;
  }
  
  
.search-result form { position: relative; }
.search-result form .form-control { padding-right: 44px; } /* กันปุ่มทับข้อความ */
.search-result form .btn{
  position:absolute; right:0; top:0; height:100%;
  display:flex; align-items:center; justify-content:center;
  padding-inline:12px;
}
.search-result form .btn i{ font-size: 1rem; line-height:1; }


