/* 机构网站样式 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* 第一行：Banner */
.banner-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.institution-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.institution-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.institution-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.date-time {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

#current-date, #current-time {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 第二行：轮播图片 */
.carousel-section {
    background: white;
    border-bottom: 1px solid #e9ecef;
}

.carousel-image {
    height: 400px;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 20px;
}

.carousel-caption h5 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.carousel-caption p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* 第三行：横向导航菜单 */
.navigation-section {
    background: #1e3a8a !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.horizontal-nav {
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
}

.horizontal-nav .nav-item {
    margin: 0;
}

.horizontal-nav .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 20px 25px !important;
    transition: all 0.3s ease;
    border-radius: 0;
    margin: 0;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.horizontal-nav .nav-link:hover {
    background: rgba(255,255,255,0.15);
    transform: none;
}

.horizontal-nav .nav-link i {
    margin-right: 8px;
}

.horizontal-nav .nav-item:last-child .nav-link {
    border-right: none;
}

/* 主要内容区域 */
.main-content {
    min-height: calc(100vh - 400px);
}

.section-title {
    color: #1e3a8a;
    font-weight: bold;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3b82f6;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: #ef4444;
}

/* 第四行：新闻区域 */
.news-section {
    background: white;
    padding: 30px 0;
}

.news-combined-row {
    align-items: stretch;
}

.news-combined-row > .col-lg-6 {
    display: flex;
    flex-direction: column;
}

.featured-news, .news-list {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.featured-news-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.featured-news-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 25px 20px 20px;
}

.featured-news-overlay h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.featured-news-overlay p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.news-items {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.news-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.3s ease;
}

.news-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    text-align: center;
    min-width: 60px;
    background: #1e3a8a;
    color: white;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.news-date .day {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
}

.news-content h5 a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.news-content h5 a:hover {
    color: #ef4444;
}

.news-content p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* 第五行：招标信息和文档下载 */
.info-section {
    background: #f8f9fa;
    padding: 30px 0;
}

.info-combined-row {
    align-items: stretch;
}

.info-combined-row > .col-lg-6 {
    display: flex;
    flex-direction: column;
}

.tender-info, .document-download {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tender-item, .document-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.tender-item:hover, .document-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.tender-status {
    min-width: 70px;
}

.tender-content h5 a, .document-content h5 a {
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
}

.tender-content p, .document-content p {
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #6c757d;
}

.document-icon i {
    font-size: 2rem;
}

.document-action {
    margin-left: auto;
    align-self: center;
}

/* 第六行：相关链接 */
.links-section {
    background: white;
}

.link-category {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    height: 100%;
    transition: all 0.3s ease;
}

.link-category:hover {
    background: #e9ecef;
    transform: translateY(-3px);
}

.link-category h5 {
    color: #1e3a8a;
    margin-bottom: 15px;
    font-weight: 600;
}

.link-list {
    list-style: none;
    padding: 0;
}

.link-list li {
    margin-bottom: 8px;
}

.link-list a {
    color: #495057;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.link-list a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

/* 第七行：版权信息 */
.footer-section {
    background: #1e3a8a !important;
    border-top: 4px solid #ef4444;
}

.footer-section a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #3b82f6 !important;
}

/* 新闻列表页面 - 新样式 */
.news-search {
    background: white;
    border-bottom: 1px solid #e9ecef;
}

.news-list-page {
    background: #f8f9fa;
}

/* 左侧分类导航 */
.category-sidebar {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 20px;
}

.category-title {
    color: #1e3a8a;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3b82f6;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 5px;
}

.category-item {
    display: block;
    padding: 10px 15px;
    color: #495057;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}

.category-item:hover {
    background: #f8f9fa;
    color: #1e3a8a;
    border-left-color: #3b82f6;
}

.category-item.active {
    background: #e3f2fd;
    color: #1e3a8a;
    border-left-color: #1e3a8a;
    font-weight: 500;
}

/* 新闻列表容器 */
.news-list-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 新闻列表项 */
.news-list-item {
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.news-list-item:hover {
    background: #f8f9fa;
    margin: 0 -15px;
    padding: 15px;
    border-radius: 5px;
}

.news-list-item:last-child {
    border-bottom: none;
}

.news-list-title {
    color: #1e3a8a;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-list-title a {
    color: inherit;
    text-decoration: none;
}

.news-list-title a:hover {
    color: #3b82f6;
}

.news-list-summary {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

.news-list-meta {
    font-size: 0.75rem;
    color: #adb5bd;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.news-list-meta .category {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    margin-right: 10px;
}

.news-list-meta .date {
    margin-right: 10px;
}

.news-list-meta .views {
    margin-right: 10px;
}

.news-list-meta .author {
    color: #495057;
}

/* 分页样式 */
.pagination {
    margin-top: 30px;
}

.page-link {
    color: #1e3a8a;
    border: 1px solid #dee2e6;
}

.page-link:hover {
    color: #1e3a8a;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

/* 新闻详情页面样式 */
.news-detail {
    background: #ffffff;
}

.article-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 20px;
}

.article-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.4;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}

.article-meta {
    font-size: 0.9rem;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
}

.article-image {
    text-align: center;
}

.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #495057;
}

.article-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.article-content h1, .article-content h2, .article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.article-tags .badge {
    margin-right: 8px;
    margin-bottom: 8px;
}

.article-share .btn {
    margin-right: 8px;
    margin-bottom: 8px;
}

.related-news .section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    border-left: 4px solid #007bff;
    padding-left: 15px;
    margin-bottom: 25px;
}

.news-sidebar .widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
}

.sidebar-widget .list-group-item {
    border: none;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-widget .list-group-item:last-child {
    border-bottom: none;
}

.sidebar-widget .list-group-item:hover {
    background-color: #f8f9fa;
}

/* 页面头部样式 */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.page-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
}

.page-header .breadcrumb-item.active {
    color: white;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .institution-title {
        font-size: 1.8rem;
    }
    
    .institution-subtitle {
        font-size: 1rem;
    }
    
    .institution-logo {
        width: 60px;
        height: 60px;
    }
    
    .marquee-image {
        width: 250px;
        height: 150px;
    }
    
    .marquee-content {
        gap: 20px;
    }
    
    .news-item {
        flex-direction: column;
        text-align: center;
    }
    
    .news-date {
        align-self: center;
    }
    
    .tender-item, .document-item {
        flex-direction: column;
        text-align: center;
    }
    
    .document-action {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .link-category {
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .banner-section .row {
        text-align: center !important;
    }
    
    .institution-title {
        font-size: 1.5rem;
        margin-top: 10px;
    }
    
    .date-time {
        margin-top: 15px;
    }
    
    .marquee-image {
        width: 200px;
        height: 120px;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 15px !important;
        margin: 2px 0;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 辅助类 */
.text-primary { color: #1e3a8a !important; }
.text-danger { color: #ef4444 !important; }
.bg-primary { background-color: #1e3a8a !important; }

.btn-outline-primary {
    color: #1e3a8a;
    border-color: #1e3a8a;
}

.btn-outline-primary:hover {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

.btn-outline-danger {
    color: #ef4444;
    border-color: #ef4444;
}

.btn-outline-danger:hover {
    background-color: #ef4444;
    border-color: #ef4444;
}