/* ===== Navigation Styles ===== */

/* Navbar container */
.navbar {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    background-color: #fff;
    height: 70px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.navbar.is-scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 60px;
}

.navbar-spacer {
    height: 70px; /* Same as navbar height */
    position: fixed;
}

.admin-bar-visible .navbar-spacer {
    margin-top: 32px; /* WordPress admin bar height */
}

.admin-bar-visible .navbar {
    top: 32px; /* WordPress admin bar height */
}

/* Logo styling */
.logo-container {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text {
    color: #0099ff;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.logo-text-cn {
    color: #333;
    font-size: 1.2rem;
    margin-left: 2px;
}

.logo-tagline {
    color: #666;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Navigation items */
.navbar-item {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.navbar-item .navbar-item {
    padding: 0;
}

.navbar-item:hover,
.navbar-item.is-active {
    color: #0099ff !important;
    background-color: transparent !important;
}

/* 二级导航样式 */
.secondary-navbar {
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 0;
    display: none; /* 默认隐藏 */
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    left: 0;
    top: 60px; /* 导航栏高度+10px间隙 */
    z-index: 10;
}

.admin-bar-visible .secondary-navbar {
    top: 92px; /* WordPress admin bar height + navbar height + 10px间隙 */
}

.secondary-navbar-container {
    display: flex;
    justify-content: center; /* 居中显示 */
    align-items: center;
    max-width: 1200px;
    width: 100%;
    padding: 0 1rem;
}

.secondary-navbar-item {
    display: flex;
    flex-direction: column; /* 垂直排列图标和文字 */
    align-items: center;
    justify-content: center;
    padding: 0.5rem 2rem;
    color: #333;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.secondary-navbar-item:hover,
.secondary-navbar-item.is-active {
    color: #0099ff;
    background-color: transparent;
}

.secondary-navbar-item .icon {
    margin-bottom: 0.5rem; /* 图标在上方，添加下边距 */
    color: #0099ff;
    font-size: 1.5rem; /* 增大图标尺寸 */
}

/* 二级导航显示控制 */
.navbar-item.about-dropdown {
    position: relative;
}

.navbar-item.about-dropdown:hover .secondary-navbar {
    display: flex;
    animation: fadeIn 0.3s ease;
}

/* 旧的下拉菜单样式 - 保留用于移动端 */
.navbar-item.has-dropdown {
    position: relative;
}

.navbar-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(10, 10, 10, 0.1);
    padding: 0.5rem 0;
    min-width: 160px;
    z-index: 20;
    border-top: 2px solid #0099ff;
}

.navbar-dropdown .navbar-item {
    padding: 0.5rem 1rem;
    white-space: nowrap;
    display: block;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
}

.navbar-dropdown .navbar-item:hover {
    background-color: #f5f5f5 !important;
}

/* Phone button */
.phone-button {
    background-color: #0099ff;
    color: white !important;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.phone-button:hover {
    background-color: #007acc;
}

.phone-button .icon {
    margin-right: 0.5rem;
}

/* Animation for dropdown */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile navigation */
@media screen and (max-width: 1023px) {
    .navbar-menu {
        background-color: white;
        box-shadow: 0 8px 16px rgba(10, 10, 10, 0.1);
        padding: 0.5rem 0;
    }

    .navbar-menu.is-active {
        position: absolute;
        width: 100%;
        top: 70px;
    }

    .phone-button {
        margin: 0.5rem 1rem;
        justify-content: center;
    }

    /* Mobile dropdown styles */
    .navbar-item.has-dropdown {
        position: static;
    }

    .navbar-dropdown {
        position: static;
        box-shadow: none;
        border-top: none;
        border-left: 2px solid #0099ff;
        margin-left: 1rem;
        padding-left: 0.5rem;
        display: none;
    }

    .navbar-item.has-dropdown:hover .navbar-dropdown {
        display: none; /* Override hover behavior on mobile */
    }

    .navbar-item.has-dropdown.is-active .navbar-dropdown {
        display: block;
    }

    .navbar-dropdown .navbar-item {
        padding: 0.5rem 1rem;
    }

    /* 移动端二级导航 */
    .secondary-navbar {
        display: none !important; /* 强制隐藏 */
        position: static;
    }

    .navbar-item.about-dropdown:hover .secondary-navbar {
        display: none !important; /* 移动端不显示悬停效果 */
    }

    .mobile-secondary-nav {
        display: none; /* 默认隐藏 */
        border-top: 1px solid #e0e0e0;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }

    .navbar-item.about-dropdown.is-active .mobile-secondary-nav {
        display: block; /* 点击时显示 */
    }

    .mobile-secondary-nav .secondary-navbar-item {
        padding: 0.5rem 1rem;
        margin-left: 1rem;
        border-left: 2px solid #0099ff;
        flex-direction: row; /* 在移动端保持水平排列 */
    }

    .mobile-secondary-nav .secondary-navbar-item .icon {
        margin-right: 0.5rem;
        margin-bottom: 0; /* 移除底部边距 */
        font-size: 1.1rem; /* 恢复图标尺寸 */
    }
}