/* ----------------------------- */
/* Design System: สีและฟอนต์หลัก */
/* ----------------------------- */
:root {
    /* Colors */
    --primary-color: #0B3190;
    --secondary-color: #00AFEC;
    --background-gray: #F2F4F8;
    --border-color: #DDE1E6;
    --white-color: #FCFCF7;
    --dark-blue: #071D56;
    --text-color: #121619;
    --inactive-color: #6C757D;

    /* Typography */
    --font-family-base: 'Noto Sans JP', sans-serif;
    --heading-1: 54px;
    --heading-2: 42px;
    --heading-3: 32px;
    --heading-4: 24px;
    --heading-5: 20px;
    --heading-6: 18px;
    --body-l: 18px;
    --body-m: 16px;
    --body-s: 14px;
}



/* ----------------------------- */
/* General Settings */
/* ----------------------------- */
body {
    font-family: var(--font-family-base);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #ffffff;
}

h1 {
    font-size: var(--heading-1);
}

h2 {
    font-size: var(--heading-2);
    color: var(--primary-color);
    font-weight: bold;
}

h3 {
    font-size: var(--heading-3);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

h4 {
    font-size: var(--heading-4);
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: bold;
    line-height: 1.5;
}

h5 {
    font-size: var(--heading-5);
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

h6 {
    font-size: var(--heading-6);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

p {
    font-size: var(--body-m);
}

a {
    text-decoration: none;
    color: var(--text-color);
}

a:hover {
    color: var(--primary-color);
}

/* ----------------------------- */
/* Header Styles */
/* ----------------------------- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    z-index: 1030;
}

#CompanyLogo {
    height: 40px;
}

@media (max-width: 519px) { 
    #CompanyLogo {
        height: 31px;
    }
}

.navbar {
    background-color: #ffffff;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
    z-index: 1030 !important;
    min-height: 70px;
}

.navbar-nav .nav-item {
    margin-right: 1rem;
}

.navbar-nav .nav-item:last-child {
    margin-right: 0;
}

.nav-link {
    color: var(--text-color);
    font-size: 16px;
    padding: 10px 15px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: var(--background-gray);
    border-radius: 4px;
}

.nav-link.active, .nav-link[aria-expanded="true"] {
    color: var(--primary-color) !important;
    background-color: var(--background-gray);
    border-radius: 4px;
}

.dropdown-menu {
    border: none;
    border-radius: 0;
    margin-top: 0 !important;
    padding: 24px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}
.dropdown-item {
    padding: 1rem;
    margin: 0;
    background-color: transparent;
    border: none;
    transition: var(--primary-color) 0.3s ease;
    color: var(--primary-color);
    text-decoration: none;
}

.dropdown-item:hover {
    padding: 1rem;
    margin: 0;
    background-color: var(--background-gray);
    border-radius: 0;
}


.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item:active {
    color: var(--primary-color);
    background-color: var(--background-gray);
}




/* ----------------------------- */
/* Hero Section */
/* ----------------------------- */
.hero-home {
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero-home img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-about {
    margin-top: 70px;
    height: 240px;
    background-image: linear-gradient(
            to bottom, 
            rgba(30, 40, 95, 0.4),
            rgba(30, 40, 95, 1) 
        ),
        url('../Images/aboutus-headerBG.jpg');
    background-size: cover;
    background-position: center center; 
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-about-new {
    margin-top: 70px;
    height: 240px;
    background-image: linear-gradient(
            to bottom, 
            rgba(30, 40, 95, 0.4),
            rgba(30, 40, 95, 1)
        ),
        url('../Images/aboutus-headerBG.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white-color);

}



.hero-about h1 {
    font-size: var(--heading-2);
    color: var(--white-color);
}

.hero-about p {
    color: var(--white-color);
}
/* Contact Us Section */
#contact h2 {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

#contact p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

#contact .btn {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

#contact .btn:hover {
    background-color: var(--secondary-color);
}

#contact img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}


/* ----------------------------- */
/* Footer Styles */
/* ----------------------------- */
.footer {
    background-image: linear-gradient(
            to right,
            rgba(30, 40, 95, 0.5),
            rgba(30, 40, 95, 1)
        ),
        url('../Images/footerBG.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    font-size: 14px;
    color: #ffffff;
    line-height: 1.6;
    padding: 40px 0;
    position: relative;
}

.footer .company-name {
    font-size: 16px;
    font-weight: normal;
}

.footer h6 {
    font-size: 16px;
    font-weight: bold;
    color: var(--white-color);
}

.footer a.footer-link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a.footer-link:hover {
    color: var(--secondary-color);
}

.footer-line {
    border-top: 1px solid #ffffff;
    opacity: 0.3;
    margin: 10px 0;
}


/* ----------------------------- */
/* Index Style */
/* ----------------------------- */
/* Factory */
/* Gallery Container */
.gallery-container {
    overflow: hidden;
    position: relative;
    max-width: 100%;
}

/* Gallery (แถวของรูปภาพ) */
.gallery {
    display: flex;
    gap: 24px;
    scroll-behavior: smooth;
    overflow-x: auto; 
    -ms-overflow-style: none;
    scrollbar-width: none;
    white-space: nowrap;
}

.gallery::-webkit-scrollbar {
    display: none; 
}


.gallery-item-wrapper {
    flex: 0 0 auto;
    width: 400px;
}

/* รูปภาพ */
.gallery-item {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.gallery p {
    padding-top: 1rem;
}

.nav-btn {
    position: absolute;
    top: 50%; 
    transform: translateY(-50%) scale(0.8); 
    background-color: var(--primary-color); 
    color: #fff;
    border: none; 
    border-radius: 4px;
    padding: 10px 16px;
    cursor: pointer;
    z-index: 1; 
    opacity: 0; 
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out; 
}

.nav-btn.prev {
    left: 12px; 
}

.nav-btn.next {
    right: 12px; 
}

.gallery-container:hover .nav-btn {
    opacity: 1;
    transform: translateY(-50%) scale(1); 
}

.nav-btn:hover {
    background-color: var(--secondary-color); 
}

/* Hero Image */
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel-inner {
    height: 700px;
}

.carousel-item {
    height: 100%;
}

@media (max-width: 768px) {
    .carousel-inner {
        height: 300px;
    }
}

#hero-home {
    margin-top: 70px; 
}

#our-services .gallery-container {
    overflow: hidden;
    position: relative;
}

#our-services .gallery {
    display: flex;
    gap: 24px;
    overflow-x: auto; 
    -ms-overflow-style: none;
    scrollbar-width: none;
    white-space: nowrap; 
    scroll-behavior: smooth;
}

#our-services .gallery::-webkit-scrollbar {
    display: none; 
}


#our-services .gallery-item-wrapper {
    flex: 0 0 auto;
    width: 100%;
    max-width: 400px;
}

#our-services .gallery-item {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    max-height: 300px;
    border-radius: 4px;
}

#our-services .gallery-caption {
    text-align: left;
}

#our-services .nav-btn {
    position: absolute;
    top: 43%;
    transform: translateY(-50%) scale(0.8);
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 16px;
    cursor: pointer;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

#our-services .nav-btn.prev {
    left: 12px;
}

#our-services .nav-btn.next {
    right: 12px;
}

#our-services .gallery-container:hover .nav-btn {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

#our-services .nav-btn:hover {
    background-color: var(--secondary-color);
}

#see_more_products_btn {
    text-decoration: none;
    color: var(--secondary-color) !important;
}

#see_more_products_btn:hover {
    text-decoration: underline;

}

#see_more_equipment_btn {
    text-decoration: none;
    color: var(--secondary-color) !important;
}

#see_more_equipment_btn:hover {
    text-decoration: underline;

}


/* Factory Section (ของ Our Services) */
#our-services .factory-wrapper {
    margin-top: 40px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

#our-services .factory-image {
    transition: transform 0.3s ease-in-out;
}

#our-services .factory-overlay {
    background: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    z-index: 1;
}

#our-services .factory-overlay h4 {
    font-size: var(--heading-4);
    color: white;
    font-weight: bold;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#our-services .factory-wrapper:hover .factory-overlay {
    opacity: 1;
}

#our-services .factory-wrapper:hover .factory-image {
    transform: scale(1.05);
}

#our-services .factory-wrapper:hover .factory-overlay h4 {
    opacity: 1;
}


/* Factory Wrapper (Global) */
.factory-wrapper {
    position: relative;
    margin: 0 auto; 
    border-radius: 8px; 
    overflow: hidden; 
    transition: transform 0.3s ease-in-out; 
}

/* Factory Image */
.factory-image {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease-in-out;
}

/* Overlay สำหรับข้อความ */
.factory-overlay {
    background: rgba(0, 0, 0, 0); 
    transition: background 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0; 
    z-index: 1; 
}

/* ข้อความ Factory */
.factory-overlay h4 {
    font-size: var(--heading-4);
    color: white;
    font-weight: bold;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Hover Effect */
.factory-wrapper:hover .factory-image {
    transform: scale(1.05);
}

.factory-wrapper:hover .factory-overlay {
    background: rgba(0, 0, 0, 0.5);
    opacity: 1;
}

.factory-wrapper:hover .factory-overlay h4 {
    opacity: 1; /* แสดงข้อความ */
}

/* Main Product & Business Scope Section */
.main-product-scope .content-box {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    height: 100%;/
}

.main-product-scope .bg-white {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.main-product-scope .d-flex.flex-column {
    gap: 16px;
}

.main-product-scope .bg-white p {
    font-size: var(--body-m);
    color: var(--text-color);
    margin: 0;
}

.main-product-scope .icon {
    width: 80px;
    height: 80px;
    margin-bottom: 8px;
}

/* Certification Section */
.certification .cert-image {
    max-width: 179px;
    height: auto;
    display: block;
}

.certification .d-flex {
    gap: 24px !important;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Layout */
@media (max-width: 768px) {
    .certification .row {
        flex-direction: column-reverse; 
    }
    .certification .d-flex {
        justify-content: center; 
        gap: 12px !important;
    }
    #history-timeline .row {
        flex-direction: column;
        text-align: center;
    }

    #history-timeline .col-md-2 {
        margin-bottom: 1rem; 
    
}
}

@media (max-width: 576px) {
    .certification .d-flex {
        gap: 8px !important;
    }
}

/* หัวข้อและคำอธิบายในคอลัมน์ขวา */
.certification h2 {
    color: var(--primary-color);
    font-size: var(--heading-2);
    margin-bottom: 1rem;
}

.certification p {
    font-size: var(--body-m);
    margin-bottom: 0.5rem;
}
/* Our Vision Section */
#vision {
    padding: 3rem 0;
}

#vision .vision-image {
    width: 150px;
    height: 150px;
    border-radius: 50%; 
    object-fit: cover; 
    display: block;
    margin-left: auto;
    margin-right: auto;
}
#vision p {
    font-size: var(--body-m); 
    color: var(--text-color); 
    margin-top: 0.5rem;
}
/* รูปภาพใน Section */
#ceo-message img {
    width: 100%;
    height: auto; 
    object-fit: cover; 
}

/* ----------------------------- */
/* About Us */
/* ----------------------------- */


.timeline-icon {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-bottom: 1rem;
}


.timeline-icon {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* ----------------------------- */
/* Business Intro */
/* ----------------------------- */


.nav-tabs {
    gap: 0.5rem; 
    display: flex; 
    justify-content: center; 
    border-bottom: none; 
}

.nav-tabs .nav-item {
    flex-grow: 0; 
    margin: 0;
}

.nav-tabs .nav-link {
    color: var(--inactive-color);
    border: none;
    background-color: transparent;
    font-weight: 500;
    transition: color 0.3s ease-in-out;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    font-weight: bold;
    position: relative;
    background-color: transparent;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

#products .card {
    border: none;
    box-shadow: none;
}

#products .card-body {
    text-align: left;
    padding-left: 0;
}

#products .card-title {
    margin-bottom: 0.5rem;
}

#products .card-text {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 14px;
}
#products .card-img-top {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    max-height: 300px;
    border-radius: 4px;
}

/* Equipment & Tools */
#equipment-tools .card {
    border: none;
    box-shadow: none;
    background-color: transparent !important;
}

/* จัดข้อความใน Card Body ให้ชิดซ้าย */
#equipment-tools .card-body {
    text-align: left;
    padding-left: 0;
}

/* เพิ่มระยะห่างข้อความ */
#equipment-tools .card-title {
    margin-bottom: 0.5rem;
}

#equipment-tools .card-text {
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 14px;
}

/* รูปภาพในการ์ด */
#equipment-tools .card-img-top {
    border-radius: 4px;
    object-fit: cover;
    height: 229px;
}

/* ----------------------------- */
/* Factory Intro */
/* ----------------------------- */

/* Manufacturing Area */
#manufacturing-area .gallery-container {
    overflow: hidden;
    position: relative;
}

#manufacturing-area .gallery {
    display: flex;
    gap: 24px;
    overflow-x: auto; 
    -ms-overflow-style: none;
    scrollbar-width: none;
    white-space: nowrap;
    scroll-behavior: smooth;
}

/* CSS สำหรับซ่อน Scrollbar ใน WebKit browsers (Chrome, Safari, Opera) */
#manufacturing-area .gallery::-webkit-scrollbar {
    display: none; 
}


#manufacturing-area .gallery-item-wrapper {
    flex: 0 0 auto;
    max-width: 400px;
    width: 100%;
}

#manufacturing-area .gallery-item {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    max-width: 400px;
    max-height: 300px;
    border-radius: 4px;
}


#manufacturing-area .gallery-caption {
    text-align: left;
    margin-top: 8px;
    font-size: 14px;
}

#manufacturing-area .nav-btn {
    position: absolute;
    top: 43%;
    transform: translateY(-50%) scale(0.8);
    background-color: var(--primary-color);
    color: #fff;
    border: none; /* เพิ่ม border: none; */
    border-radius: 4px;
    padding: 10px 16px;
    cursor: pointer;
    z-index: 1;
    opacity: 0; /* ซ่อนปุ่ม */
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

#manufacturing-area .nav-btn.prev {
    left: 12px;
}

#manufacturing-area .nav-btn.next {
    right: 12px;
}

#manufacturing-area .gallery-container:hover .nav-btn {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

#manufacturing-area .nav-btn:hover {
    background-color: var(--secondary-color);
}

/* Factory Detail */
.row.align-items-stretch {
    display: flex;
    flex-wrap: wrap;
}

.col-md-4 {
    display: flex;
    flex-direction: column;
}

.info-box {
    display: flex; 
    flex-direction: column;
    flex-grow: 1; 
}

.image-container {
    max-height: 543px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden; 
}

.factory-image {
    max-height: 100%; 
    width: 100%;
    object-fit: contain;
}

.icon {
    width: auto;
    height: auto;
    max-width: 50px;
    max-height: 50px;
}

.col-md-4 > .info-box:first-child {
    margin-bottom: 1.5rem;
}

.col-md-4 > .info-box:last-child {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    #factory-details .tab-pane .row {
        flex-direction: column;
    }

    #factory-details .tab-pane .col-md-4 {
        order: 2;
    }

    #factory-details .tab-pane .col-md-8 {
        order: 1;
    }

    #factory-details .tab-pane .image-container {
        margin-bottom: 1.5rem;
    }
}

/* Cookie Consent Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    
    /* Transition Effects */
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    transform: translateY(100%); /* ซ่อน banner ไว้ด้านล่างตอนแรก */
    opacity: 0;
}

.cookie-consent-banner.show {
    transform: translateY(0); /* เลื่อน banner ขึ้นมา */
    opacity: 1;
}

.cookie-consent-banner.hide {
    transform: translateY(100%); /* เลื่อน banner ลงไป */
    opacity: 0;
}

.cookie-consent-banner .container {
    padding-top: 15px;
    padding-bottom: 15px;
}

#acceptCookiesBtn {
    background-color: #fff;
    color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    border-radius: 3px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#acceptCookiesBtn:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

/* Hide other languages */
.lang-th, .lang-en, .lang-jp {
    display: none;
}