/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Kanit', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9fbff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: #fff;
    height: 80px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 24px;
    font-weight: 600;
    text-decoration: none;
    color: #2c3e50;
}

.logo span {
    color: #3498db;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #3498db;
}

.btn-login {
    background: #3498db;
    color: #fff !important;
    padding: 8px 20px;
    border-radius: 5px;
}

.btn-login:hover {
    background: #2980b9;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    height: 500px;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    margin: 0 10px;
    font-weight: 500;
    transition: 0.3s;
}

.btn-primary {
    background: #fff;
    color: #3498db;
}

.btn-secondary {
    border: 2px solid #fff;
    color: #fff;
}

.btn-primary:hover {
    background: #f1f1f1;
}

/* Features */
.features {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.underline {
    width: 60px;
    height: 4px;
    background: #3498db;
    margin: 10px auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 40px;
    color: #3498db;
    margin-bottom: 20px;
}

/* Footer */
footer {
    background: #2c3e50;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    margin-top: 50px;
}
/* --- ส่วนปรับปรุง Navbar ให้เป็น Responsive --- */

/* ซ่อน Checkbox ที่ใช้คุมเมนู */
#nav-check {
    display: none;
}

/* ปุ่มสามขีด (Hamburger) จะแสดงเฉพาะบนมือถือ */
.nav-toggler {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.nav-toggler span, 
.nav-toggler span::before, 
.nav-toggler span::after {
    display: block;
    background: #2c3e50;
    height: 3px;
    width: 25px;
    position: relative;
    transition: 0.3s;
}

.nav-toggler span::before { content: ""; top: 8px; }
.nav-toggler span::after { content: ""; top: -11px; }

/* Media Query สำหรับหน้าจอมือถือ (กว้างไม่เกิน 768px) */
@media (max-width: 768px) {
    .nav-toggler {
        display: block; /* แสดงปุ่มสามขีด */
    }

    .nav-links {
        position: absolute;
        top: 80px; /* ต่อท้าย Navbar */
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column; /* เรียงเมนูลงมาเป็นแนวตั้ง */
        height: 0;
        overflow: hidden;
        transition: 0.3s ease-in-out;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }

    .nav-links li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }

    /* ปรับปุ่ม Login ให้พอดีหน้าจอมือถือ */
    .btn-login {
        margin: 15px 20px !important; /* เว้นระยะจากขอบจอ */
        border-radius: 8px !important;
        background: #3498db;
        display: block;
        text-align: center;
    }

    /* เมื่อติ๊กที่ปุ่มสามขีด ให้กางเมนูออกมา */
    #nav-check:checked ~ .nav-links {
        height: auto;
        padding-bottom: 20px;
    }

    /* เปลี่ยนรูปสามขีดเป็นกากบาทเมื่อเปิดเมนู */
    #nav-check:checked ~ .nav-toggler span {
        background: transparent;
    }
    #nav-check:checked ~ .nav-toggler span::before {
        transform: rotate(45deg);
        top: 0;
    }
    #nav-check:checked ~ .nav-toggler span::after {
        transform: rotate(-45deg);
        top: -3px;
    }
    
    .logo {
        font-size: 20px; /* ย่อขนาดโลโก้บนมือถือเล็กน้อย */
    }
}