/* --- Global Reset & Body --- */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #000000;
}
a {
    color: inherit; /* ให้ลิงก์มีสีเดียวกับข้อความปกติ */
    text-decoration: none; /* ลบเส้นใต้ลิงก์ */
}
/* --- Contact Section --- */
.contact-section {
    background-color: #000000;
    color: #ffffff;
    padding: 60px 40px;
    margin-top: 4%;
}

/* --- Containers --- */
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Header (Details + Title) --- */
.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; 
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

/* --- Contact Details (Left Side) --- */
.contact-details {
    flex-basis: 50%; 
    min-width: 300px;
}

/* --- แก้ไขคลาสนี้ --- */
.contact-details h3 {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 0;
    margin-bottom: 0px;

    /* --- ส่วนที่ถูกต้องแล้ว --- */
    position: relative;
    display: inline-block; /* เพื่อให้เส้นอ้างอิงความกว้างตามข้อความ */
    padding-bottom: 12px;  /* เว้นระยะห่างระหว่างตัวหนังสือกับเส้น */
}

/* --- เพิ่มคลาสนี้เข้าไปใหม่ทั้งหมด --- */
.contact-details h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    
    /* --- ปรับความยาวของเส้นตรงนี้ --- */
    width: 50px; /* หรือใส่เป็น % เช่น 10% หรือ 100% ถ้าอยากได้ยาวเท่าข้อความ */
    
    /* --- ! สำคัญ: ต้องใส่ความหนาของเส้นด้วย --- */
    height: 3px; 
    
    /* --- สีของเส้น (ตรวจสอบว่าพื้นหลังเว็บไม่ใช่สีขาวนะ ไม่งั้นจะมองไม่เห็น) --- */
    background-color: #ffffff; 
}

.contact-details p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #e0e0e0; 
    max-width: 450px;
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info li {
    display: flex;
    align-items: center;
    font-size: 1rem;
    margin-bottom: 12px;
}

.contact-info li i {
    width: 10px;
    margin-right: 12px;
    color: #cccccc;
}

/* --- สไตล์สำหรับเส้นใต้ li ของอีเมล --- */
.contact-info li.contact-email {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding-bottom: 12px;
}

.contact-info li.contact-email::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 20%;
    height: 2px;
    background-color: #ffffff;
}

/* --- Contact Title (Right Side) --- */
.contact-title {
    flex-basis: 40%;
    text-align: right;
    min-width: 200px;
}

.contact-title h2 {
    font-family: 'Anton', sans-serif;
    font-size: 5rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin: 0;
    line-height: 1.1;

    /* --- เพิ่ม/แก้ไขส่วนนี้ --- */
    position: relative;
    display: inline-block;
    padding-bottom: 20px;
}

/* --- เพิ่มคลาสนี้เข้าไปใหม่ทั้งหมด --- */
.contact-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50%;
    height: 2px;
    background-color: #ffffff;
}

/* --- Map --- */
.map-container {
    flex: 1;
    width: auto;
    margin-bottom: 0;
    min-height: 450px;
    display: flex;
    margin-top: 100px; /* ปรับตัวเลขนี้ตามความต้องการ (เช่น 30px, 50px, 80px) */
}

.map-container iframe {
    border-radius: 12px;
    border: 0;
    width: 100%;
    height: 450px;
}

/* --- Footer --- */
.contact-footer {
    border-top: 1px solid #333;
    width: 100%;
    padding-top: 25px;
    margin: 20px auto;
}

.footer-container {
    max-width: 1200px;
    margin: 0 0% 25px ;
    font-size: 0.85rem;
    color: #888;
}

/* --- Mobile Responsive Styles --- */
/* เพิ่ม CSS นี้ต่อท้ายไฟล์ CSS เดิมของคุณ */

@media (max-width: 768px) {

    /* --- Contact Section --- */
    .contact-section {
        padding: 40px 20px; /* ลด padding ซ้ายขวาสำหรับมือถือ */
        margin-top: 8%;
    }

    /* --- Header (Details + Title) --- */
    .contact-header {
        flex-direction: column-reverse; /* สลับลำดับ ให้ Title ("CONTACT") อยู่บน */
        align-items: flex-start; /* จัดทุกอย่างชิดซ้าย */
        gap: 30px; /* ปรับระยะห่างระหว่าง Title กับ Details */
        margin-bottom: 30px;
    }

    /* --- Contact Details (Left Side) --- */
    .contact-details {
        flex-basis: 100%; /* ทำให้เต็มความกว้าง */
        min-width: unset; /* ลบความกว้างขั้นต่ำ */
    }

    .contact-details p {
        max-width: 100%; /* ให้ text เต็มความกว้างได้ */
    }

    /* --- Contact Title (Right Side) --- */
    .contact-title {
        flex-basis: 100%; /* ทำให้เต็มความกว้าง */
        text-align: left; /* จัดข้อความ "CONTACT" ชิดซ้าย */
        min-width: unset; /* ลบความกว้างขั้นต่ำ */
    }

    .contact-title h2 {
        font-size: 3.5rem; /* ลดขนาด font ของ "CONTACT" */
        letter-spacing: 0.05em; /* ลดระยะห่างตัวอักษรเล็กน้อย (ถ้าต้องการ) */
    }

    /* --- Map --- */
    /* .map-container {
        margin-bottom: 30px;
    } */
    
    .map-container iframe {
        height: 350px; /* ลดความสูงของแผนที่ */
    }

    /* --- Footer --- */
    .contact-footer {
        width: 90%; /* ขยายความกว้าง footer ให้เกือบเต็ม */
    }

    .footer-container {
        text-align: center; /* จัดข้อความ footer ให้อยู่ตรงกลาง */
        margin: 0 auto 25px;
    }
}

/* คอนเทนเนอร์ใหม่ที่ครอบฟอร์มและแผนที่ */
.contact-content-row {
    display: flex;
    justify-content: space-between; /* ดันให้ห่างกัน */
    align-items: stretch; /* ดึงให้ความสูงของแผนที่เท่ากับฟอร์ม */
    gap: 40px; /* ระยะห่างระหว่างฟอร์มกับแผนที่ */
    margin-bottom: 50px;
}


/* Container สำหรับฟอร์ม */
.form-wrapper {
    /* ลบ properties เดิมออก */
    /* display: flex; */
    /* justify-content: center; */
    /* padding: 50px 20px; */
    /* min-height: 100vh; */
    
    /* ใส่ properties ใหม่ */
    flex: 1; /* ให้ยืดพื้นที่ได้ 1 ส่วน */
    max-width: 600px; /* ความกว้างสูงสุดของฟอร์ม */
    padding: 0; /* ลบ padding รอบนอกออก */
    background-color: transparent; /* ให้พื้นหลังโปร่งใส */
}

.contact-form-card {
    background: #000000;
    padding: 20px 0; /* ปรับ padding ด้านในให้พอดี */
    width: 100%;
    max-width: 100%; /* ให้เต็ม wrapper */
    box-shadow: none;
}

/* Input Fields */
.input-group {
    margin-bottom: 25px; /* เพิ่มระยะห่างระหว่างช่อง */
    text-align: left;
}

.input-group label {
    display: block;
    /*font-weight: bold;*/
    margin-bottom: 10px;
    color: #ffffff; /* เปลี่ยนตัวหนังสือหัวข้อเป็นสีขาว */
    font-size: 18px;
}

/* เอาสีดอกจันออก หรือถ้าจะใส่ให้ใช้สีขาว */
.input-group label span {
    color: #fff; 
}

.input-group input, 
.input-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 12px; /* ความมนของขอบ */
    background-color: #ffffff; /* ช่องกรอกสีขาว */
    color: #000;
    font-size: 16px;
    box-sizing: border-box;
    font-family: inherit;
}

/* จัดการ Placeholder (ข้อความจางๆ ในช่อง) */
::placeholder {
    color: #999;
    opacity: 1; 
}

/* Container ปุ่ม เพื่อจัดกึ่งกลาง (ถ้าต้องการ) */
.button-container {
    margin-top: 40px;
    text-align: center;
}

/* ปุ่มส่งข้อมูล สไตล์ใหม่ */
.request-btn {
    background-color: #000000; /* พื้นหลังดำ */
    color: #ffffff; /* ตัวหนังสือขาว */
    padding: 15px 75px;
    border: 1px solid #ffffff; /* ขอบเส้นสีขาว */
    border-radius: 15px; /* ขอบมนแบบแคปซูล */
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px; /* ความกว้างขั้นต่ำของปุ่ม */
}

.request-btn:hover {
    background-color: #ffffff;
    color: #000000;
}

/* .map-container iframe {
    border-radius: 12px;
    border: 0;
    width: 100%;
    height: 100% !important; 
    object-fit: cover;
} */

/* ================= เพิ่ม Responsive สำหรับมือถือ ================= */
/* เพิ่มเข้าไปใน @media (max-width: 768px) { ... } ที่มีอยู่เดิม */

@media (max-width: 768px) {
    /* ... CSS เดิมใน media query ... */

    /* เพิ่มส่วนนี้เข้าไป */
    .contact-content-row {
        flex-direction: column; /* เปลี่ยนกลับมาเรียงแนวตั้งในมือถือ */
        gap: 30px;
    }

    .form-wrapper, 
    .map-container {
        max-width: 100%; /* ให้เต็มความกว้างในมือถือ */
        flex: auto;
    }
    
    .map-container {
         height: 400px; 
         
         /* --- เพิ่มบรรทัดนี้ลงไปในส่วน Media Query ของ map-container --- */
         margin-top: 0; /* ลบระยะห่างด้านบนเมื่อดูในมือถือ */
    }
}