/* 
 * 主要样式表
 * 企业官网
 */

/* 基础样式 */
:root {
    --primary-color: #2c8262;
    --secondary-color: #42e197;
    --accent-color: #d5eac6;
    --text-color: #2d4841;
    --light-text: #719683;
    --bg-color: #ffffff;
    --light-bg: #f7fafc;
    --dark-bg: #1a2c25;
    --border-color: #e2e8f0;
    --success-color: #4870bb;
    --error-color: #f56565;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

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

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

.bg-light {
    background-color: var(--light-bg);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 头部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(233, 235, 232, 0.95);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.header.scrolled {
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.98);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
}

.main-nav ul {
    display: flex;
}

.main-nav li {
    margin-left: 30px;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* 首页横幅 */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/hero-bg.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.3s;
    animation-fill-mode: both;
}

.hero-btns {
    animation: fadeInUp 1s ease 0.6s;
    animation-fill-mode: both;
}

.hero-btns .btn {
    margin: 0 10px;
}

/* 关于我们 */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 20px;
}

.company-values {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.value-item {
    text-align: center;
    padding: 20px;
    border-radius: 8px;
    background-color: var(--light-bg);
    transition: var(--transition);
}

.value-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.value-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.value-item h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* 服务内容 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.service-icon i {
    font-size: 30px;
    color: var(--primary-color);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* 产品展示 */
.product-tabs {
    margin-top: 30px;
}

.tab-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 12px 25px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--light-text);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    width: 100%;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 50px;
}

.product-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.product-details {
    flex: 1;
}

.product-details h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.product-details p {
    margin-bottom: 20px;
}

.feature-list {
    margin-bottom: 30px;
}

.feature-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.feature-list i {
    color: var(--success-color);
    margin-right: 10px;
}

/* 成功案例 */
.cases-slider {
    position: relative;
    overflow: hidden;
}

.case-item {
    display: flex;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.case-image {
    flex: 1;
    min-height: 300px;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-content {
    flex: 1;
    padding: 30px;
}

.case-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.case-category {
    color: var(--light-text);
    margin-bottom: 15px;
    font-style: italic;
}

.read-more {
    display: inline-flex;
    align-items: center;
    margin-top: 15px;
    font-weight: 600;
}

.read-more i {
    margin-left: 5px;
    transition: var(--transition);
}

.read-more:hover i {
    transform: translateX(5px);
}

.cases-nav {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.cases-nav button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 0 5px;
    transition: var(--transition);
}

.cases-nav button:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 联系我们 */
.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-form {
    flex: 1;
}

.info-item {
    margin-bottom: 30px;
}

.info-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.info-item h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.social-links {
    margin-top: 30px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-bg);
    color: var(--primary-color);
    margin-right: 10px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* 页脚 */
.footer {
    background-color: var(--dark-bg);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 15px;
}

.footer-links {
    display: flex;
    gap: 50px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: #cbd5e0;
    transition: var(--transition);
}

.footer-col a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: #cbd5e0;
}

.footer-bottom-links a {
    color: #cbd5e0;
    margin-left: 20px;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: white;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    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(--secondary-color);
    color: white;
}

/* 动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 992px) {
    .section {
        padding: 60px 0;
    }

    .about-content,
    .product-info,
    .contact-content {
        flex-direction: column;
    }

    .about-image,
    .product-image {
        margin-top: 30px;
    }

    .company-values {
        flex-wrap: wrap;
    }

    .value-item {
        flex: 0 0 calc(50% - 15px);
        margin-bottom: 30px;
    }

    .case-item {
        flex-direction: column;
    }

    .case-image {
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .header .container {
        position: relative;
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: var(--box-shadow);
        padding: 20px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: var(--transition);
    }

    .main-nav.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav li {
        margin: 0 0 15px 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .footer-content,
    .footer-links {
        flex-direction: column;
    }

    .footer-col {
        margin-bottom: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        margin-top: 15px;
    }

    .footer-bottom-links a {
        margin: 0 10px;
    }
}

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

    .hero p {
        font-size: 1rem;
    }

    .hero-btns .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .value-item {
        flex: 0 0 100%;
    }
}