/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 字体定义 */
@font-face {
    font-family: 'Microsoft YaHei';
    src: url('/dist/fonts/microsoftyahei.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==================== 导航栏 ==================== */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* 左侧 Logo 区域 */
.header-left {
    flex-shrink: 0;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.site-name {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

/* 右侧导航区域 */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 20px;
    height: 70px;
    line-height: 70px;
    color: #333;
    font-size: 16px;
    transition: all 0.3s ease;
}

a.nav-link:hover {
    color: #1890ff;
    background-color: #f5f5f5;
}

/* 有子菜单的父级导航项（span） */
span.nav-link {
    cursor: default;
}

span.nav-link:hover {
    color: #1890ff;
}

.nav-item.active .nav-link {
    color: #1890ff;
    font-weight: bold;
}

.arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.nav-item:hover .arrow {
    transform: rotate(180deg);
}

/* 二级子菜单 */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.sub-menu-item:last-child {
    border-bottom: none;
}

.sub-menu-item.active .sub-menu-link {
    color: #1890ff;
    background-color: #f0f7ff;
    font-weight: 500;
}

.sub-menu-link {
    display: block;
    padding: 12px 20px;
    color: #666;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sub-menu-link:hover {
    color: #1890ff;
    background-color: #f5f5f5;
    padding-left: 25px;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #333;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ==================== 页脚 ==================== */
.footer {
    background: #1a1a1a;
    color: #fff;
}

.footer-main {
    padding: 60px 0 40px;
}

.footer-container {
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 60px;
}

.footer-section {
    
}

.footer-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #fff;
}

.footer-title a {
    color: #fff;
    transition: color 0.3s ease;
}

.footer-title a:hover {
    color: #1890ff;
}

.footer-slogan {
    font-size: 14px;
    color: #999;
    margin-bottom: 24px;
    line-height: 1.6;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
}

.contact-icon {
    font-size: 16px;
}

.footer-nav {
    width: 230px;
    display: grid;
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
    gap: 10px 10px;
}

.footer-nav-item a {
    font-size: 14px;
    color: #999;
    transition: color 0.3s ease;
}

.footer-nav-item a:hover {
    color: #1890ff;
}

.footer-bottom {
    padding: 24px 0;
    border-top: 1px solid #333;
}

.copyright {
    text-align: center;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
}

.copyright-symbol {
    color: #666;
}

.site-name-link {
    color: #666;
    transition: color 0.3s ease;
}

.site-name-link:hover {
    color: #1890ff;
}

.copyright a {
    color: #666;
    transition: color 0.3s ease;
}

.copyright a:hover {
    color: #1890ff;
}

.copyright-reserved {
    text-align: center;
    font-size: 12px;
    color: #555;
}

/* ==================== 响应式布局 ==================== */

/* 平板 */
@media screen and (max-width: 992px) {
    .container {
        padding: 0 20px;
    }
    
    .nav-link {
        padding: 0 15px;
        font-size: 15px;
    }
    
    .site-name {
        font-size: 18px;
    }
    
    .footer-container {
        padding: 0 20px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-nav {
        grid-template-rows: repeat(4, auto);
        grid-auto-flow: column;
    }
}

/* 手机 */
@media screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .header-nav.active {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .nav-link {
        height: 50px;
        line-height: 50px;
        padding: 0 20px;
        justify-content: space-between;
    }
    
    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-item.show-submenu .sub-menu {
        max-height: 500px;
    }
    
    .nav-item.show-submenu .arrow {
        transform: rotate(180deg);
    }
    
    .sub-menu-link {
        padding-left: 40px;
        background-color: #f9f9f9;
    }
    
    .sub-menu-link:hover {
        padding-left: 45px;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .site-name {
        font-size: 16px;
    }
    
    .footer-main {
        padding: 50px 0 30px;
    }
    
    .footer-container {
        padding: 0 15px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-title {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .footer-slogan {
        font-size: 13px;
    }
    
    .contact-item {
        font-size: 13px;
    }
    
    .footer-nav {
        width: auto;
        display: flex;
        flex-wrap: wrap;
        gap: 8px 0;
    }
    
    .footer-nav-item {
        flex: 0 0 auto;
    }
    
    .footer-nav-item::after {
        content: '｜';
        color: #555;
        margin: 0 10px;
    }
    
    .footer-nav-item:last-child::after {
        display: none;
    }
    
    .footer-nav-item a {
        font-size: 13px;
    }
    
    .footer-bottom {
        padding: 20px 0;
    }
    
    .copyright {
        font-size: 12px;
    }
    
    .copyright-reserved {
        font-size: 11px;
    }
}

/* 小屏手机 */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header-wrapper {
        height: 60px;
    }
    
    .header-nav {
        top: 60px;
    }
    
    .logo-img {
        height: 30px;
    }
    
    .site-name {
        font-size: 15px;
    }
    
    .footer-main {
        padding: 40px 0 30px;
    }
    
    .footer-title {
        font-size: 16px;
    }
    
    .footer-slogan {
        font-size: 12px;
    }
    
    .contact-item {
        font-size: 12px;
    }
    
    .footer-nav {
        width: auto;
        display: flex;
        flex-wrap: wrap;
        gap: 6px 0;
    }
    
    .footer-nav-item::after {
        content: '｜';
        color: #555;
        margin: 0 8px;
    }
    
    .footer-nav-item:last-child::after {
        display: none;
    }
    
    .footer-nav-item a {
        font-size: 12px;
    }
    
    .copyright {
        font-size: 11px;
    }
    
    .copyright-reserved {
        font-size: 10px;
    }
}

