/* จัดระเบียบภาชนะรวม */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
    font-family: sans-serif;
}

/* ส่วนบน: แบ่งซ้าย 40% ขวา 60% */
.about-top {
    display: flex; 
    gap: 40px;
    margin-bottom: 60px;
    align-items: flex-start;
}
.rating-col { flex: 4; text-align: center; }
.content-col { flex: 6; }

/* ส่วนล่าง: กระจาย 5 คอลัมน์เท่าๆ กัน */
.stats-row {
    display: flex;
    justify-content: space-between; /* กระจายช่องไฟห่างกัน */
    text-align: center;
    border-top: 1px solid #eee; /* เส้นคั่นบางๆ */
    padding-top: 40px;
}
.stat-item {
    flex: 1; /* ให้แต่ละช่องกว้างเท่ากัน */
}

/* ปรับแต่งตัวเลขให้เด่น */
.score, .number {
    font-size: 24px;
    font-weight: bold;
    color: #002D72; /* สีน้ำเงินตามรูป */
}
.score { color: #FDB813; } /* สีเหลืองสำหรับ Rating */
/* --- ส่วนที่เพิ่มใหม่สำหรับ Mobile / Zoom Menu --- */

/* ปุ่ม Hamburger (ซ่อนไว้ก่อนในหน้าจอปกติ) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: white;
    transition: 0.3s;
}

/* เมื่อหน้าจอแคบลง หรือซูมจนพื้นที่เหลือน้อยกว่า 992px */
@media (max-width: 992px) {
    .menu-toggle { display: flex; } /* โชว์ปุ่ม 3 ขีด */

    .nav-links {
        position: fixed;
        right: -100%; /* ซ่อนไว้ฝั่งขวา */
        top: 0;
        width: 300px; /* ความกว้างของแถบเมนูข้าง */
        height: 100vh;
        background-color: white;
        flex-direction: column;
        padding: 80px 20px;
        transition: 0.5s;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        overflow-y: auto; /* ให้เลื่อนลงได้ถ้าเมนูยาว */
    }

    /* เมื่อสั่งเปิดเมนู */
    .nav-links.active { right: 0; }

    .nav-links li {
        margin: 15px 0;
        width: 100%;
    }

    .nav-links a {
        color: #333 !important; /* เปลี่ยนเป็นสีเข้มให้เห็นชัดบนพื้นขาว */
        font-size: 1.1rem;
        display: block;
    }

    /* ปรับแต่ง Dropdown และ Mega Menu ในโหมดมือถือให้เป็นรายการเรียงลงมา */
    .dropdown-content, .mega-menu {
        position: static !important;
        display: block !important; /* ให้โชว์ค้างไว้หรือกดเปิดเอง */
        width: 100% !important;
        box-shadow: none !important;
        transform: none !important;
        padding: 10px 20px !important;
        border: none !important;
        max-height: 0; /* ซ่อนไว้ก่อน */
        overflow: hidden;
        transition: 0.3s;
    }

    /* เมื่อคลิกเปิดเมนูย่อย (Option) */
    .nav-links li:hover .dropdown-content,
    .nav-links li:hover .mega-menu {
        max-height: 1000px; /* ขยายออกมา */
    }

    /* ปรับโครงสร้าง Mega Menu จาก 3 คอลัมน์เหลือ 1 คอลัมน์ */
    .mega-menu {
        grid-template-columns: 1fr !important;
    }
    
    .menu-column {
        border-left: none !important;
        padding: 10px 0 !important;
    }
}

    /* 1. สไตล์หลัก: ใช้หน่วย rem เพื่อให้ยืดหยุ่นตามการซูมของ Browser */
    * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Arial, sans-serif; }

    .hero {
        position: relative;
        height: 100vh; width: 100%;
        background-image: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('../images/IMG_0251.jpg'); 
        background-size: cover; background-position: center;
        display: flex; align-items: center; color: white;
    }

    /* 2. เมนู Navigation: ใช้ flex-wrap เพื่อให้เมนูตกบรรทัดได้ถ้าซูมเยอะๆ */
    nav {
        position: absolute;
        top: 0; width: 100%;
        display: flex; 
        justify-content: space-between; 
        align-items: center;
        padding: 1.5rem 5%; /* ใช้ % เพื่อให้ยืดหยุ่นตามความกว้างจอ */
        background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
        z-index: 100;
        flex-wrap: wrap; 
    }

    .logo { line-height: 1.2; flex-shrink: 0; }
    
    .nav-links { 
        list-style: none; 
        display: flex; 
        flex-wrap: wrap; /* ป้องกันเมนูซ้อนทับกันเวลาซูม */
    }
    
    .nav-links li { 
        margin-left: 1.5rem; 
        position: relative; 
    } 
    
    .nav-links a { 
        text-decoration: none; 
        color: white; 
        font-size: 0.9rem; /* ใช้ rem แทน px */
        font-weight: 500;
        transition: 0.3s;
        white-space: nowrap;
    }
    .nav-links a:hover { color: #ffcc00; }

    /* --- 3. สำหรับ Dropdown ปกติ (Data Protection) --- */
    .dropdown-content {
        display: none;
        position: absolute;
        background-color: white;
        width: 18rem; /* ใช้ rem เพื่อให้ขนาดกล่องขยายตามการซูมตัวอักษร */
        box-shadow: 0px 15px 35px rgba(0,0,0,0.2);
        top: 100%; 
        left: 50%;
        transform: translateX(-50%);
        padding: 0.5rem 0;
        border-radius: 0 0 8px 8px;
        border-top: 4px solid #002d72; /* ใส่สีและหน่วยให้ครบ */
        z-index: 1000;
    }

    .nav-links li:hover .dropdown-content { display: block; }

    .dropdown-content a { 
        color: #333 !important; 
        padding: 0.8rem 1.5rem; 
        display: block; 
        font-size: 0.85rem;
        text-decoration: none;
        border-bottom: 1px solid #f5f5f5;
        transition: 0.3s;
        text-align: left;
    }
    .dropdown-content a:hover { background-color: #f9f9f9; padding-left: 2rem; }

    /* --- 4. สำหรับ Mega Menu (Services) --- */
.has-mega-menu { 
    /* ไม่ต้องใส่ position: relative ตรงนี้ เพื่อให้เมนูลูกกางอิงตามแถบ Nav ทั้งหมด */
    position: static !important; 
} 

.mega-menu {
    display: none;
    position: absolute;
    
    /* 1. จัดให้เมนูกางอยู่กึ่งกลางหน้าจอเสมอ */
    top: 60px; /* ปรับให้พอดีกับความสูงแถบเมนูของคุณ */
    left: 50%;
    transform: translateX(-50%); 
    
    /* 2. ใช้ความกว้างที่ยืดหยุ่น (95% ของจอ แต่ไม่เกิน 1100px) */
    width: 95vw; 
    max-width: 1100px;
    
    background-color: white;
    box-shadow: 0px 15px 40px rgba(0,0,0,0.2);
    border-radius: 8px; 
    padding: 30px;
    z-index: 9999;
    
    /* 3. จัดคอลัมน์และเส้นแบ่ง */
    display: none;
    grid-template-columns: 1fr 1.5fr 1.5fr; 
    gap: 0; 
    border-top: 4px solid #002d72;
}

/* แสดงผลเมื่อ Hover */
.nav-links li:hover .mega-menu { 
    display: grid !important; 
}

/* เส้นแบ่งแนวตั้ง (Vertical Lines) */
.menu-column { padding: 0 2rem; }
.menu-column:not(:first-child) { border-left: 1px solid #333; }
.menu-column:first-child { padding-left: 0; }

/* ป้องกันตัวหนังสือเบี้ยวในคอลัมน์ */
.mega-menu h3, .mega-menu ul li a { text-align: left; }

/* จัดหัวข้อให้อยู่กลาง */
.section-title {
    text-align: center;
    color: #002D72; /* สีน้ำเงิน Lufthansa */
    margin-bottom: 40px;
}

/* ส่วน About: แบ่งซ้าย 40% ขวา 60% */
.about-top {
    display: flex;
    gap: 50px;
    margin-bottom: 60px;
    align-items: flex-start;
}

.rating-col {
    flex: 1;
    text-align: center;
}

.score {
    font-size: 2rem;
    font-weight: bold;
    color: #FFC107;
}

.stars {
    color: #FFC107;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.content-col {
    flex: 1.5;
    line-height: 1.6;
}

.btn-container {
    text-align: right;
    margin-top: 20px;
}

.btn-readmore {
    background: #F0F2F5;
    padding: 10px 25px;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

/* ส่วนสถิติ: เรียงกัน 5 อัน */
.stats-row {
    display: flex;
    justify-content: space-between;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.stat-item img {
    width: 40px;
    margin-bottom: 15px;
}

.stat-item .number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFC107;
}

.stat-item .label {
    font-size: 0.9rem;
    color: #666;
}

.our-services {
    display: flex;
    width: 100%;
    min-height: 500px;
    background-color: #F4F7F9;
    align-items: stretch;
    margin: 0;
    padding: 0;
    overflow: hidden; /* กันรูปแลบ */
}

/* ฝั่งซ้าย: ข้อความ (บังคับให้ใช้แค่ครึ่งจอ) */
.services-content {
    flex: 0 0 50%; /* บังคับให้กว้าง 50% เท่านั้น ห้ามขยายเพิ่ม ห้ามหด */
    padding: 60px 5%; /* ลด padding ลงนิดนึงเพื่อให้ตัวหนังสือมีที่หายใจ */
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box; /* สำคัญ: รวม padding เข้ากับความกว้าง 50% */
}

/* ฝั่งขวา: รูปภาพ (บังคับให้ใช้ครึ่งจอที่เหลือ) */
.services-image {
    flex: 0 0 50%; /* บังคับให้กว้าง 50% เท่านั้น */
    margin: 0;
    padding: 0;
}

/* บังคับรูปให้ใหญ่เต็มสี่เหลี่ยม 50% ของมัน */
.services-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* รูปจะขยายเต็มโดยไม่เบี้ยว */
    display: block;
}

/* ปรับขนาดตัวหนังสือให้เล็กลงนิดนึงเพื่อให้พอดีกับ 50% */
.services-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}
.services-content p {
    font-size: 1rem;
    line-height: 1.5;
}

.clients-section {
    padding: 60px 0;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 50px;
}

/* --- ปรับแต่งส่วน Clients Section ทั้งหมด --- */
.clients-section {
    text-align: center;
    padding: 80px 0;
    background-color: #fff;
    max-width: 1200px; /* คุมความกว้างให้เท่ากับส่วนอื่น */
    margin: 0 auto;
}

.section-title {
    margin-bottom: 50px;
    color: #002D72;
}

/* --- ส่วน Testimonials (ทำให้เป็น Slider) --- */
.slider-container {
    overflow: hidden; /* ซ่อนส่วนที่เลื่อนออกไปข้างนอก */
    margin-bottom: 30px;
    width: 100%;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out; /* เพิ่มความนุ่มนวลเวลาเลื่อน */
    /* ถ้ามี 3 อัน และอยากให้โชว์พร้อมกัน ให้ใช้ gap ช่วย */
    gap: 30px; 
}

.slide-page {
    min-width: 100%; /* 1 หน้าสไลด์กว้างเท่าหน้าจอพอดี */
    display: flex;   /* จัดรายการข้างใน 3 อันให้เรียงแนวนอน */
    justify-content: space-around;
    padding: 20px 0;
}

.testimonial-item {
    flex: 0 0 calc(33.33% - 20px); /* บังคับให้แบ่งเป็น 3 คอลัมน์พอดี */
    padding: 20px;
    box-sizing: border-box;
}

/* ปรับแต่งโลโก้ลูกค้า */
.client-logo-large {
    height: 60px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.client-logo-large img {
    max-height: 50px; /* คุมขนาดโลโก้ไม่ให้ใหญ่เกินไป */
    width: auto;
    filter: grayscale(100%); /* ทำให้เป็นสีเทาตามรูป */
    opacity: 0.6;
    transition: 0.3s;
}

/* เมื่อเอาเมาส์ชี้ ให้โลโก้มีสีขึ้นมา */
.testimonial-item:hover .client-logo-large img {
    filter: grayscale(0%);
    opacity: 1;
}

.testimonial-item p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    min-height: 80px; /* บังคับความสูงข้อความให้เท่ากันทุกกล่อง */
}

.client-name {
    display: block;
    font-weight: bold;
    font-size: 0.9rem;
    color: #002D72;
    font-style: italic;
}

/* --- จุด Pagination --- */
.dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 80px;
}

.dot {
    height: 10px;
    width: 10px;
    background-color: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background-color: #333;
    width: 12px; /* ทำให้จุดที่เลือกดูเด่นขึ้นเล็กน้อย */
    height: 12px;
}

/* --- ส่วน Logo Grid (แบรนด์ด้านล่าง) --- */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* แถวละ 4 โลโก้ */
    gap: 50px 30px; /* ระยะห่าง บน-ล่าง 50px, ซ้าย-ขวา 30px */
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-item {
    display: flex;
    justify-content: center;
}

.logo-item img {
    max-width: 140px;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.4;
    transition: 0.4s;
}

.logo-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05); /* ขยายขนาดขึ้นเล็กน้อยเวลาชี้ */
}
