/* 基础样式和变量 */
:root {
    --primary: #e73051;
    --primary-dark: #c41e3d;
    --primary-light: #ff5a7d;
    --secondary: #333333;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --shadow: 0 5px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #fff;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 20px;
}
ul {
    list-style: none;
}
/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(231, 48, 81, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.btn-large {
    padding: 15px 35px;
    font-size: 1.1rem;
}

/* 图片自适应 */
.img-responsive {
    width: 100%;
    height: auto;
    display: block;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 导航栏 */
/* 导航栏样式修改 */
header {
    position: absolute; /* 初始为绝对定位 */
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0); /* 初始透明 */
    transition: all 0.3s ease;
    z-index: 1000;
}

/* 固定定位时的样式 */
header.fixed {
    position: fixed;
    /* background-color: #1f4485; */
    background-color: rgba(255, 255, 255, 0.95); /*固定时添加白色背景 */
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    backdrop-filter: blur(5px);
}

/* 确保导航栏内容在固定时保持原有样式 */
.navbar {
    display: flex;
    /* justify-content: space-between; */
    align-items: center;
    padding: 15px 0;
    transition: padding 0.3s ease;
}

/* 可选：固定时可以稍微缩小内边距 */
header.fixed .navbar {
    padding: 15px 0;
}

/* .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
} */

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0; /* 防止Logo被压缩 */
}

.logo i {
    margin-right: 8px;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    /* flex: 1; */
    /* margin-top: 6px; */
    display: flex;
    list-style: none;
    /* justify-content: center; 右对齐 */
    /* flex-grow: 1; 占据剩余空间 */
    /* margin-left: 50px; Logo和菜单之间的间距 */
}

.nav-links li {
    margin-left: 50px;
    position: relative;
}

.nav-links a {
    text-decoration: none;
    /* color: var(--secondary); */
    /* color: #fff; */
    color: #6f6f6f;
    font-weight: 700;
    font-size: 14px;
    /* font-size: 1rem; */
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover {
    /* color: var(--primary); */
    /* color: #fff; */
}

.nav-links a.active {
    /* color: var(--primary); */
    /* color: #fff; */
}

.nav-links a.active:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
     background-color: var(--primary); 
    /* background-color: #FFF; */
    bottom: -15px;
    left: 0;
}

/* 关键：当鼠标悬停在导航栏任意位置时，隐藏所有下划线 */
.nav-links:hover a:after {
    width: 0;
    opacity: 0;
}

/* 仅显示悬停项的下划线 */
.nav-links li:hover > a:after {
    width: 100% !important;
    opacity: 1;
    transition: width 0.3s ease, opacity 0.3s ease;
}


/* 确保悬停项的颜色也突出 */
.nav-links li:hover > a {
    /* color: #fff !important; */
}
.nav-links a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
     background-color: var(--primary); 
    /* background-color: #FFF; */
    bottom: -15px;
    left: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover:after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
    margin-left: 20px; /* 与菜单的间距 */
}

/* 页面公共样式 */
.page-hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #fdf2f4 0%, #f8f9fa 100%);
    text-align: center;
}

.page-hero h1 {
    font-size: 2.8rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.page-hero p {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto 30px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
}

/* 图片容器 */
.image-container {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-weight: 500;
}

.image-container.large {
    height: 400px;
}

.image-container.medium {
    height: 300px;
}

.image-container.small {
    height: 200px;
}

/* 页脚 */
footer {
    background-color: var(--secondary);
    color: #ddd;
    padding: 70px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
}

.footer-col h3:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
    bottom: -10px;
    left: 0;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 0.9rem;
}

/* 移动菜单 */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 2000;
    padding: 30px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.close-menu {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
}

.mobile-nav-links {
    list-style: none;
    margin-bottom: 30px;
}

.mobile-nav-links li {
    margin-bottom: 20px;
}

.mobile-nav-links a {
    text-decoration: none;
    color: var(--secondary);
    font-size: 1.2rem;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .page-hero h1 {
        font-size: 2.2rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .page-hero h1 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 0 15px;
    }
}