/* 基础样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #777;
    --white: #fff;
    --gray: #f5f5f5;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.section {
    padding: 10px 0;
    display: none;
}

.section.active {
    display: block;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--secondary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto;
}

.highlight {
    color: var(--primary-color);
}

/* 标题栏样式 */
.header {
    background-color: transparent;
    padding: 0;
}

.header-image {
    width: 100%;
    height: 75px;
    object-fit: cover;
}

/* 导航栏样式 */
.navbar {
    margin-top: 0;
}

.nav-menu {
    display: flex;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    padding: 20px 15px;
    color: var(--dark-color);
    font-weight: 500;
}

.nav-menu li.active a,
.nav-menu li a:hover {
    color: var(--primary-color);
}

.nav-menu li.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
}

/* 轮播图样式 */
.slider {
    position: relative;
    overflow: hidden;
    height: 400px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    background-color: rgba(0, 0, 0, 0.6);
    padding: 30px;
    border-radius: 5px;
    max-width: 800px;
}

.slide-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 10;
}

.prev-slide,
.next-slide {
    background-color: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition);
}

.prev-slide:hover,
.next-slide:hover {
    background-color: var(--primary-color);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--white);
}

/* 关于我们样式 */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
}

.about-image img {
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background-color: var(--gray);
    border-radius: 5px;
    flex: 1;
    margin: 0 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
}

/* 服务卡片新样式 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4列等宽 */
    gap: 20px; /* 卡片间距 */
}

/* 服务卡片样式（保持图片+标题结构） */
.service-card {
    display: block; /* 使链接可以填充整个卡片 */
    color: inherit; /* 继承文字颜色 */
    text-decoration: none; /* 去除下划线 */
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.service-image {
    height: 180px; /* 固定图片高度 */
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card h3 {
    padding: 15px;
    margin: 0;
    text-align: center;
    font-size: 1.1rem;
    color: #2c3e50;
    border-top: 1px solid #eee; /* 标题上方分隔线 */
}

/* 悬停效果 */
.service-card:hover {
    transform: translateY(-5px);
}

.service-card:hover img {
    transform: scale(1.05);
}

/* 平板设备：一行2列 */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 手机设备：一行1列 */
@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* 案例展示样式 */
.portfolio-filter {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    margin: 0 10px 10px 0;
    background-color: var(--gray);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.portfolio-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(52, 152, 219, 0.9);
    color: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    padding: 20px;
    text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay h3 {
    margin-bottom: 10px;
}

.portfolio-link {
    color: var(--white);
    border: 1px solid var(--white);
    padding: 8px 15px;
    border-radius: 4px;
    margin-top: 15px;
}

.portfolio-link:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* 新闻样式 */
.news-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 25px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.tab-btn.active,
.tab-btn:hover {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

.news-content {
    display: none;
}

.news-content.active {
    display: block;
}

.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    margin-bottom: 30px;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.news-date {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px;
    text-align: center;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-date .day {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.news-date .month {
    font-size: 1rem;
    text-transform: uppercase;
}

.news-date .year {
    font-size: 0.9rem;
}

.news-details {
    padding: 20px;
    flex: 1;
}

.news-details h3 {
    margin-bottom: 10px;
}

.news-details h3 a {
    color: var(--secondary-color);
}

.news-details h3 a:hover {
    color: var(--primary-color);
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    font-weight: bold;
}

.view-all {
    display: block;
    text-align: center;
    margin-top: 30px;
    font-weight: bold;
    color: var(--primary-color);
}

.view-all:hover {
    text-decoration: underline;
}

/* 联系样式 */
.contact-container {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.contact-info,
.contact-form {
    flex: 1;
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.contact-info h3,
.contact-form h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.info-item i {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
}

.social-media {
    margin-top: 30px;
}

.social-media a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    margin-right: 10px;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-media a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.map-container {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 页脚样式 */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
}

.footer-column {
    flex: 0 1 250px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-column h3 {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-contact li {
    justify-content: center;
}

.footer-links a {
    color: var(--light-color);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.footer-contact li i {
    margin-right: 10px;
}

.footer-newsletter form {
    display: flex;
    flex-direction: column;
}

.footer-newsletter input[type="email"] {
    padding: 12px;
    border: none;
    border-radius: 4px;
    margin-bottom: 15px;
    font-family: inherit;
}

.footer-newsletter button {

    padding: 12px;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.footer-newsletter button:hover {
    background-color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #444;
    color: var(--light-color);
    font-size: 0.9rem;
    margin-top: 40px;
}

.footer-bottom a {
    color: var(--primary-color);
}

.footer-bottom a:hover {
    text-decoration: underline;
}

