/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    transition: all 0.5s;
    border-bottom: 1px solid transparent;
    padding: 1.5rem 0;
    background: transparent;
}

/* 所有页面：滚动后统一显示深色背景 */
.navbar.scrolled {
    background: rgba(11, 16, 56, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 0;
}

/* 浅色背景页面（products、blog、contact）：未滚动时保持完全透明 */
body.view-products .navbar:not(.scrolled),
body.view-blog .navbar:not(.scrolled),
body.view-contact .navbar:not(.scrolled) {
    background: transparent !important;
    border-bottom: 1px solid transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* body.view-products .navbar:not(.scrolled) .navbar-toggle,
body.view-blog .navbar:not(.scrolled) .navbar-toggle,
body.view-contact .navbar:not(.scrolled) .navbar-toggle {
    color: #1E40AF !important;
}

body.view-products .navbar:not(.scrolled) .navbar-toggle:hover,
body.view-blog .navbar:not(.scrolled) .navbar-toggle:hover,
body.view-contact .navbar:not(.scrolled) .navbar-toggle:hover {
    color: #1E3A8A !important;
    background: rgba(30, 64, 175, 0.15) !important;
} */

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-logo {
    width: 2.3rem;
    height: 2.3rem;
    object-fit: contain;
}

.logo-placeholder {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
}

.navbar-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar-menu-desktop {
    display: none;
}

@media (min-width: 768px) {
    .navbar-menu-desktop {
        display: flex;
        align-items: baseline;
        gap: 1rem;
    }
}

.nav-btn {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: bold;
    transition: all 0.3s;
    background: transparent;
    border: none;
    color: rgba(147, 197, 253, 0.9);
    cursor: pointer;
}

.nav-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-btn.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 0.375rem;
    background: transparent;
    border: none;
    color: rgba(147, 197, 253, 0.9);
    cursor: pointer;
    transition: all 0.3s;
}

.navbar-toggle:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.menu-icon {
    font-size: 1.75rem;
    line-height: 1;
}

@media (min-width: 768px) {
    .navbar-toggle {
        display: none;
    }
}

.navbar-menu-mobile {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-width: 100vw;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease-in-out;
    background: rgba(11, 16, 56, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.navbar-menu-mobile.active {
    max-height: 500px;
    opacity: 1;
}

.navbar-menu-mobile .mobile-nav-btn {
    display: block;
    width: calc(100% - 2rem);
    max-width: calc(100vw - 2rem);
    text-align: left;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s;
    background: transparent;
    border: none;
    color: rgba(147, 197, 253, 0.9);
    cursor: pointer;
    margin: 0.5rem 1rem;
    box-sizing: border-box;
}

.navbar-menu-mobile .mobile-nav-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.navbar-menu-mobile .mobile-nav-btn.active {
    color: white;
    background: rgba(59, 130, 246, 0.4);
}

