/**
 * 文档展示页面样式 - C端前台
 * 现代化设计，SEO友好
 */

/* ================================
   Hero Section - 首页横幅（精简版）
   ================================ */
.hero-section {
    background: url('../images/hero-bg.jpg') center center no-repeat;
    background-size: cover;
    padding: 20px 0;
    margin-bottom: 0;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.4);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
}

.search-box {
    max-width: 500px;
    margin: 0 auto;
}

.search-form .form-control {
    border: none;
    padding: 10px 16px;
    font-size: 0.95rem;
    border-radius: 8px 0 0 8px;
}

.search-form .btn {
    border-radius: 0 8px 8px 0;
    padding-left: 20px;
    padding-right: 20px;
    font-size: 0.95rem;
}

/* ================================
   Filter Section - 筛选区域（紧凑版）
   ================================ */
.filter-section {
    margin-top: 0;
    margin-bottom: 16px;
}

.filter-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 12px 20px;
}

.filter-label {
    display: none;
}

.filter-form .form-select {
    border-radius: 6px;
    padding: 8px 32px 8px 12px;
    border: 1px solid #dee2e6;
    font-size: 0.9rem;
    cursor: pointer;
    background-position: right 8px center;
    background-size: 16px;
}

.filter-form .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.filter-form .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.filter-form .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ================================
   Breadcrumb Bar - 面包屑导航（隐藏）
   ================================ */
.breadcrumb-bar {
    display: none;
}

.breadcrumb-bar .breadcrumb {
    background: transparent;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.breadcrumb-bar .breadcrumb-item a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb-bar .breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
}

/* ================================
   Stats Bar - 统计信息（精简版）
   ================================ */
.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.stats-text {
    color: #495057;
    font-size: 0.9rem;
}

.stats-text strong {
    color: #667eea;
    font-size: 1rem;
}

.view-options {
    display: none;
}

/* ================================
   Document List - 文档列表（横向按行展示）
   ================================ */
.document-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.document-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    overflow: hidden;
    border: 1px solid #eee;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12);
    border-color: #667eea;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    padding: 12px 16px;
}

.doc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    font-size: 1.5rem;
    margin-right: 16px;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.doc-meta .badge {
    font-weight: 500;
    padding: 3px 8px;
    font-size: 0.75rem;
}

.doc-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-date {
    font-size: 0.8rem;
    color: #868e96;
}

.doc-action {
    font-size: 0.8rem;
    color: #667eea;
    font-weight: 500;
}

/* ================================
   Pagination - 分页（精简版）
   ================================ */
.pagination-wrapper {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.pagination {
    gap: 2px;
}

.pagination .page-link {
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    color: #495057;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: #667eea;
    color: #fff;
}

.pagination .page-item.active .page-link {
    background: #667eea;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    background: #f8f9fa;
    color: #adb5bd;
}

/* 隐藏禁用的 prev/next 按钮 */
.pagination li.first.disabled,
.pagination li.prev.disabled,
.pagination li.next.disabled,
.pagination li.last.disabled {
    display: none !important;
}

/* ================================
   Empty State - 空状态
   ================================ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.empty-icon {
    font-size: 5rem;
    color: #dee2e6;
    margin-bottom: 24px;
}

.empty-state h3 {
    color: #495057;
    margin-bottom: 12px;
}

.empty-state p {
    color: #868e96;
    margin-bottom: 24px;
}

/* ================================
   Documents Section - 文档区域
   ================================ */
.documents-section {
    padding: 40px 0 80px;
}

/* ================================
   Footer Styles - 页脚
   ================================ */
.footer {
    background: #1a1a2e;
}

.footer h5,
.footer h6 {
    color: #fff;
    font-weight: 600;
}

.footer a {
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #667eea !important;
}

.social-links {
    margin-top: 16px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #667eea;
    transform: translateY(-4px);
}

/* ================================
   Responsive - 响应式设计
   ================================ */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .filter-card {
        padding: 16px;
    }
    
    .filter-form .col-md-3 {
        margin-bottom: 16px;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .doc-icon {
        padding: 24px 16px;
        font-size: 3rem;
    }
    
    .document-card .card-body {
        padding: 16px;
    }
    
    .doc-title {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .search-form .input-group-lg {
        flex-direction: column;
    }
    
    .search-form .form-control {
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .search-form .btn {
        border-radius: 8px;
        width: 100%;
    }
}

/* ================================
   Loading Animation - 加载动画
   ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.document-card {
    animation: fadeInUp 0.5s ease forwards;
}

/* 为每个卡片添加延迟动画 */
.document-card:nth-child(1) { animation-delay: 0.1s; }
.document-card:nth-child(2) { animation-delay: 0.2s; }
.document-card:nth-child(3) { animation-delay: 0.3s; }
.document-card:nth-child(4) { animation-delay: 0.4s; }
.document-card:nth-child(5) { animation-delay: 0.5s; }
.document-card:nth-child(6) { animation-delay: 0.6s; }

/* ================================
   Print Styles - 打印样式
   ================================ */
@media print {
    .hero-section,
    .filter-section,
    .breadcrumb-bar,
    .stats-bar,
    .pagination-wrapper,
    footer,
    .btn {
        display: none !important;
    }
    
    .document-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ================================
   Accessibility - 无障碍
   ================================ */
.card-link:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.badge:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .document-card {
        border: 2px solid #000;
    }
    
    .hero-section {
        background: #000;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .document-card,
    .social-links a {
        animation: none;
        transition: none;
    }
    
    .document-card:hover {
        transform: none;
    }
}

/* ================================
   SEO Related - SEO相关
   ================================ */
[itemprop] {
    display: inline-block;
}

/* 结构化数据隐藏但可读 */
.schema-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

