/* 主要样式文件 */
:root {
    --primary-blue: #1e40af;
    --secondary-blue: #3b82f6;
    --light-blue: #60a5fa;
    --hover-blue: #1d4ed8;
    --text-gray: #374151;
    --light-gray: #f9fafb;
    --border-gray: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-gray);
}

/* 渐变背景 */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 50%, var(--light-blue) 100%);
    position: relative;
}

.gradient-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 25px 25px, rgba(255,255,255,0.1) 2px, transparent 0),
        radial-gradient(circle at 75px 75px, rgba(255,255,255,0.1) 2px, transparent 0);
    background-size: 100px 100px;
    pointer-events: none;
}

/* 玻璃效果 */
.glass-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
}

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

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* 文字阴影 */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 下拉菜单 */
.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu {
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Swiper 轮播图样式 */
.swiper {
    width: 100%;
    height: 100%;
    position: relative;
}

.swiper-wrapper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.swiper-slide > div {
    width: 100%;
    height: 100%;
    position: relative;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Swiper 导航按钮 */
.swiper-button-next,
.swiper-button-prev {
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    margin-top: -20px !important;
    transition: all 0.3s ease !important;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: scale(1.1) !important;
}

.swiper-button-next::after, 
.swiper-button-prev::after {
    font-size: 16px !important;
    color: #374151 !important;
    font-weight: bold !important;
}

.swiper-button-disabled {
    opacity: 0.5 !important;
}

/* Swiper 分页器 */
.swiper-pagination {
    bottom: 15px !important;
    text-align: center !important;
}

.swiper-pagination-bullet {
    width: 10px !important;
    height: 10px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
    margin: 0 4px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
}

.swiper-pagination-bullet-active {
    background: white !important;
    transform: scale(1.3) !important;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8) !important;
}

/* 搜索框样式 */
.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 9999px;
    padding: 8px 16px;
    min-width: 280px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.search-container:hover {
    background: rgba(255, 255, 255, 1);
}

.search-container.focused {
    ring: 2px;
    ring-color: rgba(59, 130, 246, 0.6);
}

.search-input {
    flex: 1;
    background: transparent;
    color: var(--text-gray);
    border: none;
    outline: none;
    font-size: 14px;
}

.search-input::placeholder {
    color: #6b7280;
}

.search-button {
    width: 40px;
    height: 40px;
    margin-left: 8px;
    background: var(--secondary-blue);
    color: white;
    border-radius: 50%;
    padding: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
}

.search-button:hover {
    background: var(--hover-blue);
    transform: scale(1.1);
}

.search-button:active {
    transform: scale(0.95);
}

/* 导航栏样式 */
.nav-link {
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 18px;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: #bfdbfe;
    background: rgba(29, 78, 216, 0.8);
}

/* 导航高亮样式 */
.nav-link.current,
.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fbbf24;
    font-weight: 600;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-link.current:hover,
.nav-link.active:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fbbf24;
}

/* 新闻列表项 */
.news-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    padding: 12px;
    transition: all 0.2s ease;
}

.news-item:hover {
    background: #f9fafb;
}

.news-dot {
    width: 8px;
    height: 8px;
    background: #93c5fd;
    border-radius: 50%;
    flex-shrink: 0;
}

.news-link {
    color: var(--text-gray);
    text-decoration: none;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-link:hover {
    color: var(--secondary-blue);
}

.news-date {
    font-size: 14px;
    color: #6b7280;
    flex-shrink: 0;
}

/* 栏目卡片 */
.section-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-gray);
    overflow: hidden;
    transition: all 0.3s ease;
}

.section-card:hover {
    box-shadow: var(--shadow-lg);
}

.section-header {
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.section-content {
    padding: 24px;
}

/* 专题卡片 */
.topic-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    height: 120px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.topic-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topic-content {
    text-align: center;
    color: white;
}

.topic-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.topic-card:hover .topic-title {
    transform: scale(1.1);
}

.topic-description {
    font-size: 14px;
    opacity: 0.9;
}

.topic-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    opacity: 0.7;
}

/* 统计卡片 */
.stat-card {
    text-align: center;
    padding: 16px;
    border-radius: 8px;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
}

/* 视频卡片 */
.video-thumbnail {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.05);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-thumbnail:hover .video-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.play-icon {
    color: white;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover .play-icon {
    transform: scale(1.2);
}

/* 快速链接 */
.quick-link {
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 100px;
}

.quick-link i {
    font-size: 20px;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.quick-link:hover i {
    transform: scale(1.1);
}

.quick-link span {
    font-size: 14px;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-container {
        min-width: 240px;
    }
    
    .nav-link {
        font-size: 16px;
        padding: 6px 12px;
    }
    
    .topic-title {
        font-size: 20px;
    }
    
    .stat-number {
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    .search-container {
        min-width: 200px;
    }
    
    .section-content {
        padding: 16px;
    }
    
    .topic-card {
        height: 120px;
    }
    
    .topic-title {
        font-size: 18px;
    }
}

/* 工具类 */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--secondary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 过渡动画 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* Tab 切换样式 */
.tab-button {
    position: relative;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
}

.tab-button:focus {
    outline: none;
}

.tab-button.active {
    color: #2563eb !important;
    border-color: #2563eb !important;
    background-color: #2563eb !important;
    border-radius: 0.5rem !important; /* 增加圆角背景 */
}

.tab-button.active.text-blue-600 {
    color: #ffffff !important;
}

.tab-button.active.border-blue-600 {
    border-color: #2563eb !important;
}

.tab-button:not(.active):hover {
    color: #374151 !important;
    border-color: #d1d5db !important;
}

.tab-button:hover {
    transition: all 0.2s ease;
}

.tab-content {
    min-height: 200px;
}

.tab-pane {
    animation: fadeIn 0.2s ease-in-out;
}

.tab-pane:not(.active) {
    display: none;
}

/* 响应式设计 */
@media (max-width: 640px) {
    .tab-button {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
} 

/* 分页样式 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.pagination li {
    margin: 0;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-gray);
    background: white;
    color: var(--text-gray);
    cursor: pointer;
}

.pagination li a:hover {
    background: var(--light-blue);
    color: white;
    border-color: var(--light-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

.pagination li.active span {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.pagination li.disabled span {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination li.disabled span:hover {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    transform: none;
    box-shadow: none;
}

/* 分页容器样式 */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-gray);
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* 分页信息样式 */
.pagination-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.pagination-info span {
    color: var(--primary-blue);
    font-weight: 600;
}

/* 响应式分页 */
@media (max-width: 768px) {
    .pagination {
        gap: 0.375rem;
    }
    
    .pagination li a,
    .pagination li span {
        min-width: 2.25rem;
        height: 2.25rem;
        padding: 0 0.625rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 640px) {
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination li a,
    .pagination li span {
        min-width: 2rem;
        height: 2rem;
        padding: 0 0.5rem;
        font-size: 0.75rem;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .pagination {
        gap: 0.125rem;
    }
    
    .pagination li a,
    .pagination li span {
        min-width: 1.75rem;
        height: 1.75rem;
        padding: 0 0.375rem;
        font-size: 0.6875rem;
    }
}

/* 分页动画效果 */
.pagination li a,
.pagination li span {
    position: relative;
    overflow: hidden;
}

.pagination li a::before,
.pagination li span::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.pagination li a:hover::before {
    left: 100%;
}

/* 分页焦点样式 */
.pagination li a:focus {
    outline: 2px solid var(--light-blue);
    outline-offset: 2px;
}

/* 分页加载状态 */
.pagination.loading {
    opacity: 0.7;
    pointer-events: none;
}

.pagination.loading li a,
.pagination.loading li span {
    cursor: wait;
}

/* 轮播图链接样式 */
.swiper-slide a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.swiper-slide a:hover {
    text-decoration: none;
    color: inherit;
}

/* 确保链接可以正常点击 */
.swiper-slide a:focus {
    outline: 2px solid var(--light-blue);
    outline-offset: 2px;
}

/* 确保导航按钮正常工作 */
.swiper-button-next,
.swiper-button-prev {
    pointer-events: auto !important;
    z-index: 20 !important;
    position: absolute !important;
}

.swiper-pagination {
    pointer-events: auto !important;
    z-index: 20 !important;
}

/* 防止轮播图容器阻止事件 */
.swiper {
    pointer-events: auto;
}

/* 轮播图slide内容可点击 */
.swiper-slide {
    pointer-events: auto;
}

/* 轮播图内的链接可点击 */
.swiper-slide a.slide-link {
    pointer-events: auto !important;
    position: absolute;
    z-index: 15 !important;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
}

/* 确保导航按钮在链接之上 */
.swiper-button-next,
.swiper-button-prev {
    z-index: 30 !important;
    pointer-events: auto !important;
    position: absolute !important;
}

.swiper-pagination {
    z-index: 30 !important;
    pointer-events: auto !important;
}

/* 文字层不阻挡点击事件 */
.swiper-slide .pointer-events-none {
    pointer-events: none !important;
}

/* Prose 内容样式 - 确保图片居中显示 */
.prose img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.prose p[style*="text-align:center"] img,
.prose p[style*="text-align: center"] img {
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
} 