/* ลบขอบขาวรอบๆ หน้าเว็บ เพื่อให้ Navbar ชิดขอบบนสุด 100% */
body {
    margin: 0;
    padding: 0;
}

.navbar {
    background-color: #080203; /* สีพื้นหลังดำ */
    min-height: 80px; 
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%; 
    color: rgb(246, 247, 250);
    
    /* 1. เปลี่ยนจาก sticky เป็น relative เพื่อไม่ให้วิ่งตามตอนเลื่อนจอ */
    position: relative; 
    
    /* 2. เอา top: 20px; ออกไป เพื่อไม่ให้มีช่องว่างด้านบน */
    
    z-index: 1000;
}

.logo-section {
    display: flex;
    align-items: center;
    margin-left: 60px; 
    gap: 20px;
}

.logo-section span {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0px; 
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 17px;
    font-weight: 500;
    padding: 10px 15px;
    transition: 0.3s;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

@media (max-width: 768px) {
    .navbar {
        height: auto;
        padding: 15px 20px;
        flex-direction: row; 
    }

    .nav-links {
        display: none; 
    }

    .logo-section {
        margin-left: 0; 
    }

    .logo-section img {
        width: 60px; 
    }
}

/* แชท */
.kp-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chat-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); 
    transform-origin: bottom right;
}

.chat-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none !important;
    color: white !important;
    font-weight: bold;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s ease;
}

.menu-item:hover {
    transform: scale(1.05); 
}

.menu-item img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    background: white;
    border-radius: 50%;
    padding: 2px;
}

.fb-item { background-color: #0084ff; }
.line-item { background-color: #00B900; }

.chat-toggle-btn {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: translateY(-5px); 
}

.cartoon-img {
    width: 75px;  
    height: 75px; 
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    border: 3px solid #fff; 
    background-color: #fff; 
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff3b30;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}


/* --- แก้ปัญหาการ์ดขาด/โดนตัดขอบล่างในมือถือ --- */
        .slider-outer-container, 
        .company-section {
            height: auto !important; /* ปลดล็อกความสูง ให้กล่องยืดตามเนื้อหาอัตโนมัติ */
            min-height: 100% !important;
        }

        .card-slider-container {
            height: auto !important;
            padding-bottom: 25px !important; /* เพิ่มพื้นที่ว่างด้านล่าง ป้องกันขอบและเงาของการ์ดโดนตัด */
            overflow: hidden !important; 
        }

        .company-card {
            height: auto !important; /* ให้การ์ดปรับความสูงตามรูปและข้อความด้านใน */
            display: flex !important;
            flex-direction: column !important; /* จัดเรียงรูปไว้บน ข้อความไว้ล่าง */
            justify-content: space-between;
        }

        .card-image {
            flex-grow: 1; /* ให้กล่องรูปภาพขยายเต็มพื้นที่ที่เหลือ */
        }