@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@100..900&family=Sarabun:ital,wght@0,400;0,700;1,400;1,700&display=swap');

* {
    scroll-behavior: smooth;
}

:root {
    --color-text-dark: #1B1B1E;
    --color-text-white: #ffffff;
    --color-text-grey: #686E7A;
    --color-text-lightgrey: #AFAFAF;
    --color-text-blue: #00A6FF;
    --color-text-yellow: #FBEECA;

    --color-primary-blue: #00A6FF;
    --color-disable-grey: #9D9D9D;
    --color-link-blue: #00A6FF;

    --color-line-grey: #D9D9D9;
    --color-line-darkgrey: #686E7A;
    --color-line-blue: #00A6FF;
    --color-line-white: #ffffff;

    --color-bg-lightblue: #DEEAF8;
    --color-bg-lightblue2: #C5DBF2;
    --color-bg-lightgrey: #EFEEE9;
    --color-bg-yellow: #FBEECA;
    --color-bg-brown: #241C15;
    --color-bg-white: #ffffff;

    --border-radius-xs: 0.125rem;
    --border-radius-sm: 0.25rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    --border-radius-xxl: 1.5rem;
}

body {
    font-weight: 400;
    font-size: 1rem;
    color: var(--color-text-dark);
    font-style: normal;
    font-family: "Noto Sans Thai", sans-serif;
}


/* ---- Navbar ---- */

.navbar-nav .nav-link {
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border: 1px solid transparent;
    border-radius: 4px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
    border: 1px solid #00A6FF;
    background-color: #00A6FF10;
}

/* Optional: เพิ่มสไตล์เพื่อแสดง focus ที่ชัดเจนสำหรับการนำทางด้วยคีย์บอร์ด */
.navbar-nav .nav-link:focus-visible {
    outline: 2px solid #00A6FF;
    outline-offset: 1px;
}

/* ---- navbaricon ---- */
.navbaricon {
    list-style: none;
    text-decoration: none !important;
    border-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.navbaricon a {
    display: block;
    text-align: center;
    color: rgba(27, 27, 30, 0.80);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.navbaricon a:hover,
.navbaricon a:focus,
.navbaricon a:active {
    color: var(--color-primary-blue) !important;
    border: 1px solid #00A6FF;
    background-color: #00A6FF10;
    border-radius: 4px;
}

/* ---- End Navbar ---- */


.navbar-pt {
    margin-top: 64px;
}

.navbar-py {
    padding-bottom: 80px;
    padding-top: 140px;
}

.mt-btn-banner {
    margin-top: 1.5rem;
}

/* ---- bg ---- */
.bg-main {
    background-image: linear-gradient(rgba(255, 255, 255, 0), #fff),
        linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)),
        url(../images/bg-main.png);
    background-size: contain;
}

.bg-banner-allwhite {
    height: 60vh;
    background-color: #fff;
}

/* ---- btn ---- */
.btn:hover .material-symbols-rounded.smooth {
    transform: translateX(5px);
    transition: transform 0.5s ease;
}

.icon-hover:hover .material-symbols-rounded.smooth {
    transform: translateX(5px);
    transition: transform 0.5s ease;
}

.icon-hover {
    color: var(--color-primary-blue);
    position: relative;
    display: inline-block;
}

.icon-hover::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 1px;
    background-color: var(--color-primary-blue);
}

.sc-link a {
    font-family: "Mitr", sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-text-blue);
    text-decoration: underline;
}

.sc-link a:hover {
    color: var(--color-text-blue);
}

/* ---- seacrh-box ---- */
.search-blog .input-group-text {
    border: 1px solid transparent;
    background-color: #F4F4F5;
    /* padding-top: 10px; */
    color: var(--color-text-dark);
    border-radius: 4px;
}

.search-blog .input-group {
    border: 1px solid transparent;
    transition: border-color .15s ease-in-out;
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 4px;
}

.search-blog .input-group:hover,
.search-blog .input-group:active {
    border: 1px solid var(--color-primary-blue);
    border-radius: 4px;
}

.search-blog .input-group:focus-within {
    border: 1px solid var(--color-primary-blue);
    border-radius: 4px;
}

.search-blog .form-control {
    border: none;
    outline: none;
    box-shadow: none;
    background-color: #F4F4F5;
    border-radius: 4px;
    padding: 7px 13px !important;
}

.search-blog .form-control:focus {
    outline: none;
    box-shadow: none;
    border-radius: 4px;
}

.search-blog input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    cursor: pointer;
    height: 24px;
    width: 24px;
    background-image: url("../images/close.svg");
}

.search-blog .form-control::placeholder {
    color: #A1A1AA;
    opacity: 1;
}

/* For Internet Explorer */
.search-blog .form-control:-ms-input-placeholder {
    color: #A1A1AA;
}

/* For Microsoft Edge */
.search-blog .form-control::-ms-input-placeholder {
    color: #A1A1AA;
}


.img-head-blog {
    width: 100%;
    height: 340px;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid #ececec;
}

.img-blog {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid #ececec;
}

a.title-blog h5:hover {
    color: var(--color-text-blue) !important;
}

a.title-blog h5 {
    color: var(--color-text-dark) !important;
    font-weight: 700;
}

.title-detail {
    color: rgba(27, 27, 30, 0.90);
    font-size: 1rem;
    font-weight: 500;
}

.head-blog {
    height: 340px;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog {
    height: 575px;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (max-width: 575.98px) {
    .head-blog {
        height: auto;
    }

    .blog {
        height: auto;
    }
}

@media (min-width:576px) {
    .head-blog {
        height: 260px;
    }

    .blog {
        height: 575px;
    }
}

@media (min-width:768px) {
    .head-blog {
        height: 240px;
    }

    .blog {
        height: 650px;
    }
}

@media (min-width:992px) {
    .head-blog {
        height: 340px;
    }

    .blog {
        height: 575px;
    }
}

@media (min-width:1200px) {
    .head-blog {
        height: 340px;
    }

    .blog {
        height: 575px;
    }
}




.date-time {
    color: rgba(27, 27, 30, 0.40);
    font-size: 0.875rem;
    font-weight: 500;
}

.blog-container {
    transition: all 0.3s ease;
}

.blog-container:hover {
    transform: translateY(-5px) scale(1.02);
}

.main-blog {
    margin-bottom: 4rem;
}

.pt-100 {
    padding-top: 5rem;
}



/* footer */

footer {
    /* padding-top: 80px; */
    padding-bottom: 40px;
}

footer h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-text-lightgrey);
    font-size: 0.875rem !important;
}

footer ul {
    list-style-type: none;
    padding: 0;

}

footer ul li {
    font-size: 14px;
    padding: 0.5rem 0;
}


footer a {
    text-decoration: none;
    color: rgba(27, 27, 30, 0.80);
}

footer a:hover {
    color: var(--color-text-blue);
}

/* ---- footer icon ---- */


.footericon {
    list-style: none;
    text-decoration: none !important;
    border-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.footericon a {
    display: block;
    width: 40px;
    height: 40px;
    text-align: center;
    background: var(--color-bg-white);
    border-radius: 2px;
    font-size: 30px;
    color: rgba(27, 27, 30, 0.80);
    text-decoration: none;
}

.footericon a:hover,
.footericon a:focus,
.footericon a:active {
    color: var(--color-primary-blue);
    border: 0;
}

.sticky-icon {
    list-style: none;
    text-decoration: none !important;
}

.sticky-icon a {
    position: relative;
    display: block;
    width: 40px;
    height: 40px;
    text-align: center;
    background: transparent;
    border-radius: 40px;
    font-size: 24px;
    color: #797979;
    border: solid 1px #acacac;
}

.sticky-icon a:hover {
    color: var(--color-text-white);
    font-size: 24px;
    border: 0;
    background-color: var(--color-primary-blue);
}

.sticky-icon a:focus {
    color: var(--color-text-white);
    font-size: 24px;
    border: 0;
    background-color: var(--color-primary-blue);
}

.sticky-icon a:active {
    color: var(--color-text-white);
    font-size: 24px;
    border: 0;
    background-color: var(--color-primary-blue);
}

.sticky-share {
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
}

.h7 {
    font-size: 0.875rem !important;
    color: rgba(27, 27, 30, 0.80);
}

/* end footer */

/* ---- live chat ---- */
/* Button used to open the chat form - fixed at the bottom of the page */
.chat-open-button {
    color: white;
    border: none;
    cursor: pointer;
    opacity: 1;
    position: fixed;
    bottom: 88px;
    right: 8px;
    width: 3.75rem;
    height: 3.75rem;
    padding: 0.2rem;
    border-radius: 50%;
    font-size: 30px;
    text-align: center;
    align-items: center;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.14),
        0 2px 4px rgba(0, 0, 0, 0.28);
}

.chat-open-button:hover {
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.14),
        0 4px 8px rgba(0, 0, 0, 0.28);
    animation: shake 1s;
    /* animation-iteration-count: infinite; */
}



.btn-chat a {
    position: relative;
    display: block;
    width: 3.75rem;
    height: 3.75rem;
    text-align: center;
    right: 8px;
    border-radius: 50%;
    padding: 0.3rem;
    color: white;
    text-decoration: none;
    font-size: 32px;
    /* box-shadow: 0 0 4px rgba(0, 0, 0, 0.14),
        0 4px 8px rgba(0, 0, 0, 0.28); */
}

.btn-chat a::before {
    content: '';
    position: absolute;
    text-align: center;
    top: 0;
    left: 0;
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    font-size: 32px;
    z-index: -1;
    padding: 0.2rem;
}

.message {
    background: linear-gradient(to right, #EC3C48, #ff5a3d);
}

.mail {
    background: linear-gradient(to right, #fab113, #ffc505);
}

.line-icon {
    background: linear-gradient(to right, #00B900, #00B900);
}

.facebook-icon {
    background: linear-gradient(to right, #1877F2, #1877F2);
}

.calling-icon {
    background: linear-gradient(to right, #f26818, #ff8929);
}

.btn-chat a:hover::before {
    /* transform: scale(1.1); */
    /* box-shadow: 0 0 4px rgba(0, 0, 0, 0.14),
        0 4px 8px rgba(0, 0, 0, 0.28); */
    font-size: 28px;
}

.btn-chat a:hover {
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.14),
        0 4px 8px rgba(0, 0, 0, 0.28);
    animation: shake 1s;
    animation-iteration-count: infinite;
}

.btn-chat a:focus {
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.14),
        0 4px 8px rgba(0, 0, 0, 0.28);
}

/* The popup chat - hidden by default */
.chat-popup {
    visibility: hidden;
    /* Instead of display: none */
    opacity: 0;
    transition: visibility 0s linear 0.5s, opacity 0.5s cubic-bezier(0.215, 0.610, 0.355, 1.000);
    position: fixed;
    bottom: 128px;
    right: 26px;
    z-index: 9;

}

.chat-popup.open {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
    /* Apply transition immediately */
}

.form-chat-container {
    width: 2.5rem;
    padding-right: 1rem;
}

/* Set a style for the submit/send button */
.form-chat-container .btn-chat {
    border: none;
    cursor: pointer;
    margin-bottom: 8px;
    opacity: 1;
    background: transparent;
}

.form-chat-container .btn-chat:last-child {
    border: none;
    cursor: pointer;
    margin-bottom: 28px;
    opacity: 1;
    background: transparent;
}

/* Default styles - hide mobile button */
.btn-chat.mobile {
    display: none;
}

/* CSS Media Query for Mobile Screens */
@media screen and (max-width: 768px) {
    .btn-chat.desktop {
        display: none;
    }

    .btn-chat.mobile {
        display: inline-block;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    50% {
        transform: translateX(2px);
    }

    75% {
        transform: translateX(-2px);
    }
}



.chat-open-button i {
    display: inline-block;
    /* Allows transformation */
    transition: transform 0.5s cubic-bezier(0.215, 0.610, 0.355, 1.000);

}

.chat-open-button .icofont-close {
    transform: rotate(180deg);
}

.chat-open-button {
    /* ... existing styles ... */
    transition: transform 0.5s;
    transform: translateY(0);
    /* Initial state, no movement */
}

/* New class to move the button up when chat is closed */
.chat-open-button.chat-closed {
    transform: translateY(-300px);
    /* Adjust this value to move the button up */
}


/* ---- content ----- */
.st-team a {
    color: #1B1B1E;
}

.st-team a:hover,
.st-team :active {
    color: var(--color-text-blue);
}

.img-detail-blog {
    width: 1140px;
    height: 440px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 575.98px) {
    .img-detail-blog {
        width: 100%;
        height: 300px;
    }
}

@media (min-width:576px) {
    .img-detail-blog {
        width: 100%;
        height: 300px;
    }
}

@media (min-width:768px) {
    .img-detail-blog {
        width: 100%;
        height: 360px;
    }
}

@media (min-width:992px) {
    .img-detail-blog {
        width: 1140px;
        height: 440px;
    }
}

@media (min-width:1200px) {
    .img-detail-blog {
        width: 1140px;
        height: 440px;
    }
}

.content-blog img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.text {
    color: rgba(27, 27, 30, 0.80);
}

.mt-bottom {
    margin-top: 120px;
}

.mt-recom {
    margin-top: 96px;
}