* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

body {
    background-color: black;
    color: white;
    text-align: center;
}

.navbar {
    position: fixed;
    top: 1;
    left: 0;
    width: 100%;
    background-color: black;
    padding: 10px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.navbar .logo {
    font-size: 25px;
    font-weight: 700;
}

.navbar a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-size: 20px;
}

.banner {
    background-image: url('pic/7.jpg'); /* ใส่ที่อยู่รูปของคุณ */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    text-align: center;
    padding: 350px 20px; /* ปรับขนาดให้เหมาะสม */
    color: white; /* ให้ข้อความอ่านง่ายขึ้น */
}


.section {
    padding: 50px 20px;
}
h4 {
    font-size: 35px;
    margin-bottom: 50px;
    color: rgb(242, 234, 234);
}
h2 {
    font-size: 28px;
    margin-bottom: 50px;
    color: rgb(242, 234, 234);
}

/* แถบเลื่อน (Carousel) */
.carousel {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding-bottom: 0px; /* เพิ่มระยะห่างด้านล่าง */
}

.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.carousel-slide {
    display: flex;
    transition: transform 0.5s ease-in-out;
}



.prev, .next {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
    position: absolute;
}

.prev { left: 0; }
.next { right: 0; }

.footer {
    margin-top: 50px;
    padding: 20px;
    background-color: #111;
    font-size: 14px;
}
.footer {
    background-color: black;
    color: white;
    padding: 40px 20px;
    font-size: 14px;
    text-align: center;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.footer-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.footer-section a {
    display: block;
    color: white;
    text-decoration: none;
    font-size: 14px;
    margin: 5px 0;
}

.footer-section a:hover {
    text-decoration: underline;
}

.social-links {
    margin: 20px 0;
}

.social-links a {
    color: white;
    font-size: 24px;
    margin: 0 10px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #1db954; /* เปลี่ยนเป็นสีเขียวเวลา hover */
}


.footer-bottom {
    margin-top: 10px;
    font-size: 12px;
    color: #aaa;
}

.footer-bottom a {
    color: white;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}
h1 {
    color: rgb(0, 0, 0); /* ให้แน่ใจว่าเห็นได้บนพื้นหลังดำ */
    text-align: center;
    margin-top: px;
    font-size: 36px;
    font-weight: bold;
}

#content {
    padding-top: 80px; /* ปรับตามความสูงของ navbar */
}
/* ปรับให้หัวข้ออยู่ตรงกลางและชัดเจน */
.strains h2 {
    text-align: center;
    font-size: 28px;
    color: #ffffff;  /* เปลี่ยนสีให้เข้มขึ้น */
    margin-bottom: 20px;
}

/* ปรับ layout และระยะห่าง */
.strains {
    text-align: center;
    padding: 60px 20px;
    background-color: #0c0c0c;
}

/* จัดการ Grid ให้ดูดีขึ้น */
.strain-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* ทำให้แต่ละคอลัมน์มีขนาดที่ยืดหยุ่น */
    gap: 20px; /* ระยะห่างระหว่างไอเท็ม */
    margin: 20px;
}

/* ปรับขนาดและการแสดงผลของกล่องพันธุ์พืช */
.strain {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px;
    transition: transform 0.3s ease;
}

/* ทำให้รูปภาพมีขนาดเท่ากัน */
.strain img {
    width: 100%;
    height: 200px;  /* กำหนดความสูงคงที่ */
    object-fit: cover; /* ครอบรูปให้พอดี */
    border-radius: 15px;
}

/* ปรับขนาดตัวอักษรให้ชัดเจนขึ้น */
.strain h3 {
    margin-top: 10px;
    font-size: 22px;
    color: #000000;
}

.strain p {
    font-size: 16px;
    color: #555; /* สีเทาเข้มขึ้นให้อ่านง่าย */
}

/* ทำให้ hover ดูมีลูกเล่น */
.strain:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(10, 10, 10, 0.15);
}
/* ปรับ Navbar ให้มี padding เพิ่ม */


/* ปรับระยะห่างของเนื้อหาไม่ให้ติด Navbar */
.about {
    text-align: center;
    padding-top: 120px; /* ป้องกันหัวข้อติด Navbar */
    background-color: #ffffff;
}

/* ปรับขนาดตัวอักษรให้เด่นชัด */
.about h1 {
    font-size: 32px;
    color: #000000;
    font-weight: bold;
}

/* ปรับระยะห่างของ Strains Section */
.strains {
    padding-top: 60px;
}
.contact-info {
    text-align: center;
    padding: 50px 20px;
}

.contact-details p {
    font-size: 18px;
    margin: 10px 0;
}

.map-container {
    text-align: center;
    margin: 20px auto;
    width: 80%;
}

.contact-form {
    text-align: center;
    padding: 40px 20px;
    background: #f5f5f5;
}

.contact-form form {
    max-width: 500px;
    margin: auto;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.contact-form button {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    cursor: pointer;
}

.contact-form button:hover {
    background: #218838;
}
.banner {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    transition: opacity 1.5s ease-in-out; /* ทำให้เปลี่ยนภาพแบบนุ่มนวล */
    position: relative;
}

.banner.fade {
    opacity: 0; /* ลดความโปร่งใสก่อนเปลี่ยนภาพ */
}
.carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding: 10px;
}



.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 100;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #000;
    color: #fff;
    font-family: 'Space Mono', monospace;
    border-radius: 15px;
    padding: 40px;
    max-width: 960px;
    width: 90%;
    display: none;
    z-index: 101;
    box-sizing: border-box;
}

.popup h1 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    color: #f5f5f5;
}

.popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.popup img {
    width: 250px;  /* Fixed width for all images */
    height: 350px;  /* Fixed height for all images */
    object-fit: cover;  /* Ensures images are resized to fit the given dimensions without distortion */
    border-radius: 15px;
    margin-bottom: 20px;
}

#popup-details {
    width: 100%;
    color: #fff;
    font-size: 14px;
    line-height: 1.8;
    margin-top: 20px;
    text-align: left; /* Align text to the left for a clean look */
}

#popup-details p {
    margin-bottom: 10px;
}

#popup-details strong {
    color: #00ffff;
    display: inline-block;
    margin-bottom: 5px;
}

#popup-description {
    font-size: 16px;
    color: #fff;
    margin-top: 20px;
    text-align: left;
    font-weight: 300;
}

#popup-overlay {
    display: block; /* Make sure the overlay is visible */
}


.close-popup {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    color: #fff;
    font-size: 35px;
    cursor: pointer;
    transition: all 0.3s ease;
}
@media screen and (max-width: 768px) {
    .sidebar-filters {
        position: fixed;
        top: 10px;
        right: 10px;
        width: 30%; /* ทำให้แถบ filter ย่อขนาดเมื่อแสดงในมือถือ */
        max-width: 300px; /* กำหนดขนาดสูงสุด */
        z-index: 10;
        display: none; /* ซ่อนแถบ filter ในหน้าจอโทรศัพท์ */
    }

    /* สร้างปุ่มที่ทำให้แถบ filter เปิด/ปิด */
    .sidebar-filters-toggle {
        display: block;
        position: fixed;
        top: 10px;
        right: 10px;
        background-color: #333;
        color: white;
        padding: 10px;
        border-radius: 5px;
        z-index: 20;
    }
}


@media (max-width: 768px) {
    .genetic-strain {
        width: 180px; /* ลดขนาดของ strain ลงในมือถือ */
        height: auto; /* ปรับขนาดให้เหมาะสมในมือถือ */
    }

    .genetic-strain img {
        height: 70%; /* ปรับขนาดภาพให้เล็กลงในมือถือ */
    }

    .genetic-strain h3 {
        font-size: 0.9rem; /* ลดขนาดข้อความในมือถือ */
    }
}

.gallery-section {
    padding: 40px 20px;
    background-color: #222;
    color: white;
}

.gallery-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

.gallery {
    display: flex;
    overflow-x: scroll;
    gap: 15px;
    padding: 10px;
    scroll-snap-type: x mandatory;
}

.gallery-item {
    flex: 0 0 auto;
    width: 400px; /* ปรับขนาดตามต้องการ */
    height: 300px; /* ปรับขนาดตามต้องการ */
    box-sizing: border-box;
    border-radius: 10px;
    overflow: hidden;
    scroll-snap-align: center;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

/* ทำให้รูปภาพเลื่อนในแนวนอน */
.gallery::-webkit-scrollbar {
    height: 8px;
}

.gallery::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.gallery::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ปรับให้แสดงผลของ hero-banner */

.video-container {
    display: flex; /* ใช้ flexbox เพื่อจัดวางวิดีโอในแถวเดียว */
    gap: 20px; /* เพิ่มช่องว่างระหว่างวิดีโอ */
}

/* ปรับให้แสดงผลของ hero-banner */
.hero-banner {
    position: relative;
    width: 100%;
    height: 500px; /* กำหนดความสูงของ banner */
    overflow: hidden;
    display: flex; /* ใช้ flexbox เพื่อจัดวางวิดีโอในแถวเดียว */
    justify-content: center; /* จัดวางวิดีโอให้กลาง */
    align-items: center; /* จัดตำแหน่งวิดีโอในแนวตั้ง */
}

.video-container {
    display: flex; /* ใช้ flexbox เพื่อจัดวางวิดีโอในแถวเดียว */
    width: 70%; /* ให้ความกว้างของ container เต็มพื้นที่ */
    justify-content: center; /* จัดวางวิดีโอให้กลาง */
    gap: 10px; /* เพิ่มช่องว่างระหว่างวิดีโอ */
}

.hero-banner video {
    width: 48%; /* กำหนดความกว้างของวิดีโอให้ไม่เกิน 48% ของความกว้าง */
    height: 100%; /* กำหนดความสูงของวิดีโอให้เต็มพื้นที่ */
    object-fit: cover; /* ให้วิดีโอครอบคลุมพื้นที่โดยไม่บิดเบี้ยว */
}

.hero-banner h1 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

.carousel button {
    position: absolute;
    top: 50%;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    font-size: 2rem;
    cursor: pointer;
    transform: translateY(-50%);
    border-radius: 5px;
}

.carousel .prev {
    left: 10px;
}

.carousel .next {
    right: 10px;
}

/* ปรับขนาดของแต่ละ strain */
.genetic-strain {
    text-align: center;
    margin: 20px;
    background: none;
    border: none;
    box-shadow: none;
}

/* การจัดการขนาดของรูปภาพให้เท่ากัน */
.genetic-strain img {
    width: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
}

.genetic-strain h2 {
    color: #fff;
    font-weight: 300;
    margin-top: 10px;
    font-size: 1rem;
    letter-spacing: 1px;
}
/* Styling for Sidebar Filters */
.sidebar-filters {
    position: fixed;
    right: 20px;
    top: 100px;
    background: rgba(30, 30, 30, 0.9);
    padding: 20px 25px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    color: #fff;
    z-index: 999;
    font-family: 'Kanit', sans-serif;
    width: 180px;
    right: 20px;
}
.sidebar-filters label {
    display: flex;
    align-items: center;
    font-size: 15px;
    margin: 8px 0;
    gap: 10px; /* เพิ่มช่องว่างระหว่าง checkbox กับข้อความ */
    white-space: nowrap;
    transition: color 0.2s;
}
.sidebar-filters input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #00ffb3;
    transform: scale(1.2);
}
.sidebar-filters .filter-category h3 {
    font-size: 20px;
    margin-bottom: 12px;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
    color: #00ffb3;
    white-space: nowrap;
}
.filter-toggle {
    cursor: pointer;
    color: #fff;
    background-color: #333;
    padding: 10px;
    border-radius: 50%;
    font-size: 180px;
}
.filter-category {
    width: 30%;
    font-size: 16px;
}
/* ปรับฟอนต์และการแสดงผลในฟิลเตอร์ */
.filter-category label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.filter-category h3 {
    font-size: 1.2em;
    margin-bottom: 5px;
}

/* ฟิลเตอร์ที่เลือกแล้ว */
.filter-category input[type="checkbox"]:checked {
    accent-color: #58a6f7; /* สีเมื่อเลือกฟิลเตอร์ */
}

/* แบ่งช่องฟิลเตอร์ให้สวยงาม */
.filter-category label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

/* Main Content Layout */
.main-content {
    margin-top: 80px;  /* เพิ่มระยะห่างให้เนื้อหาหลักไม่ทับ navbar */
    padding: 20px;
}

