﻿/* 独立导航样式 - 浅色版 */
.nav-main-wrapper {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    width: 100%;
    position: relative;
    z-index: 1000;
}

.nav-main-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid #dee2e6;
}

.nav-main-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

/* 左侧Logo区域 */
.nav-main-brand {
    display: flex;
    align-items: center;
}

.nav-main-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #495057;
    font-weight: 600;
    font-size: 22px;
}

.nav-main-logo-icon {
    width: 32px;
    height: 32px;
    background: #6c9bcf;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    font-size: 18px;
}

.nav-main-logo-text {
    font-size: 22px;
    letter-spacing: 0.5px;
    color: #495057;
}

.nav-main-logo-sub {
    font-size: 12px;
    color: #868e96;
    margin-left: 8px;
    font-weight: normal;
}

/* 中间导航菜单 */
.nav-main-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-main-item {
    position: relative;
    margin: 0 8px;
}

.nav-main-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #6c757d;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 15px;
    font-weight: 500;
}

    .nav-main-link:hover {
        background: rgba(108, 155, 207, 0.1);
        color: #4a7bb8;
        transform: translateY(-1px);
    }

    .nav-main-link.active {
        background: rgba(108, 155, 207, 0.15);
        color: #4a7bb8;
        box-shadow: 0 2px 6px rgba(108, 155, 207, 0.2);
    }

    .nav-main-link::before {
        content: '';
        display: inline-block;
        width: 18px;
        height: 18px;
        margin-right: 8px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

.nav-main-link-home::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c757d'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E");
}

.nav-main-link-home:hover::before,
.nav-main-link-home.active::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234a7bb8'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E");
}

.nav-main-link-about::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236c757d'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}

.nav-main-link-about:hover::before,
.nav-main-link-about.active::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234a7bb8'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}

/* 移动端菜单按钮 */
.nav-main-toggle {
    display: none;
    background: none;
    border: none;
    color: #6c757d;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    width: 40px;
    height: 40px;
    position: relative;
}

    .nav-main-toggle span,
    .nav-main-toggle span::before,
    .nav-main-toggle span::after {
        display: block;
        background-color: #6c757d;
        height: 2px;
        width: 24px;
        border-radius: 1px;
        position: absolute;
        left: 8px;
        transition: all 0.3s ease;
    }

    .nav-main-toggle span {
        top: 19px;
    }

        .nav-main-toggle span::before {
            content: '';
            top: -8px;
        }

        .nav-main-toggle span::after {
            content: '';
            top: 8px;
        }

    .nav-main-toggle.active span {
        background-color: transparent;
    }

        .nav-main-toggle.active span::before {
            transform: rotate(45deg);
            top: 0;
            background-color: #4a7bb8;
        }

        .nav-main-toggle.active span::after {
            transform: rotate(-45deg);
            top: 0;
            background-color: #4a7bb8;
        }

    .nav-main-toggle:hover span,
    .nav-main-toggle:hover span::before,
    .nav-main-toggle:hover span::after {
        background-color: #4a7bb8;
    }

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .nav-main-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #f8f9fa;
        flex-direction: column;
        padding: 15px 0;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
        border-top: 1px solid #dee2e6;
        border-bottom: 1px solid #dee2e6;
    }

        .nav-main-menu.active {
            display: flex;
        }

    .nav-main-item {
        margin: 0;
    }

    .nav-main-link {
        padding: 15px 25px;
        border-radius: 0;
        border-bottom: 1px solid #edf1f5;
        color: #495057;
    }

        .nav-main-link:hover {
            background: rgba(108, 155, 207, 0.1);
            color: #4a7bb8;
        }

    .nav-main-toggle {
        display: block;
    }

    .nav-main-logo-sub {
        display: none;
    }
}

@media screen and (max-width: 480px) {
    .nav-main-content {
        height: 60px;
    }

    .nav-main-logo-text {
        font-size: 18px;
    }

    .nav-main-container {
        padding: 0 15px;
    }
}

/* 鼠标悬停效果增强 */
.nav-main-link:hover {
    box-shadow: 0 2px 8px rgba(108, 155, 207, 0.15);
}

.nav-main-link.active:hover {
    box-shadow: 0 3px 10px rgba(108, 155, 207, 0.25);
}

/* 平滑滚动效果 */
.nav-main-container {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* 焦点状态 */
.nav-main-link:focus {
    outline: 2px solid rgba(108, 155, 207, 0.3);
    outline-offset: 2px;
}
