/* 自定义样式 - 智汇咨询网站 */

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    transition: all 0.3s ease;
    padding: 20px 0;
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    padding: 0;
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
}

.navbar-nav .nav-link {
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #28a745;
}

/* Hero板块：全屏大底图 + 自动轮播 */
.hero-section {
    min-height: 100vh;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

/* 背景图层容器 */
.hero-slides {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* 单张背景图 */
.hero-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* 暗色遮罩，确保文字清晰可读 */
.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 130, 50, 0.82) 0%, rgba(0, 0, 0, 0.55) 100%);
    z-index: 1;
}

/* 轮播指示点 */
.hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 12px;
}

.hero-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: 2px solid rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background: #fff;
    border-color: #fff;
    transform: scale(1.2);
}

.hero-dot:hover {
    background: rgba(255,255,255,0.8);
}

.hero-section .container {
    z-index: 2;
}

.hero-section h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-section .lead {
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

/* 服务板块图标样式 */
.icon-box {
    width: 100px;
    height: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.hover-card:hover .icon-box {
    transform: scale(1.1);
}

/* 关于我们板块 */
#about {
    padding: 100px 0;
}

#about img {
    transition: transform 0.3s ease;
}

#about img:hover {
    transform: scale(1.02);
}

/* 成功案例板块 */
.portfolio-item {
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.portfolio-item img {
    transition: transform 0.3s ease;
}

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

.portfolio-item:hover img {
    transform: scale(1.05);
}

/* 团队板块 */
#team img {
    transition: transform 0.3s ease;
}

#team .card:hover img {
    transform: scale(1.05);
}

.team-social a {
    transition: color 0.3s ease;
}

.team-social a:hover {
    color: #28a745;
}

/* 新闻资讯板块 */
#news .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

#news .card-img-top {
    transition: transform 0.3s ease;
}

#news .card:hover .card-img-top {
    transform: scale(1.05);
}

/* 客户评价板块 */
.testimonial-item {
    transition: transform 0.3s ease;
}

.testimonial-item:hover {
    transform: translateY(-5px);
}

/* 数据统计板块 */
.stat-item {
    padding: 30px;
}

.stat-item h2 {
    font-size: 3rem;
    margin: 10px 0;
}

.contact-info {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    height: 100%;
}

/* 联系我们板块 - 地图 */
.map-container iframe {
    min-height: 450px;
}

@media (max-width: 768px) {
    .map-container iframe {
        min-height: 300px;
    }
}

/* 页脚样式 */
footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: #28a745;
    text-decoration: none;
}

.social-links a {
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 0.8;
}

/* 返回顶部按钮 */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.btn-back-to-top.show {
    display: flex;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        padding-top: 100px;
    }
    
    .icon-box {
        width: 80px;
        height: 80px;
    }
    
    .icon-box i {
        font-size: 2rem;
    }
    
    .stat-item h2 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

/* 滚动由 JS 统一管理（main.js），不设 CSS scroll-behavior 避免冲突 */

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 按钮样式优化 */
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.btn-outline-light {
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.3);
}

/* 卡片悬停效果 */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 部分标题装饰 */
#services h2::after,
#about h2::after,
#cases h2::after,
#team h2::after,
#news h2::after,
#contact h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #28a745;
    margin: 20px auto;
}

.text-center h2::after {
    margin-left: auto;
    margin-right: auto;
}

/* 区块间距 */
section {
    padding: 80px 0;
}

/* 表格样式（如果需要） */
.table-success {
    background-color: #d4edda;
}

/* 表单验证样式 */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #28a745;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #218838;
}

/* 打印样式 */
@media print {
    .navbar,
    .btn-back-to-top,
    footer {
        display: none;
    }
    
    section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
}