/* ===== 共享导航栏样式 ===== */
/* index.html 和 about.html 共用的导航栏样式 */

:root {
    --primary-orange: #f97316;
    --primary-orange-dark: #ea580c;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --bg-white: #ffffff;
    --bg-light: #f9fafb;
    --bg-gray: #f3f4f6;
    --border-gray: #e5e7eb;
}

/* ===== 导航栏 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* ===== Logo ===== */
.logo {
    display: flex;
    align-items: center;
    gap: 2px;
    text-decoration: none;
}

.nav-logo-img {
    height: 36px;
    width: auto;
    display: block;
    transform: scale(1.5);
    transform-origin: left center;
}

.footer-logo-img {
    height: 36px;
    width: auto;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.logo-hds {
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: -2px;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 40%, #f97316 70%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-energy {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    color: var(--primary-orange);
    text-transform: uppercase;
    font-style: italic;
}

.logo-dev {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #2563eb;
    text-transform: uppercase;
    margin-top: 1px;
}

/* ===== 导航菜单 ===== */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-menu li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: all 0.25s ease;
    position: relative;
}

.nav-menu li a:hover {
    background-color: var(--primary-orange);
    color: white;
}

.nav-menu li a.active {
    background-color: var(--primary-orange);
    color: white;
}

/* ===== 导航栏右侧 ===== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-gray);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.search-btn:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
}

/* ===== 语言切换器 ===== */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.lang-btn:hover {
    border-color: var(--primary-orange);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    overflow: hidden;
    z-index: 9999;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown button {
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.lang-dropdown button:hover {
    background: var(--bg-light);
}

.lang-dropdown button.active {
    color: var(--primary-orange);
    font-weight: 600;
}

/* ===== 移动端响应式 ===== */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 20px;
    }

    .nav-menu {
        display: none;
    }

    /* 汉堡按钮 */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        background: none;
        border: 1px solid var(--border-gray);
        border-radius: 6px;
        cursor: pointer;
        padding: 8px;
        transition: all 0.3s;
    }

    .hamburger:hover {
        border-color: var(--primary-orange);
    }

    .hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--text-dark);
        border-radius: 2px;
        transition: all 0.3s;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .mobile-overlay.show {
        display: block;
        opacity: 1;
    }
}
