/**
 * 招标平台自定义样式
 * 用于详情页、列表页等页面的样式增强
 * 包含所有原型中的现代化样式
 */

/* ========== CSS变量定义 ========== */
:root {
    --theme-primary: #28a745;
    --theme-primary-light: #5cb85c;
    --theme-primary-dark: #218838;
    --theme-border-light: #f0f0f0;
    --theme-border-medium: #ddd;
    --theme-text-primary: #333;
    --theme-text-secondary: #666;
    --theme-text-dark: #333;
    --theme-text-medium: #666;
    --theme-text-light: #888;
    --theme-bg-white: #fff;
    --theme-bg-light: #f9f9f9;
    --theme-radius: 4px;
    --theme-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ========== 现代化卡片样式 ========== */

.card-modern {
    background-color: var(--theme-bg-white);
    border: 1px solid var(--theme-border-medium);
    border-radius: var(--theme-radius);
    box-shadow: var(--theme-shadow);
    margin-bottom: 30px;
    overflow: hidden;
}

.card-modern-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--theme-border-medium);
    background-color: #FDFDFD;
}

.card-modern-header .panel-title,
.card-modern-header h3 {
    font-size: 16px;
    font-weight: bold;
    color: var(--theme-text-primary);
    margin: 0;
    line-height: 1.5;
}

.card-modern-header .panel-title .glyphicon {
    color: var(--theme-primary-dark);
    margin-right: 8px;
}

.card-modern-body {
    padding: 20px;
}

/* Tab样式 */
.card-modern .nav-tabs {
    border-bottom: 1px solid var(--theme-border-medium);
    background-color: #FDFDFD;
    padding: 0 12px;
}

.card-modern .nav-tabs > li {
    margin-bottom: -1px;
}

.card-modern .nav-tabs > li > a {
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    color: var(--theme-text-secondary);
    padding: 14px 16px;
    font-weight: 500;
    font-size: 15px;
}

.card-modern .nav-tabs > li > a:hover {
    background-color: var(--theme-bg-light);
    border-bottom-color: var(--theme-border-medium);
}

.card-modern .nav-tabs > li.active > a,
.card-modern .nav-tabs > li.active > a:hover,
.card-modern .nav-tabs > li.active > a:focus {
    color: var(--theme-primary-dark);
    font-weight: bold;
    border: 0;
    border-bottom: 3px solid var(--theme-primary-light);
    background-color: var(--theme-bg-white);
}

.card-modern .tab-content {
    padding: 0;
}

.card-modern .panel-footer {
    background-color: #FDFDFD;
    border-top: 1px solid var(--theme-border-medium);
    padding: 12px 20px;
}

/* ========== 侧边栏样式 ========== */

/* 侧边栏导航菜单 */
.sidebar-nav-menu {
    padding: 0;
}

.sidebar-nav-menu .list-group {
    padding: 0;
    margin: 0;
}

.sidebar-nav-menu .list-group-item {
    border-radius: 0;
    border: 0;
    border-bottom: 1px solid var(--theme-border-medium);
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--theme-text-secondary);
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-nav-menu .list-group-item:last-child {
    border-bottom: 0;
}

.sidebar-nav-menu .list-group-item:hover {
    background-color: #FBFBFB;
    color: var(--theme-primary-dark);
    text-decoration: none;
}

.sidebar-nav-menu .list-group-item.active {
    background-color: var(--theme-primary-light);
    color: #FFFFFF;
    border-color: var(--theme-primary-light);
    font-weight: bold;
}

.sidebar-nav-menu .list-group-item.active::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    margin-top: -6px;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid #FFFFFF;
}

/* 侧边栏列表 */
.sidebar-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.sidebar-list li {
    border-bottom: 1px dashed var(--theme-border-medium);
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list li a {
    display: block;
    padding: 10px 5px;
    color: var(--theme-text-secondary);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.sidebar-list li a:hover {
    color: var(--theme-primary-dark);
    background-color: #FBFBFB;
}

.sidebar-list li a::before {
    content: '•';
    color: var(--theme-primary-light);
    margin-right: 8px;
    font-weight: bold;
    font-size: 16px;
}

/* ========== 文章列表页样式 ========== */

/* 文章列表项 */
.article-list .article-item {
    padding: 20px;
    border-bottom: 1px solid var(--theme-border-medium);
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

.article-list .article-item:last-child {
    border-bottom: none;
}

/* Hover效果 - 左侧绿色条 */
.article-list .article-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--theme-primary-light);
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-list .article-item:hover {
    background-color: #FBFBFB;
}

.article-list .article-item:hover::before {
    transform: translateX(0);
}

/* ========== 文章详情页样式 ========== */

/* 文章头部 */
.article-header {
    border-bottom: 1px solid var(--theme-border-medium);
    padding-bottom: 20px;
    margin-bottom: 30px;
    text-align: center;
}

/* 文章标题 */
.article-title {
    font-size: 26px;
    font-weight: bold;
    color: #333;
    margin-top: 10px;
    margin-bottom: 15px;
    line-height: 1.4;
}

/* 文章元信息 */
.article-meta {
    font-size: 13px;
    color: #888;
}

.article-meta span {
    margin: 0 10px;
    display: inline-block;
}

.article-meta i {
    margin-right: 5px;
}

/* 文章正文 */
.article-content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--theme-text-dark);
}

.article-content h3 {
    font-size: 18px;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--theme-text-dark);
}

.article-content p {
    margin-bottom: 15px;
    text-indent: 2em;
}

.article-content ol,
.article-content ul {
    margin-bottom: 15px;
    padding-left: 2em;
}

.article-content ol li,
.article-content ul li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.article-content table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.article-content table th,
.article-content table td {
    border: 1px solid var(--theme-border-medium);
    padding: 10px;
    text-align: left;
}

.article-content table th {
    background-color: var(--theme-bg-light);
    font-weight: bold;
}

/* 附件下载区域 */
.attachment-box {
    background-color: #f0f8f0;
    border: 1px solid #d4edda;
    border-radius: 4px;
    padding: 20px;
    margin: 30px 0;
}

.attachment-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--theme-text-dark);
    margin-bottom: 15px;
}

.attachment-title .glyphicon {
    color: var(--theme-primary);
    margin-right: 8px;
}

.attachment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.attachment-list li {
    margin-bottom: 10px;
}

.attachment-list li a {
    color: var(--theme-primary);
    text-decoration: none;
    font-size: 15px;
    display: inline-block;
    transition: all 0.3s ease;
}

.attachment-list li a:hover {
    color: var(--theme-primary-dark);
    text-decoration: underline;
}

.attachment-icon {
    margin-right: 8px;
    color: var(--theme-primary-light);
}

/* 无附件提示 */
.no-attachment {
    padding: 30px 20px;
    text-align: center;
    background-color: #fafafa;
    border-radius: 4px;
    border: 1px dashed #ddd;
}

.no-attachment .glyphicon {
    display: inline-block;
    vertical-align: middle;
}

.no-attachment span {
    vertical-align: middle;
}

/* 上一篇/下一篇导航 */
.article-nav {
    border-top: 1px solid var(--theme-border-medium);
    padding-top: 20px;
    margin-top: 30px;
}

.article-nav a {
    display: block;
    padding: 10px 0;
    color: var(--theme-text-medium);
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-nav a:hover {
    color: var(--theme-primary);
    padding-left: 10px;
}

/* ========== 移动端适配 ========== */
@media (max-width: 767px) {
    .article-title {
        font-size: 20px;
        text-align: left;
    }
    
    .article-meta {
        text-align: left;
    }
    
    .article-meta span {
        margin: 0 10px 0 0;
        display: block;
        margin-bottom: 5px;
    }
    
    .article-content {
        font-size: 15px;
    }
    
    .article-content p {
        text-indent: 0;
    }
}

