/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo h1 {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 30px;
}

.nav-item a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
}

.nav-item a:hover {
    color: #3498db;
}

.nav-item.active a {
    color: #3498db;
}

.nav-item.active a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #3498db;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 主要内容区域 */
.main {
    margin-top: 70px;
}

.section {
    padding: 80px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.section-title {
    font-size: 36px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 50px;
    color: #2c3e50;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #3498db;
}

/* 首页文本说明区域 */
.home-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.home-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.home-section .section-title {
    color: white;
}

.home-section .section-title::after {
    background: white;
}

.description-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.description-text {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.description-text:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.description-text.focused {
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.description-text:last-child {
    margin-bottom: 0;
}

/* Swiper轮播图区域 */
.carousel-section {
    background: #f8f9fa;
}

.swiper-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.mySwiper {
    padding: 20px 0;
}

.swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
}

.slide-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.slide-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.slide-image {
    width: 100%;
    height: auto;
    object-fit: contain; /* 改为contain避免裁剪 */
    display: block;
}

/* 现代浏览器使用aspect-ratio优化 */
@supports (aspect-ratio: 9/19.5) {
    .slide-image {
        aspect-ratio: 9/19.5; /* 手机屏幕比例 */
        max-height: 500px;
        object-fit: cover; /* 保持比例的cover */
    }
}

/* 兼容方案：使用padding-bottom技术保持宽高比 */
.slide-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 216.67%; /* 19.5/9 * 100 = 手机屏幕比例 */
    overflow: hidden;
    background: #f0f0f0;
}

.slide-image-wrapper .slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 现代浏览器覆盖wrapper */
@supports (aspect-ratio: 9/19.5) {
    .slide-image-wrapper {
        padding-bottom: 0;
        aspect-ratio: 9/19.5;
        max-height: 500px;
    }
}

.slide-content {
    padding: 25px;
    text-align: center;
    flex-shrink: 0; /* 防止内容被压缩 */
}

.slide-content h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}

.slide-content p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Swiper导航和分页器样式 */
.swiper-button-next,
.swiper-button-prev {
    color: #3498db;
    background: rgba(255, 255, 255, 0.8);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 18px;
}

.swiper-pagination {
    bottom: 10px !important;
}

.swiper-pagination-bullet {
    background: #3498db;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

/* 轮播图文本说明区域 */
.description-section {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.description-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.description-section .section-title {
    color: #2c3e50;
}

/* Footer样式 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #3498db;
}

.footer-section p,
.footer-section li {
    margin-bottom: 10px;
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

.footer-bottom p {
    margin-bottom: 5px;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 导航栏响应式 */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-item {
        margin: 0;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    
    .nav-item a {
        display: block;
        padding: 15px 20px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* 内容区域响应式 */
    .section {
        padding: 60px 0;
        min-height: auto;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    
    .description-box {
        padding: 25px;
    }
    
    .description-text {
        font-size: 16px;
        padding: 12px;
    }
    
    /* 轮播图响应式 */
    .slide-image {
        max-height: 400px;
    }
    
    .slide-content {
        padding: 20px;
    }
    
    /* Footer响应式 */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .description-box {
        padding: 20px;
    }
    
    .description-text {
        font-size: 15px;
    }
    
    .slide-image {
        max-height: 350px;
    }
    
    .slide-content h3 {
        font-size: 18px;
    }
    
    .slide-content p {
        font-size: 13px;
    }
}

/* 平滑滚动效果 */
html {
    scroll-behavior: smooth;
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.8s ease-out;
}