/* 网站主样式文件 */

/* 字体引入 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* 全局样式 */
body {
    font-family: 'Noto Sans SC', sans-serif;
}

/* 防止横向滚动 */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* 容器最大宽度限制 */
.container {
    max-width: 100%;
}

/* 确保所有元素不超出视口 */
*, *::before, *::after {
    box-sizing: border-box;
}

section, div, article {
    max-width: 100%;
}

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

/* 导航栏hover效果 */
.nav-item {
    position: relative;
    transition: color 0.3s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0066B3;
    transition: width 0.3s ease;
}

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

/* 二级菜单 */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    margin-top: 10px;
}

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

.nav-dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #4B5563;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.nav-dropdown-item:last-child {
    border-bottom: none;
}

.nav-dropdown-item:hover {
    background-color: #F3F4F6;
    color: #0066B3;
    padding-left: 25px;
}

.nav-dropdown-icon {
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-icon {
    transform: rotate(180deg);
}

/* 移动端二级菜单样式 */
.mobile-submenu {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-dropdown-icon {
    transition: transform 0.3s ease;
}

.mobile-nav-dropdown.active .mobile-dropdown-icon {
    transform: rotate(180deg);
}

/* PC端二级菜单样式 */
@media (min-width: 768px) {
    .nav-dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        min-width: 200px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 100;
        margin-top: 10px;
    }

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

/* 轮播图样式 */
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* 轮播图指示器 */
.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-indicator.active {
    width: 30px;
    border-radius: 5px;
    background-color: white;
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 按钮动画 */
.btn-animate {
    transition: all 0.3s ease;
}

.btn-animate:hover {
    transform: scale(1.05);
}

/* 新闻轮播样式 */
.news-carousel-container {
    position: relative;
}

.news-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.news-slide.active {
    opacity: 1;
    position: relative;
}

.news-indicator {
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-indicator.active {
    width: 32px;
}

/* 滚动动画 */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 搜索框样式 */
.search-box {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 新闻卡片悬停效果 */
.news-card {
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* 分页按钮 */
.pagination-btn {
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    transform: scale(1.05);
}

/* 面包屑 */
.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 8px;
    color: #999;
}

/* 文章内容样式 */
.article-content {
    line-height: 2;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-indent: 2em;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 2rem 0 1rem;
    color: #333;
}

.article-content img {
    margin: 2rem auto;
    border-radius: 8px;
    max-width: 100%;
}

/* 相关新闻卡片 */
.related-card {
    transition: all 0.3s ease;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 搜索结果卡片 */
.result-card {
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* 页面内容样式 */
.page-content {
    line-height: 2;
}

.page-content p {
    margin-bottom: 1.5rem;
    text-indent: 2em;
}

.page-content h3 {
    font-size: 1.25rem;
    font-weight: bold;
    margin: 2rem 0 1rem;
    color: #333;
}

.page-content img {
    margin: 2rem auto;
    border-radius: 8px;
    max-width: 100%;
}

.page-content ul, .page-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

/* 特色卡片 */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.article-content img[data-align="left"] {
    float: left;
    margin-right: 1rem;
}

.article-content img[data-align="center"] {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.article-content img[data-align="right"] {
    float: right;
    margin-left: 1rem;
}