/**
 * 沛林网络科技企业官网样式表
 * 作者: CodeBuddy
 * 日期: 2023
 */

/* 基础样式 */
:root {
    --primary-color: #1565C0;
    --primary-dark: #0D47A1;
    --primary-light: #42A5F5;
    --accent-color: #FF6E40;
    --text-color: #333333;
    --text-light: #666666;
    --text-white: #FFFFFF;
    --bg-light: #F5F7FA;
    --bg-dark: #1A1A1A;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* 为固定导航栏预留空间 */
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-white);
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--primary-color); /* 修改标题颜色为主题色 */
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

.bg-light {
    background-color: var(--bg-light);
}

/* 导航栏样式 */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

#header.scrolled {
    background-color: var(--text-white);
    box-shadow: var(--shadow);
    padding: 15px 0;
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
}

.company-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-white);
    transition: var(--transition);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1px;
}

#header.scrolled .company-name {
    color: var(--primary-color);
    text-shadow: none;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-white);
    position: relative;
    padding: 5px 0;
}

#header.scrolled .nav-menu a {
    color: var(--text-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--text-white);
    cursor: pointer;
}

#header.scrolled .mobile-menu-btn {
    color: var(--text-color);
}

/* 首屏轮播区样式 */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.slider-container {
    position: relative;
    height: 100%;
}

.slider {
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.7);
}

.slide-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    color: var(--text-white);
    z-index: 1;
}

/* 修改banner文字排版，确保三行文字都居中 */
.slide-text-container {
    max-width: 800px; /* 增加宽度 */
    margin: 0 auto; /* 水平居中 */
    text-align: center; /* 文字居中对齐 */
    margin-top: 170px; /* 保持下移距离 */
    width: 80%; /* 占据更多横向空间 */
    display: flex;
    flex-direction: column;
    align-items: center; /* 确保子元素也居中 */
}

.slide-content h1 {
    font-size: 4.5rem; /* 更大的标题字体 */
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    color: var(--primary-light); /* 使用主题色系的亮色调 */
    width: 100%; /* 确保宽度占满容器 */
    text-align: center; /* 确保文字居中 */
}

.slide-subtitle {
    font-size: 2.2rem; /* 更大的副标题字体 */
    margin-bottom: 30px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    line-height: 1.3;
    color: var(--text-white); /* 保持白色，增强对比度 */
    width: 100%; /* 确保宽度占满容器 */
    text-align: center; /* 确保文字居中 */
}

.slide-description {
    background-color: rgba(21, 101, 192, 0.7); /* 使用主题蓝色背景，增加透明度 */
    padding: 25px;
    border-radius: 8px;
    margin-top: 25px;
    max-width: 700px; /* 进一步增加宽度 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 添加阴影增强立体感 */
    width: 100%; /* 确保宽度占满容器 */
    text-align: center; /* 确保文字居中 */
}

.slide-description p {
    color: var(--text-white);
    font-size: 1.1rem;
    line-height: 1.6;
}

.slide-description p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 2;
}

.prev-btn,
.next-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.prev-btn:hover,
.next-btn:hover {
    background-color: var(--primary-color);
}

.slider-dots {
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--text-white);
    transform: scale(1.2);
}

/* 核心业务展示样式 */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--text-white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color); /* 修改标题颜色为主题色 */
}

.service-card p {
    color: var(--text-light);
}

/* 公司优势区样式 */
.advantages-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.advantage-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background-color: var(--text-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.advantage-icon {
    font-size: 2rem;
    color: var(--primary-color);
    min-width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.advantage-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color); /* 修改标题颜色为主题色 */
}

.advantage-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* 客户案例样式 */
.cases-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background-color: transparent;
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    color: var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.cases-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.case-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.case-img {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.case-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(21, 101, 192, 0.9);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    opacity: 0;
    transition: var(--transition);
}

.case-item:hover .case-img img {
    transform: scale(1.1);
}

.case-item:hover .case-overlay {
    opacity: 1;
}

.case-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.case-overlay p {
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.client-logos {
    margin-top: 60px;
    text-align: center;
}

.client-logos h3 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary-color); /* 修改标题颜色为主题色 */
}

/* 修改合作伙伴样式，添加公司名称 */
.logos-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 20px;
    max-width: 100%;
    overflow-x: auto;
    padding: 10px 0;
}

.partner-item {
    width: 18%;
    min-width: 160px;
    background-color: var(--text-white);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.partner-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.partner-logo {
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    background-color: #f5f7fa; /* 统一背景色 */
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05); /* 添加细微边框 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* 添加轻微阴影 */
    transition: all 0.3s ease;
}

.partner-logo img {
    max-width: 75%;
    max-height: 75%;
    object-fit: contain;
    filter: grayscale(20%); /* 轻微灰度处理，使所有logo风格更加统一 */
    opacity: 0.9; /* 轻微降低不透明度，使视觉效果更加柔和 */
    transition: all 0.3s ease;
}

.partner-item:hover .partner-logo {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.partner-item:hover .partner-logo img {
    filter: grayscale(0%);
    opacity: 1;
}

.partner-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
    text-align: center;
}

/* 案例详情弹窗样式 */
.case-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
}

.case-modal-content {
    position: relative;
    background-color: var(--text-white);
    margin: 50px auto;
    width: 90%;
    max-width: 900px;
    border-radius: 8px;
    overflow: hidden;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 1;
}

.case-modal-body {
    padding: 30px;
}

.case-modal-header {
    margin-bottom: 30px;
    text-align: center;
}

.case-modal-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
}

.case-modal-images {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.modal-img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
}

.case-modal-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.info-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* 联系我们样式 */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background-color: var(--text-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.info-item h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--primary-color); /* 修改标题颜色为主题色 */
}

.info-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.contact-map {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.map-container {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-social {
    background-color: var(--text-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.contact-social h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--primary-color); /* 修改标题颜色为主题色 */
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
}

/* 页脚样式 */
#footer {
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info {
    max-width: 400px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.footer-logo .company-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
}

.link-group h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: #FFFFFF; /* 纯白色 */
}

.link-group h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.link-group ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.link-group a {
    color: #FFFFFF; /* 纯白色 */
    transition: var(--transition);
}

.link-group a:hover {
    color: var(--text-white);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5); /* 更改为半透明白色，不那么显眼 */
}

.footer-bottom p {
    margin-bottom: 10px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5); /* 更改为半透明白色，不那么显眼 */
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--primary-light); /* 悬停时显示主题色 */
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-white);
    border: none;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* 响应式样式 */
@media (max-width: 992px) {
    .section {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .slide-content h1 {
        font-size: 3rem;
    }
    
    .slide-subtitle {
        font-size: 1.5rem;
    }
    
    .slide-description {
        max-width: 450px;
    }
    
    .logo img {
        height: 50px;
    }
    
    .logo span {
        font-size: 1.8rem;
    }
}

/* 平板设备媒体查询 */
@media (min-width: 769px) and (max-width: 1024px) {
    .slide-text-container {
        max-width: 80%;
        margin: 170px auto 0; /* 保持下移距离并水平居中 */
        text-align: center;
    }
    
    .company-name {
        font-size: 2.2rem;
    }
    
    /* 确保合作伙伴在平板上也是一行显示 */
    .logos-container {
        justify-content: space-between;
    }
    
    .partner-item {
        width: 18%;
        min-width: 120px;
    }
    
    /* 调整页脚在平板上的布局 */
    .footer-content {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .footer-info {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .footer-links {
        width: 100%;
        justify-content: space-between;
    }
}

/* 移动设备媒体查询 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--text-white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 20px;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu a {
        color: var(--text-color);
        font-size: 1.2rem;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .slide-content h1 {
        font-size: 2.5rem;
    }
    
    .slide-subtitle {
        font-size: 1.3rem;
    }
    
    .slide-description {
        max-width: 100%;
    }
    
    .slide-text-container {
        max-width: 100%;
        padding: 0 20px;
        margin-top: 170px; /* 保持与桌面版一致的下移距离 */
        text-align: center; /* 保持居中对齐 */
    }
    
    .cases-filter {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 6px 15px;
        font-size: 0.9rem;
    }
    
    .case-modal-content {
        margin: 20px auto;
        width: 95%;
    }
    
    .case-modal-images {
        flex-direction: column;
    }
    
    .modal-img {
        max-width: 100%;
    }
    
    .company-name {
        font-size: 1.8rem; /* 调整移动端公司名称大小 */
    }
    
    /* 调整合作伙伴在移动端的显示 */
    .logos-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .partner-item {
        width: 45%;
        min-width: 140px;
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .slide-subtitle {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .slide-description p {
        font-size: 0.9rem;
    }
    
    .advantage-item,
    .info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-content {
        gap: 30px;
    }
    
    .footer-info,
    .link-group {
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .link-group h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .logo img {
        height: 40px;
    }
    
    .logo span {
        font-size: 1.4rem;
    }
    
    .partner-item {
        width: 130px;
    }
    
    .partner-name {
        font-size: 0.9rem;
    }
}