/**
 * 新闻页面样式表
 * 乐智影公司网站 - 新闻动态页面专用样式
 */

/* CSS变量定义 */
:root {
    --primary-color: #3490dc;
    --secondary-color: #6c757d;
    --success-color: #38c172;
    --danger-color: #e3342f;
    --warning-color: #f6993f;
    --info-color: #6cb2eb;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #e9ecef;
    --text-muted: #6c757d;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
}

/* 全局新闻页面容器 */
.news-page {
    background: var(--light-color);
    min-height: 100vh;
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.animate-on-scroll.delay-100 { animation-delay: 0.1s; }
.animate-on-scroll.delay-200 { animation-delay: 0.2s; }
.animate-on-scroll.delay-300 { animation-delay: 0.3s; }
.animate-on-scroll.delay-400 { animation-delay: 0.4s; }

/* 面包屑导航 */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb .separator {
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb .current {
    color: white;
    font-weight: 500;
}

/* 新闻卡片悬停效果增强 */
.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.news-card:hover::before {
    transform: scaleX(1);
}

/* 新闻图片悬停效果 */
.news-image {
    position: relative;
    overflow: hidden;
}

.news-image img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

/* 新闻分类标签样式增强 */
.news-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.news-card:hover .news-category {
    transform: translateY(0);
    opacity: 1;
}

/* 新闻元信息样式增强 */
.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 15px;
}

.news-date,
.news-views {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 0.85rem;
}

.news-date i,
.news-views i {
    color: #667eea;
    opacity: 0.8;
}

/* 按钮样式增强 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::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;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* 空状态样式增强 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* 加载动画增强 */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-card {
        margin-bottom: 20px;
    }
    
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .news-content-area {
        padding: 20px;
    }
    
    .news-detail-title {
        font-size: 1.8rem;
    }
    
    .news-detail-meta {
        flex-direction: column;
        gap: 15px;
    }
}

/* 搜索框样式增强 */
.search-input {
    position: relative;
    transition: var(--transition);
}

.search-input:focus {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(52, 144, 220, 0.3);
}

/* 响应式图片 */
.responsive-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: var(--transition);
}

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

/* 文字省略 */
.text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.text-ellipsis-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--light-color);
    color: var(--text-muted);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* 社交分享按钮 */
.social-share {
    display: flex;
    gap: var(--spacing-sm);
    margin: var(--spacing-lg) 0;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.1);
}

.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.wechat { background: #07c160; }
.share-btn.weibo { background: #e6162d; }

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* 进度条 */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #2979ff);
    z-index: 9999;
    transition: width 0.3s ease;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(52, 144, 220, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 144, 220, 0.4);
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    padding: var(--spacing-xl);
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    transform: scale(0.7);
    transition: var(--transition);
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: var(--dark-color);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #1a1a1a;
        --dark-color: #e9ecef;
        --border-color: #333;
        --text-muted: #adb5bd;
    }
    
    body {
        background: #1a1a1a;
        color: #e9ecef;
    }
    
    .news-card {
        background: #2d2d2d;
        border-color: #444;
    }
    
    .btn-outline {
        border-color: #666;
        color: #e9ecef;
    }
    
    .search-input {
        background: #2d2d2d;
        border-color: #444;
        color: #e9ecef;
    }
}

/* 减少动画（无障碍访问） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-on-scroll {
        animation: none;
        opacity: 1;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066cc;
        --text-muted: #000;
        --border-color: #000;
    }
    
    .news-card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid #000;
    }
}

/* 打印样式 */
@media print {
    .news-filter-section,
    .pagination-section,
    .back-to-top,
    .social-share {
        display: none !important;
    }
    
    .news-card {
        break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* 超小屏幕优化 */
@media (max-width: 360px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .news-card {
        margin-bottom: 1rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* 大屏幕优化 */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .news-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .news-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .btn {
        min-height: 44px; /* 保证触摸目标足够大 */
    }
}

/* 焦点样式（键盘导航） */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    transition: top 0.3s;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* 自定义选择器 */
::selection {
    background: var(--primary-color);
    color: white;
}

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
