/* General Setup (คงเดิม) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* sarabun-300 - thai */
@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 300;
  src: url('fonts/sarabun/sarabun-v17-thai-300.woff2') format('woff2');
}

/* sarabun-regular - thai */
@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/sarabun/sarabun-v17-thai-regular.woff2') format('woff2');
}

/* sarabun-700 - thai */
@font-face {
  font-family: 'Sarabun';
  font-style: normal;
  font-weight: 700;
  src: url('fonts/sarabun/sarabun-v17-thai-700.woff2') format('woff2');
}

body {
    font-family: 'Sarabun', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f7f6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 0 15px;
}

/* Header & Navigation (ปรับปรุง) */
header {
    background: #ffffff;
    color: #2c3e50;
    padding: 15px 0;
    border-bottom: 3px solid #3498db;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* ปุ่ม Hamburger Menu (ซ่อนไว้ในจอคอม) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    border: none;
    background: none;
    padding: 10px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #2980b9;
    margin: 2px 0;
    transition: 0.3s;
}

.logo h1 {
    font-size: 1.4rem;
    color: #2980b9;
}

.logo p {
    font-size: 0.75rem;
    font-weight: bold;
}

.main-nav {
    display: flex;
    list-style: none;
    align-items: center;
}

.main-nav > li {
    margin-left: 15px;
    position: relative; /* สำคัญสำหรับการวางตำแหน่ง dropdown */
}

.main-nav li a {
    text-decoration: none;
    color: #34495e;
    font-weight: 400;
    font-size: 0.95rem;
    padding: 10px 5px;
    display: block;
    transition: 0.3s;
}

.main-nav li a:hover {
    color: #3498db;
}

.arrow {
    font-size: 0.8rem;
    margin-left: 3px;
}

/* Dropdown Menu Logic */
.dropdown-content {
    display: none; /* ซ่อนไว้เริ่มต้น */
    position: absolute;
    background-color: #ffffff;
    min-width: 260px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.15);
    z-index: 1;
    top: 100%; /* ให้แสดงใต้เมนูหลัก */
    left: 0;
    list-style: none;
    border-top: 3px solid #3498db;
    padding: 10px 0;
}

.dropdown-content li a {
    color: #333;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-content li:last-child a {
    border-bottom: none;
}

.dropdown-content li a:hover {
    background-color: #f8f9fa;
    color: #2980b9;
    padding-left: 25px; /* เพิ่มลูกเล่นตอน hover */
}

/* แสดง dropdown เมื่อเอาเมาส์ไปวางที่เมนูหลัก */
.dropdown:hover .dropdown-content {
    display: block;
}

.btn-apply {
    background: #e67e22;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 5px;
    margin-left: 10px;
}

.btn-apply:hover {
    background: #d35400;
}

/* Hero & Other Sections */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)), 
                /* url('https://images.unsplash.com/photo-1516549655169-df83a0774514?auto=format&fit=crop&w=1350&q=80'); */
                url('images/aboutus.png');
    background-size: cover;
    background-position: center;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content h2 { font-size: 2.2rem; margin-bottom: 10px; }
.hero-content h3 { font-size: 1.6rem; margin-bottom: 10px; }

.btn-primary {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
}

.info-section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title hr { width: 50px; height: 3px; background: #3498db; border: none; margin: 10px auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card { background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.card h3 { margin-bottom: 15px; color: #2980b9; }
.card_home { background: #fff; padding-top: 10px; padding-left: 10px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.card_home h3 { margin-bottom: 15px; color: #2980b9; }

/* บังคับลบเส้นใต้ทุกกรณีสำหรับ card_home */
.card_home a.no-underline, 
.card_home a.no-underline h3,
.card_home a.no-underline:hover,
.card_home a.no-underline:visited,
.card_home a.no-underline:active {
    text-decoration: none !important; /* ใช้ !important เพื่อชนะสไตล์พื้นฐานของ Browser */
    text-decoration-line: none !important;
    outline: none;
}
/* ลบเส้นใต้ที่อาจเกิดจาก h3 ภายในลิ้งค์ */
.card_home a.no-underline h3 {
    display: inline-block;
    border-bottom: none !important;
}

footer {
    background: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}


/* --- Responsive Breakpoint (768px - Tablet/Mobile) --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex; /* แสดงปุ่ม Hamburger */
    }

    .main-nav {
        display: none; /* ซ่อนเมนูเริ่มต้นในมือถือ */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        padding: 20px 0;
        z-index: 999;
    }

    .main-nav.active {
        display: flex; /* แสดงเมื่อกดปุ่ม */
    }

    .main-nav > li {
        margin: 0;
        width: 100%;
    }

    .main-nav li a {
        padding: 15px 25px;
        border-bottom: 1px solid #eee;
    }

    /* ปรับ Dropdown ให้แสดงแบบ Accordion ในมือถือ */
    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        background: #f9f9f9;
        border-top: none;
        padding-left: 20px;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .btn-apply {
        margin: 15px 25px !important;
        text-align: center;
    }

    /* Hero Section */
    .hero { height: auto; padding: 100px 0; }
    .hero-content h2 { font-size: 1.8rem; }
}