/* --- Google Font --- */
@import url('/npm/@fontsource/prompt/index.css');

/* --- CSS Variables (ตัวแปรสี) --- */
:root {
    --primary-color: #41826e; /* สีเขียวตุ่นๆ */
    --white-color: #ffffff;
    --dark-grey-color: #333333; /* สีตัวอักษรหลัก */
    --light-grey-color: #f4f7f6; /* สีพื้นหลังสลับ */
    --border-color: #e0e0e0;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* --- Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* กันเมนูบังหัวข้อตอนกดลิงก์ */
}

body {
    font-family: 'Prompt', sans-serif;
    line-height: 1.7;
    color: var(--dark-grey-color);
    background-color: var(--white-color);
    padding-top: 80px;
}

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

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { color: var(--primary-color); margin-bottom: 1rem; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 3rem; }
.section-bg { background-color: var(--light-grey-color); }
section { padding: 80px 0; }
a { text-decoration: none; }

/* --- Header & Navbar --- */
.header {
    background-color: var(--white-color);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo img { height: 50px; }
.nav-menu { display: flex; list-style: none; gap: 30px; }
.nav-link { text-decoration: none; color: var(--dark-grey-color); font-weight: 400; transition: color 0.3s ease; }
.nav-link:hover { color: var(--primary-color); }
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: var(--dark-grey-color); transition: all 0.3s ease-in-out; }

/* --- Hero Section --- */
.hero {
    height: 100vh;
    position: relative; /* สำคัญมาก สำหรับการวาง element ซ้อนกัน */
    overflow: hidden; /* ซ่อนสไลด์ที่อยู่นอกจอ */
    color: var(--white-color);
    display: flex; /* จัดให้ content อยู่กลางจอ */
    justify-content: center;
    align-items: center;
    text-align: center;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 500%; /* 100% ต่อ 1 รูป มี 5 รูป = 500% */
    height: 100%;
    display: flex;
    transition: transform 0.8s ease-in-out; /* เอฟเฟกต์ตอนเลื่อน */
    z-index: 1; /* ให้อยู่หลังสุด */
}

.slide {
    width: 20%; /* 100% / 5 รูป = 20% */
    height: 100vh;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ทำให้รูปเต็มพื้นที่โดยไม่เสียสัดส่วน */
}

/* เพิ่ม overlay สีเข้มๆ ให้ข้อความอ่านง่ายขึ้น */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.hero-content {
    position: relative; /* ทำให้มาอยู่บน overlay */
    z-index: 3;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--white-color);
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #356a5a;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--white-color);
}

/* --- Services Section --- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; }
.service-link { text-decoration: none; color: inherit; display: block; height: 100%; }
.service-item { background: var(--white-color); padding: 2rem; border-radius: 10px; box-shadow: var(--shadow); transition: transform 0.3s ease, box-shadow 0.3s ease; height: 100%; }
.service-item:hover { transform: translateY(-10px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.service-icon { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1rem; }

/* --- NEW: Accordion Styles --- */
.accordion { max-width: 800px; margin: 0 auto; }
.accordion-item { border-bottom: 1px solid var(--border-color); }
.accordion-item:last-child { border-bottom: none; }
.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.2rem 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    color: var(--dark-grey-color);
    text-align: left;
}
.accordion-header .icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 0.5rem;
}
.accordion-content p { margin-bottom: 1rem; color: #555; }
.accordion-item.active .accordion-header .icon { transform: rotate(45deg); }
.accordion-item.active .accordion-content {
    max-height: 200px; /* ตั้งค่าให้สูงพอที่จะแสดงเนื้อหา */
    padding-bottom: 1.5rem;
}
.read-more { color: var(--primary-color); font-weight: 600; }

/* --- Footer Section --- */
.footer { background-color: var(--primary-color); color: var(--white-color); padding: 50px 0 0; }
.footer-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 2rem; padding-bottom: 40px; }
.footer h4 { margin-bottom: 1rem; color: var(--white-color); font-size: 1.2rem; }
.footer p, .footer a { color: rgba(255, 255, 255, 0.8); text-decoration: none; display: block; margin-bottom: 0.5rem; transition: color 0.3s ease; }
.footer a:hover { color: var(--white-color); }
.footer ul { list-style: none; }
.footer-bottom { text-align: center; padding: 20px; border-top: 1px solid rgba(255, 255, 255, 0.2); }

/* --- Fade-in Animation on Scroll --- */
.section-fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.section-fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive (for Mobile) --- */
@media (max-width: 768px) {
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .nav-menu { position: fixed; left: -100%; top: 80px; flex-direction: column; background-color: var(--white-color); width: 100%; text-align: center; transition: 0.3s; box-shadow: var(--shadow); }
    .nav-menu.active { left: 0; }
    .nav-menu li { padding: 1rem 0; }
    .hero-title { font-size: 2.5rem; }
    .services-grid { grid-template-columns: 1fr; }
    .section-title { font-size: 2rem; }
}


/*
===============================================
  STYLES FOR PERSONNEL PAGE (personal.html)
===============================================
*/

/* --- Global adjustment for pages with fixed header --- */
/* เพิ่มโค้ดนี้เพื่อให้เนื้อหาในหน้าใหม่ๆ ไม่ถูกเมนูบัง */
body {
    padding-top: 80px; /* เท่ากับความสูงของ header */
}

/* --- Page Header (แถบหัวข้อสีเขียว) --- */
.page-header {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 40px 0;
    text-align: center;
}

.page-header h1 {
    color: var(--white-color);
    font-size: 2.5rem;
}

.page-header p {
    font-size: 1.1rem;
    font-weight: 300;
}

/* --- Leader Card (การ์ดผู้บริหาร) --- */
.leader-card {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 4rem;
    margin-top: 2rem; /* เพิ่มระยะห่างด้านบนนิดหน่อย */
}

.leader-image {
    flex: 0 0 300px;
}

.leader-image img {
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.leader-info h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.leader-info .title {
    font-size: 1.2rem;
    color: var(--dark-grey-color);
    margin-bottom: 1.5rem;
}

.contact-info {
    font-size: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

/* --- Section Divider (เส้นคั่น) --- */
.section-divider {
    border: 0;
    height: 1px;
    background-color: #e0e0e0;
    margin: 3rem 0;
}

/* --- Staff Grid (การ์ดเจ้าหน้าที่) --- */
.staff-heading {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.staff-card {
    background-color: var(--white-color);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.staff-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.staff-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.5rem auto;
    border: 4px solid var(--primary-color);
}

.staff-details h4 {
    font-size: 1.2rem;
    color: var(--dark-grey-color);
    margin-bottom: 0.25rem;
}

.staff-details .title {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.staff-details .contact {
    color: var(--primary-color);
    font-weight: 600;
}

/* --- Responsive adjustments for Personnel page --- */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .leader-card {
        flex-direction: column;
        text-align: center;
    }

    .leader-image {
        flex-basis: auto;
        width: 250px;
        margin: 0 auto;
    }

    .leader-info h2 {
        font-size: 1.8rem;
    }
    .staff-grid {
    grid-template-columns: 1fr;
}
}

