body {
    margin: 0;
    font-family: '微软雅黑', Arial, sans-serif;
    background: #f7f7f7;
    color: #222;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

header {
    background: #222;
    color: #fff;
}

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

.logo {
    font-size: 1.6em;
    font-weight: bold;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav li {
    margin-left: 28px;
}


nav ul li a {
    position: relative; /* 为伪元素定位做参考 */
    color: #fff;
    text-decoration: none;
    transition: color .2s;
    font-size: 1em;
}

nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px; /* 调整横条与文字的间距 */
    width: 0; /* 初始宽度为 0 */
    height: 2px; /* 横条高度 */
    background-color: #ffd321; /* 横条颜色 */
    transition: width 0.2s ease-in-out; /* 添加过渡效果 */
}

nav ul li a:hover::after {
    width: 100%; /* 鼠标悬停时横条宽度变为 100% */
}

nav a {
    color: #fff;
    text-decoration: none;
    transition: color .2s;
    font-size: 1em;
}

nav a:hover {
    color: #ffd321;
}

section.hero {
    display: flex; /* 使用 Flexbox 布局 */
    flex-direction: column; /* 子元素垂直排列 */
    align-items: center; /* 子元素水平居中 */
    justify-content: center; /* 子元素垂直居中 */
}

.hero {
    background: linear-gradient(135deg, #0ab7ff, #00e1c3);
    color: #fff;
    text-align: center;
    padding: 80px 0 10px 0;
}

section.hero img {
    width: 66%; /* 宽度铺满容器 */
    height: auto; /* 设置固定高度，可按需调整 */
    object-fit:contain; /* 保持图片比例，覆盖整个容器，可能会裁剪部分图片 */
    object-position: center; /* 图片居中显示 */
    display: block; /* 去除图片底部的间隙 */
    align-self: center;
}

.hero h1 {
    font-size: 2.5em;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.3em;
    margin-bottom: 32px;
}

.btn {
    padding: 12px 36px;
    background: #fff;
    color: #ffd321;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.btn:hover {
    background: #ffd321;
    color: #fff;
}

section {
    padding: 56px 0;
    background: #f7f7f7;
}

section:nth-child(even) {
    background: #fff;
}

h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 36px;
}

.service-list {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}

.service-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 32px 24px;
    flex: 1 1 220px;
    max-width: 320px;
    text-align: center;
    margin: 8px;
}

.case-list {
    display: flex;
    gap: 32px;
    justify-content: center;
    flex-wrap: wrap;
}

.case-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
    padding: 16px;
    text-align: center;
    max-width: 320px;
    flex: 1 1 220px;
    margin: 8px;
}

.case-item img {
    width: 100%;
    border-radius: 6px;
    height: 180px;
    object-fit: cover;
}

form {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

input, textarea {
    padding: 10px;
    font-size: 1em;
    border: 1px solid #bbb;
    border-radius: 6px;
    outline: none;
    resize: none;
}

button[type="submit"] {
    background: #ffd321;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px 0;
    font-size: 1.1em;
    cursor: pointer;
    transition: background .2s;
}

button[type="submit"]:hover {
    background: #00e1c3;
}

#formMsg {
    margin-top: 12px;
    color: #0ab7ff;
    text-align: center;
}

footer {
    background: #222;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 1em;
}

@media (max-width: 900px) {
    .service-list, .case-list {
        flex-direction: column;
        gap: 16px;
    }
    .service-item, .case-item {
        max-width: 100%;
    }
    .header-flex {
        flex-direction: column;
        height: auto;
        padding: 10px 0;
    }
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    nav li {
        margin-left: 0;
        margin-top: 8px;
    }
}