/**
 * 红河胜天信息咨询有限公司 - 前台样式
 * 版本: 2.0
 * 更新时间: 2026-03-11
 */

/* ============================================
   全局样式
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6c5ce7;
    --primary-dark: #5b4cdb;
    --primary-light: #a29bfe;
    --secondary-color: #00b894;
    --accent-color: #fdcb6e;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #d63031;
    --info-color: #0984e3;
    --dark-color: #2d3436;
    --light-color: #dfe6e9;
    --gray-color: #636e72;
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8f9fa;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

/* ============================================
   顶部导航
   ============================================ */
.top-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: 8px 0;
    font-size: 13px;
}

.top-bar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-item i {
    font-size: 14px;
}

/* ============================================
   主导航
   ============================================ */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--dark-color);
    font-size: 15px;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
}

/* ============================================
   轮播图区域
   ============================================ */
.hero-section {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: var(--transition);
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.8), rgba(0, 184, 148, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-content {
    max-width: 800px;
    padding: 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-btn {
    display: inline-block;
    background: var(--white);
    color: var(--primary-color);
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   通用section
   ============================================ */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--dark-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.section-title p {
    color: var(--gray-color);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   服务卡片
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 32px;
    color: var(--white);
}

.service-card h3 {
    font-size: 22px;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--gray-color);
    margin-bottom: 20px;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.service-features span {
    background: var(--light-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--gray-color);
}

/* ============================================
   案例展示
   ============================================ */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.case-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.case-image {
    height: 200px;
    overflow: hidden;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.case-card:hover .case-image img {
    transform: scale(1.1);
}

.case-info {
    padding: 25px;
}

.case-type {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
}

.case-card h3 {
    font-size: 18px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.case-card p {
    color: var(--gray-color);
    font-size: 14px;
    margin-bottom: 15px;
}

.case-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--light-color);
}

.case-client {
    font-size: 13px;
    color: var(--gray-color);
}

.case-date {
    font-size: 13px;
    color: var(--gray-color);
}

/* ============================================
   新闻列表
   ============================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.news-image {
    height: 180px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-info {
    padding: 20px;
}

.news-date {
    font-size: 12px;
    color: var(--gray-color);
    margin-bottom: 10px;
}

.news-card h3 {
    font-size: 16px;
    color: var(--dark-color);
    margin-bottom: 10px;
    line-height: 1.5;
}

.news-desc {
    font-size: 13px;
    color: var(--gray-color);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   关于我们
   ============================================ */
.about-section {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.about-content h2 {
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 20px;
}

.about-content p {
    color: var(--gray-color);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--gray-color);
}

/* ============================================
   联系我们
   ============================================ */
.contact-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
}

.contact-section .section-title h2 {
    color: var(--white);
}

.contact-section .section-title p {
    color: rgba(255, 255, 255, 0.9);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact-item {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

.contact-item i {
    font-size: 32px;
    margin-bottom: 15px;
}

.contact-item h4 {
    font-size: 16px;
    margin-bottom: 10px;
}

.contact-item p {
    font-size: 14px;
    opacity: 0.9;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.contact-form h3 {
    font-size: 24px;
    color: var(--dark-color);
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-block {
    width: 100%;
}

/* ============================================
   页脚
   ============================================ */
.site-footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h4 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
}

.footer-about p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact-item i {
    color: var(--primary-color);
    margin-top: 3px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 992px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .main-header .container {
        padding: 0 15px;
        height: 60px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .logo img {
        height: 35px;
    }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .main-nav a {
        padding: 15px 0;
        border-bottom: 1px solid var(--light-color);
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero-section {
        height: 450px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .services-grid,
    .cases-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 25px;
    }
}

/* ============================================
   工具类
   ============================================ */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-muted {
    color: var(--gray-color) !important;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
