/* General Styling */
:root {
    --primary-color: #007bff; /* Blue */
    --secondary-color: #28a745; /* Green */
    --accent-color: #ffc107; /* Yellow/Orange */
    --text-color: #333;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
}

body {
    font-family: 'Open Sans', 'Noto Sans Thai', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3 {
    font-family: 'Montserrat', 'Noto Sans Thai', sans-serif;
    color: var(--dark-bg);
}

h1 { font-size: 2.8em; }
h2 { font-size: 2.2em; text-align: center; margin-bottom: 40px; }
h3 { font-size: 1.5em; }

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

/* แก้ไขโค้ดส่วนนี้ */
.btn:hover {
    background: #0056b3; /* สีน้ำเงินที่เข้มขึ้น 10% ของ #007bff */
    text-decoration: none;
}

.btn-primary { 
    background: var(--primary-color); 
}

.btn-primary:hover {
    background: #0056b3; /* กำหนดสี hover โดยตรง */
}

.btn-secondary { 
    background: var(--secondary-color); 
}

.btn-secondary:hover {
    background: #1e7e34; /* กำหนดสี hover โดยตรงสำหรับปุ่มรอง */
}

/* Header */
.main-header {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0; /* รวม padding ที่คุณแก้ไขไว้แล้ว */
}

.main-header .header-left {
    display: flex;
    align-items: center;
    gap: 20px; /* ระยะห่างระหว่างโลโก้และปุ่มเปลี่ยนภาษา */
}

/* Navigation */
.main-header .main-nav {
    flex-grow: 1; /* ให้ Nav ขยายเต็มพื้นที่ที่เหลือ */
    display: flex;
    justify-content: flex-end; /* ชิดขวา */
}

/* Language Switcher */
.main-header .lang-switcher {
    display: flex;
    gap: 10px;
}

.main-header .lang-btn {
    color: #000; /* เปลี่ยนสีข้อความให้เข้ากับพื้นหลังสีขาว */
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.main-header .lang-btn:hover {
    background-color: #f0f0f0;
}

.main-header .lang-btn.active {
    background-color: var(--primary-color); /* ใช้สีหลักของเว็บเป็นสีพื้นหลัง */
    color: #fff; /* ใช้สีขาวเป็นสีข้อความ */
    font-weight: 700;
    pointer-events: none; /* ทำให้ปุ่มที่ Active คลิกไม่ได้ */
}

/* Responsive CSS for Mobile */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .main-header .header-left {
        width: 100%;
        justify-content: space-between;
    }

    .main-nav {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
    }
    
    .main-header .lang-switcher {
        /* ไม่ต้องซ่อน เพราะเราย้ายไปรวมกับ header-left แล้ว */
    }
}

@media (max-width: 768px) {
    /* เพิ่มระยะห่างด้านล่างของส่วนเนื้อหาทั้งหมด (ซึ่งรวมปุ่มไว้ด้วย) */
    .service-detail-section .service-text {
        margin-bottom: 20px; /* เพิ่มระยะห่างด้านล่าง */
    }

    /* หรือถ้าต้องการเพิ่มระยะห่างด้านบนของรูปภาพ */
    .service-detail-section .service-image {
        margin-top: 20px;
    }
}

.logo-text {
    display: flex;
    flex-direction: column; /* จัดให้ข้อความเรียงลงมาเป็นแนวตั้ง */
    line-height: 1.2; /* ปรับระยะห่างระหว่างบรรทัด */
	align-items: center;
}

.logo-line-1 {
    font-weight: 600; /* ทำให้บรรทัดบนหนาขึ้น */
    font-size: 1.2em; /* ขนาดฟอนต์บรรทัดแรก */
	text-align: center;
	width: 100%;
	letter-spacing: 0.1em;
}

.logo-line-2 {
    font-weight: 400; /* ทำให้บรรทัดล่างบางลง */
    font-size: 0.8em; /* ขนาดฟอนต์บรรทัดที่สอง */
    color: #777; /* ทำให้สีจางลงเล็กน้อย */
    margin-top: -5px; /* ปรับระยะห่างให้ชิดกันมากขึ้น */
	text-align: center;
	width: 100%;
	letter-spacing: 0.2em;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px; /* เพิ่มระยะห่างระหว่างรูปภาพกับข้อความ */
}

.logo img {
    height: 40px;
    margin-right: 0px; /* 10px */
}

.logo span {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-bg);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-links li {
    margin-left: 30px;
    position: relative; /* สำหรับ Dropdown */
}

.nav-links a {
    color: var(--text-color);
    font-weight: 600;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
    text-decoration: none;
}

/* Dropdown Menu */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 180px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
    left: 50%; /* จัดกลาง */
    transform: translateX(-50%); /* จัดกลาง */
    padding: 10px 0;
    top: 100%; /* อยู่ใต้เมนูหลัก */
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    white-space: nowrap; /* ป้องกันข้อความห่อ */
}

.dropdown-content a:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Hero Section */
.hero-section {
    background: url('../images/hero-bg.jpg') no-repeat center center/cover; /* ใส่ภาพพื้นหลัง */
    color: #fff;
    text-align: center;
    padding: 100px 20px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-section::before { /* Overlay */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* เพิ่มความมืดให้ภาพ */
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    color: #fff;
}

.hero-section p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: #eee;
}

/* Services Highlight */
.services-highlight-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.service-cards .card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-cards .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.service-cards .card i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-cards .card h3 {
    margin-top: 0;
    color: var(--dark-bg);
}

/* Service Detail Section */
.service-detail-section {
    padding: 80px 0;
    background-color: #fff;
    text-align: center;
}

.service-detail-section h2 {
    color: var(--dark-bg);
}

.service-detail-section p {
    max-width: 800px;
    margin: 0 auto 30px auto;
}

.service-detail-section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.service-detail-section ul {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    display: inline-block; /* เพื่อจัดกลาง */
    text-align: left;
}

.service-detail-section ul li {
    background: var(--light-bg);
    margin: 10px 0;
    padding: 10px 20px;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: var(--dark-bg);
    color: #fff;
    text-align: center;
}

.contact-section h2 {
    color: #fff;
}

.contact-section p {
    margin-bottom: 40px;
    font-size: 1.1em;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto 40px auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: none;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1em;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form button {
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
}

.contact-form button:hover {
    background: darken(var(--primary-color), 10%);
}

.contact-info {
    margin-top: 30px;
    font-size: 1.1em;
}

.contact-info p {
    margin: 10px 0;
}

.contact-info i {
    margin-right: 10px;
    color: var(--accent-color);
}

.social-links a {
    color: #fff;
    font-size: 1.8em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Footer */
.main-footer {
    background: #222;
    color: #bbb;
    padding: 30px 0;
    text-align: center;
    font-size: 0.9em;
}

.main-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: #bbb;
    margin: 0 15px;
}

.footer-links a:hover {
    color: #fff;
}

/* Mobile Nav */
.menu-toggle {
    display: none; /* ซ่อนบน Desktop */
    font-size: 1.8em;
    cursor: pointer;
    color: var(--text-color);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px; /* ใต้ Header */
        left: 0;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        border-top: 1px solid #eee;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    .nav-links li a {
        display: block;
        padding: 15px 20px;
        text-align: center;
    }

    .dropdown-content {
        position: static; /* ไม่ลอย */
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        min-width: unset;
        width: 100%;
        transform: none;
        background-color: #f0f0f0;
    }

    .dropdown-content a {
        padding-left: 40px; /* เยื้องเล็กน้อย */
        background-color: #f0f0f0;
    }

    .menu-toggle {
        display: block; /* แสดงบน Mobile */
    }

    .hero-section h1 {
        font-size: 2.5em;
    }

    .service-cards {
        grid-template-columns: 1fr;
    }
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-color: var(--light-bg);
}

.about-content {
    display: flex;
    flex-wrap: wrap; /* ให้สามารถขึ้นบรรทัดใหม่ได้ใน Mobile */
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 20px;
}

.about-text .intro-text {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1em;
    color: #555;
    margin-bottom: 15px;
}

.mission-vision {
    margin-top: 30px;
}

.mission-vision h3 {
    margin-bottom: 15px;
    color: var(--dark-bg);
}

.mission-vision ul {
    list-style: none;
    padding: 0;
}

.mission-vision ul li {
    font-size: 1em;
    color: #555;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.mission-vision ul li i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .about-content {
        flex-direction: column;
    }

    .about-text {
        order: 2; /* ทำให้ข้อความอยู่ด้านล่างรูปใน Mobile */
    }
    
    .about-image {
        order: 1; /* ทำให้รูปอยู่ด้านบนใน Mobile */
    }
}

/* Privacy Policy Section */
.privacy-policy-section {
    padding: 80px 0;
    background-color: var(--light-bg);
    line-height: 1.8;
}

.privacy-policy-section h1 {
    text-align: left;
    margin-bottom: 10px;
}

.privacy-policy-section h3 {
    text-align: left;
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.privacy-policy-section p.last-updated {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 40px;
}

.privacy-policy-section ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}

.privacy-policy-section ul li {
    margin-bottom: 10px;
}

.privacy-policy-section address {
    font-style: normal;
    margin-top: 20px;
}

/* Terms & Conditions Section */
.terms-section {
    padding: 80px 0;
    background-color: var(--light-bg);
    line-height: 1.8;
}

.terms-section h1 {
    text-align: left;
    margin-bottom: 10px;
}

.terms-section h3 {
    text-align: left;
    margin-top: 40px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.terms-section p.last-updated {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 40px;
}

.terms-section ul {
    list-style-type: decimal;
    padding-left: 20px;
    margin-bottom: 20px;
}

.terms-section ul li {
    margin-bottom: 10px;
}

.terms-section .contact-info-footer {
    margin-top: 50px;
    font-size: 1.1em;
    font-weight: 500;
}

/* Helper for darkening colors (requires SCSS or a custom function for pure CSS) */
/* For pure CSS, you'd manually adjust the color values */
/* Example: background: #0069d9; for darken(--primary-color, 10%) */