/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* 自定义颜色 */
.text-primary {
    color: #1e88e5 !important;
}

.bg-primary {
    background-color: #1e88e5 !important;
}

.btn-primary {
    background-color: #1e88e5 !important;
    border-color: #1e88e5 !important;
}

.btn-primary:hover {
    background-color: #1976d2 !important;
    border-color: #1976d2 !important;
}

/* 导航栏样式 */
.navbar-brand h1 {
    font-size: 1.8rem;
    margin: 0;
}

.nav-link {
    font-size: 1.1rem;
    margin-left: 1rem;
}

.nav-link:hover {
    color: #1e88e5 !important;
}

.nav-link.active {
    color: #1e88e5 !important;
    font-weight: bold;
}

/* 轮播图样式 */
.carousel-item {
    height: 500px;
}

.carousel-item img {
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    bottom: 20%;
}

.carousel-caption h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.carousel-caption p {
    font-size: 1.2rem;
}

/* 卡片样式 */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #1e88e5;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    position: relative;
    padding: 20px 0;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #1e88e5;
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.timeline-date {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    z-index: 2;
    margin-top: -30px;
}

.timeline-content {
    width: 45%;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: auto;
}

/* 圆形数字样式 */
.circle-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #1e88e5;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto;
}

/* 返回顶部按钮样式 */
#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-item {
        height: 300px;
    }
    
    .carousel-caption h2 {
        font-size: 1.8rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    .timeline-date {
        left: 20px;
        margin-top: 0;
        margin-left: 40px;
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        margin-right: 0 !important;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 表单样式 */
.form-control:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 0.2rem rgba(30, 136, 229, 0.25);
}

/* 地图容器样式 */
.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
}

/* 案例详情模态框样式 */
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* 分页样式 */
.page-link {
    color: #1e88e5;
}

.page-link:hover {
    color: #1976d2;
}

.page-item.active .page-link {
    background-color: #1e88e5;
    border-color: #1e88e5;
}

/* 标签样式 */
.badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
}

/* 手风琴样式 */
.accordion-button:focus {
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: #1e88e5;
}

/* 团队成员卡片样式 */
.card-body .fab,
.card-body .fas {
    transition: transform 0.3s ease;
}

.card-body .fab:hover,
.card-body .fas:hover {
    transform: scale(1.2);
}

/* 新闻列表样式 */
.news-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}