/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    background-color: #0078d7;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

header .logo img {
    height: 60px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin-top: 0;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 4px 0;
}

.hero {
    background: url('../images/hero-bg.jpg') no-repeat center center/cover;
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
}

.hero p {
    font-size: 1.2rem;
}

.activity-slider {
    padding: 2rem;
    background-color: #fff;
    margin: 2rem 0;
}

.activity-slider h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #006400;
}

.swiper-container {
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.swiper-slide p {
    margin-top: 1rem;
    font-size: 1.2rem;
    color: #333;
}

.swiper-button-next, .swiper-button-prev {
    color: #006400;
}

.swiper-pagination-bullet-active {
    background: #006400;
}

/* สไตล์สำหรับส่วนข่าวสารและลิงค์หน่วยงานที่เกี่ยวข้อง */
.news-and-links {
    display: flex; /* ใช้ Flexbox แทน Grid */
    justify-content: space-between; /* ให้คอลัมน์ทั้งสองอยู่ห่างกัน */
    padding: 2rem;
    background-color: #fff;
    margin: 2rem 0;
}

.news, .related-links {
    width: 48%; /* กำหนดความกว้างของแต่ละคอลัมน์ */
}

.news h2, .related-links h2 {
    margin-bottom: 1rem;
    color: #006400;
}

.news ul, .related-links ul {
    list-style: none;
}

.news ul li, .related-links ul li {
    margin: 0.5rem 0;
}

.news ul li a, .related-links ul li a {
    color: #0078d7;
    text-decoration: none;
}

.news ul li a:hover, .related-links ul li a:hover {
    text-decoration: underline;
}

/* สำหรับหน้าจอขนาดเล็ก (มือถือ) */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .hamburger {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #0078d7;
        position: absolute;
        top: 70px;
        left: 0;
        z-index: 1000;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 0.5rem 0;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .swiper-slide img {
        max-width: 90%;
    }

    .news-and-links {
        flex-direction: column; /* แสดงเป็นคอลัมน์เดียวบนมือถือ */
    }

    .news, .related-links {
        width: 100%; /* ให้คอลัมน์เต็มความกว้างบนมือถือ */
    }

    .related-links {
        margin-top: 2rem; /* เพิ่มระยะห่างระหว่างคอลัมน์บนมือถือ */
    }
}

/* สำหรับหน้าจอขนาดกลาง (แท็บเล็ต) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
}

/* สำหรับหน้าจอขนาดใหญ่ (เดสก์ท็อป) */
@media (min-width: 1025px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }
}