/* 通用样式 */
:root {
    --primary-color: #638c0b;
    /* Logo主色调 */
    --secondary-color: #4a6b08;
    /* 主色调的深色变体 */
    --dark-text: #333;
    --light-text: #f8f8f8;
    --background-light: #f9f9f9;
    --background-dark: #2c3e50;
    /* 深色背景，用于对比 */
    --accent-color: #a4d400;
    /* 强调色，用于点缀 */
}

html {
    font-size: 16px;
    /* 设置html根元素的字体大小，作为rem的基准 */
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.8;
    color: var(--dark-text);
    background-color: var(--background-light);
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 40px 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    margin-top: 0;
    line-height: 1.2;
}

p {
    margin-bottom: 1em;
}

/* 头部样式 */
.header {
    background: transparent;
    color: var(--dark-text);
    /* padding: 2rem 0; */
    /* 增加头部垂直内边距 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* 增加更明显的阴影 */
    position: relative;
    z-index: 100;
    /* 确保头部在最上层 */
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    /* padding: 0 20px; */
}

.header .logo-group {
    display: flex;
    align-items: center;
}

.header .logo {
    height: 70px;
    /* 稍微增大Logo */
    margin-right: 20px;
    /* 增加Logo与标题间距 */
}

.header h1 {
    margin: 0;
    font-size: clamp(1.0rem, 4.5vw, 2.8rem); /* 字体大小在1.0rem到2.8rem之间，根据视口宽度调整 */
    font-weight: 700;
    color: var(--dark-text);
    letter-spacing: 1px;
    /* 增加字母间距 */
    white-space: nowrap; /* 文本不换行 */
    overflow: hidden; /* 隐藏超出部分 */
    text-overflow: ellipsis; /* 显示省略号 */
}

/* 主视觉区样式 */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--light-text);
    text-align: center;
    padding: 150px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    transform: rotate(45deg);
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(0.2) rotate(45deg);
        opacity: 0.8;
    }

    100% {
        transform: scale(0.8) rotate(45deg);
        opacity: 1;
    }
}

.hero .container {
    position: relative;
    z-index: 1;
    /* padding: 0 20px; */
}

.hero h2 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.8rem;
    max-width: 800px;
    margin: 0 auto 30px auto;
    font-weight: 300;
}

/* 核心业务样式 */
.services {
    padding: 80px 0;
    background: var(--background-light);
    text-align: center;
}

.services .section-header {
    margin-bottom: 40px;
}

.services .section-header h2 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.services .section-header h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.services .section-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-top: 10px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.service-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* 使卡片内容居中 */
    text-align: center;
    /* 使卡片内容文本居中 */
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 3.5rem;
    /* 增大图标 */
    margin-bottom: 20px;
    color: var(--primary-color);
    /* 图标颜色 */
}

.service-card h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    display: inline-block;
}

.service-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-text);
    margin-bottom: 0;
}

/* 底部样式 */
.footer {
    background: rgba(99, 140, 11, 0.05);
    /* 几乎透明的绿色背景 */
    color: var(--dark-text);
    /* 调整文字颜色以适应浅色背景 */
    text-align: center;
    padding: 50px 0;
    margin-top: 80px;
    font-size: 1.2rem;
    line-height: 2;
    border-top: none;
    /* 移除顶部边框 */
}

.footer p {
    margin: 0;
    padding: 5px 0;
}

/* 响应式设计 */
@media (max-width: 992px) {
    /* .header h1 的字体大小已通过 clamp() 处理，无需在此处单独设置 */
    .hero h2 {
        font-size: 3.5rem;
    }

    .hero p {
        font-size: 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        /* 992px以下单列布局 */
        max-width: 500px;
        /* 限制宽度以居中单列 */
    }
}

@media (max-width: 768px) {
    .header .container {
        /* flex-direction: column; */
        text-align: center;
    }

    .header .logo {
        height: 48px;
        margin-right: 10px;
        /* 移动端Logo大小 */
        /* margin-bottom: 15px; */
    }

    /* .header h1 的字体大小已通过 clamp() 处理，无需在此处单独设置 */

    /* 移动端底部样式调整 */
    .footer {
        padding: 40px 20px;
    }

    .hero {
        padding: 100px 0;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.3rem;
    }

    /* 核心业务移动端样式调整 */
    .services {
        padding: 60px 0;
    }

    .services .section-header h2 {
        font-size: 2.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;

        padding: 0 30px;
        /* 移动端单列布局 */
    }

    .service-card {
        padding: 25px;
    }

    .service-card h3 {
        font-size: 1.6rem;
    }

    .service-card p {
        font-size: 1rem;
    }

    .container {
        width: 95%;
        padding: 20px 0;
    }
}

@media (max-width: 480px) {
    /* .header h1 的字体大小已通过 clamp() 处理，无需在此处单独设置 */
    .hero h2 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .services .section-header h2 {
        font-size: 2rem;
    }
}
