

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    /* 🟢 เปลี่ยนจาก Prompt เป็น Kanit และใส่ !important เพื่อบังคับใช้ */
    font-family: 'Kanit', sans-serif !important; 
}

/* 🚀 ล็อกคอหน้าเว็บไม่ให้ถ่างออกด้านข้างเด็ดขาด */
html, body { 
    background-color: white; 
    font-size: 18px; 
    line-height: 1.6; 
    color: #333; 
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important; /* ซ่อนสิ่งที่ล้นจอทั้งหมด */
    position: relative;
}

/* =========================================
   2. HEADER (Desktop & Mobile)
   ========================================= */
.main-header {
    display: flex; justify-content: space-between; align-items: center; padding: 15px 40px;
    background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); 
    position: fixed; top: 25px; left: 0; right: 0; margin: 0 auto; width: 90%; max-width: 1200px;
    border-radius: 50px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); z-index: 999; 
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1); /* เอฟเฟกต์ยืดหดแบบสมูท */
    overflow: hidden; /* 🚀 ป้องกันเนื้อหาทะลุตอนโดนบีบ */
}
.logo { flex-shrink: 0; } /* ล็อกไม่ให้โลโก้เบี้ยว */
.logo img { height: 45px; display: block; transition: all 0.4s ease; }

/* 🚀 เอฟเฟกต์ Smart Nav สำหรับจอคอม (หดเป็นแถบเล็ก + โฮเวอร์เพื่อกางออก) */
@media (min-width: 769px) {
    .main-header.scrolled { 
        width: 130px; /* บีบกรอบเหลือแค่ก้อนเล็กๆ พอดีโลโก้ */
        top: 15px; 
        padding: 10px 20px;
        background-color: rgba(255, 255, 255, 0.65); /* ทำให้โปร่งใสขึ้นจะได้ไม่บังเนื้อหาเว็บ */
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        cursor: pointer; /* เมาส์เปลี่ยนเป็นรูปมือให้รู้ว่าชี้ได้ */
    }
    
    .main-header.scrolled .logo img {
        height: 35px; /* ย่อขนาดโลโก้ลงนิดนึง */
        margin: 0 auto;
    }
    
    .main-header.scrolled .nav-bar {
        opacity: 0;
        visibility: hidden;
        transform: translateX(30px);
        transition: all 0.2s ease; /* ซ่อนเมนูอย่างรวดเร็ว */
    }

    /* 🚀 เมื่อเอาเมาส์ชี้ที่แถบเล็กๆ (ให้กางสไลด์ออกมา) */
    .main-header.scrolled:hover {
        width: 85%; /* กางกลับมาเกือบเต็มจอ */
        max-width: 1200px;
        background-color: rgba(255, 255, 255, 0.98); /* คืนสีพื้นหลังกลับมาทึบ */
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        padding: 15px 40px; /* คืนความหนาของกรอบ */
        cursor: default;
    }
    
    .main-header.scrolled:hover .logo img {
        height: 45px; /* คืนขนาดโลโก้กลับมา */
    }
    
    .main-header.scrolled:hover .nav-bar {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
        transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1) 0.15s; /* 🚀 ดีเลย์ 0.15 วิ รอกรอบกางเสร็จก่อนแล้วเมนูค่อยโชว์ */
    }
}

/* =========================================
   🍔 HAMBURGER MENU (ปุ่ม 3 ขีด สำหรับมือถือ)
   ========================================= */
.hamburger-menu {
    display: none; 
    flex-direction: column; justify-content: space-between;
    width: 28px; height: 20px; cursor: pointer; z-index: 1001;
}
.hamburger-menu span {
    display: block; width: 100%; height: 3px; background-color: #111111;
    border-radius: 3px; transition: all 0.3s cubic-bezier(0.77, 0, 0.175, 1);
}

/* =========================================
   🚀 HORIZONTAL SCROLL MENU
   ========================================= */
.nav-bar { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; max-width: 80%; white-space: nowrap; }
.nav-arrow {
    background-color: #ffffff; border: 1px solid #eaeaea; border-radius: 50%;
    width: 36px; height: 36px; font-size: 14px; color: #555555; cursor: pointer; display: flex; 
    align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0,0,0,0.05); transition: all 0.3s ease; flex-shrink: 0; 
}
.nav-arrow:hover { background-color: #f5a623; color: #ffffff; border-color: #f5a623; transform: scale(1.1); }
.nav-scroll-container {
    flex: 1; max-width: calc(100% - 90px); overflow-x: auto; scroll-behavior: smooth;
    -ms-overflow-style: none; scrollbar-width: none; display: flex;
    mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
}
.nav-scroll-container::-webkit-scrollbar { display: none; }
.nav-scroll-container ul { list-style: none; display: flex; align-items: center; gap: 12px; width: max-content; padding: 0 20px; }
.nav-scroll-container ul li a {
    display: inline-block; padding: 8px 20px; background-color: #f4f8fb; color: #555555; border-radius: 30px; 
    font-size: 15px; font-weight: 500; text-decoration: none !important; white-space: nowrap; transition: all 0.3s ease; border: 1px solid transparent;
}
.nav-scroll-container ul li a:hover { background-color: #ffffff; color: #f5a623; border-color: #f5a623; box-shadow: 0 4px 10px rgba(245, 166, 35, 0.15); }
.nav-scroll-container ul li a.active-menu { background-color: #f5a623 !important; color: #ffffff !important; border-color: #f5a623 !important; box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3); }

/* =========================================
   ✨ Shared Intro Card (รูปไอคอนบริการเก่า)
   ========================================= */
.intro-card-shared {
    max-width: 1000px; margin: 0 auto; background: #ffffff; border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08); padding: 30px; border: 1px solid rgba(0,0,0,0.05); text-align: center;
}
.intro-img-shared { max-width: 100%; height: auto; border-radius: 10px; }

/* =========================================
   3. FOOTER
   ========================================= */
.site-footer {
    background-color: #ffffff; background-image: radial-gradient(#e5e7eb 2px, transparent 2px); background-size: 30px 30px;
    padding: 60px 5% 20px; border-top: 1px solid #eaeaea; margin-top: 50px;
}
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
.footer-col-contact { flex: 1 1 400px; }
.footer-col-links { flex: 1 1 200px; }
.footer-logo { height: 50px; margin-bottom: 25px; }
.contact-list { list-style: none; margin-bottom: 25px; }
.contact-list li { font-size: 16px; color: #555555; margin-bottom: 12px; display: flex; gap: 10px; }
.social-links { display: flex; gap: 15px; }
.social-links a { display: flex; justify-content: center; align-items: center; width: 45px; height: 45px; background-color: #f8f9fa; border-radius: 8px; border: 1px solid #eaeaea; }
.social-links a img { width: 22px; transition: 0.3s; }
.social-links a:hover { background-color: #f5a623; }
.social-links a:hover img { filter: brightness(0) invert(1); }
.footer-heading { font-size: 22px; font-weight: 700; margin-bottom: 25px; position: relative; padding-bottom: 10px; }
.footer-heading::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 4px; background-color: #f5a623; }
.footer-menu { list-style: none; }
.footer-menu li { margin-bottom: 15px; }
.footer-menu a { text-decoration: none; color: #555555; transition: 0.3s; }
.footer-menu a:hover { color: #f5a623; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #eaeaea; color: #999999; font-size: 14px; }

/* =========================================
   📱 RESPONSIVE HEADER & MOBILE SIDEBAR
   ========================================= */
@media (max-width: 768px) {
    .main-header {
        position: fixed !important; 
        /* 🚀 เปลี่ยนจากกำหนด width 90% เป็นการขึงซ้าย-ขวาแทน รับรองไม่มีล้นจอ */
        left: 10px !important; 
        right: 10px !important; 
        width: auto !important; 
        
        height: 70px; top: 15px; padding: 0 20px; border-radius: 35px;
        overflow: visible !important; 
    }
    /* (โค้ดส่วนอื่นด้านล่างในหมวดนี้ ปล่อยไว้เหมือนเดิมครับ) */
    .hamburger-menu { display: flex; }
    .nav-bar {
        position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; background-color: #ffffff;
        box-shadow: -10px 0 30px rgba(0,0,0,0.15); display: flex; flex-direction: column; justify-content: flex-start;
        align-items: center; transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1); z-index: 1000;
        padding-top: 100px; padding-bottom: 40px; max-width: 100%;
    }
    .nav-arrow { display: none; } 
    .nav-scroll-container { width: 100%; height: 100%; max-width: 100%; overflow-y: auto; overflow-x: hidden; -ms-overflow-style: none; scrollbar-width: none; mask-image: none; -webkit-mask-image: none; }
    .nav-scroll-container ul { flex-direction: column; gap: 15px; width: 100%; align-items: center; }
    .nav-scroll-container ul li { width: 100%; padding: 0 20px; }
    .nav-scroll-container ul li a { display: block; text-align: center; padding: 12px 20px; font-size: 16px; width: 100%; }
    .nav-bar.active { right: 0; }
    .hamburger-menu.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger-menu.active span:nth-child(2) { opacity: 0; }
    .hamburger-menu.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    
    .footer-container { flex-direction: column; }
    .intro-card-shared { padding: 15px; } 
}