/* 传承栏目专用样式 */

/* 主内容区域 */
.heritage-main {
    /*margin-top: 50px;*/
    background: var(--bg-light);
    min-height: calc(100vh - 76px);
    margin-top: 0;
}

/* 页面头部 */
.heritage-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    padding-top: 80px;
}

.heritage-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    /*color: var(--accent-color);*/

}

.heritage-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.search-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.5rem;
    backdrop-filter: blur(10px);
}

.search-box .form-control {
    border: none;
    background: transparent;
    color: white;
    padding: 0.75rem 1rem;
}

.search-box .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box .btn {
    border-radius: 20px;
    padding: 0.75rem 1.5rem;
}

/* 侧边栏样式 */
.heritage-sidebar {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
    margin-bottom: 2rem;
}

.sidebar-title {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-sqlist {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dark);
    border: 1px solid transparent;
}

.category-item:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.category-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
}

.category-item i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}
/**

 */
.category-sqitem {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dark);
    border: 1px solid transparent;
}

.category-sqitem:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.category-sqitem.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
}

.category-sqitem i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
}

/* 筛选器样式 */
.sidebar-filters {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-label {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    display: block;
}

.form-check {
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    color: var(--text-dark);
    cursor: pointer;
}

/* 内容控制区 */
.content-controls {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.sort-options {
    display: flex;
    align-items: center;
}

.sort-options label {
    font-weight: bold;
    color: var(--text-dark);
}

.view-toggle .btn {
    margin-left: 0.5rem;
}

.view-toggle .btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 传承内容网格 */
.heritage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.heritage-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.heritage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.heritage-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.heritage-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.heritage-card:hover .heritage-image img {
    transform: scale(1.1);
}

.heritage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.heritage-card:hover .heritage-overlay {
    opacity: 1;
}

.overlay-buttons {
    display: flex;
    gap: 0.5rem;
}

.overlay-buttons .btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.heritage-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.heritage-badge.video {
    background: var(--secondary-color);
}

.heritage-badge.audio {
    background: #6c757d;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.play-button:hover {
    background: white;
    transform: translate(-50%, -50%) scale(1.1);
}

.heritage-content {
    padding: 1.5rem;
}

.heritage-meta {
    margin-bottom: 1rem;
}

.heritage-meta .badge {
    margin-right: 0.5rem;
    font-size: 0.8rem;
}

.heritage-title {
    /*color: var(--text-dark);*/
    font-weight: bold;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    line-height: 1.4;
}

.heritage-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.heritage-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.heritage-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.heritage-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 列表视图样式 */
.heritage-grid.list-view {
    grid-template-columns: 1fr;
}

.heritage-grid.list-view .heritage-card {
    display: flex;
    height: 200px;
}

.heritage-grid.list-view .heritage-image {
    width: 300px;
    height: 100%;
    flex-shrink: 0;
}

.heritage-grid.list-view .heritage-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.heritage-grid.list-view .heritage-description {
    -webkit-line-clamp: 2;
}

/* 分页样式 */
.heritage-pagination {
    margin-top: 3rem;
}

.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: 8px;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-link:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* 模态框样式 */
.modal-xl {
    max-width: 90%;
}

.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
}

/* 内容详情样式 */
.content-detail {
    line-height: 1.8;
}

.content-detail h1,
.content-detail h2,
.content-detail h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.content-detail p {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.content-detail img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.content-detail blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: var(--text-light);
}

/* 视频播放器样式 */
.video-player {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* 音频播放器样式 */
.audio-player {
    width: 100%;
    margin-bottom: 1rem;
}

/* 截图功能样式 */
.screenshot-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screenshot-container {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
}

.screenshot-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.screenshot-controls {
    margin-top: 1rem;
    text-align: center;
}

/* 下载进度样式 */
.download-progress {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 2000;
    min-width: 300px;
}

.progress {
    height: 8px;
    border-radius: 4px;
    margin: 0.5rem 0;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .heritage-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .heritage-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .heritage-grid.list-view .heritage-card {
        flex-direction: column;
        height: auto;
    }

    .heritage-grid.list-view .heritage-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .heritage-header {
        padding: 2rem 0;
    }

    .heritage-title {
        font-size: 1rem;
    }

    .heritage-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .content-controls {
        padding: 1rem;
    }

    .sort-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .view-toggle {
        margin-top: 1rem;
    }

    .heritage-content {
        padding: 1rem;
    }

    .heritage-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .heritage-sidebar {
        padding: 1.5rem;
    }

    .heritage-image {
        height: 200px;
    }

    .overlay-buttons .btn {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

    .play-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .modal-xl {
        max-width: 95%;
        margin: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }
}

/* 动画效果 */
.heritage-card {
    animation: fadeInUp 0.6s ease-out;
}

.heritage-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.heritage-card:nth-child(even) {
    animation-delay: 0.2s;
}

/* 加载状态 */
.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--text-light);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 1rem;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h5 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1rem;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.9rem;
}

.tooltip-inner {
    background: var(--primary-color);
    border-radius: 6px;
}

/* 滚动条样式 */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}
