/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "宋体", Tahoma, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

a {
    color: #333;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 头部 */
.header-container {
    padding: 20px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    text-align: center;
}

.header-container h1 {
    font-size: 18px;
    margin-bottom: 10px;
}

/* 导航栏样式 */
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 0px;
    flex-wrap: nowrap;
    padding: 0;
    overflow-x: auto;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
}

nav ul li a {
    color: #fff;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

/* 鼠标悬停效果 */
nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

/* 点击效果（激活状态） */
nav ul li a:active {
    background-color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

/* 横幅 */
.banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* 主要内容 */
main {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-section, .service-section, .news-section, .contact-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.about-section h2, .service-section h2, .news-section h2, .contact-section h2 {
    font-size: 18px;
    color: #4CAF50;
    margin-bottom: 15px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
}

/* 新闻动态样式 */
.news-section .news {
    list-style: none;
    padding-left: 20px;
    margin: 0;
}

.news-section .news li {
    margin-bottom: 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px dashed #ddd;
}

.news-section .news li a {
    color: #333;
    flex: 1;
}

.news-section .news li span {
    color: #999;
    margin-left: 20px;
    text-align: right;
    white-space: nowrap;
}

/* 服务中心样式 */
.service-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.service-item {
    flex: 1 1 calc(33.333% - 20px);
    text-align: center;
}

.service-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* 页脚 */
footer {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    margin-top: 20px;
}

footer a {
    color: #fff;
}

footer p {
    margin: 5px 0;
}

/* 媒体查询：平板设备 */
@media (min-width: 768px) {
    .header-container {
        padding: 10px;
    }

    .header-container h1 {
        font-size: 28px;
        margin-bottom: 5px;
    }

    nav ul {
        gap: 4px;
        padding: 6px;
    }

    nav ul li a {
        padding: 6px 10px;
        font-size: 14px;
    }

    main {
        gap: 10px;
    }

    .about-section, .service-section, .news-section, .contact-section {
        padding: 15px;
    }

    .about-section h2, .service-section h2, .news-section h2, .contact-section h2 {
        font-size: 16px;
        margin-bottom: 10px;
        padding-bottom: 3px;
    }

    .news-section .news li {
        padding: 3px 0;
    }

    .service-items {
        gap: 10px;
    }

    .service-item {
        flex: 1 1 calc(33.333% - 10px);
    }

    .service-item img {
        margin-bottom: 5px;
    }
}