/* ==========================================================================
   GLOBAL RESET & VARIABLES
   ========================================================================== */
:root {
    --primary-color: #d4af37; /* Gold */
    --secondary-color: #1a1a1a; /* Dark */
    --light-bg: #f9f9f9;
    --text-color: #333;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Arial Black', 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Segoe UI', 'sans-serif'; 
}

body { 
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
}

a {
    text-decoration: none;
} 

/* ==========================================================================
   HEADER STRUCTURE (ลดพื้นที่ว่างรอบกล่องหัวเว็บทั้งหมด)
   ========================================================================== */
header { 
    background-image: url('../img/headBG.png'); 
    background-size: cover;
    background-position: center;
    color: #fff;  
    text-align: center;
    padding: 8px 5% 4px 5%; /* 🎯 ลด padding บน-ล่าง ให้พื้นที่รวมแคบลงกระชับขึ้น */
    margin: 0;
    position: relative; 
    display: flex;  
    flex-direction: column; 
    justify-content: center; 
    align-items: center;
    z-index: 1; 
    width: 100%;
}

/* จัดกลุ่มโลโก้ให้อยู่กึ่งกลางแถวบนสุด และบีบระยะห่างด้านล่าง */
.logo-group {
    display: flex !important;
    flex-direction: row; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    flex-wrap: nowrap !important; 
    width: 100%;
    margin-bottom: 0px; /* 🎯 ลดมาร์จินด้านล่างเป็น 0 เพื่อให้เมนูวิ่งขึ้นมาชนชิด */
    padding-bottom: 0px;
}

.logo a {
    font-family: 'Arial Black','sans-serif';
    font-size: clamp(35px, 5vw, 60px); 
    font-weight: bold;
    text-transform: uppercase;
    margin: 0;
    background: linear-gradient(to bottom, #2e8b57 0%, #adff2f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(1px 1px 0px #000000) 
            drop-shadow(-1px -1px 0px #000000) 
            drop-shadow(1px -1px 0px #000000) 
            drop-shadow(-1px 1px 0px #000000)
            drop-shadow(0 0 5px rgba(255,255,255,0.9))
            drop-shadow(0 0 10px rgba(173,216,230,0.8));
    display: inline-block;
    line-height: 1.1; /* 🎯 บีบกรอบตัวอักษรโลโก้ให้ชิดขึ้น */
}

.van-img {
    max-height: 45px; 
    width: auto;
    display: inline-block;
}

/* ==========================================================================
   NAVIGATION MENU (ปรับระยะให้ดึงขึ้นมาเชื่อมต่อกับโลโก้ทันที)
   ========================================================================== */
nav {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: -2px; /* 🎯 ใช้ลบ margin เพื่อดึงแทบเมนูขึ้นไปสวมต่อท้ายโลโก้ให้ชิดที่สุด */
    padding-top: 0px;
    overflow-x: auto; 
    white-space: nowrap; 
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}

nav::-webkit-scrollbar {
    display: none;
}

nav ul { 
    display: flex; 
    flex-direction: row; 
    flex-wrap: nowrap !important; 
    justify-content: center;
    align-items: center;
    list-style: none; 
    padding: 0 10px;
    margin: 0;
}

nav ul li { 
    margin: 0 15px; 
    flex-shrink: 0; 
}

nav ul li a { 
    color: #000; 
    text-decoration: none;
    font-family: Courier New, sans-serif; 
    font-weight: bold;
    font-size: 14px; 
    transition: 0.3s; 
    display: inline-block;
    padding: 4px 0 2px 0; /* 🎯 ลด padding ด้านบนของตัวลิงก์ลง */
}

nav ul li a:hover { 
    color: var(--primary-color); 
}

/* ==========================================================================
   RESPONSIVE FOR MOBILE (ควบคุมระยะชิดบนหน้าจอมือถือ)
   ========================================================================== */
@media (max-width: 380px) {
    header {
        padding: 6px 0px 4px 0px !important; /* 🎯 บีบขอบหัวเว็บด้านบนลงอีกบนมือถือ */
    }

    .logo-group {
        margin-bottom: -2px !important; /* 🎯 ล็อกระยะให้ชนกันแน่นบนมือถือ */
    }

    nav {
        justify-content: flex-start; 
        padding: 0 15px; 
        margin-top: -4px !important; /* 🎯 ดึงเมนูขึ้นไปให้ชิดขึ้นอีกในจอเล็ก */
    }

    nav ul {
        justify-content: flex-start; 
        padding: 0;
    }

    nav ul li {
        margin: 0 10px !important; 
    }

    nav ul li a {
        font-size: 13px; 
        padding: 2px 0 !important; /* 🎯 ลดพื้นที่บวมของปุ่มเมนูในมือถือ */
    }
}
</style>