/* common.css - 公共导航/头部样式 */
:root {
    --primary-color: #2283c3;
    --secondary-color: #2ecc71;
    --text-color: #34495e;
    --bg-color: #ecf0f1;
    --light-color: #ffffff;
    --dark-color: #2c3e50;
    --shadow-color: rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* 两个页面统一平滑滚动 */
}

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* 头部样式 - 完全统一 */
header {
    background-color: var(--light-color);
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 65px; /* 固定高度，避免渲染差异 */
}

/* Logo样式 - 固定宽度，统一渲染 */
.logo {
    display: flex;
    align-items: center;
    width: 200px; /* 固定logo宽度，避免内容变化导致偏移 */
}

.logo img {
    height: 50px;
    margin-right: 15px;
    flex-shrink: 0; /* 防止图片被压缩 */
}

.logo-text {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.logo-text h2 {
    font-size: 19px;
    color: var(--primary-color);
    transition: var(--transition);
    margin: 0;
    height: 30px;
}

.logo-text h3 {
    font-size: 14px;
    color: var(--primary-color);
    margin: 0;
    font-weight: 500;
    opacity: 0.8; /* 两个页面统一透明度 */
}

.logo:hover .logo-text h2 {
    color: var(--secondary-color);
}

/* 导航样式 - 标准化间距 */
nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0; /* 显式重置，避免默认样式 */
}

nav ul li {
    margin-left: 0; /* 重置所有li的margin */
    padding-left: 30px; /* 用padding替代margin，更稳定 */
}

/* 第一个li取消左侧间距，避免整体偏移 */
nav ul li:first-child {
    padding-left: 0;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 5px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.nav-chinese {
    font-size: 16px;
    line-height: 1.2;
}

.nav-english {
    font-size: 14px;
    line-height: 1.2;
    margin-top: 2px;
    color: #555; /* 两个页面统一颜色 */
    font-weight: 400;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a:hover .nav-english {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}


/* 页脚样式 - 复用index */
        footer {
            background-color: var(--dark-color);
            color: var(--light-color);
            padding: 20px 0;
            text-align: center;
        }
        
        .footer-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }
        
        .contact-info {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            margin: 10px 0;
        }
        
        .contact-info p {
            margin: 0 15px;
        }

        .contact-item {
            margin: 0 15px;
            padding: 0px;
        }

        .contact-item p {
            margin: 5px 0;
        }
        .copyright {
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid rgba(255,255,255,0.1);
        }
        
        .icp-link {
            color: #95a5a6;
            text-decoration: none;
            transition: var(--transition);
        }
        
        .icp-link:hover {
            color: #bdc3c7;
            text-decoration: underline;
        }

/* Active导航状态 */
nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a.active::after {
    width: 100%;
}

nav ul li a.active .nav-english {
    color: var(--primary-color);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* 响应式设计 - 平板和移动设备 */
@media screen and (max-width: 968px) {
    .header-container {
        height: auto;
        min-height: 65px;
        flex-wrap: wrap;
    }

    .logo {
        width: auto;
        min-width: 200px;
    }

    .logo-text h2 {
        font-size: 16px;
    }

    .logo-text h3 {
        font-size: 12px;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav.active {
        max-height: 500px;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
    }

    nav ul li {
        padding: 10px 0;
        padding-left: 0;
        width: 100%;
        text-align: left;
    }

    nav ul li a {
        padding: 10px 20px;
        justify-content: flex-start;
        text-align: left;
    }

    .nav-chinese {
        font-size: 18px;
    }

    .nav-english {
        font-size: 14px;
    }
}

/* 响应式设计 - 小屏幕移动设备 */
@media screen and (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }

    .logo img {
        height: 40px;
        margin-right: 10px;
    }

    .logo-text h2 {
        font-size: 14px;
        height: auto;
    }

    .logo-text h3 {
        font-size: 11px;
    }

    .footer-container {
        padding: 0 15px;
    }

    .contact-info {
        flex-direction: column;
        gap: 10px;
    }

    .contact-info p {
        margin: 5px 0;
    }
}

/* 响应式设计 - 超小屏幕 */
@media screen and (max-width: 480px) {
    .logo {
        min-width: 150px;
    }

    .logo-text h2 {
        font-size: 12px;
    }

    .logo-text h3 {
        font-size: 10px;
    }
}