﻿body[lang="th"] {
    font-family: 'Bai Jamjuree', sans-serif;
}

body[lang="zh"] {
    font-family: 'Noto Sans SC', sans-serif;
}

body[lang="en"] {
    font-family: 'Noto Sans', sans-serif;
}

input {
    font-family: inherit;
}

/* font Thai */

/* bai-jamjuree-200 - latin_latin-ext_thai */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bai Jamjuree';
    font-style: normal;
    font-weight: 200;
    src: url('/fonts/bai-jamjuree-v13-latin_latin-ext_thai-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* bai-jamjuree-200italic - latin_latin-ext_thai */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bai Jamjuree';
    font-style: italic;
    font-weight: 200;
    src: url('/fonts/bai-jamjuree-v13-latin_latin-ext_thai-200italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* bai-jamjuree-300 - latin_latin-ext_thai */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bai Jamjuree';
    font-style: normal;
    font-weight: 300;
    src: url('/fonts/bai-jamjuree-v13-latin_latin-ext_thai-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* bai-jamjuree-300italic - latin_latin-ext_thai */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bai Jamjuree';
    font-style: italic;
    font-weight: 300;
    src: url('/fonts/bai-jamjuree-v13-latin_latin-ext_thai-300italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* bai-jamjuree-regular - latin_latin-ext_thai */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bai Jamjuree';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/bai-jamjuree-v13-latin_latin-ext_thai-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* bai-jamjuree-italic - latin_latin-ext_thai */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bai Jamjuree';
    font-style: italic;
    font-weight: 400;
    src: url('/fonts/bai-jamjuree-v13-latin_latin-ext_thai-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* bai-jamjuree-500 - latin_latin-ext_thai */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bai Jamjuree';
    font-style: normal;
    font-weight: 500;
    src: url('/fonts/bai-jamjuree-v13-latin_latin-ext_thai-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* bai-jamjuree-500italic - latin_latin-ext_thai */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bai Jamjuree';
    font-style: italic;
    font-weight: 500;
    src: url('/fonts/bai-jamjuree-v13-latin_latin-ext_thai-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* bai-jamjuree-600 - latin_latin-ext_thai */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bai Jamjuree';
    font-style: normal;
    font-weight: 600;
    src: url('/fonts/bai-jamjuree-v13-latin_latin-ext_thai-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* bai-jamjuree-600italic - latin_latin-ext_thai */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bai Jamjuree';
    font-style: italic;
    font-weight: 600;
    src: url('/fonts/bai-jamjuree-v13-latin_latin-ext_thai-600italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* bai-jamjuree-700 - latin_latin-ext_thai */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bai Jamjuree';
    font-style: normal;
    font-weight: 700;
    src: url('/fonts/bai-jamjuree-v13-latin_latin-ext_thai-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* bai-jamjuree-700italic - latin_latin-ext_thai */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Bai Jamjuree';
    font-style: italic;
    font-weight: 700;
    src: url('/fonts/bai-jamjuree-v13-latin_latin-ext_thai-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* font Chinese */
/* noto-sans-sc-100 - chinese-simplified_latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 100;
    src: url('/fonts/noto-sans-sc-v39-chinese-simplified_latin_latin-ext-100.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-sc-200 - chinese-simplified_latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 200;
    src: url('/fonts/noto-sans-sc-v39-chinese-simplified_latin_latin-ext-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-sc-300 - chinese-simplified_latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 300;
    src: url('/fonts/noto-sans-sc-v39-chinese-simplified_latin_latin-ext-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-sc-regular - chinese-simplified_latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/noto-sans-sc-v39-chinese-simplified_latin_latin-ext-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-sc-500 - chinese-simplified_latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 500;
    src: url('/fonts/noto-sans-sc-v39-chinese-simplified_latin_latin-ext-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-sc-600 - chinese-simplified_latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 600;
    src: url('/fonts/noto-sans-sc-v39-chinese-simplified_latin_latin-ext-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-sc-700 - chinese-simplified_latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 700;
    src: url('/fonts/noto-sans-sc-v39-chinese-simplified_latin_latin-ext-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-sc-800 - chinese-simplified_latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 800;
    src: url('/fonts/noto-sans-sc-v39-chinese-simplified_latin_latin-ext-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-sc-900 - chinese-simplified_latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans SC';
    font-style: normal;
    font-weight: 900;
    src: url('/fonts/noto-sans-sc-v39-chinese-simplified_latin_latin-ext-900.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* font English */

/* noto-sans-100 - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 100;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-100.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-100italic - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: italic;
    font-weight: 100;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-100italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-200 - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 200;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-200.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-200italic - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: italic;
    font-weight: 200;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-200italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-300 - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 300;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-300.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-300italic - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: italic;
    font-weight: 300;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-300italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-regular - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 400;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-italic - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: italic;
    font-weight: 400;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-500 - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 500;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-500italic - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: italic;
    font-weight: 500;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-600 - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 600;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-600.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-600italic - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: italic;
    font-weight: 600;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-600italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-700 - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 700;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-700italic - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: italic;
    font-weight: 700;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-800 - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 800;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-800.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-800italic - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: italic;
    font-weight: 800;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-800italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-900 - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: normal;
    font-weight: 900;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-900.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}
/* noto-sans-900italic - latin_latin-ext */
@font-face {
    font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
    font-family: 'Noto Sans';
    font-style: italic;
    font-weight: 900;
    src: url('/fonts/noto-sans-v42-latin_latin-ext-900italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

/* end font */

.swiper {
    width: 100%;
    height: 300px;
}

.swiper-slide {
    background-color: grey;
    height: auto !important;
    text-align: center;
}

.swiper-content {
    height: 300px !important
}

.input-group-text {
    background-color: #004225;
    border: none;
}

    .input-group-text i {
        color: white;
    }

input.form-control {
    max-width: 100%;
    min-width: 100%;
    box-sizing: border-box;
}

.form-control {
    border: none;
    box-shadow: none;
}

.img-fluid-full {
    max-width: none;
    width: 100%;
    object-fit: cover;
}

.dropdown-menu {
    min-width: 50px;
}

/* underline 4 menu on top */
ul.list-unstyled li a.active {
    border-bottom: 1px solid #fff;
    font-weight: normal;
}

.category-menu a {
    position: relative;
    color: white;
    text-decoration: none;
    padding-bottom: 4px;
    transition: color 0.2s ease;
}

    .category-menu a::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: 0;
        height: 2px;
        width: 0;
        background-color: white;
        transition: width 0.3s ease;
    }

    .category-menu a:hover::after {
        width: 100%;
    }

#searchInput:focus {
    outline: none;
    box-shadow: none;
}

.icon-hover-grow {
    display: inline-block;
    transition: transform 0.2s ease;
}

    .icon-hover-grow:hover {
        transform: scale(1.25); /* ขยาย 25% */
    }

/* for article page */
.read-more-section {
    position: relative;
    max-height: 300px;
    overflow: hidden;
}

    .read-more-section.no-collapse {
        max-height: none;
        overflow: visible;
    }

    /* gradient ด้านล่าง */
    .read-more-section.has-gradient::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 120px;
        background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
        pointer-events: none;
        z-index: 1;
    }

    /* gradient ด้านบน */
    .read-more-section.has-gradient::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 5%;
        background: linear-gradient(to bottom, rgba(255,255,255,1), rgba(255,255,255,0));
        pointer-events: none;
        z-index: 1;
    }

.read-more-toggle {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    background: #204d40;
    color: white;
    border: 2px solid #ccc;
    padding: 0.5rem 1rem;
    border-radius: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, opacity 0.4s ease;
    opacity: 1;
    pointer-events: auto;
    font-size: larger;
}

    .read-more-toggle:hover {
        border-color: #000;
        background-color: #017462;
    }

.btn-icon-dl {
    background-image: url('/assets/icons/download.png');
    background-repeat: no-repeat;
    background-position: left center; /* Adjust position as needed */
    padding-left: 36px; /* Create space for the icon */
}

    .btn-icon-dl:hover {
        background-image: url('/assets/icons/download-w.png');
        background-repeat: no-repeat;
        background-position: left center; /* Adjust position as needed */
        padding-left: 36px; /* Create space for the icon */
    }

/* for search pagination */
.page-item .disabled {
    color: red;
}

.page-item {
    width: 40px;
    text-align: center;
    margin-left: 2px;
    margin-right: 2px;
}

/* for search page */
.card {
    transition: height 0.3s ease;
    overflow: hidden;
}

.card-image {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

    .card-image::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to left, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.2) 40%, rgba(255,255,255,0) 60%);
        pointer-events: none;
        z-index: 1;
    }

    .card-image img {
        position: relative;
        z-index: 0;
    }

.summary-container {
    position: relative;
    margin-bottom: 1.5rem;
}

.summary-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
    font-weight: 300;
    color: #000;
}

    .summary-text.expanded {
        -webkit-line-clamp: unset;
        overflow: visible;
    }

.btn-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #007bff;
    padding: 0.2rem;
    transition: transform 0.2s ease;
}

/* bootstrap icon +/- */
.icon {
    color: #004225;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.toggle-btn:hover .icon {
    transform: scale(1.2);
}

/* font awesome icon ^/v */
.chevron-icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: #017462;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-btn:hover .chevron-icon {
    transform: scale(1.5);
}

.toggle-btn.expanded .chevron-icon {
    transform: rotate(180deg);
    fill: #017462;
}

.toggle-btn.expanded:hover .chevron-icon {
    transform: rotate(180deg) scale(1.5);
}

/* Mobile Search Input */
#mobileSearchInput {
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

    #mobileSearchInput:focus {
        border-color: #007bff;
        box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
        outline: none;
    }

/* Signup Form */
.signup-container {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.form-section {
    flex: 1;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    padding-top: 0rem;
}

.form-box {
    width: 100%;
    max-width: 400px;
    position: relative;
}

.form-control {
    border: 2px solid #0d6efd;
    border-radius: 8px;
}

.member-img-section {
    flex: 1;
    background-image: url('/assets/img/sign.jpg');
    background-size: cover;
    background-position: right center;
}

.login-img-section {
    flex: 1;
    background-image: url('/assets/img/login.jpg');
    background-size: cover;
    background-position: right center;
}

.profile-img-section {
    flex: 1;
    background-image: url('/assets/img/profile.jpg');
    background-size: cover;
    background-position: 60% center;
}

.invalid-feedback {
    font-size: 0.8rem;
    color: saddlebrown;
    opacity: 0;
    transition: opacity 0.4s ease;
    position: relative;
    margin-top: 4px;
}

.form-control.is-invalid + .invalid-feedback {
    opacity: 1;
}

@media (min-width: 768px) and (max-width: 1280px) and (orientation: landscape) {
    /* control right arrow display whent title scroll */
    @keyframes pulseRight {
        0% {
            transform: translateX(0);
        }

        50% {
            transform: translateX(4px);
        }

        100% {
            transform: translateX(0);
        }
    }

    .title-hover-arrow.visible .arrow {
        opacity: 1;
        transform: translateX(0);
        color: #0E6051;
    }

    .title-hover-arrow.visible:nth-child(1) .arrow {
        transition-delay: 0.1s;
    }

    .title-hover-arrow.visible:nth-child(2) .arrow {
        transition-delay: 0.2s;
    }
}

@media (max-width: 768px) {
    .signup-container {
        flex-direction: column-reverse;
    }

    .member-img-section {
        background-image: url('/assets/img/sign-mob.jpg');
        background-position: top center;
        min-height: 300px;
    }

    .login-img-section {
        background-image: url('/assets/img/login-mob.jpg');
        background-position: top center;
        min-height: 300px;
    }

    .profile-img-section {
        background-image: url('/assets/img/profile-mob.jpg');
        background-position: top center;
        min-height: 300px;
    }

    .form-section {
        padding: 2rem 1rem;
    }

    /* control right arrow display whent title scroll */
    @keyframes pulseRight {
        0% {
            transform: translateX(0);
        }

        50% {
            transform: translateX(4px);
        }

        100% {
            transform: translateX(0);
        }
    }

    .title-hover-arrow.visible .arrow {
        opacity: 1;
        transform: translateX(0);
        color: #0E6051;
    }

    .title-hover-arrow.visible:nth-child(1) .arrow {
        transition-delay: 0.1s;
    }

    .title-hover-arrow.visible:nth-child(2) .arrow {
        transition-delay: 0.2s;
    }
}

.btn-custom-green {
    background-color: #395345;
    border-color: #677651;
    color: #fff;
}

    .btn-custom-green:hover {
        background-color: #526258;
        border-color: #677651;
        color: #fff;
    }

/* hover title article */
.title-hover-arrow {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

    .title-hover-arrow:hover {
        color: #0E6051; /* เขียวเข้มแบบ professional */
    }

.arrow {
    margin-left: 0.5em;
    font-size: 1em;
    color: #66bb6a; /* เขียวอ่อนแบบเชิญชวน */
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
    pointer-events: none;
    text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.1);
}

.title-hover-arrow:hover .arrow {
    opacity: 1;
    transform: translateX(0);
    color: #0E6051; /* เขียวเข้มตอน hover */
}



.bg-deep-green {
    background-color: #0A1A14; /* เขียวเข้มเกือบดำ */
}

/* caption at page Category, Jigsaw, Subject, Tag */
.caption-intro {
    font-size: 0.95rem; /* เล็กกว่าหัวข้อ แต่ยังอ่านง่าย */
    color: #6c757d; /* สีเทาเข้มแบบ Bootstrap text-muted */
    font-weight: 300; /* น้ำหนักเบา แต่ไม่จางเกินไป */
    margin-bottom: 0.25rem; /* เว้นระยะก่อนหัวข้อหลัก */
    display: block; /* ให้แสดงเต็มบรรทัด */
}

/* play button over clip image */
.video-post {
    position: relative;
    display: inline-block;
}

.video-post .bi-youtube {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 3rem;
	color: red;
	z-index: 2;
	pointer-events: none;
}

.video-post img {
	display: block;
	width: 100%;
	height: auto;
}


.article-video {
    position: relative;
    display: inline-block;
}

.article-video .bi-youtube {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 4rem;
	color: red;	
	z-index: 20;
	pointer-events: none;
}

.article-video img {
	display: block;
	width: 100%;
	height: auto;
}

@-moz-document url-prefix() {
    .firefox-fix-play-btn {
        margin-top: 80px;
        margin-left: 130px;
    }
}

.divClip {
  position: relative;
  display: block; 
}

.btnPlayClip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); 
  z-index: 100;		
}

/*.video-post {
      position: relative;
      display: inline-block;
    }

    .play-thumbnail {
      display: block;
      width: 100%;
      height: auto;
    }

    .play-overlay {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: auto;
      height: auto;
      pointer-events: none;
      z-index: 2;
    }*/

/* empty template wrapper */
.alert-empty::before {
    content: "";
    position: absolute;
    top: -30px;
    left: -40px;
    width: 120px;
    height: 120px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="%2300514a" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.656a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11z"/></svg>');
    background-repeat: no-repeat;
    background-size: 100%;
    opacity: 0.08;
    z-index: 0;
}

/* below header banner */
.context-banner {
    width: auto;
    height: 150px; /* mock ขนาดภาพ ปรับตามที่คุณต้องการ */
    position: relative;
    overflow: hidden;
}

    .context-banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0.8; /* ทำให้ภาพจางลง  */
        filter: grayscale(5%); /* เพิ่มความ soft */
    }

    /* ไล่ fade ด้านล่างให้ขาว */
    .context-banner::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 75px; /* ความสูงของ fade */
        /* background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);  */
    }

.context-banner {
    position: relative;
    z-index: 0;
    margin-bottom: -100px !important;
}

/* cookies */
.cookie-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #fffef5;
    border: 1px solid #e0c080;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: 'Prompt', sans-serif;
    z-index: 9999;
    max-width: 340px;
}

.cookie-img {
    width: 48px;
    margin-bottom: 10px;
}

.cookie-content h2 {
    font-size: 18px;
    color: #5d4037;
    margin: 0;
}

.cookie-content p {
    font-size: 14px;
    color: #6d4c41;
    margin: 8px 0;
}

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

    .cookie-actions button {
        background-color: #8d6e63;
        color: white;
        border: none;
        padding: 8px;
        border-radius: 6px;
        cursor: pointer;
        font-size: 14px;
    }

        .cookie-actions button:hover {
            background-color: #6d4c41;
        }

.cookie-link {
    font-size: 13px;
    color: #5d4037;
    text-decoration: underline;
    margin-top: 4px;
}

.cookie-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 30px;
    height: 30px;
    background-color: #000;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 300;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
}

    .cookie-close:hover {
        background-color: #6d4c41;
    }

#cookieSettingsModal .modal-content {
    background-color: #FFF8F0;
    border: 1px solid #F5D7B2;
    box-shadow: 0 0 10px rgba(210, 166, 121, 0.3);
    border-radius: 12px;
}

#cookieSettingsModal .modal-header {
    background-color: #D2A679;
    color: #fff;
}

#cookieSettingsModal .form-check-label {
    color: #8B5E3C;
}

#cookieSettingsModal .btn-primary {
    background-color: #8B5E3C;
    border: none;
}

#cookieSettingsModal .btn-secondary {
    background-color: #F5D7B2;
    border: none;
    color: #333;
}
