/* --------------------------------------------------------
   TOP UTILITY BAR
   -------------------------------------------------------- */
.top-utility-bar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 6px 0;
    font-size: 13px;
    transition: all 0.3s ease;
}
.utility-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.utility-services-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.utility-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}
.badge-wellness { background: #e6fffa; color: #0d9488; border: 1px solid #b2f5ea; }
.badge-wellness:hover { background: #0d9488; color: #ffffff; }
.badge-webboard { background: #fff5f7; color: #ff527b; border: 1px solid #ffe4e6; }
.badge-webboard:hover { background: #ff527b; color: #ffffff; }
.badge-market { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.opacity-disabled { opacity: 0.75; }
.badge-soon { font-size: 9px; background: #94a3b8; color: #fff; padding: 1px 5px; border-radius: 4px; }
.utility-right { color: #64748b; font-size: 12px; }

/* --------------------------------------------------------
   MAIN HEADER & ADAPTIVE STICKY NAV (DESKTOP)
   -------------------------------------------------------- */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.main-navigation {
    display: flex;
    align-items: center;
}

.nav-top-only {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-scrolled-only {
    display: none !important;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: #334155;
    cursor: pointer;
    padding: 5px;
}

/* --------------------------------------------------------
   MOBILE DRAWER (INDEPENDENT SIDEBAR)
   -------------------------------------------------------- */
.mobile-drawer-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: #ffffff !important;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 99999 !important;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
    box-sizing: border-box;
}

.mobile-drawer-menu.mobile-nav-open {
    left: 0 !important;
}

.mobile-drawer-inner {
    padding: 60px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-drawer-inner .nav-link {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-weight: 500;
    text-decoration: none;
    display: block;
}

.mobile-services-group {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-services-group .utility-badge-link {
    width: 100%;
    box-sizing: border-box;
    justify-content: center;
    padding: 10px;
}

/* --------------------------------------------------------
   DESKTOP STATE: WHEN SCROLLED DOWN (.is-scrolled)
   -------------------------------------------------------- */
@media (min-width: 992px) {
    .main-header.is-scrolled {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        padding: 2px 0;
    }

    .main-header.is-scrolled .nav-top-only {
        display: none !important;
    }

    .main-header.is-scrolled .nav-scrolled-only {
        display: flex !important;
        align-items: center;
        gap: 10px;
    }

    .nav-group-services {
        border-left: 1px solid #e2e8f0;
        padding-left: 12px;
        margin-left: 5px;
    }
    
    .mobile-drawer-menu {
        display: none !important;
    }
}

/* --------------------------------------------------------
   DROPDOWN MENU STYLES
   -------------------------------------------------------- */
.nav-item-dropdown { position: relative; }
.dropdown-toggle { display: flex !important; align-items: center; gap: 6px; }
.nav-arrow-icon { font-size: 11px; transition: transform 0.2s ease; }
.nav-item-dropdown:hover .nav-arrow-icon { transform: rotate(180deg); }
.dropdown-menu-box {
    position: absolute; top: 100%; left: 0; min-width: 200px;
    background: #ffffff; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9; padding: 8px 0; opacity: 0; visibility: hidden;
    transform: translateY(10px); transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); z-index: 99;
}
.nav-item-dropdown:hover .dropdown-menu-box { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item-link {
    display: block; padding: 10px 20px; font-size: 14px; color: #475569;
    text-decoration: none; position: relative; transition: all 0.2s ease;
}
.dropdown-item-link::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 0; background-color: #ff527b; border-radius: 0 4px 4px 0; transition: height 0.2s ease;
}
.dropdown-item-link:hover, .dropdown-item-link.active {
    background: #fff5f7; color: #ff527b; padding-left: 24px;
}
.dropdown-item-link:hover::before, .dropdown-item-link.active::before { height: 60%; }

/* --------------------------------------------------------
   MOBILE RESPONSIVE DRAWER (< 991px)
   -------------------------------------------------------- */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: block;
    }

    .desktop-only-nav {
        display: none !important;
    }

    /* ฉากหลังสีเทาโปร่งแสง */
    .mobile-nav-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 23, 42, 0.5);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 99998 !important;
    }
    .mobile-nav-backdrop.active {
        opacity: 1;
        pointer-events: auto;
    }

    .site-logo { height: 38px; }
    .utility-container { flex-direction: column; gap: 6px; align-items: flex-start; }
    .utility-right { display: none; }
}

/* --------------------------------------------------------
   SEARCH & AUTH MODAL STYLES
   -------------------------------------------------------- */
.search-overlay-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 100000;
}
.search-overlay-wrapper.open { opacity: 1 !important; pointer-events: auto !important; }
.close-search-x {
    position: absolute; top: 30px; right: 40px; background: none; border: none;
    font-size: 32px; color: #94a3b8; cursor: pointer; transition: transform 0.2s, color 0.2s;
}
.close-search-x:hover { color: #ff527b; transform: rotate(90deg); }
.search-container-box { width: 100%; max-width: 750px; padding: 20px; text-align: center; }
.search-form-inside { width: 100%; margin-bottom: 15px; }
.search-input-field {
    display: flex; align-items: center; background: #ffffff; border-radius: 50px;
    padding: 8px 10px 8px 24px; box-shadow: 0 15px 30px rgba(0,0,0,0.2); position: relative;
}
.main-search-icon { font-size: 20px; color: #94a3b8; margin-right: 15px; }
.search-input-field input[type="text"] {
    flex: 1; border: none; background: none; outline: none; font-size: 18px; color: #1e293b; padding: 10px 0; font-family: inherit;
}
.search-input-field input[type="text"]::placeholder { color: #cbd5e1; }
.btn-search-execute {
    background: #ff527b; color: #ffffff; border: none; padding: 12px 30px; border-radius: 50px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.2s;
}
.btn-search-execute:hover { background: #e03f66; }
.search-tip-text { color: #64748b; font-size: 14px; margin: 0; }

.search-type-options {
    display: flex; justify-content: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.search-type-item { cursor: pointer; }
.search-type-item input[type="radio"] { display: none; }
.search-type-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 20px;
    background: rgba(255, 255, 255, 0.1); color: #94a3b8; font-size: 13px; font-weight: 500; transition: all 0.25s ease; border: 1px solid rgba(255, 255, 255, 0.15);
}
.search-type-item input[type="radio"]:checked + .search-type-btn {
    background: #ff527b; color: #ffffff; border-color: #ff527b; box-shadow: 0 4px 12px rgba(255, 82, 123, 0.3);
}
.search-type-btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.2); }

.login-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: all 0.3s ease; z-index: 100001;
}
.login-modal-overlay.open { opacity: 1 !important; pointer-events: auto !important; }
.login-modal-card {
    background: #ffffff; width: 100%; max-width: 400px; padding: 35px 28px 30px 28px; border-radius: 20px; position: relative; box-shadow: 0 20px 40px rgba(0,0,0,0.12); margin: 20px;
}
.close-modal-x { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 20px; color: #94a3b8; cursor: pointer; transition: color 0.2s; }
.close-modal-x:hover { color: #ff527b; }
.auth-tabs-nav { display: flex; border-bottom: 2px solid #f1f5f9; margin-bottom: 25px; gap: 20px; }
.auth-tab-btn {
    background: none; border: none; padding-bottom: 12px; font-size: 16px; font-weight: 600; color: #94a3b8; cursor: pointer; position: relative; transition: color 0.2s;
}
.auth-tab-btn:hover { color: #1e293b; }
.auth-tab-btn.active { color: #ff527b; }
.auth-tab-btn.active::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 100%; height: 2px; background: #ff527b; }
.auth-tab-content { display: none; }
.auth-tab-content.active { display: block; }
.auth-form-group { display: flex; flex-direction: column; gap: 14px; }
.auth-form-group input[type="text"], .auth-form-group input[type="email"], .auth-form-group input[type="password"] {
    width: 100%; padding: 12px 16px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 14px; outline: none; transition: all 0.2s; box-sizing: border-box; background: #f8fafc;
}
.auth-form-group input[type="text"]:focus, .auth-form-group input[type="email"]:focus, .auth-form-group input[type="password"]:focus { 
    border-color: #ff527b; background: #fff; box-shadow: 0 0 0 3px rgba(255, 82, 123, 0.1); 
}
.form-options { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #64748b; margin: 4px 0; }
.remember-me { display: flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.remember-me input[type="checkbox"] { width: 16px !important; height: 16px !important; margin: 0; cursor: pointer; }
.forgot-link { color: #ff527b; text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }
.btn-auth-submit { width: 100%; padding: 12px; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; color: #ffffff; cursor: pointer; transition: background 0.2s; }
.btn-login-theme { background: #ff527b; }
.btn-login-theme:hover { background: #e03f66; }
.btn-register-theme { background: #1e293b; }
.btn-register-theme:hover { background: #0f172a; }
.auth-divider { text-align: center; margin: 20px 0; position: relative; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: #e2e8f0; z-index: 1; }
.auth-divider span { background: #ffffff; padding: 0 15px; font-size: 13px; color: #94a3b8; position: relative; z-index: 2; }
.btn-google-login {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px; border: 1px solid #e2e8f0; border-radius: 10px; background: #ffffff; color: #334155; font-size: 14px; font-weight: 500; text-decoration: none; box-sizing: border-box; transition: background 0.2s, border-color 0.2s;
}
.btn-google-login:hover { background: #f8fafc; border-color: #cbd5e1; }
.btn-google-login img { width: 18px; height: 18px; }

.site-brand { display: flex; align-items: center; }
.logo-link { display: inline-block; line-height: 0; }
.site-logo { height: 45px; width: auto; display: block; transition: transform 0.2s ease; }
.site-logo:hover { transform: scale(1.03); }