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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    color: #0056b3;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem;
    font-weight: 600;
    line-height: 1.2;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* 导航栏 */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: padding 0.3s ease;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin-left: 1.5rem;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

/* 英雄区域 */
.hero-section {
    position: relative;
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.6);
    margin-top: 0; /* 原来是60px，现在导航栏移到右下角，不需要margin-top */
}

.hero-section img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%; /* 控制显示图片中间部分 */
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-text {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #0056b3;
}

/* 内容区 */
.content-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* 可点击图片链接区域 */
.image-links-section {
    margin-top: 3rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #007bff;
}

.image-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.image-link-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: auto; /* 确保高度自适应 */
    display: flex;
    flex-direction: column;
}

.image-link-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.image-link {
    display: block;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.image-link-img {
    display: block;
    width: 100%;
    transition: transform 0.5s;
}

.image-link:hover .image-link-img {
    transform: scale(1.05);
}

.image-link-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: #fff;
    padding: 1rem;
    transition: opacity 0.3s;
    min-height: 100px; /* 确保足够的高度显示文字 */
}

.image-link-title {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    line-height: 1.3; /* 调整行高 */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制最多显示2行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.image-link-desc {
    font-size: 0.9rem;
    opacity: 0.8;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* 限制最多显示3行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 移动菜单按钮 */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-button span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: #333;
    transition: all 0.3s ease-in-out;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-text {
        font-size: 1.1rem;
    }
    
    .content-section {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .nav-bar {
        padding: 0.8rem;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .mobile-menu-button {
        display: block;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        display: none;
        padding: 1rem;
    }
    
    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }
    
    .main-nav li {
        margin: 0.7rem 0;
        text-align: center;
    }
    
    .main-nav a {
        display: block;
        padding: 0.5rem 0;
    }
    
    .hero-section {
        height: 200px;
        margin-top: 0; /* 移除顶部间距 */
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-text {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .cta-button {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .image-links-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-bar {
        padding: 0.7rem;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .hero-section {
        height: 175px;
        margin-top: 0; /* 移除顶部间距 */
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.7rem;
        margin-bottom: 0.7rem;
    }
    
    .hero-text {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }
    
    .cta-button {
        padding: 0.5rem 1.3rem;
        font-size: 0.85rem;
    }
    
    .content-section {
        padding: 1.5rem 1rem;
    }
    
    h1, h2, h3, h4, h5, h6 {
        margin-bottom: 0.7rem;
    }
    
    h1 { font-size: 1.7rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    
    .image-links-grid {
        grid-template-columns: 1fr;
    }
    
    .image-link-title {
        font-size: 1.1rem;
    }
}

/* 右下角导航栏 */
.corner-nav-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: auto;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-radius: 10px;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 9999; /* 提高z-index确保它在最上层 */
    transition: all 0.3s ease;
    pointer-events: auto; /* 确保可以接收点击事件 */
}

.corner-nav-bar .logo {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.corner-nav-bar .main-nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
}

.corner-nav-bar .main-nav li {
    margin: 0.5rem 0;
    text-align: center;
}

.corner-nav-bar .main-nav a, .corner-nav-bar .nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    display: block;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    background-color: #f8f8f8;
    border-radius: 5px;
    min-width: 80px;
    text-align: center;
    cursor: pointer;  /* 确保鼠标显示为可点击状态 */
}

.corner-nav-bar .main-nav a:hover, .corner-nav-bar .nav-link:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 媒体查询：确保在手机上显示 */
@media (max-width: 768px) {
    .corner-nav-bar {
        bottom: 10px;
        right: 10px;
        padding: 0.6rem;
        display: flex !important; /* 强制显示 */
        visibility: visible !important; /* 确保可见 */
        opacity: 1 !important; /* 确保不透明 */
    }
    
    .corner-nav-bar .logo {
        font-size: 1rem;
    }
    
    .corner-nav-bar .main-nav a, .corner-nav-bar .nav-link {
        padding: 0.4rem 0.8rem;
        min-width: 70px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .corner-nav-bar {
        bottom: 5px;
        right: 5px;
        padding: 0.5rem;
        border-radius: 8px;
    }
    
    .corner-nav-bar .logo {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .corner-nav-bar .main-nav a, .corner-nav-bar .nav-link {
        padding: 0.3rem 0.6rem;
        min-width: 60px;
        font-size: 0.85rem;
    }
    
    .corner-nav-bar .main-nav li {
        margin: 0.3rem 0;
    }
}

/* 视频展示区域 */
.video-section {
    margin-top: 3rem;
}

.featured-video-container {
    margin-bottom: 2rem;
    background-color: #f5f5f5;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.featured-video-title {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: #444;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}

.video-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.video-player {
    width: 100%;
    background-color: #000;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.video-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* 响应式视频播放器 */
.video-player video,
.featured-video-container video {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .featured-video-container {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-title {
        font-size: 1rem;
    }
}
