/* assets/css/style.css */

/* --- 1. Variables (ปรับปรุงเล็กน้อย) --- */
:root {
    --primary-color: #1930e3; /* สีหลัก - น้ำเงินเข้ม */
    --accent-color: #FFC107; /* สีเน้น - เหลืองทอง */
    --dark-bg: #1a1a1a; /* พื้นหลังสีเข้ม */
    --light-bg: #f8f9fa; /* พื้นหลังสีอ่อนมาก (เกือบขาว) - ใช้สำหรับ services, content-block */
    --white-bg: #ffffff; /* พื้นหลังสีขาวบริสุทธิ์ */
    --text-color: #333; /* สีข้อความปกติ */
    --secondary-text-color: #666; /* สีข้อความรอง */
    --light-text-color: #f4f4f4; /* สีข้อความบนพื้นหลังเข้ม */
    --border-color: #eee;
    --font-primary: 'Montserrat', sans-serif; /* สำหรับหัวข้อ */
    --font-body: 'Sarabun', sans-serif; /* สำหรับเนื้อหา */
    --shadow-light: 0 4px 12px rgba(0,0,0,0.06); /* ปรับความเข้มเงาเล็กน้อย */
    --shadow-medium: 0 8px 24px rgba(0,0,0,0.1); /* ปรับความเข้มเงาเล็กน้อย */

    /* NEW: Add a base font size variable for easier scaling */
    --base-font-size: 16px; /* กลับมาใช้ 16px เป็นค่า Default base เพื่อให้อ่านง่าย */
}

/* --- 2. Base Styles (ปรับปรุง font-size, padding-top) --- */
body {
    font-family: var(--font-body);
    line-height: 1.7; /* ปรับ line-height ให้อ่านง่ายขึ้น */
    color: var(--text-color);
    margin: 0;
    padding-top: 80px; /* เพิ่ม padding-top ให้ Header ไม่บังเนื้อหาเริ่มต้น */
    overflow-x: hidden; /* ป้องกันการเลื่อนแนวนอน */
    font-size: 1em; /* ใช้ 1em ซึ่งจะอ้างอิงจาก --base-font-size (16px) */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* เพิ่ม padding ซ้ายขวาให้เนื้อหาไม่ชิดขอบจอเกินไป */
}

/* --- 3. Header --- */
.main-header {
    background-color: rgba(255, 255, 255, 0.98); /* เพิ่มความทึบแสงเล็กน้อย */
    backdrop-filter: blur(10px); /* เพิ่ม blur เล็กน้อย */
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* ปรับเงาให้ชัดขึ้นเล็กน้อย */
    transition: background-color 0.3s ease;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0; /* ปรับ padding ให้ Header มีความสูงเหมาะสม */
}
.logo img {
    height: 80px; /* ปรับขนาดโลโก้ */
}
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}
.main-nav ul li {
    margin-left: 30px; /* เพิ่มระยะห่างระหว่าง Link */
}
.main-nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1em; /* ปรับขนาด Font */
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}
.main-nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
}
.main-nav ul li a:hover::after {
    width: 100%;
}

/* Mobile Navigation Toggle */
.menu-toggle {
    display: none; /* Hidden on desktop */
    font-size: 1.8em; /* ขนาดเหมาะสมสำหรับปุ่ม toggle */
    cursor: pointer;
    color: var(--text-color);
}

/* Mobile Navigation Menu */
.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%; /* Start off-screen */
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px); /* เพิ่ม blur */
    z-index: 1100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: left 0.4s ease-in-out;
    overflow-y: auto;
}
.mobile-nav.active {
    left: 0; /* Slide in */
}
.mobile-nav .close-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 2.2em; /* ขนาดเหมาะสมสำหรับปุ่มปิด */
    color: var(--text-color);
    cursor: pointer;
}
.mobile-nav ul {
    list-style: none;
    padding: 0;
    text-align: center;
}
.mobile-nav ul li {
    margin-bottom: 20px; /* ระยะห่างระหว่าง Link ใน Mobile Menu */
}
.mobile-nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 2em; /* ขนาด Font ใน Mobile Menu */
    font-weight: 700;
    transition: color 0.3s ease;
    padding: 8px 15px;
    display: block;
}
.mobile-nav ul li a:hover {
    color: var(--primary-color);
}

/* --- 4. Hero Section --- */
.hero-section {
    position: relative;
    min-height: 85vh; /* ใช้ min-height แทน height เพื่อความยืดหยุ่น */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    color: var(--light-text-color);
}
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}
.hero-image, .hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6); /* ปรับความสว่างพื้นหลังให้ข้อความอ่านง่าย */
    transform: scale(1.05); /* ปรับ Scale เล็กน้อย */
}
.hero-content {
    z-index: 1;
    max-width: 800px; /* เพิ่ม max-width เพื่อรองรับเนื้อหาบนจอใหญ่ */
    padding: 0 20px; /* เพิ่ม padding เพื่อไม่ให้ข้อความชิดขอบเกินไป */
}
.hero-content h1 {
    font-family: var(--font-primary);
    font-size: 4em; /* เพิ่มขนาด Font สำหรับ Desktop */
    margin-bottom: 20px;
    line-height: 1.2;
    font-weight: 700;
}
.hero-content p {
    font-size: 1.3em; /* เพิ่มขนาด Font สำหรับ Desktop */
    margin-bottom: 40px;
    font-weight: 300;
}

/* --- 5. Global Section Styling --- */
.section-padded {
    padding: 50px 0; /* ใช้ค่าเดิม (80px) เพื่อให้มีระยะห่างที่สบายตาบน Desktop */
}
.content-block {
    background-color: var(--white-bg);
}
.bg-light {
    background-color: var(--light-bg);
}
h2 {
    font-family: var(--font-primary);
    font-size: 3em; /* ปรับขนาด h2 ให้ใหญ่ขึ้นเล็กน้อยสำหรับ Desktop */
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
}
h3 {
    font-family: var(--font-primary);
    font-size: 1.8em; /* ปรับขนาด h3 ให้เหมาะสม */
    color: var(--text-color);
}
.section-description {
    text-align: center;
    max-width: 700px; /* เพิ่ม max-width สำหรับคำอธิบาย */
    margin: 0 auto 60px auto; /* เพิ่มระยะห่างด้านล่างจากคำอธิบายถึงส่วนเนื้อหา */
    font-size: 1.2em; /* ปรับขนาด Font */
    color: var(--secondary-text-color);
}

/* --- 6. Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 30px; /* ปรับขนาด padding */
    text-decoration: none;
    border-radius: 8px; /* ปรับ border-radius */
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1em; /* ปรับขนาด Font */
    cursor: pointer; /* เพิ่ม cursor pointer */
}
.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: 2px solid var(--primary-color);
}
.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-secondary {
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}
.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}
.btn-white {
    background-color: var(--light-text-color);
    color: var(--primary-color);
    border: 2px solid var(--light-text-color);
}
.btn-white:hover {
    background-color: rgba(255,255,255,0.8);
    color: var(--primary-color);
}
.btn-lg {
    padding: 16px 35px; /* ปรับขนาดให้ใหญ่ขึ้น */
    font-size: 1.1em;
}
.btn-text {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
    font-size: 1em; /* ปรับขนาด Font */
}
.btn-text:hover {
    color: #0056b3;
}
.arrow-icon {
    margin-left: 8px;
    font-size: 1.1em;
}

/* --- 7. Services Section (id="services") --- */
#services {
    padding: 80px 0;
    background-image: url('../images/0022.jpeg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
    color: var(--light-text-color);
    text-align: center;
    }

/* Overlay for #services */
#services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2); /* ปรับสีและค่า Alpha ของ Overlay ให้ข้อความอ่านง่ายขึ้น */
    z-index: -1;
}

#services h2,
#services .section-description {
    color: var(--light-text-color); /* กำหนดสีให้ชัดเจนเมื่ออยู่บนพื้นหลังมืด */
}
#services h2 {
    font-size: 3em !important; /* ใช้ !important ชั่วคราว ถ้ามี inline style */
}
#services .section-description {
    margin-bottom: 50px; /* เพิ่มระยะห่างจาก description ถึง grid */
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* ปรับ minmax ให้ใหญ่ขึ้นเล็กน้อย */
    gap: 30px; /* เพิ่มช่องว่างระหว่างกล่องบริการ */
    justify-content: center;
    align-items: stretch; /* ทำให้กล่องสูงเท่ากัน */
}

.service-item {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5x;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    text-align: center; /* สำคัญ: ให้เนื้อหาภายใน service-item จัดกลาง */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    color: var(--text-color);
    }

.service-item:hover {
    transform: translateY(-8px); /* เพิ่ม Hover effect */
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2); /* เพิ่มเงาตอน Hover */
}

.service-item img {
    width: 80px;
    height: 80px;

    display: block; 
    margin: 0 auto 20px auto; 
    margin-top: 10px;
    }

.service-item h3 {
    font-size: 1.6em; /* ขนาดหัวข้อในกล่องบริการ */
    margin-bottom: 15px;
    color: var(--primary-color); /* สีหัวข้อในกล่องบริการ */
}

.service-item p {
    font-size: 1em; /* ขนาดข้อความอธิบาย */
    line-height: 1.6;
    color: var(--secondary-text-color);
    flex-grow: 1;
    margin-bottom: 20px; /* ระยะห่างจาก p ถึง Learn More */
}

.service-item .btn-text {
    color: var(--accent-color); /* สี Link "Learn More" */
    text-decoration: none;
    font-weight: 600;
}

.service-item .btn-text:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* --- 8. Why Choose Us Section --- */
.why-choose-us-section {
    background-color: var(--light-bg); /* สีพื้นหลังอ่อนๆ */
    color: var(--text-color);
}

.why-choose-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* ปรับ minmax ให้เหมาะสม */
    gap: 30px;
    margin-top: 50px; /* เพิ่มระยะห่าง */
}

.why-choose-item {
    background-color: var(--white-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center; /* จัดกลางเนื้อหาในกล่อง */
    border-bottom: 5px solid var(--primary-color); /* เปลี่ยนสีเส้นให้เข้ากับ primary-color */
}

.why-choose-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.why-choose-item h3 {
    color: var(--primary-color); /* สีเดียวกับเส้นด้านล่าง */
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 700; /* ทำให้หัวข้อเข้มขึ้น */
    display: flex; /* ใช้ flexbox เพื่อจัดเรียงไอคอนกับข้อความ */
    align-items: center; /* จัดให้อยู่กึ่งกลางแนวตั้ง */
    justify-content: center; /* จัดกลางไอคอนและข้อความ */
}

.why-choose-item h3 .icon-large {
    font-size: 1.2em;
    margin-right: 10px;
    color: var(--primary-color);
}

.why-choose-item p {
    font-size: 1.1em;
    line-height: 1.7;
    color: var(--secondary-text-color);
}
/* ไอคอนอยู่ด้านบนหัวข้อและข้อความ (ถ้าคุณต้องการ) */
.icon-above-heading {
    display: block;
    text-align: center;
    margin-bottom: 20px; /* เพิ่มระยะห่าง */
    color: var(--primary-color);
}

.icon-large {
    font-size: 3.5em; /* ขนาดไอคอนที่ใหญ่ขึ้น */
}

/* --- 9. Split Content (About Section) --- */
.split-content {
    display: flex;
    align-items: center;
    gap: 60px; /* เพิ่มระยะห่างระหว่างคอลัมน์ */
    flex-wrap: wrap; /* ให้มัน Wrap ลงมาในมือถือ */
    margin-top: 50px; /* เพิ่มระยะห่างจาก section-description */
}
.split-text, .split-image {
    flex: 1;
    min-width: 320px; /* กำหนด min-width เพื่อให้แสดงผลได้ดีบนจอเล็ก */
}
.split-image img {
    width: 100%;
    height: 450px; /* เพิ่มความสูงรูปภาพ */
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}
.split-text h2 {
    text-align: left; /* ให้หัวข้อชิดซ้ายบน Desktop */
    margin-bottom: 20px;
    font-size: 2.8em; /* ปรับขนาด h2 */
}
.split-text p {
    font-size: 1.1em; /* ปรับขนาด Font */
    margin-bottom: 25px;
    line-height: 1.7;
    text-align: left; /* ให้ข้อความชิดซ้ายบน Desktop */
}

/* --- 10. Property Cards Grid (สำหรับหน้าแสดงอสังหาริมทรัพย์) --- */
#properties {
    padding: 80px 0;
    background-color: var(--light-bg);
}
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* ปรับ minmax */
    gap: 30px;
    margin-top: 50px;
}
.property-card {
    background-color: var(--white-bg);
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}
.property-card .property-image {
    width: 100%;
    height: 220px; /* เพิ่มความสูงรูปภาพ */
    object-fit: cover;
}
.property-card .property-content {
    padding: 20px;
}
.property-card .property-type {
    display: inline-block;
    background-color: var(--accent-color);
    color: #333;
    font-size: 0.8em;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.property-card h3 {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--primary-color);
}
.property-card .location {
    font-size: 0.9em;
    color: var(--secondary-text-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}
.property-card .location i {
    margin-right: 5px;
    color: var(--primary-color);
}
.property-card .price {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
}
.property-card .features {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: var(--secondary-text-color);
    margin-bottom: 15px;
}
.property-card .features span {
    display: flex;
    align-items: center;
}
.property-card .features i {
    margin-right: 4px;
    color: var(--primary-color);
}
.property-card .btn {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    font-size: 0.95em;
}

/* --- 11. Service Areas Grid --- */
.service-areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* ปรับ minmax ให้เหมาะสม */
    gap: 30px;
    margin-top: 50px;
}

.service-area-item {
    background-color: var(--white-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-area-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.service-area-item .service-area-image {
    width: 100%;
    height: 200px; /* ปรับความสูงรูปภาพ */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px; /* เพิ่มระยะห่าง */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.service-area-item h3 {
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-area-item p {
    font-size: 1em;
    color: var(--secondary-text-color);
    line-height: 1.7;
}

/* --- 12. Testimonials Section --- */
#testimonials {
    background-color: var(--dark-bg);
    color: var(--light-text-color);
    padding: 80px 0;
}
#testimonials h2 {
    color: var(--light-text-color);
}
#testimonials .section-description {
    color: rgba(255,255,255,0.8);
}
.testimonials-slider {
    max-width: 800px; /* เพิ่ม max-width */
    margin: 40px auto 0 auto;
    position: relative;
    overflow: hidden;
}
.testimonial-item {
    background-color: var(--white-bg);
    color: var(--text-color);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    margin: 0 15px;
    opacity: 0;
    transform: scale(0.95); /* ปรับ scale */
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.testimonial-item.slick-active {
    opacity: 1;
    transform: scale(1);
}
.testimonial-item p {
    font-style: italic;
    font-size: 1em; /* ปรับขนาด font */
    margin-bottom: 20px;
    line-height: 1.7;
}
.testimonial-item .client-info {
    display: flex;
    align-items: center;
    justify-content: center;
}
.testimonial-item .client-info img {
    width: 60px; /* ขนาดรูปโปรไฟล์ */
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 3px solid var(--primary-color);
}
.testimonial-item .client-info .client-name {
    font-weight: 700;
    font-size: 1.1em;
    color: var(--primary-color);
}
.testimonial-item .client-info .client-title {
    font-size: 0.85em;
    color: var(--secondary-text-color);
}
.testimonials-slider .slick-prev,
.testimonials-slider .slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    font-size: 2.5em;
    color: var(--primary-color);
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.testimonials-slider .slick-prev:hover,
.testimonials-slider .slick-next:hover {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}
.testimonials-slider .slick-prev {
    left: -50px;
}
.testimonials-slider .slick-next {
    right: -50px;
}
.testimonials-slider .slick-dots {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin-top: 30px;
}
.testimonials-slider .slick-dots li {
    margin: 0 5px;
}
.testimonials-slider .slick-dots button {
    font-size: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.testimonials-slider .slick-dots li.slick-active button {
    background-color: var(--primary-color);
}

/* --- 13. CTA Section --- */
.cta-section {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(to right, var(--primary-color), #0056b3);
    color: var(--light-text-color);
}
.cta-section h2 {
    color: var(--light-text-color);
    margin-bottom: 20px;
    font-size: 2.8em;
}
.cta-section p {
    font-size: 1.1em;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.9);
}

/* --- 14. Contact Section --- */
#contact {
    padding: 80px 0;
    background-color: var(--white-bg);
}
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.contact-info-item {
    text-align: center;
    padding: 25px;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}
.contact-info-item i {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.contact-info-item h3 {
    font-size: 1.4em;
    margin-bottom: 8px;
    color: var(--text-color);
}
.contact-info-item p {
    font-size: 0.95em;
    color: var(--secondary-text-color);
}
.contact-form {
    max-width: 700px;
    margin: 50px auto 0 auto;
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
}
.contact-form .form-group {
    margin-bottom: 20px;
}
.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box;
    font-family: var(--font-body);
}
.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}
.contact-form button {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.contact-form button:hover {
    background-color: #0056b3;
}
.contact-form .message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.95em;
}
.contact-form .message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.contact-form .message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- 15. Footer --- */
.main-footer {
    background-color: var(--dark-bg);
    color: var(--light-text-color);
    padding-top: 50px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 25px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo img {
    height: 80px; /* ปรับขนาดโลโก้ใน Footer ให้เหมาะสม */
    margin-bottom: 10px;
    margin-left: 0; /* ลบ margin-left ออกถ้าไม่ต้องการจัดซ้ายในคอลัมน์ */
}
.footer-col h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1em;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li {
    margin-bottom: 8px;
}
.footer-col ul li a, .footer-col address, .footer-col p {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.3s ease;
}
.footer-col ul li a:hover {
    color: var(--primary-color);
}
.footer-bottom-bar {
    text-align: center;
    padding: 15px 0;
    font-size: 0.8em;
    color: rgba(255,255,255,0.5);
}

/* --- 16. Utility Classes --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.py-1 { padding-top: 10px; padding-bottom: 10px; }
.py-2 { padding-top: 20px; padding-bottom: 20px; }
.py-3 { padding-top: 30px; padding-bottom: 30px; }


/* --- 17. Scroll to Top Button --- */
#scroll-to-top {
    display: none; /* Hidden by default */
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99;
    font-size: 1.8em;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 50%;
    box-shadow: var(--shadow-medium);
    transition: background-color 0.3s ease, transform 0.3s ease;
}
#scroll-to-top:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
}


/* --- 18. Responsive Design (ปรับปรุง Media Queries) --- */

/* For Tablets and smaller Desktops (max-width: 992px) */
@media (max-width: 992px) {
    body {
        font-size: 0.95em; /* ลดขนาด Font Base เล็กน้อยบน Tablet */
    }
    .container {
        padding: 0 15px; /* ปรับ padding บน Tablet */
    }
    .main-nav ul li {
        margin-left: 20px; /* ลดระยะห่าง Link Nav */
    }
    .main-nav ul li a {
        font-size: 1em; /* ปรับขนาด Font Link Nav */
    }

    .hero-content h1 {
        font-size: 3.2em; /* ลดขนาด Hero heading */
    }
    .hero-content p {
        font-size: 1.1em; /* ลดขนาด Hero paragraph */
    }

    h2 {
        font-size: 2.5em; /* ลดขนาด H2 */
    }
    .section-description {
        font-size: 1.1em;
        margin-bottom: 40px; /* ปรับ margin-bottom */
    }
    .section-padded {
        padding: 60px 0; /* ลด padding ส่วนต่างๆ */
    }

    .split-content {
        gap: 40px; /* ลด Gap ใน Split Content */
    }
    .split-image img {
        height: 380px; /* ลดความสูงรูปใน About */
    }
    .split-text h2 {
        font-size: 2.2em; /* ลดขนาด H2 ใน About */
    }
    .split-text p {
        font-size: 1em; /* ลดขนาด P ใน About */
    }

    .services-grid,
    .properties-grid,
    .why-choose-us-grid,
    .service-areas-grid,
    .contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* ปรับ minmax ให้เล็กลงเล็กน้อย */
        gap: 25px; /* ลด gap */
    }

    .testimonial-item {
        margin: 0 10px; /* ปรับ margin ของ Testimonial item */
    }
    .testimonials-slider .slick-prev { left: -30px; }
    .testimonials-slider .slick-next { right: -30px; }

    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* ปรับ footer grid */
    }
}

/* For Mobile Phones (max-width: 768px) - เดิมใช้ 767px แต่ปรับเป็น 768px ตามที่คุณใช้ */
@media (max-width: 768px) {
    body {
        padding-top: 70px; /* Adjusted padding for smaller header on mobile */
        font-size: 0.9em; /* ลดขนาด Font Base เล็กน้อยบนมือถือ */
    }
    .header-inner {
        padding: 8px 0; /* ลดความสูง Header บนมือถือ */
    }
    .logo img {
        height: 60px; /* ลดขนาดโลโก้บนมือถือ */
    }
    .main-nav {
        display: none; /* Hide desktop nav */
    }
    .menu-toggle {
        display: block; /* Show toggle button */
    }
    .mobile-nav ul li a {
        font-size: 1.8em; /* Adjusted mobile nav font size */
    }

    .hero-section {
        min-height: 70vh; /* ลดความสูง Hero Section บนมือถือ */
    }
    .hero-content h1 {
        font-size: 2.2em; /* ลดขนาด Hero heading สำหรับมือถือ */
        margin-bottom: 15px;
    }
    .hero-content p {
        font-size: 1em; /* ลดขนาด Hero paragraph สำหรับมือถือ */
        margin-bottom: 30px;
    }
    .hero-content .btn-primary {
        padding: 12px 25px; /* ปรับขนาดปุ่มบน Hero */
        font-size: 0.9em;
    }

    .section-padded {
        padding: 40px 0; /* ลด padding ทั่วไปบนมือถือ */
    }
    h2 {
        font-size: 2em; /* ลดขนาด H2 สำหรับมือถือ */
        margin-bottom: 15px;
    }
    .section-description {
        font-size: 1em;
        margin-bottom: 30px;
        padding: 0 15px; /* เพิ่ม padding ซ้ายขวาให้คำอธิบาย */
    }

    /* Services Section Specifics */
   

  
    
    #services h2 {
        font-size: 2em !important; /* ให้ใช้ขนาดนี้บนมือถือ */
    }
    .services-grid {
        grid-template-columns: 1fr; /* 1 คอลัมน์บนมือถือ */
        gap: 70px; /* ลด gap */
    }
    .service-item {
        max-width: 320px; /* จำกัดความกว้างสูงสุดของ service item บนมือถือ */
        margin: 0 auto; /* จัดกลาง */
        padding: 25px; /* ปรับ padding */
    }
    .service-item img {
        width: 70px; /* ปรับขนาด icon */
        height: 70px;
        margin-bottom: 15px;
    }
    .service-item h3 {
        font-size: 1.5em;
    }
    .service-item p {
        font-size: 0.9em;
    }

    /* About Section Specifics */
    .split-content {
        flex-direction: column; /* Stack columns on small screens */
        gap: 30px;
    }
    .split-text, .split-image {
        min-width: unset; /* Remove min-width to allow full width */
        width: 100%;
    }
    .split-text h2 {
        text-align: center; /* Center heading on small screens */
        font-size: 2em;
        margin-bottom: 15px;
    }
    .split-text p {
        text-align: center; /* Center paragraph on small screens */
        font-size: 0.95em;
    }
    .split-image img {
        height: 300px; /* ลดความสูงรูปภาพบนมือถือ */
        margin-top: 0; /* ลบ margin-top เดิมออก */
    }

    /* Why Choose Us & Service Areas Specifics */
    .why-choose-us-grid,
    .service-areas-grid,
    .properties-grid,
    .contact-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
        gap: 20px;
    }
    .why-choose-item,
    .service-area-item,
    .property-card,
    .contact-info-item {
        max-width: 320px; /* จำกัดความกว้างสูงสุดของ single column items */
        margin: 0 auto; /* จัดกลาง */
        padding: 25px; /* ปรับ padding */
    }
    .why-choose-item h3 {
        font-size: 1.6em;
        margin-bottom: 10px;
    }
    .why-choose-item p {
        font-size: 1em;
    }
    .icon-large {
        font-size: 3em; /* ลดขนาด icon-large บนมือถือ */
        margin-bottom: 15px;
    }

    /* Testimonials Section Specifics */
    .testimonials-slider .slick-prev,
    .testimonials-slider .slick-next {
        font-size: 2em;
        width: 35px;
        height: 35px;
        top: 50%; /* ปรับตำแหน่งปุ่ม Slider */
        transform: translateY(-50%);
        opacity: 0.8; /* ให้ปุ่มจางลงเล็กน้อย */
    }
    .testimonials-slider .slick-prev { left: 5px; } /* ชิดขอบมากขึ้น */
    .testimonials-slider .slick-next { right: 5px; } /* ชิดขอบมากขึ้น */
    .testimonial-item {
        padding: 20px; /* ลด padding */
        font-size: 0.9em;
    }
    .testimonial-item .client-info img {
        width: 50px;
        height: 50px;
    }

    /* Contact Form Specifics */
    .contact-form {
        margin: 30px auto 0 auto; /* ปรับ margin */
        padding: 25px;
    }
    .contact-form label {
        font-size: 0.95em;
    }
    .contact-form input, .contact-form textarea {
        padding: 10px;
        font-size: 0.9em;
    }
    .contact-form button {
        padding: 12px;
        font-size: 1em;
    }

    /* Footer Specifics */
    .footer-grid {
        grid-template-columns: 1fr; /* Stack footer columns on mobile */
        gap: 20px; /* ลด gap */
        text-align: center; /* จัดกลางข้อความใน footer */
    }
    .footer-col {
        margin-bottom: 20px;
    }
    .footer-col:last-child {
        margin-bottom: 0;
    }
    .footer-logo img {
        max-width: 100px; /* จำกัดขนาดโลโก้ใน footer */
        margin: 0 auto 15px auto; /* จัดกลาง */
        display: block;
    }
    .footer-col address,
    .footer-col p,
    .footer-col ul {
        text-align: center;
    }
    .footer-col ul {
        padding-left: 0;
    }
    #services {
    background-image: url('../images/villa-2186912_1280.jpg');
    background-position: center 40%; /* ลองปรับค่า 30% นี้ */
    }
}