/* custom.css - รวมทุกสไตล์ไว้ที่นี่ (แทนที่ไฟล์ css เก่าทั้งหมด) */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600&display=swap');

:root {
    --primary-color: #2E8B57; /* SeaGreen - สีหลัก */
    --secondary-color: #20B2AA; /* LightSeaGreen */
    --accent-color: #FF8C00; /* DarkOrange - ปุ่ม */
    --text-dark: #333333;
    --bg-light: #f8f9fa;
}

body {
    font-family: 'Sarabun', sans-serif;
    background: linear-gradient(68deg, #eee, #8acaa6);
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- ส่วน Header & Search Form (แทน search_form.css) --- */
.hero-header {
    background: url(bg.jpg), linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0 80px 0; /* เพิ่ม padding ล่างเผื่อให้ search card ทับ */
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 50px;
}

.search-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-top: -60px; /* ดึงกล่องขึ้นไปทับ Header */
    position: relative;
    z-index: 10;
}

.btn-search {
    background-color: var(--accent-color);
    color: white;
    border-radius: 50px;
    padding: 10px 30px;
    border: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-search:hover {
    background-color: #e67e00;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 140, 0, 0.3);
}

/* --- ส่วน Result Table (แทน search_result.css) --- */
.custom-table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden; /* บังคับมุมโค้ง */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

/* ปรับแต่ง Table ของ Bootstrap เพิ่มเติม */
.table thead th {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px;
    font-weight: 500;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

.table tbody tr:hover {
    background-color: #f1f8f6; /* สีเขียวอ่อนมากๆ เวลาเมาส์ชี้ */
}

/* --- ส่วน Gallery (แก้ไขใหม่: ให้รูปภาพแสดงเต็ม ไม่ตัด) --- */
/* เราใช้ class .gallery-content แทนการบังคับ .lightbox img แบบเดิม เพื่อรองรับ HTML จาก DB */
.gallery-content img {
    max-width: 100%;       /* รูปไม่ล้นกรอบ */
    height: auto;          /* ความสูงอิสระ ไม่ตัดภาพ */
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: inline-block; /* จัดกลาง */
}

.gallery-content img:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* --- ส่วน Detail Card (สำหรับหน้า view.php) --- */
.detail-card {
    background: white;
    border-radius: 15px;    
    margin: 15px;
}

.detail-header {
    background: #009688;
    padding: 15px 20px;
    border-bottom: 1px solid #dcefe6;
    color: #ffffff;
    font-weight: 600;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}