/* ==========================================================================
   1. 基础设置
   ========================================================================== */
:root {
    /* 颜色系统 */
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-text: #666;
    --bg-color: #f8f9fa;
    --white: #fff;
    --placeholder-bg: #e9ecef;
    
    /* 阴影系统 */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 15px rgba(0,0,0,0.1);
    
    /* 动画和过渡 */
    --transition: all 0.3s ease;
    --border-radius: 10px;
}

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* ==========================================================================
   2. 布局组件
   ========================================================================== */
/* 通用间距 */
.section-padding {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-title p {
    color: var(--light-text);
    font-size: 1.1rem;
}

/* ==========================================================================
   3. 导航栏
   ========================================================================== */
.navbar {
    background-color: var(--white) !important;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-scrolled {
    padding: 0.5rem 0;
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--secondary-color) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.nav-link {
    color: var(--secondary-color) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* ==========================================================================
   4. 轮播图
   ========================================================================== */
.carousel-item {
    height: 600px;
    position: relative;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    filter: brightness(0.7);
    transition: var(--transition);
}

.carousel-item:hover img {
    filter: brightness(0.8);
}

.carousel-caption {
    background: rgba(0,0,0,0.6);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    max-width: 800px;
    margin: 0 auto;
    backdrop-filter: blur(5px);
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.carousel-item.active .carousel-caption {
    transform: translateY(0);
    opacity: 1;
}

.carousel-caption h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.carousel-caption p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: rgba(255,255,255,0.9);
}

/* ==========================================================================
   5. 卡片组件
   ========================================================================== */
/* 基础卡片 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    background-color: var(--white);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-title {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--light-text);
    line-height: 1.7;
}

/* 服务卡片 */
.service-card {
    text-align: center;
    padding: 2.5rem;
    position: relative;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.service-card:hover::before {
    opacity: 0.05;
}

.service-card .card-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.service-card:hover .card-title {
    color: var(--primary-color);
}

.service-card ul li {
    margin-bottom: 1rem;
    color: var(--light-text);
    transition: var(--transition);
}

.service-card:hover ul li {
    color: var(--text-color);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-card:hover i {
    transform: scale(1.1);
}

/* 新闻卡片 */
.news-card {
    margin-bottom: 2rem;
}

.news-card .card-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.news-card .text-muted {
    font-size: 0.9rem;
}

/* ==========================================================================
   6. 按钮和表单
   ========================================================================== */
/* 按钮 */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: darken(var(--primary-color), 10%);
    border-color: darken(var(--primary-color), 10%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* 表单 */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid rgba(0,0,0,0.1);
    padding: 0.75rem 1rem;
    transition: var(--transition);
    background-color: var(--white);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(52,152,219,0.15);
    background-color: var(--white);
}

.form-label {
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--light-text);
    font-size: 0.875rem;
}

/* ==========================================================================
   7. 页脚
   ========================================================================== */
footer {
    background-color: var(--secondary-color) !important;
    color: var(--white);
    padding: 5rem 0 2rem;
    margin-top: 5rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

footer h5 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

footer p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* 社交链接 */
.social-links {
    margin-top: 2rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    border-radius: 50%;
    margin-right: 1rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

footer .copyright {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: rgba(255,255,255,0.6);
}

/* ==========================================================================
   8. 工具类
   ========================================================================== */
/* 动画 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
    display: none;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.back-to-top:hover {
    background-color: darken(var(--primary-color), 10%);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.back-to-top i {
    font-size: 20px;
}

/* ==========================================================================
   9. 响应式
   ========================================================================== */
@media (max-width: 768px) {
    /* 轮播图 */
    .carousel-item {
        height: 400px;
    }
    
    .carousel-caption {
        padding: 1.5rem;
    }
    
    .carousel-caption h3 {
        font-size: 1.8rem;
    }
    
    /* 标题 */
    .section-title h2 {
        font-size: 2rem;
    }
    
    /* 服务卡片 */
    .service-card {
        margin-bottom: 2rem;
    }
    
    /* 页脚 */
    footer {
        padding: 3rem 0 1rem;
    }
    
    footer .social-links {
        text-align: center;
    }
    
    /* 返回顶部按钮 */
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top i {
        font-size: 16px;
    }
}

/* ==========================================================================
   10. 图片占位符
   ========================================================================== */
.img-placeholder {
    background-color: var(--placeholder-bg);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    font-size: 1.2rem;
    text-align: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    min-height: 200px;
}

.img-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shine 1.5s infinite;
}

@keyframes shine {
    100% {
        left: 100%;
    }
}

/* 轮播图占位符 */
.carousel-item .img-placeholder {
    height: 600px;
    width: 100%;
}

/* 新闻图片占位符 */
.news-card .img-placeholder {
    height: 200px;
    margin-bottom: 1rem;
}

/* 服务卡片占位符 */
.service-card .img-placeholder {
    height: 150px;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   11. 布局优化
   ========================================================================== */
.container {
    max-width: 1200px;
    padding: 0 1.5rem;
}

.row {
    margin-left: -1rem;
    margin-right: -1rem;
}

.col-md-4, .col-md-6, .col-md-3 {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* 卡片布局优化 */
.card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body .btn {
    margin-top: auto;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .carousel-item .img-placeholder {
        height: 400px;
    }
    
    .news-card .img-placeholder {
        height: 180px;
    }
    
    .service-card .img-placeholder {
        height: 120px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .row {
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    .col-md-4, .col-md-6, .col-md-3 {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
} 