/* ==========================================================================
   1. DESKTOP MAIN NAVBAR (แถบเมนูหลัก)
   ========================================================================== */

.custom-navbar-wrapper {
    background: linear-gradient(180deg, #021329 0%, #052246 100%);
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 80px;
    display: flex;
    align-items: center;
    width: 100%;
}

.custom-navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1300px !important;
    margin: 0 auto !important;
    padding: 0;
}

.navbar-brand-logo img {
    height: 67px;
    width: auto;
    display: block;
    object-fit: contain;
}

.navbar-menu-actions-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.main-menu-links{
    display:flex;
    align-items:center;
    gap:24px;
    flex-wrap:nowrap;
}

.dropdown-menu-item{
    position:relative;
}

.dropdown-toggle{
    display:flex;
    align-items:center;
    gap:6px;
}

.dropdown-toggle::after{
    display:none !important;
}

.dropdown-content{
    position:absolute;
    top:100%;
    left:0;
    min-width:220px;

    background:#fff;
    border-radius:10px;
    padding:10px 0;

    box-shadow:0 10px 25px rgba(0,0,0,.15);

    opacity:0;
    visibility:hidden;
    transform:translateY(10px);

    transition:.25s;
    z-index:999;
}

.dropdown-content a{
    display:block;
    padding:10px 18px;
    white-space:nowrap;
    color:#222;
}

.dropdown-content a:hover{
    background:#f5f5f5;
}

.dropdown-menu-item:hover .dropdown-content{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
}

.menu-link-item {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 25px;
    font-weight: normal;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.menu-link-item:hover {
    color: #FBB801 !important;
}

.navbar-search-btn a {
    width: 45px;
    height: 45px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 140, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 140, 255, 0.25);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 18px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.navbar-search-btn:hover {
    background: rgba(0, 140, 255, 0.12);
    border-color: rgba(0, 140, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 140, 255, 0.25);
    transform: translateY(-2px);
}

.navbar-lang-dropdown {
    height: 45px;
    padding: 0 18px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 140, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 140, 255, 0.25);
    backdrop-filter: blur(10px);
    color: #ffffff;
    font-size: 18px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.navbar-lang-dropdown:hover {
    background: rgba(0, 140, 255, 0.12);
    border-color: rgba(0, 140, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 140, 255, 0.25);
    transform: translateY(-2px);
}

.btn-cta-yellow {
    background-color: #FBB801 !important;
    color: #000;
    font-size: 22px;
    font-weight: 500;
    height: 44px;
    padding: 0 12px;
    border-radius: 7px;
    text-decoration: none !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cta-yellow span {
    transform: translateY(3px);
}

.btn-cta-yellow:hover {
    background-color: #e5a900 !important;
}

.lang-current-toggle {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 22px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.lang-current-toggle::after {
    margin-top: -5px;
}

.lang-custom-menu {
    background-color: #052246 !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.lang-custom-menu .dropdown-item {
    color: #ffffff !important;
    font-size: 25px;
}

.lang-custom-menu .dropdown-item:hover {
    background-color: #FBB801 !important;
    color: #000000 !important;
}

.nav-divider {
    width: 1px;
    height: 40px;
    margin: 0 15px;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 8px rgba(77, 163, 255, 0.6);
}

/* ==========================================================================
   2. BURGER BAR BUTTON STYLE (ปุ่มเปิดเมนู)
   ========================================================================== */

.custom-burger-btn {
    display: none !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.custom-burger-btn:focus,
.custom-burger-btn:active,
.custom-burger-btn:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}


/* ==========================================================================
   3. MOBILE OFFCANVAS SIDEBAR (หน้าตาเมนูด้านข้างเวลากดบนมือถือ)
   ========================================================================== */

.custom-mobile-offcanvas {
    background-color: #031833 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 320px !important;
}

.custom-mobile-offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px;
}

.site-header-close {
    position: absolute;
    right: 10px;
    top: 10px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    padding: 5px;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list .nav-item {
    margin-bottom: 5px;
}

.mobile-nav-list .nav-link {
    color: #ffffff !important;
    display: flex;
    align-items: center;
    padding: 9px 6px !important;
    font-size: 24px;
    transition: background 0.2s;
}

.mobile-nav-list .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #FBB801 !important;
}

.nav-link-icon {
    display: inline-flex;
    margin-right: 12px;
    width: 20px;
    justify-content: center;
}

.nav-link-icon img {
    max-height: 50px;
    width: auto;
}

/* แถบเลือกภาษาบนมือถือด้านล่าง */
.mobile-nav-lang {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link-lang-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 22px;
}

.lang-divider {
    color: rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   Header Right Side(profile)
   ========================================================================== */

.header-right-side {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-menu-link {
    text-decoration: none;
    display: block;
}

.user-menu-link::after {
    display: none !important;
}

.user-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background-color: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    color: #ffffff;
    font-size: 22px;
    font-weight: 400;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-dropdown .dropdown-menu {
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 6px 0;
    min-width: 250px;
    background-color: #ffffff;
    margin-top: 10px !important;
}

.user-profile-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #333333;
    font-size: 25px;
    text-decoration: none;
}

.user-profile-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

.user-profile-dropdown .dropdown-item .icon {
    display: inline-flex;
    margin-right: 10px;
    width: 40px;
    height: 40px;
}

.user-profile-dropdown .dropdown-item .text-red {
    color: #dc3545;
    font-weight: 500;
}


/* ==========================================================================
   4. RESPONSIVE MEDIA QUERIES (จุดตัดหน้าจอเปลี่ยนเป็นมือถือ)
   ========================================================================== */

@media (max-width: 1180px) {
    .navbar-menu-actions-wrap {
        gap: 12px !important;
    }

    .main-menu-links {
        gap: 12px;
    }
}

@media (max-width: 1080px) {

    .navbar-brand-logo img {
        height: 60px;
        width: auto;
        display: block;
        object-fit: contain;
    }

    .navbar-menu-actions-wrap {
        gap: 10px !important;
    }

    .main-menu-links {
        gap: 9px;
    }
}

@media (max-width: 1024px) {

    .main-menu-links,
    .navbar-cta-wrap,
    .navbar-search-btn {
        display: none !important;
    }

    .navbar-lang-dropdown {
        display: none !important;
    }

    .custom-burger-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

@media (max-width: 991px) {

    /* ขยับระยะห่างบนแท็บเล็ต/มือถือให้แคบลง */
    .header-right-side {
        gap: 10px;
    }
}

@media (max-width: 767px) {
    .user-name {
        display: none;
    }

    .user-profile-dropdown .dropdown-menu-end {
        right: 0;
        left: auto;
        position: absolute;
    }
}

@media (max-width: 480px) {
    .custom-navbar-wrapper {
        padding: 10 15px !important;
    }
}