/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 24px; /* 增加上下内边距，避免logo贴边 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px; /* 导航栏更高，给logo更多垂直空间 */
}

/* 导航栏左侧logo与文字 */
.nav-logo { display: flex; align-items: center; gap: 14px; padding: 4px 0; height: 100%; }
.nav-logo .logo {
    /* 以最大高度约束图片，避免在不同环境放大失控 */
    max-height: 60px;
    width: auto;
    height: auto;
    border-radius: 8px;
    object-fit: contain;
    display: block;
}
.nav-logo .brand-text h2 { margin: 0; line-height: 1.2; }
.nav-logo .brand-text p { margin: 0; }

/* 导航菜单项间距略微调整容纳新增项 */
.nav-menu { gap: 26px; }

.nav-logo h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-logo p {
    color: #7f8c8d;
    font-size: 0.8rem;
    margin-top: -5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #3498db;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    margin: 3px 0;
    transition: 0.3s;
}

/* 首页轮播图区域 */
.hero-section {
    height: 78vh; /* 缩短以露出下方内容 */
    position: relative;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex; /* 横向排列，支持左右平移 */
    transition: transform 0.6s ease-in-out; /* 平移动画 */
}

.slide {
    position: relative; /* 改为相对定位，作为单页面板 */
    width: 100%;
    height: 100%;
    flex: 0 0 100%; /* 每个面板占满视口宽度 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.slide-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: slideInUp 1s ease-out;
}

.slide-content p {
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: slideInUp 1s ease-out 0.3s both;
}

.slide-content .subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    animation: slideInUp 1s ease-out 0.6s both;
}

.slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.7), rgba(44, 62, 80, 0.7));
}

/* 轮播控制按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 30px;
}

.next {
    right: 30px;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 公司介绍区域 */
.about-section {
    padding: 100px 0;
    background: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.section-header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.about-content {
    display: grid;
    gap: 60px;
}

/* 公司信息卡片 */
.info-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item strong {
    color: #3498db;
    font-weight: 600;
}

.info-item span {
    color: #555;
    font-size: 1rem;
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 4px solid #3498db;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.product-image {
    width: 100%;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-card h4 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.product-card p {
    color: #7f8c8d;
    line-height: 1.6;
}

/* 服务流程时间线 */
.process-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateY(-5px);
}

.step-number {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.step-content p {
    color: #7f8c8d;
    line-height: 1.6;
}

/* 企业文化 */
.culture-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* 公司简介左对齐与首行缩进 */
.culture-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    max-width: 800px;
    margin: 0 auto 12px auto;
    text-align: left; /* 左对齐 */
    text-indent: 2em; /* 首行缩进两个字 */
}

/* 核心优势区域 */
.core-advantages {
    margin-top: 60px;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.advantage-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
    border-top: 4px solid #e74c3c;
}

.advantage-card:hover {
    transform: translateY(-5px);
}

.advantage-card h4 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.advantage-card p {
    color: #7f8c8d;
    line-height: 1.6;
}

/* 联系我们区域 */
.contact-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
}

.contact-content {
    text-align: center;
}

.contact-item {
    margin-bottom: 30px;
}

.contact-item h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.contact-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.contact-details {
    margin: 40px 0;
}

.contact-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.contact-col {
    background: rgba(255, 255, 255, 0.1);
    padding: 25px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.contact-col h5 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: #ecf0f1;
}

.contact-col p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.company-motto {
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.company-motto h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.company-motto p {
    font-size: 1.2rem;
    opacity: 0.9;
    font-style: italic;
}

/* 产品页面样式 */
.page-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    margin-top: 70px;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.page-header p {
    font-size: 1.3rem;
    opacity: 0.9;
}

.products-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.product-category {
    margin-bottom: 80px;
}

.category-header {
    text-align: center;
    margin-bottom: 50px;
}

.category-header h2 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 700;
}

.category-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.product-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.product-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-item .product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-item .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-item h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin: 20px 0 15px;
    font-weight: 600;
}

.product-item p {
    color: #7f8c8d;
    padding: 0 20px 25px;
    line-height: 1.6;
}

/* 导航栏激活状态 */
.nav-menu a.active {
    color: #3498db;
}

.nav-menu a.active::after {
    width: 100%;
}

/* 地图容器样式 */
.map-container {
    margin-top: 50px;
    text-align: center;
}

.map-container h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-weight: 600;
}

/* 页脚 */
.footer {
    background: #1a252f;
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* 交替分栏布局（产品服务页） */
.category-row {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 80px;
}
.category-row.reverse {
    grid-template-columns: 1.8fr 1.2fr;
}
.category-row.reverse .category-text { order: 2; }
.category-row.reverse .category-gallery { order: 1; }

.category-text h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 16px;
    font-weight: 700;
}
.category-text p {
    color: #7f8c8d;
    line-height: 1.85;
}

.category-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 180px;
    gap: 16px;
}
.gallery-item {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

@media (max-width: 1024px) {
    .category-row,
    .category-row.reverse {
        grid-template-columns: 1fr;
    }
    .category-row.reverse .category-text,
    .category-row.reverse .category-gallery {
        order: unset;
    }
    .category-gallery { grid-auto-rows: 160px; }
}

@media (max-width: 600px) {
    .category-gallery {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 130px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed !important;
        left: 0 !important;
        top: -100vh !important; /* 完全隐藏在上方，使用视口高度 */
        flex-direction: column !important;
        background-color: white !important;
        width: 100% !important;
        text-align: center !important;
        transition: 0.3s !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        border-spacing: 0 !important;
        gap: 0 !important; /* 重置桌面版的 gap */
        z-index: 1 !important; /* 确保在导航栏下方 */
        max-height: calc(100vh - 90px) !important; /* 限制最大高度，使用导航栏实际高度 */
        overflow-y: auto !important; /* 如果内容过多可以滚动 */
        display: block !important; /* 覆盖桌面版的 flex */
        transform: translateZ(0) !important; /* 创建新的层叠上下文 */
    }
    
    .nav-menu li {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        list-style: none !important;
    }
    
    .nav-menu a {
        display: block !important;
        width: 100% !important;
        padding: 15px 20px !important;
        text-decoration: none;
        color: #2c3e50 !important;
        font-weight: 500;
        font-size: 1rem !important;
        border-bottom: 1px solid #f0f0f0;
        transition: all 0.3s ease;
        background-color: white !important;
        text-align: center !important;
        line-height: 1 !important;
        position: static !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    .nav-menu a:hover {
        background-color: #f8f9fa;
        color: #3498db;
        transform: translateX(3px);
    }
    
    .nav-menu a:active {
        background-color: #e9ecef;
        transform: scale(0.98);
    }
    
    /* 恢复分割线样式 */
    .nav-menu li:first-child a {
        border-top: 1px solid #f0f0f0;
    }
    
    .nav-menu li:last-child a {
        border-bottom: 1px solid #f0f0f0;
    }
    
    /* 菜单项图标效果 - 居中显示 */
    .nav-menu a::before {
        content: '';
        display: inline-block;
        width: 4px;
        height: 4px;
        background-color: #3498db;
        border-radius: 50%;
        margin-right: 8px;
        opacity: 0;
        transition: opacity 0.3s ease;
        vertical-align: middle;
    }
    
    .nav-menu a:hover::before {
        opacity: 1;
    }
    
    /* 重置桌面版的 ::after 样式在移动端 */
    .nav-menu a::after {
        display: none !important;
    }
    
    /* 强制移除所有可能的间距 */
    .nav-menu * {
        margin: 0 !important;
        padding: 0 !important;
        border-spacing: 0 !important;
    }
    
    .nav-menu a {
        margin: 0 !important;
        padding: 15px 20px !important;
    }
    
    .nav-menu.active {
        top: 90px !important; /* 从导航栏下方弹出，使用导航栏实际高度 */
        gap: 0 !important; /* 确保激活状态也没有间距 */
        max-height: calc(100vh - 90px) !important; /* 确保不超出屏幕，使用导航栏实际高度 */
        z-index: 1 !important; /* 确保在导航栏下方 */
        position: fixed !important; /* 确保定位正确 */
        transform: translateZ(0) !important; /* 创建新的层叠上下文 */
        background-color: white !important; /* 确保背景色正确 */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important; /* 确保阴影正确 */
    }
    
    .slide-content h1 {
        font-size: 2.5rem;
    }
    
    .slide-content p {
        font-size: 1.1rem;
    }
    
    .carousel-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .prev {
        left: 15px;
    }
    
    .next {
        right: 15px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .process-timeline {
        grid-template-columns: 1fr;
    }
    
    .process-step {
        flex-direction: column;
        text-align: center;
    }
    .hero-section { height: 70vh; }
    .nav-logo .logo {
        max-height: 48px;
    }
}

@media (max-width: 480px) {
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 1rem;
    }
    
    .info-card,
    .product-card,
    .process-step,
    .culture-content {
        padding: 20px;
    }
    
    .container {
        padding: 0 15px;
    }
}

/* 首页第一张为Logo图：限制图片高度，避免铺满 */
.logo-slide .slide-image img {
    object-fit: contain;
    height: auto; /* 覆盖通用的 height:100% */
    width: auto;  /* 覆盖通用的 width:100% */
    max-height: 240px; /* 可按需调整 */
    max-width: 80vw;   /* 防止极端宽图过大 */
    margin: 0 auto; /* 居中 */
    display: block;
}

@media (max-width: 768px) {
    .logo-slide .slide-image img { max-height: 160px; }
}
