@import url('https://fonts.googleapis.com/css2?family=Athiti:wght@200;300;400;500;600;700&display=swap');

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

html, body {
    font-family: "Athiti", sans-serif;
    height: 100%;
    width: 100%;
}

.background-boby{
    background: rgb(161, 118, 82);
    background: linear-gradient(16deg, rgb(216, 171, 134) 0%, rgba(237, 233, 211, 1) 94%);
}

/* header */
.banner {
    width: 100%;
    height: 100vh;
    /* ปรับความสูงตามที่ต้องการ */
    background-size: cover;
    background-position: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.40), rgba(0, 0, 0, 0.40));
}

.logo {
    width: 100px;
    margin-top: -10px;
    cursor: pointer;
}

.navbar {
    width: 70%;
    height: 110px;
    padding: 20px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(73, 72, 72, 0.5);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    position: relative;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 15px;
    transition: transform 0.3s ease-in-out;
}

.nav-list li {
    position: relative;
    padding: 20px;
}

.nav-list a {
    text-decoration: none;
    color: #fff;
    transition: color 0.3s;
}

.navbar ul li a:hover {
    background: rgb(109, 109, 109);
    transition: 0.3s;
    color: black;
}

.banner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Dropdown Menu */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    /* จัด dropdown ให้ติดกับเมนูหลัก */
    left: 0;
    background-color: #474747;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.nav-menu-btn {
    display: none;
}

.nav-close-btn {
    display: none;
    position: absolute;
    top: 20px; /* ปรับตามตำแหน่งที่ต้องการ */
    right: 20px;
    font-size: 18px;
    color: #fff;
    z-index: 2001;
    background: none;
    border: none;
    cursor: pointer;
}

#languageSwitcher {
    background: transparent;
    color: #f8f6f6;
    border: none;
}


/* Mobile Styles - ปรับเมนูให้ชัดเจน */
@media screen and (max-width: 1049px) {

    html, body {
        font-family: "Athiti", sans-serif;
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        /* จัดให้เนื้อหาเริ่มต้นจากด้านซ้าย */
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 50%;
        background-color: rgba(0, 0, 0, 0.9);
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
        padding: 60px 20px 20px 20px;
        /* เพิ่ม padding เพื่อขยับเนื้อหาด้านบนลงมา */
        overflow-y: auto;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
        z-index: 2000;
    }

    .nav-list.active {
        transform: translateX(0);
        /* margin-top: 40[px]; */
        padding-top: 70px;
    }

    .nav-list li {
        margin: 0px 0;
        /* เพิ่มระยะห่างระหว่างรายการเมนู */
        width: 100%;
        list-style: none;
    }

    #languageSwitcher {
        margin-left: 18px;
        font-size: 15px;
        padding: 10px;
        border: 1px solid #ffffff;
    }

    .nav-list a {

        text-decoration: none;
        color: #fff;
        font-size: 1em;
        /* ปรับขนาดฟอนต์ให้ใหญ่ขึ้นเล็กน้อย */
        padding: 0px 0;
        /* เพิ่ม padding บนและล่างเพื่อให้ดูเด่นชัด */
        /* margin-top: 60px; */

        transition: background-color 0.3s, color 0.3s;
        width: 100%;
        /* ให้ครอบคลุมความกว้างของเมนู */
    }

    .nav-menu-btn {
        font-family: "Athiti", sans-serif;
        display: block;
        font-size: 18px;
        /* Adjust font size as needed */
        color: #fff;
        /* White text */
        background: none;
        /* Remove background color */
        border: none;
        /* Remove border */
        cursor: pointer;
        /* Change cursor to pointer to indicate it's clickable */
        z-index: 2001;
        padding: 0;
        /* Remove any padding that may cause a larger clickable area */
        margin-right: 5%;
    }

    .nav-close-btn {
        display: none;
        position: absolute;
        /* top: 20px;
        right: -30px; */
        margin-right: 10%;
        font-size: 18px;
        /* Adjust font size as needed */
        color: #fff;
        z-index: 2001;
        background: none;
        /* Remove any background if applicable */
        border: none;
        /* Remove border */
        cursor: pointer;
        /* Change cursor to pointer */
    }

    .nav-list.active+.nav-close-btn {
        display: block;
    }

    .nav-menu-btn:hover,
    .nav-menu-btn:focus,
    .nav-menu-btn:active {
        background: none;
        /* Remove background on any interactive state */
        border: none;
        /* Remove border */
        outline: none;
        /* Remove any outline that may be causing a border effect */
    }

    .dropdown-content {
        display: none;
        position: absolute;
        top: 100%;
        /* จัด dropdown ให้ติดกับเมนูหลัก */
        left: 0;
        background-color: #474747;
        min-width: 160px;
        box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }
    
    .dropdown-content a {
        color: black;
        padding: 12px 16px;
        text-decoration: none;
        display: block;
        text-align: left;
    }
    
    .dropdown-content a:hover {
        background-color: #f1f1f1;
    }
    
    .dropdown:hover .dropdown-content {
        display: block;
    }
}
/* header */

.property-section {
    padding: 20px;
    background-color: #f5f5f5;
}

/* Property Grid */
.property-grid {
    padding: 40px 0;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.property-card {
    background-color: #e0e0e0;
    border-radius: 10px;
    text-align: center;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 280px;
    margin: 0 auto;
}

.property-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.property-info {
    padding-top: 10px;
    max-height: 100px;
    overflow: hidden;
}

.property-info:hover{
    transition: 0.3s;
    color: black;
    box-shadow: #333;
}

.image-placeholder {
    background-color: #d3d3d3;
    height: 200px;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    border-radius: 10px;
}

.property-info p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}

/* container */
.container-buy-rent {
    margin: auto;
    background-color: #9E7431;
    width: 50%;
    height: auto;
    padding-top: 40px;
    padding-bottom: 40px;
    border-radius: 10px;
    margin-top: -150px;
}

.toggle-container {
    margin: auto;
    background-color: rgb(255, 255, 255);
    display: flex;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    font-family: serif;
    width: 35%;
}

.toggle-button {
    padding: 10px 30px;
    width: 50%;
    font-size: 24px;
    border: none;
    outline: none;
    cursor: pointer;
    transition: color 0.3s;
    flex: 1;
    text-align: center;
    z-index: 1; /* Ensure buttons are on top of the sliding background */
    position: relative;
    font-family: "Athiti", sans-serif;
}

.toggle-button.buy {
    background-color: transparent; /* Transparent background to show the sliding effect */
    color: black;
}

.toggle-button.rent {
    background-color: transparent;
    color: black;
}

.toggle-button.active {
    color: white;
}

.toggle-button:hover {
    filter: brightness(90%);
}

.toggle-button:first-child {
    border-radius: 10px 0 0 10px;
}

.toggle-button:last-child {
    border-radius: 0 10px 10px 0;
}

/* The sliding background for the active button */
.toggle-background {
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #E28C13;
    transition: left 0.3s ease; /* Smooth slide transition */
    border-radius: 10px;
    z-index: 0;
}

.search-container {
    margin: auto;
    margin-top: 20px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    overflow: hidden;
    width: 70%;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-input {
    border: none;
    width: 100%;
    padding: 15px;
    flex-grow: 1;
    font-size: 16px;
    outline: none;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    background-color: white;
    transition: background-color 0.3s ease;
    font-family: "Athiti", sans-serif;
}

.search-btn {
    background-color: #E28C13;
    color: white;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 10px;
    outline: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-family: "Athiti", sans-serif;
}

.search-btn:hover {
    background-color: #c47911;
    transform: scale(1.05);
}

.search-btn:active {
    transform: scale(0.95);
}

.dropdown-container {
    display: flex;
    justify-content: center; /* จัดให้อยู่ตรงกลาง */
    align-items: center; /* จัดให้จัดแนวกลางในแนวตั้ง */
    gap: 20px; /* เว้นระยะห่างระหว่าง dropdowns */
    margin-top: 20px;
    flex-wrap: wrap; /* ทำให้ย่อขยายได้และจัดให้อยู่ในแถวหลายบรรทัดหากหน้าจอแคบ */
}

.custom-dropdown-box {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px 30px 10px 10px; /* Adjusted to leave space for arrow */
    font-size: 16px;
    font-family: Arial, sans-serif;
    width: 100%;
    max-width: 200px;
    box-sizing: border-box;
    cursor: pointer;
    background-image: none;
    color: #333;
    position: relative;
    transition: box-shadow 0.3s ease; /* Add smooth shadow transition */
    font-family: "Athiti", sans-serif;
}

.custom-dropdown-box.open {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Shadow effect when open */
}

.dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

#dropdown-arrow {
    position: absolute;
    top: 50%;
    right: 10px; /* Positioned inside the box */
    transform: translateY(-50%);
    font-size: 16px;
    color: #333;
    pointer-events: none;
    transition: transform 0.3s ease; /* Smooth arrow transition */

}

.custom-dropdown-box.open + #dropdown-arrow {
    transform: translateY(-50%) rotate(180deg); /* Rotate arrow when dropdown opens */
}

.fas {
    transition: transform 0.3s ease;
}

.price-input {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    max-width: 100px; /* เพิ่มขนาดสูงสุดเพื่อความเหมาะสม */
    flex: 1; /* ทำให้ input ยืดหยุ่นได้ */
    font-family: "Athiti", sans-serif;
}

/* สำหรับเบราว์เซอร์ Chrome, Safari, Edge, Opera */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Responsive layout */
@media screen and (max-width: 1200px) {
    .container-buy-rent {
        width: 70%;
        margin-top: -100px;
    }

    .toggle-container {
        width: 50%;
    }

    .search-container {
        width: 80%;
    }

    .dropdown-container {
        gap: 10px;
    }
}

@media screen and (max-width: 768px) {
    .container-buy-rent {
        width: 90%;
        margin-top: -150px;
        padding: 20px 0;
    }

    .toggle-container {
        width:  50%;
    }

    .search-container {
        width: 80%;
        margin-top: 10px;
    }

    .dropdown-container {
        flex-direction: flex;
        gap: 10px;
        width: 100%;
    }

    .custom-dropdown-box {
        max-width: 100%;
        width: 100%;
    }

    .min-max-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .price-input {
        width: 50%;
        max-width: none;
    }

    .search-btn {
        width: 50%;
    }
}

@media screen and (max-width: 480px) {
    .container-buy-rent {
        width: 90%;
        margin-top: -200px;
        padding: 20px;
        background-color: #9E7431;
    }

    .toggle-container {
        flex-direction: row; /* แสดงปุ่มในแถวเดียวกัน */
        width: 100%;
        justify-content: space-around; /* กระจายปุ่มให้ไม่ทับกัน */
    }

    .toggle-button {
        width: 45%; /* ลดความกว้างของปุ่ม */
        padding: 10px 0;
    }

    .search-container {
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }

    .search-input {
        width: 100%;
        margin-bottom: 10px; /* เพิ่มพื้นที่ระหว่าง input กับปุ่มค้นหา */
    }

    .dropdown-container {
        width: 100%;
        gap: 10px;
        flex-direction: column;
    }

    .min-max-container {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .price-input {
        width: 100%; /* ให้ input กว้างเต็มพื้นที่ */
        max-width: none;
    }

    .search-btn {
        width: 100%;
    }
}
/* container */


/* @media screen and (max-width: 320px) {
    .toggle-container {
        
        width: 80%;
    }

    .toggle-button.buy , .toggle-button.rent {
        font-size: 18px;
    }
    .search-container {
        width: 80%;
        height: 50px;
    }

    .min-max-container {
        width: 80%;
    }
} */

/* ---------------------------footer---------------------------------- */

.footer-box1 {
    width: 100%;
    background-color: #EDE9D3;
    color: #000000;
    padding: 40px 0 20px;
    font-size: 14px;
    line-height: 20px;
}

.row {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
}

.col {
    flex-basis: 100%;
    padding: 15px;
    /* width: 50px; */
    box-sizing: border-box;
}


.col:nth-child(2),
.col:nth-child(3) {
    flex-basis: 100%; /* Full width on smaller screens */
}


.-footer-logo {
    width: 70%;
    height: auto;
    max-width: 250px;
    margin: 0 auto 20px auto;
}


.col .Texth3 {
    width: fit-content;
    margin: 0 auto 15px auto;
    position: relative;
}


.email-id {
    width: fit-content;
    border-bottom: 1px solid #000000;
    margin: 20px 0;
}


.ul1 .li1 {
    list-style: none;
    margin-bottom: 10px;
}

.ul1 .li1 .a1 {
    text-decoration: none;
    color: #000000;
}

.form-box1 {
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #000000;
    margin-bottom: 20px;
}

.form-box1 .uil {
    font-size: 18px;
    margin-right: 5px;
}

.form-box1 .input-box1 {
    width: 65%;
    max-width: 250px;
    background: transparent;
    color: #030303;
    border: 0;
    outline: none;
    text-align: center;
    margin-bottom: 10px;
    font-family: "Athiti", sans-serif;
}

.form-box1 .button-box1 {
    background: transparent;
    border: 0;
    outline: none;
    cursor: pointer;
}

.form-box1 .button-box1 .uil {
    font-size: 18px;
    color: #000000;
}

.social-icons1 {
    text-align: center;
    margin-top: 15px;
}

.social-icons1 .uil,
.social-icons1 .fa-brands {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    font-size: 20px;
    color: #000;
    margin: 8px;
    cursor: pointer;
}

hr {
    width: 90%;
    border: 0;
    border-bottom: 1px solid #000000;
    margin: 15px auto;
}

.copyright {
    text-align: center;
    font-size: 12px;
    margin-top: 15px;
}


.underline {
    width: 100%;
    height: 5px;
    background: #000000;
    border-radius: 3px;
    position: absolute;
    top: 25px;
    left: 0;
    overflow: hidden;
}

.underline span {
    width: 15px;
    height: 100%;
    background: #fff;
    border-radius: 3px;
    position: absolute;
    top: 0;
    left: 10px;
    animation: moving 2s linear infinite;
}


.popup {
    display: none;
    /* ซ่อน popup โดยค่าเริ่มต้น */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Style for the popup content */
.popup-content {
    background-color: #A16922;
    /* สีน้ำตาล */
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 60%;
    border-radius: 10px;
    text-align: center;
    color: white;
}

/* Close button */
.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Popup image */
.popup-image img {
    position: absolute;
    width: 655px;
    left: 210px;
}

/* Popup text */
.popup-text p {
    margin: 70px 0;
    font-size: 20px;
}

/* Popup buttons */
.popup-buttons button {
    padding: 10px 20px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    background-color: #F7941D;
    color: white;
    cursor: pointer;
    font-size: 18px;
    font-family: "Athiti", sans-serif;
}

.popup-buttons button:hover {
    background-color: #E6831A;
}

.popupwechat {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}
.popupline{
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}
@keyframes moving {
    0% {
        left: -20px;
    }

    100% {
        left: 100%;
    }
}

@media screen and (min-width: 480px) {
    .col {
        flex-basis: 45%;
    }

    .col:nth-child(2),
    .col:nth-child(3) {
        flex-basis: 45%;
    }

    .form-box1 .input-box1 {
        width: 70%;
        max-width: 250px;
    }
}

@media screen and (min-width: 768px) {
    .col {
        flex-basis: 45%; /* Adjust for larger screens */
    }

    .col:nth-child(2),
    .col:nth-child(3) {
        flex-basis: 20%; /* Adjust for the 'Links' and 'Newsletter' columns on larger screens */
    }

    .form-box1 .uil {
        font-size: 25px;
    }

    .form-box1 .button-box1 .uil {
        font-size: 25px;
    }
}


@media screen and (min-width: 1024px) {
    .col {
        flex-basis: 22%; /* Adjust for desktop */
    }

    .col:nth-child(2),
    .col:nth-child(3) {
        flex-basis: 15%;
    }
}

/* -----------------------------------------------------------------------------------------contact */


.container-info {
    margin: auto;
    background-color: #9e743152;
    width: 80%;
    height: auto;
    border-radius: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
    flex-direction: column; /* Ensures the content stacks vertically */
    display: flex; /* Ensures the content stacks vertically */
    min-height: 500px; /* Set a minimum height to visualize the vertical centering */
}

.container-info p {
    font-size: 20px;
    color: #000000;
    text-align: center;
    padding: 20px;
}