/* 1. นำเข้าฟอนต์ Sarabun (ฟอนต์เดียวกับหน้าติดต่อเราที่สวยกว่า) */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;700&display=swap');

:root {
    --forest-green: #1B4332; /* สีเขียวหลักของหอพัก */
    --leaf-green: #2D6A4F;
    --warm-white: #F8F9FA;
    --text-dark: #2D3436;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
/* แก้ไขจากเดิม ให้ยกเว้นคลาสที่ขึ้นต้นด้วย fa (ไอคอน) ไม่ให้โดนทับฟอนต์ */
*:not(i) { 
    font-family: 'Sarabun', sans-serif !important; 
}

/* บังคับให้ไอคอนใช้ฟอนต์ของมันเอง */
.fas, .fab, .fa-solid, .fa-brands {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900;
}

body {
    background-color: var(--warm-white);
    color: var(--text-dark);
    margin: 0;
    line-height: 1.6;
}

/* 3. ส่วน Header และการคุมขนาดโลโก้ (แก้ปัญหาโลโก้ล้นจอ) */
header { 
    background: white; 
    padding: 0 5%; 
    height: 80px; /* ล็อคความสูงแถบเมนูให้คงที่ */
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-section { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

/* บังคับขนาดโลโก้ให้เล็กลงและพอดีกับแถบเมนู */
.logo-section img { 
    height: 55px !important; /* ปรับขนาดให้พอดี ไม่ล้นเหมือนเดิม */
    width: auto !important;
    display: block;
    object-fit: contain;
}

.logo-section h1 { 
    font-size: 1.5rem; 
    color: var(--forest-green); 
    margin: 0;
    font-weight: 700;
}

/* 4. ส่วนเมนูนำทาง (Navigation) และขีดเส้นใต้ */
nav { display: flex; gap: 25px; }
nav a { 
    text-decoration: none; 
    color: #555; 
    font-size: 1rem; 
    transition: var(--transition); 
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
}
nav a:hover { color: var(--forest-green); }

/* ขีดเส้นใต้สำหรับหน้าที่กำลังเปิดอยู่ */
nav a.active { 
    color: var(--forest-green); 
    font-weight: bold; 
    border-bottom: 2px solid var(--forest-green); 
}

/* 5. เลย์เอาต์แบบการ์ดเนื้อหา (Content Card) */
.container { 
    max-width: 1200px; 
    margin: 40px auto; 
    padding: 0 20px; 
}

.content-card, .content-section, .contact-card {
    background: white;
    border-radius: 20px; /* ขอบมน 20px ตามหน้าติดต่อเรา */
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05); /* เงาฟุ้งสวยงาม */
    border: 1px solid rgba(27, 67, 50, 0.05);
    transition: var(--transition);
    margin-bottom: 30px;
}

/* หัวข้อที่มีเส้นขีดข้างสีเขียว */
.section-title {
    color: var(--forest-green);
    font-size: 2rem;
    border-left: 6px solid var(--forest-green);
    padding-left: 20px;
    margin-bottom: 30px;
    font-weight: 700;
}

/* 6. ปุ่มกดทรงแคปซูล */
.btn {
    background: var(--forest-green);
    color: white !important;
    padding: 12px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    border: none;
    transition: var(--transition);
}
.btn:hover {
    background: var(--leaf-green);
    transform: translateY(-2px);
}

/* 7. สำหรับ Slideshow */
.slideshow-container {
    width: 100%;
    height: 450px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.slideshow-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 8. การแสดงผลบนมือถือ (Responsive) */
@media (max-width: 768px) {
    header { 
        height: auto; 
        flex-direction: column; 
        padding: 15px; 
        gap: 15px; 
    }
    nav { gap: 15px; flex-wrap: wrap; justify-content: center; }
    .content-card { padding: 1.5rem; }
}