:root {
    --font-head: 'Poppins', 'Kanit', system-ui, sans-serif;
    --font-body: 'Inter', 'Noto Sans Thai', system-ui, sans-serif;
    --feature-height: clamp(320px, 36vw, 460px);
    --bg-corlor: #F4F7FB;
    --text-color: #122840;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    background-color: var(--bg-corlor);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-color);
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.offcanvas-title {
    font-family: var(--font-head);
}

a,
a:hover {
    text-decoration: none;
}

/* Header ============================================== */
.sh-site-header {
    background-color: #122840;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.sh-site-header .nav-link {
    color: #C9D6E6;
}

.sh-site-header .nav-link:hover,
.sh-site-header .nav-link.active {
    color: #fff;
}

.sh-offcanvas-menu {
    background-color: #122840;
    color: #fff;
}

@media (max-width: 991.98px) {
    .sh-offcanvas-menu .nav-link {
        padding: .75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, .15);
    }
}

.sh-top-bar {
    background-color: #fff;
    color: #0d47a1;
    font-size: .75rem;
}

.sh-top-bar svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.sh-top-bar .sh-social a {
    display: inline-flex;
}

.sh-lang-btn {
    background: none;
    border: 0;
    color: #0d47a1;
    font-size: .75rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.sh-top-bar .sh-flag {
    width: 18px;
    height: 18px;
    fill: none;
    flex-shrink: 0;
}

.sh-lang-list .list-group-item {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.sh-lang-list .sh-flag {
    width: 22px;
    height: 22px;
}

.sh-lang-list .list-group-item.active {
    background-color: #0d47a1;
    border-color: #0d47a1;
}

.sh-top-bar a {
    color: #0d47a1;
    text-decoration: none;
}



/* Navbar ============================================== */
.sh-site-header .nav-link {
    position: relative;
    transition: color .2s ease, padding-left .2s ease;
}

.sh-site-header .nav-link::before {
    content: '';
    position: absolute;
    left: .5rem;
    right: .5rem;
    bottom: .25rem;
    height: 2px;
    background: #fff;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.sh-site-header .nav-link:hover::before,
.sh-site-header .nav-link.active::before,
.sh-site-header .nav-link.show::before {
    transform: scaleX(1);
}

/* Dropdown */
.sh-site-header .dropdown-menu {
    border: 0;
    border-radius: .5rem;
    padding: .35rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
    font-size: .9rem;
}

.sh-site-header .dropdown-item {
    border-radius: .35rem;
    transition: background-color .2s ease, padding-left .2s ease;
}

.sh-site-header .dropdown-item:hover,
.sh-site-header .dropdown-item:focus {
    background-color: #e3f2fd;
    color: #0d47a1;
    padding-left: 1.25rem;
}

@keyframes sh-menuIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media (min-width: 992px) {

    /* desktop: เปิด dropdown ตอน hover */
    .sh-site-header .dropdown:hover>.dropdown-menu {
        display: block;
        margin-top: 0;
        top: 100%;
        right: 0;
        left: auto;
        animation: sh-menuIn .2s ease;
    }
}

@media (max-width: 991.98px) {
    .sh-site-header .nav-link::before {
        display: none;
    }

    .sh-offcanvas-menu .nav-link:hover {
        padding-left: .5rem;
    }

    .sh-offcanvas-menu .dropdown-menu {
        background: rgba(255, 255, 255, .08);
        box-shadow: none;
    }

    .sh-offcanvas-menu .dropdown-item {
        color: rgba(255, 255, 255, .9);
    }

    .sh-offcanvas-menu .dropdown-item:hover,
    .sh-offcanvas-menu .dropdown-item:focus {
        background-color: rgba(255, 255, 255, .15);
        color: #fff;
    }
}

main {
    flex: 1;
}

/* SLICK SLIDER  */
.slick-prev,
.slick-next {
    z-index: 10;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, .65);
    border: 0;
    border-radius: 50%;
    padding: 0;
    transform: translateY(-50%);
    opacity: .7;
    cursor: pointer;
    transition: opacity .2s ease, background-color .2s ease;
}

.slick-prev:hover,
.slick-next:hover,
.slick-prev:focus,
.slick-next:focus {
    background: rgba(255, 255, 255, .9);
    opacity: 1;
}

.slick-prev::before,
.slick-next::before {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 13px;
    height: 13px;
    border-top: 3px solid #0d47a1;
    border-right: 3px solid #0d47a1;
    content: "";
    opacity: 1;
}

.slick-prev::before {
    transform: translate(-30%, -50%) rotate(-135deg);
}

.slick-next::before {
    transform: translate(-70%, -50%) rotate(45deg);
}

.slick-prev {
    left: 15px;
}

.slick-next {
    right: 15px;
}

.slick-slide,
.slick-track,
.slick-list {
    transition: none;
}

.slick-slide {
    padding: 0 5px;
}

.slick-list {
    margin: 0 -5px;
}

.slick-slide img {
    width: 100%;
    display: block;
    border-radius: .65rem;
}


/* Pagination */
.sh-pagination .page-link {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0 .2rem;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50% !important;
    color: #0d47a1;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .2);
}

.sh-pagination .page-item.active .page-link {
    background: #0d47a1;
    color: #fff;
}

.sh-pagination .page-item.disabled .page-link {
    opacity: .5;
}

.sh-pagination .page-item:not(.active):not(.disabled):hover .page-link {
    background: #185fcb;
    color: #fff;
    box-shadow: 0 .35rem .75rem rgba(13, 71, 161, .35);
}

/* News Cms */
.sh-news-item {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.sh-news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: .5rem;
    overflow: hidden;
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .15);
    transition: box-shadow .3s ease, transform .3s ease;
}

.sh-news-item:hover .sh-news-card,
.sh-news-item:focus-visible .sh-news-card {
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, .35);
    transform: translateY(-4px);
}

.sh-news-thumb {
    flex: 0 0 auto;
    overflow: hidden;
}

.sh-news-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 10;
}

.sh-news-body {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1rem;
    min-width: 0;
}

.sh-news-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sh-news-date {
    font-size: .8125rem;
    color: #6c757d;
}

.sh-news-card-row {
    flex-direction: row;
}

.sh-news-card-row .sh-news-thumb {
    width: 30%;
    flex: 0 0 30%;
    min-width: 110px;
    max-width: 260px;
}

.sh-news-card-row .sh-news-thumb img {
    aspect-ratio: auto;
    min-height: 100px;
}

.sh-news-card-row .sh-news-body {
    flex: 1 1 auto;
    padding: .75rem;
    justify-content: center;
}

@media (min-width: 576px) {

    .sh-news-card-row .sh-news-thumb img {
        min-height: 120px;
    }

    .sh-news-card-row .sh-news-body {
        padding: 1rem;
    }

    .sh-news-card-row .sh-news-title {
        -webkit-line-clamp: 1;
    }

    .sh-news-card-row .sh-news-text {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Breadcrumb */
:root {
    --bc-hover: #8b5a2b;
    --bc-text: #64748b;
    --bc-dark: #1e293b;
}

/* ===== Minimal Underline (responsive: ลดขนาดตัวอักษรตามหน้าจอ) ===== */
.bc-line .breadcrumb {
    margin: 0;
    /* ตัวอักษรย่อ/ขยายตามความกว้างจอ: ต่ำสุด 12px, สูงสุด 16px */
    font-size: clamp(0.75rem, 0.45rem + 1.6vw, 1rem);
    /* ระยะห่างรอบตัวคั่นใช้หน่วย em จึงลดตามขนาดตัวอักษรด้วย */
    --bs-breadcrumb-item-padding-x: 0.5em;
    --bs-breadcrumb-divider-color: #cbd5e1;
    flex-wrap: nowrap;
    /* อยู่บรรทัดเดียวเสมอ */
    white-space: nowrap;
}

.bc-line .breadcrumb-item a {
    color: var(--bc-text);
    text-decoration: none;
    padding-bottom: 2px;
    background: linear-gradient(var(--bc-hover), var(--bc-hover)) no-repeat 0 100% / 0 2px;
    transition: background-size .3s, color .2s;
}

.bc-line .breadcrumb-item a:hover {
    color: var(--bc-hover);
    background-size: 100% 2px;
}

.bc-line .breadcrumb-item.active {
    color: var(--bc-dark);
    font-weight: 600;
    /* ชื่อหน้าปัจจุบันยาวเกินจะตัดเป็น … แทนที่จะดันล้นจอ */
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.bc-line .breadcrumb-item+.breadcrumb-item::before {
    content: "/";
    color: #cbd5e1;
}

/* ===== Call to action (p-cta) ===== */
.p-cta {
    --p-cta-bg: #c85000;
    --p-cta-ink: #12294a;
    --p-cta-white: #ffffff;
    --p-cta-sub: #ffe3d0;
    background: var(--p-cta-bg);
    color: var(--p-cta-white);
    padding: 2.5rem 0;
}

.p-cta__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2rem;
}

.p-cta__title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.p-cta__sub {
    margin: .35rem 0 0;
    font-size: 1.1rem;
    color: var(--p-cta-sub);
}

.p-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.p-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    padding: 1.35rem 2rem;
    border: 1px solid var(--p-cta-white);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}

.p-cta__btn--solid {
    background: var(--p-cta-white);
    color: var(--p-cta-ink);
}

.p-cta__btn--solid:hover {
    background: var(--p-cta-sub);
    color: var(--p-cta-ink);
}

.p-cta__btn--ghost {
    background: transparent;
    color: var(--p-cta-white);
}

.p-cta__btn--ghost:hover {
    background: var(--p-cta-white);
    color: var(--p-cta-bg);
}

@media (max-width: 767.98px) {
    .p-cta {
        padding: 2rem 0;
        text-align: center;
    }

    .p-cta__inner {
        justify-content: center;
    }

    .p-cta__title {
        font-size: 1.5rem;
    }

    .p-cta__sub {
        font-size: 1rem;
    }

    .p-cta__actions {
        width: 100%;
        flex-direction: column;
    }

    .p-cta__btn {
        width: 100%;
        padding: 1.1rem 1.5rem;
    }
}