/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* 头部导航 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: 1px;
    margin: 0;
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    height: 3px;
    width: 100%;
    background-color: #333;
    transition: all 0.3s ease;
    transform-origin: left center;
}

.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg);
}

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

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
}

nav ul li a:hover {
    color: #3498db;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #3498db;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

/* 首屏横幅 */
.hero {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%), url('../images/hero-bg.svg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 60px;
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 22px;
    margin-bottom: 30px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn-primary {
    display: inline-block;
    background-color: #3498db;
    color: #fff;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

/* 关于我们 */
.about {
    padding: 100px 0;
    background-color: #fff;
}

.about h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
}

.about p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 18px;
    color: #666;
    line-height: 1.8;
}

.stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-top: 50px;
}

.stat-item {
    flex: 1;
    padding: 20px;
}

.stat-item h3 {
    font-size: 48px;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 18px;
    color: #666;
    margin: 0;
    text-align: center;
}

/* 业务范围 */
.services {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.services h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: #2c3e50;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid #3498db;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.service-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
}

.service-card p {
    color: #666;
    line-height: 1.7;
}

/* 子公司展示 */
.subsidiaries {
    padding: 100px 0;
    background-color: #fff;
}

.subsidiaries h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: #2c3e50;
}

.subsidiary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.subsidiary-card {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    cursor: pointer;
}

.subsidiary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.subsidiary-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
}

.subsidiary-card p {
    color: #666;
    margin-bottom: 0;
    line-height: 1.7;
}

/* 新闻中心 */
.news {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.news h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #2c3e50;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.news-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer; /* 添加指针样式表示可点击 */
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.news-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.news-item p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.7;
}

.news-item small {
    color: #95a5a6;
    font-size: 14px;
}

/* 新闻分页 */
.news-pagination {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    gap: 10px;
}

.news-pagination button {
    padding: 8px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.news-pagination button.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.news-pagination button:hover:not(.active) {
    background-color: #f8f9fa;
}

.no-news {
    text-align: center;
    color: #666;
    font-style: italic;
    grid-column: 1 / -1;
    padding: 40px;
}

/* 新闻详情模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    animation: modalopen 0.4s;
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-60px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover,
.close:focus {
    color: #000;
}

.modal-content h2 {
    color: #2c3e50;
    margin-top: 0;
    padding-right: 40px;
}

.modal-content p {
    line-height: 1.8;
    color: #555;
    font-size: 16px;
    margin-bottom: 15px;
}

.modal-content .date {
    color: #95a5a6;
    font-size: 14px;
    margin-bottom: 20px;
    display: block;
}

/* 子公司详情模态框 */
.subsidiary-modal {
    max-width: 1000px;
}

.subsidiary-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

.subsidiary-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 25px 0 15px;
    color: #2c3e50;
}

.subsidiary-info p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.subsidiary-info ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.subsidiary-info li {
    margin-bottom: 10px;
    color: #666;
}

.subsidiary-contact {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    height: fit-content;
}

.subsidiary-contact h3 {
    font-size: 20px;
    font-weight: 600;
    margin-top: 0;
    color: #2c3e50;
}

.subsidiary-contact p {
    margin-bottom: 15px;
    color: #666;
}

/* 联系我们 */
.contact {
    padding: 100px 0;
    background-color: #fff;
}

.contact h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: #2c3e50;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.contact-item {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.contact-item h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
}

.contact-item p {
    color: #666;
    font-size: 18px;
    line-height: 1.7;
}

/* 页脚 */
footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background: #3498db;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
}

/* 子公司详情页面样式 */
.subsidiary-detail {
    padding: 120px 0 60px;
    background-color: #fff;
}

.subsidiary-detail h1 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #2c3e50;
}

.subsidiary-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.subsidiary-info h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 30px 0 15px;
    color: #2c3e50;
}

.subsidiary-info p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.subsidiary-info ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

.subsidiary-info li {
    margin-bottom: 10px;
    color: #666;
}

.subsidiary-contact {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    height: fit-content;
}

.subsidiary-contact h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2c3e50;
}

.subsidiary-contact p {
    margin-bottom: 15px;
    color: #666;
}

.back-link {
    text-align: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header .container {
        flex-direction: row;
        padding: 15px 0;
        position: relative;
    }
    
    .menu-toggle {
        display: flex;
        margin-right: 15px; /* 保持汉堡菜单与右边有一定距离 */
    }
    
    .logo {
        margin-left: 15px; /* 为logo添加左边距 */
    }
    
    #main-nav {
        position: fixed;
        top: 15px; /* 顶部位置改为15px */
        right: -100%;
        width: 70%;
        height: calc(100vh - 30px); /* 调整高度为100vh - 30px */
        background-color: #fff;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        padding-top: 80px;
        border-radius: 10px 0 0 10px; /* 添加圆角效果 */
    }
    
    #main-nav.active {
        right: 0px; /* 菜单与屏幕右边保持0px的距离 */
    }
    
    nav ul {
        flex-direction: column;
        padding: 20px;
    }
    
    nav ul li {
        margin: 15px 0;
    }
    
    .hero-content {
        padding: 0 20px; /* 为横幅内容添加左右内边距 */
    }
    
    .hero-content h2 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 18px;
    }
    
    .stats {
        flex-direction: column;
        gap: 30px;
    }
    
    .service-grid,
    .subsidiary-grid,
    .news-list,
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .subsidiary-content {
        grid-template-columns: 1fr;
    }
    
    .subsidiary-contact {
        margin-top: 30px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-section {
        text-align: center;
        margin-bottom: 30px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-animate {
    animation: fadeInUp 0.6s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}