/* 全局样式 */
:root {
    --primary-color: #0066cc;
    --secondary-color: #f39c12;
    --dark-color: #333;
    --light-color: #f8f9fa;
    --text-color: #333;
    --border-color: #ddd;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img, i {
    max-width: 100%;
    height: auto;
    display: block;
    vertical-align: middle;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    color: var(--dark-color);
}

.section-header h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #0052a3;
    color: #fff;
}

.btn-primary {
    background-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: #e08e0b;
}

.text-center {
    text-align: center;
}

/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo img {
    height: 60px;
}

.main-nav ul {
    display: flex;
}

.main-nav ul li {
    margin-left: 30px;
}

.main-nav ul li a {
    color: var(--dark-color);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.main-nav ul li a.active,
.main-nav ul li a:hover {
    color: var(--primary-color);
}

.main-nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.main-nav ul li a.active:after,
.main-nav ul li a:hover:after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    height: 3px;
    background-color: var(--dark-color);
    transition: var(--transition);
}

/* 轮播图样式 */
.hero-slider {
    margin-top: 80px;
    height: 600px;
    position: relative;
    overflow: hidden;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}
/* Swiper轮播图样式 */
.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-pagination {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background-color: #fff;
}

.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    z-index: 2;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 24px;
    font-weight: bold;
}

.swiper-button-next {
    right: 20px;
}

.swiper-button-prev {
    left: 20px;
}

/* 产品展示样式 */
.featured-products {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.product-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-img {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.product-item:hover .product-overlay {
    opacity: 1;
}

.product-item:hover .product-img img {
    transform: scale(1.1);
}

.product-item h3 {
    padding: 20px 20px 10px;
    font-size: 1.3rem;
    color: var(--dark-color);
}

.product-item p {
    padding: 0 20px 20px;
    color: #666;
}

/* 关于我们样式 */
.about-section {
    padding: 80px 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-img {
    flex: 1;
}

.about-img img {
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 品牌优势样式 */
.brand-advantages {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.advantage-item {
    text-align: center;
    padding: 30px 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.advantage-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.advantage-icon {
    width: 80px;
    height: 80px;
    line-height: 80px;
    margin: 0 auto 20px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    font-size: 2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.advantage-item:hover .advantage-icon {
    background-color: var(--secondary-color);
}

.advantage-item h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.advantage-item p {
    color: #666;
}

/* 新闻资讯样式 */
.news-section {
    padding: 80px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.news-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.news-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.news-img {
    height: 200px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-item:hover .news-img img {
    transform: scale(1.1);
}

.news-content {
    padding: 20px;
}

.news-date {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
}

.news-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.news-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    position: relative;
    display: inline-block;
}

.read-more:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.read-more:hover:after {
    width: 100%;
}

/* 工程案例样式 */
.projects-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.project-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 250px;
    transition: var(--transition);
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-img {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-item:hover .project-img img {
    transform: scale(1.1);
}

.project-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    transform: translateY(100%);
    transition: var(--transition);
}

.project-item:hover .project-content {
    transform: translateY(0);
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.project-content p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 招商加盟样式 */
.franchise-section {
    padding: 80px 0;
}

.franchise-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.franchise-text {
    flex: 1;
}

.franchise-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.franchise-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.franchise-text ul {
    margin-bottom: 30px;
    padding-left: 20px;
}

.franchise-text ul li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.franchise-text ul li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.franchise-img {
    flex: 1;
}

.franchise-img img {
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h3,
.footer-links h3,
.footer-contact h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-about h3:after,
.footer-links h3:after,
.footer-contact h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-about p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #ccc;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.footer-contact p i {
    margin-right: 10px;
    color: var(--secondary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    transition: var(--transition);
    box-sizing: border-box;
    flex-shrink: 0;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
}

/* 新闻详情页面样式 */
.news-detail-section {
    padding: 80px 0;
}

.news-detail {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.news-header {
    margin-bottom: 30px;
    text-align: center;
}

.news-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.news-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem;
    color: #666;
}

.news-meta span {
    display: flex;
    align-items: center;
}

.news-meta i {
    margin-right: 5px;
}

.news-img {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: auto;
    display: block;
}

.news-content {
    margin-bottom: 30px;
}

.news-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.news-content h2 {
    font-size: 1.8rem;
    margin: 30px 0 15px;
    color: var(--dark-color);
}

.news-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.news-content ul li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.news-content strong {
    color: var(--primary-color);
}

.news-share {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.news-share h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--dark-color);
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-btn {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    color: var(--dark-color);
    transition: var(--transition);
}

.share-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.share-btn i {
    margin-right: 5px;
}

.news-navigation {
    text-align: center;
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--secondary-color);
}

.back-link i {
    margin-right: 5px;
}

.related-news {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.related-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.related-news .news-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-news .news-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.related-news .news-img {
    height: 200px;
    margin-bottom: 0;
}

.related-news .news-img img {
    height: 100%;
    object-fit: cover;
}

.related-news .news-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-news .news-meta {
    margin-bottom: 15px;
}

.related-news .news-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.related-news .news-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1;
}

.related-news .read-more {
    color: var(--primary-color);
    font-weight: 500;
    position: relative;
    display: inline-block;
    align-self: flex-start;
}

.related-news .read-more:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.related-news .read-more:hover:after {
    width: 100%;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .slide-content h1 {
        font-size: 2.5rem;
    }

    .about-content,
    .franchise-content {
        flex-direction: column;
    }

    .about-img,
    .franchise-img {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 500px;
    }

    .slide-content h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .advantages-grid,
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 576px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: rgba(255, 255, 255, 0.98);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        z-index: 999;
        overflow-y: auto;
    }

    .main-nav.active {
        left: 0;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
    }

    .main-nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .main-nav ul li a {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .hero-slider {
        height: 400px;
        margin-top: 70px;
    }

    .slide-content h1 {
        font-size: 1.5rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .product-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .advantages-grid,
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .footer-contact p {
        justify-content: center;
    }
    
    /* 新闻详情页面响应式样式 */
    .news-detail {
        padding: 20px;
    }
    
    .news-header h1 {
        font-size: 1.8rem;
    }
    
    .news-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .share-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
    
    .related-news-grid {
        grid-template-columns: 1fr;
    }
}

/* JavaScript 辅助类 */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}
