/* 网站头部样式 */

/* 引用主题变量定义文件 */
@import 'theme-variables.css';

/* 固定在右上角的主题切换按钮样式 */
.fixed-theme-switch-wrapper {
    position: fixed;
    bottom: 30px;
    left: 10px;
    z-index: 2000;
}

.theme-switch-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px var(--shadow-medium);
    transition: all 0.3s ease;
    font-size: 20px;
}

.theme-switch-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 4px 20px var(--shadow-medium);
}

.theme-switch-btn i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.theme-switch-btn:hover i {
    transform: rotate(-15deg);
}

/* 响应式调整 */
@media (max-width: 767px) {
    .fixed-theme-switch-wrapper {
        bottom: 30px;
        left: 10px;
    }
    
    .theme-switch-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .theme-switch-btn i {
        font-size: 18px;
    }
}

/* 移动端主题切换按钮 */
.mobile-theme-switch-wrapper {
    position: relative;
    z-index: 2000;
}

/* 固定主题按钮样式 */
.fixed-theme-btn {
    width: 30px;
    height: 30px;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1001;
}

/* 导航栏样式 */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.05));
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 10px 0;
    box-shadow: 0 5px 15px var(--shadow-light, rgba(0, 0, 0, 0.05));
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo样式 */
.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand img {
    max-height: 40px;
    transition: max-height 0.3s ease;
}

.navbar-scrolled .navbar-brand img {
    max-height: 35px;
}

/* 导航菜单样式 */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-item {
    position: relative;
}

/* 导航链接样式 - 合并后的统一版本 */
.nav-link {
    /* 基础样式设置，适用于所有导航链接（包括下拉菜单按钮） */
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary, #333);
    padding: 10px 15px 1px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 4px;
    /* 确保所有导航链接的高度一致 */
    display: inline-block;
    box-sizing: border-box;
    height: auto;
    vertical-align: bottom;
}

/* 下拉菜单按钮特殊样式 - 仅包含下拉特有的样式，共用部分通过继承获取 */
.nav-link.dropdown-toggle {
    /* 仅添加箭头所需的额外右侧padding */
    padding-right: 20px;
    /* 确保箭头和文字垂直居中 */
    display: inline-flex;
    align-items: center;
}

/* 合并导航链接的hover和active状态样式 */
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    /* 文字颜色变化 */
    color: var(--primary-color, #f9a826) !important;
    /* 统一使用border-bottom设置下划线，确保是直线 */
    border-bottom: 2px solid var(--primary-color, #f9a826);
    /* 确保没有圆角效果 */
    border-radius: 0;
    /* 确保没有其他样式影响 */
    overflow: visible;
}

/* 移除之前使用的::after伪元素下划线 */
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    display: none;
}

/* 下拉菜单样式 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 160px;
    padding: 10px 0;
    margin: 2px 0 0;
    font-size: 16px;
    color: var(--text-primary, #333);
    background-color: var(--bg-primary, white);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.15));
    border-radius: 8px;
    box-shadow: 0 10px 25px var(--shadow-medium, rgba(0, 0, 0, 0.1));
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 20px;
    clear: both;
    font-weight: 400;
    color: var(--text-primary, #333);
    text-align: inherit;
    white-space: nowrap;
    background: none;
    border: 0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    color: var(--primary-color, #f9a826);
    background-color: var(--bg-secondary, #f8f9fa);
}

/* 增强下拉菜单项的hover和active状态颜色样式 */
.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item.active {
    color: var(--primary-color, #f9a826) !important;
    background-color: var(--bg-secondary, #f8f9fa);
}

/* 特殊处理下拉菜单项，确保不显示下划线 */
.dropdown-item.active::after,
.dropdown-item:hover::after,
.dropdown-item:focus::after {
    display: none !important; /* 防止下拉菜单项出现下划线 */
}

/* 移动端菜单按钮 */
.navbar-toggler {
    padding: 10px;
    font-size: 20px;
    color: var(--text-primary, #333);
    background-color: transparent;
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background-color: var(--bg-secondary, #f8f9fa);
}

/* 导航栏右侧联系信息 */
.navbar-contact {
    display: flex;
    align-items: center;
    gap: 15px;
}

.phone-number {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary, #333);
}

.phone-number i {
    color: var(--primary-color, #f9a826);
}

/* 响应式设计 */
@media (max-width: 991px) {
    .navbar-nav {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        padding: 12px 15px;
        display: block;
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: var(--bg-secondary, #f8f9fa);
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
}