/* =========================================
   1. RESET & CORE STYLES
========================================= */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', Tahoma, Thonburi, sans-serif; 
}

body { 
    background-color: #f9f9f9; 
    color: #333; 
    line-height: 1.6;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   2. HEADER & NAVIGATION (ใสในหน้าแรก / น้ำเงินในหน้าอื่น)
========================================= */
header { 
    position: absolute; /* ลอยทับรูปในหน้าแรก */
    width: 100%; 
    top: 0; 
    left: 0;
    z-index: 1000; 
    padding: 25px 50px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: transparent; 
    transition: 0.3s ease-in-out;
}

/* แก้ไขให้หน้าอื่นเมนูโปร่งใสและลอยทับรูปเหมือนหน้าแรก */
header.header-sub { 
    position: absolute; /* เปลี่ยนจาก relative เป็น absolute เพื่อให้ลอยทับรูป */
    background: transparent !important; /* บังคับให้โปร่งใส ไม่เอาสีน้ำเงิน */
    box-shadow: none !important; /* เอาเงาแถบออกให้คลีน */
    padding: 25px 50px; /* ปรับ Padding ให้เท่ากับหน้าแรก */
}
header .logo { 
    font-size: 28px; 
    font-weight: bold; 
    text-decoration: none; 
    color: white; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}
header .logo span { color: #C5A880; }

nav ul { 
    list-style: none !important; 
    display: flex !important; 
    gap: 20px; 
    margin: 0;
    padding: 0;
}

nav ul li a { 
    color: white; 
    text-decoration: none; 
    font-size: 15px; 
    font-weight: 500;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    transition: 0.3s; 
}
nav ul li a:hover { color: #C5A880; }

/* =========================================
   3. HERO & PAGE TITLES
========================================= */
/* Hero สำหรับหน้าแรก */
.hero { 
    background: linear-gradient(rgba(74, 64, 54, 0.4), rgba(74, 64, 54, 0.7)), 
                url('../images/Gemini_Generated_Image_7jb0hm7jb0hm7jb0.png') center/cover no-repeat;
    height: 650px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    text-align: center; 
    padding-top: 80px;
}

/* แถบหัวข้อสำหรับหน้าอื่นๆ (Mini Hero) */
.page-title-area {
    background: linear-gradient(rgba(74, 64, 54, 0.8), rgba(74, 64, 54, 0.9)), 
                url('../images/Gemini_Generated_Image_7jb0hm7jb0hm7jb0.png') center/center no-repeat;
    background-size: cover;
    padding: 100px 0 60px 0;
    text-align: center;
    color: white;
}

.hero h1, .page-title-area h1 { 
    font-size: 50px; 
    font-weight: bold;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}
/* ส่วนของ Slideshow Container */
.hero-slider {
    position: relative;
    width: 100%;
    height: 650px; /* ความสูงเท่าเดิมที่คุณชอบ */
    overflow: hidden;
    background-color: #000;
}

/* ตั้งค่ารูปภาพในสไลด์ */
.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0; /* ซ่อนไว้ก่อน */
    transition: opacity 1.5s ease-in-out; /* เอฟเฟกต์ค่อยๆ ปรากฏ */
    z-index: 1;
}

.hero-slider .slide.active {
    opacity: 1; /* แสดงรูปที่ active */
    z-index: 2;
}

/* ส่วนเนื้อหาที่ลอยบนสไลด์ */
.hero-content {
    position: relative;
    z-index: 10; /* ต้องสูงกว่า slide */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    text-align: center;
}

/* --- จุดสำคัญ: เมนูต้องกดได้ --- */
header {
    z-index: 1000 !important; /* สูงที่สุดเพื่อให้กดเมนูได้เสมอ */
}

header.header-sub {
    position: absolute; /* หรือ relative ตามดีไซน์หน้าอื่น */
    width: 100%;
    background: transparent;
}
.page-title-area p { color: #C5A880; font-weight: bold; margin-top: 10px; }

/* =========================================
   4. SEARCH BAR
========================================= */
.search-bar { 
    background: white; 
    padding: 15px; 
    border-radius: 8px; 
    display: flex; 
    gap: 10px; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 800px;
    margin-top: 30px;
}

.search-bar select, .search-bar input { 
    flex: 1; padding: 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 15px;
}

.search-bar button { 
    background: #C5A880; border: none; color: #4A4036; font-weight: bold; 
    cursor: pointer; padding: 12px 30px; border-radius: 4px; transition: 0.3s;
}
.search-bar button:hover { background: #e09e00; transform: translateY(-2px); }

/* =========================================
   5. PROPERTY CARDS & GRID
========================================= */
.property-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 25px; 
    margin: 40px 0;
}

.card { 
    background: white; border-radius: 12px; overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: 0.4s; position: relative;
}
.card:hover { transform: translateY(-10px); box-shadow: 0 12px 25px rgba(0,0,0,0.15); }

/* Gallery ในการ์ด */
.card-gallery { position: relative; width: 100%; height: 220px; overflow: hidden; background: #eee; }
.slide-link { display: none; width: 100%; height: 100%; }
.slide-link.active { display: block; }
.slide-img { width: 100%; height: 100%; object-fit: cover; }

/* Badges */
.badge-hot { position: absolute; top: 15px; left: 15px; background: #ff4757; color: white; padding: 5px 12px; border-radius: 4px; font-weight: bold; font-size: 12px; z-index: 10; }
.badge-new { position: absolute; top: 15px; right: 15px; background: #2ed573; color: white; padding: 5px 12px; border-radius: 4px; font-weight: bold; font-size: 12px; z-index: 10; }

/* เลื่อนรูปในการ์ด */
.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4); color: white; border: none;
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer; z-index: 20;
}
.prev-btn { left: 10px; } .next-btn { right: 10px; }
.image-counter { position: absolute; bottom: 10px; right: 10px; background: rgba(0, 0, 0, 0.6); color: white; padding: 3px 8px; border-radius: 12px; font-size: 12px; z-index: 20; }

/* เนื้อหาการ์ด */
.card-body { padding: 20px; }
.card-price-bar { margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.card-price { color: #C5A880; font-size: 24px; font-weight: bold; }
.gold-line { flex: 1; height: 1px; background: #eee; }
.card-title { font-size: 18px; margin-bottom: 10px; color: #4A4036; font-weight: bold; }
.card-details-main { font-size: 14px; color: #777; display: flex; justify-content: space-between; border-top: 1px solid #eee; padding-top: 15px; margin-top: 10px; }

.btn-detail-listing {
    display: block; text-align: center; background: #4A4036; color: white; padding: 12px; 
    text-decoration: none; border-radius: 6px; margin-top: 20px; font-weight: 600; transition: 0.3s;
}
.btn-detail-listing:hover { background: #004080; }

/* =========================================
   6. CONTACT & FORMS
========================================= */
.contact-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin: 40px 0; }
.contact-form-container, .contact-details { background: white; padding: 35px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px; margin-bottom: 20px; border: 1px solid #ddd; border-radius: 6px; }
.contact-form button { background: #4A4036; color: white; border: none; padding: 15px 30px; border-radius: 6px; font-weight: bold; cursor: pointer; width: 100%; }

/* =========================================
   7. FOOTER & COOKIE
========================================= */
footer { background: #1a1a1a; color: #aaa; text-align: center; padding: 50px 20px; margin-top: 80px; }
footer h3 { color: white; margin-bottom: 15px; }

.cookie-banner {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(74, 64, 54, 0.98); color: white;
    padding: 20px 40px; display: none; justify-content: space-between;
    align-items: center; z-index: 10000;
}
.btn-cookie-accept { background: #C5A880; color: #4A4036; border: none; padding: 10px 25px; border-radius: 4px; font-weight: bold; cursor: pointer; }

/* =========================================
   8. RESPONSIVE
========================================= */
@media (max-width: 992px) {
    header { padding: 20px; }
    .hero h1 { font-size: 38px; }
    .search-bar { flex-direction: column; }
}

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
    nav ul { display: none !important; } /* แนะนำให้ทำ Hamburger Menu ในอนาคต */
}
/* คอนเทนเนอร์ของจุดวงกลม */
.slider-dots {
    position: absolute;
    bottom: 30px; /* ระยะห่างจากด้านล่าง */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20; /* ให้อยู่เหนือรูป แต่ต่ำกว่าเมนูหลัก */
}

/* ลักษณะของจุดวงกลมปกติ */
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5); /* สีขาวจางๆ */
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

/* ลักษณะของจุดเมื่อเอาเมาส์ไปวาง */
.dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

/* ลักษณะของจุดที่กำลังแสดงผลอยู่ (Active) */
.dot.active {
    background-color: #C5A880; /* สีทองตามธีม PattayaPrime */
    width: 30px; /* ยืดออกให้ดูโมเดิร์น (Optional) */
    border-radius: 10px;
    transform: scale(1);
}
.btn-whatsapp { background: #25D366; color: white; }
    .btn-whatsapp:hover { background: #128C7E; color: white; }