/* ============================================
   技术资源页面样式 - 按设计图重写
   ============================================ */

/* 页面布局 */
.tech-page { padding: 20px 0; }
.tech-page-inner { display: flex; gap: 24px; }

/* ========== 左侧侧栏 ========== */
.tech-sidebar { width: 220px; flex-shrink: 0; }
.tech-sidebar-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 20px;
}
.tech-sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}
.tech-sidebar-list { list-style: none; padding: 0; margin: 0; }
.tech-sidebar-list li { margin-bottom: 4px; }
.tech-sidebar-list li:last-child { margin-bottom: 0; }
.tech-sidebar-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 14px;
    color: #666;
    border-radius: 4px;
    transition: all .2s;
}
/* hover时文字清晰可见 */
.tech-sidebar-list li a:hover {
    background: #16587e;
    color: #fff !important;
}
/* 选中项：藏青色背景白字 */
.tech-sidebar-list li a.active {
    background: #16587e !important;
    color: #fff !important;
    font-weight: 500;
}
.tech-sidebar-list li a .cat-count {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}
.tech-sidebar-list li a.active .cat-count {
    color: rgba(255,255,255,.75);
}
.tech-sidebar-list li a:hover .cat-count {
    color: rgba(255,255,255,.75);
}

/* ========== 右侧主区 ========== */
.tech-main-area { flex: 1; min-width: 0; }

/* ========== 标题+搜索栏容器（一行，矩形框） ========== */
.tech-header-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tech-page-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
    padding: 0;
    border: none;
}
.tech-search-bar {
    margin: 0;
}
.tech-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}
.tech-search-select {
    width: 200px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    outline: none;
    background: #fff;
    cursor: pointer;
}
.tech-search-select:focus {
    border-color: #16587e;
}
.tech-category-select {
    width: 150px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    outline: none;
    background: #fff;
    cursor: pointer;
}
.tech-category-select:focus {
    border-color: #16587e;
}
.tech-search-input {
    width: 220px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
    outline: none;
    transition: border-color .2s;
}
.tech-search-input:focus {
    border-color: #16587e;
}
.tech-search-input::placeholder {
    color: #bbb;
}
.tech-search-btn {
    height: 32px;
    padding: 0 18px;
    background: #16587e;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: opacity .2s;
    white-space: nowrap;
}
.tech-search-btn:hover {
    opacity: .85;
}
.tech-reset-btn {
    height: 32px;
    padding: 0 14px;
    background: #fff;
    color: #666;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
    line-height: 30px;
    display: inline-block;
}
.tech-reset-btn:hover {
    border-color: #16587e;
    color: #16587e;
    text-decoration: none;
}

/* ========== 表格列表（下载模式） ========== */
.tech-resource-table-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0 20px;
}
.tech-resource-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.tech-resource-table thead th {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 14px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-align: left;
    white-space: nowrap;
}
.tech-resource-table tbody tr {
    transition: background .2s;
}
.tech-resource-table tbody tr:hover {
    background: #fafbfc;
}
.tech-resource-table tbody tr + tr {
    border-top: 1px solid #f0f0f0;
}
.tech-resource-table tbody td {
    padding: 14px 12px;
    font-size: 14px;
    color: #333;
    vertical-align: middle;
    line-height: 1.5;
}

/* 列宽调整：产品分类加宽，下载列变窄 */
.col-type { width: 10%; }
.col-title { width: 30%; }
.col-category { width: 30%; }
.col-lang { width: 14%; }
.col-action { width: 16%; text-align: center; }
.tech-resource-table thead th.col-action {
    text-align: center;
}

/* 标题文字 */
.tech-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    display: block;
}

/* 下载图标 - 居中显示 */
.tech-download-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #16587e;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: opacity .2s;
}
.tech-download-icon:hover {
    opacity: .75;
    color: #16587e;
}
.tech-download-icon.disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* ========== 文档模式（应用方案）- 列表 ========== */
.tech-doc-list { }
.tech-doc-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    margin-bottom: 12px;
    padding: 16px 20px;
    overflow: hidden;
    transition: box-shadow .2s;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.tech-doc-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.tech-doc-card:last-child {
    margin-bottom: 0;
}
.tech-doc-thumb {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid #eee;
}
.tech-doc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tech-doc-thumb-placeholder {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 24px;
}
.tech-doc-card-body {
    flex: 1;
    min-width: 0;
}
.tech-doc-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.5;
}
.tech-doc-title a {
    color: #333;
    text-decoration: none;
    transition: color .2s;
}
.tech-doc-title a:hover {
    color: #16587e;
}
.tech-doc-summary {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* 列表元信息：作者/日期/浏览量/下载次数 */
.tech-doc-meta {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: #999;
}
.tech-doc-meta span {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.tech-doc-meta i {
    margin-right: 4px;
    font-size: 12px;
    color: #bbb;
}
/* 下载按钮（列表卡片右侧） */
.tech-doc-action {
    flex-shrink: 0;
    align-self: center;
}
.tech-doc-dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 18px;
    background: #16587e;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .2s;
}
.tech-doc-dl-btn:hover {
    opacity: .85;
    color: #fff;
    text-decoration: none;
}
.tech-doc-dl-btn.disabled {
    background: #f0f0f0;
    color: #bbb;
    cursor: not-allowed;
}

/* ========== 空数据 ========== */
.tech-empty {
    text-align: center;
    padding: 60px 0;
    color: #999;
}
.tech-empty i {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
    color: #ddd;
}
.tech-empty p {
    margin: 0;
    font-size: 14px;
}

/* ========== 分页 ========== */
.tech-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    padding-top: 16px;
}
.pager .tech-pagination a,
.pager .tech-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    color: #666;
    background: #fff;
    transition: all .2s;
}
.pager .tech-pagination a:hover {
    border-color: #16587e;
    color: #16587e;
}
.pager .tech-pagination li.active span,
.pager .tech-pagination li.active a {
    background: #fff;
    color: #16587e;
    border-color: #16587e;
    font-weight: 500;
}
.pager .tech-pagination .disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .tech-page-inner {
        flex-direction: column;
    }
    .tech-sidebar {
        width: 100%;
    }
    .tech-sidebar-list {
        display: flex;
        flex-wrap: wrap;
    }
    .tech-sidebar-list li {
        flex: 1;
        min-width: 120px;
    }
    .tech-header-wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .tech-page-title {
        text-align: center;
        padding-bottom: 8px;
        border-bottom: 1px solid #eee;
    }
    .tech-search-form {
        flex-direction: column;
        align-items: stretch;
    }
    .tech-search-select,
    .tech-category-select,
    .tech-search-input,
    .tech-search-btn,
    .tech-reset-btn {
        width: 100%;
    }
    .tech-resource-table {
        table-layout: auto;
    }
    .tech-doc-card {
        flex-direction: column;
    }
    .tech-doc-thumb {
        width: 100%;
        height: 180px;
    }
}
@media (max-width: 768px) {
    .col-type,
    .col-category,
    .col-lang {
        display: none;
    }
    .col-title { width: 60%; }
    .col-action { width: 40%; }
}
