/* technical.css - 技术文档页面特定样式 */

/* 页面标题区域 */
.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* 文档分类卡片 */
.doc-category-card {
    display: block;
    background: white;
    border-radius: 10px;
    padding: 25px 20px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    border-top: 4px solid #0d6efd;
}

.doc-category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    color: #0d6efd;
}

.doc-category-card:nth-child(2) {
    border-top-color: #198754;
}

.doc-category-card:nth-child(3) {
    border-top-color: #dc3545;
}

.doc-category-card:nth-child(4) {
    border-top-color: #ffc107;
}

.doc-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: #0d6efd;
}

.doc-category-card:hover .doc-icon {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
}

/* 文档表格 */
.doc-table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.doc-table {
    margin: 0;
}

.doc-table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    padding: 15px;
    color: #495057;
}

.doc-table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-top: 1px solid #f1f1f1;
}

.doc-table tbody tr:hover {
    background-color: #f8f9fa;
}

.doc-info {
    display: flex;
    align-items: center;
}

.doc-info i {
    font-size: 24px;
}

/* 技术参数卡片 */
.spec-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.spec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #0d6efd;
}

.spec-table {
    margin-bottom: 0;
}

.spec-table tr:last-child td {
    border-bottom: none;
}

.spec-table th {
    font-weight: 600;
    color: #495057;
    width: 40%;
}

/* 安全数据表卡片 */
.sds-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.sds-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.sds-header {
    padding: 15px;
    display: flex;
    align-items: center;
    font-weight: 600;
}

.sds-body {
    padding: 20px;
}

.sds-body h6 {
    margin-bottom: 5px;
}

.sds-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 12px;
    color: #6c757d;
}

.sds-meta span {
    display: flex;
    align-items: center;
}

.sds-footer {
    padding: 15px;
    border-top: 1px solid #f1f1f1;
}

/* 应用指南手风琴 */
.accordion-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-button {
    background-color: #f8f9fa;
    font-weight: 600;
    padding: 15px 20px;
}

.accordion-button:not(.collapsed) {
    background-color: #e8f4ff;
    color: #0d6efd;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: #86b7fe;
}

.accordion-body {
    padding: 20px;
}

/* 代码高亮 */
pre[class*="language-"] {
    border-radius: 8px;
    margin: 15px 0;
    background: #1d1f21 !important;
}

code[class*="language-"] {
    font-size: 14px;
    line-height: 1.5;
}

/* 技术公告 */
.tech-notice .card {
    border-width: 2px;
}

/* 文档查看模态框样式 */
.doc-view-modal .modal-body {
    padding: 0;
}

.doc-viewer {
    width: 100%;
    height: 500px;
    border: none;
}

/* 侧边导航 */
.side-nav .card {
    margin-bottom: 20px;
}

.side-nav .list-group-item {
    border-left: none;
    border-right: none;
    border-color: #f1f1f1;
    padding: 10px 15px;
    font-size: 14px;
}

.side-nav .list-group-item:first-child {
    border-top: none;
}

/* 筛选器 */
.form-select-sm {
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .doc-table {
        display: block;
        overflow-x: auto;
    }
    
    .doc-info {
        min-width: 200px;
    }
    
    .sds-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .accordion-button {
        font-size: 14px;
    }
    
    pre[class*="language-"] {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .doc-category-card {
        padding: 20px 15px;
    }
    
    .doc-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .section-header h3 {
        margin-bottom: 10px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doc-category-card,
.spec-card,
.sds-card,
.accordion-item {
    animation: fadeIn 0.5s ease forwards;
}

.doc-category-card:nth-child(2) {
    animation-delay: 0.1s;
}

.doc-category-card:nth-child(3) {
    animation-delay: 0.2s;
}

.doc-category-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* 文档搜索高亮 */
.highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
}

/* 下载按钮效果 */
.download-doc-btn:hover,
.download-spec-btn:hover {
    animation: downloadPulse 0.5s ease;
}

@keyframes downloadPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}