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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    overflow-x: hidden;
    background-color: #f4f4f4;
    color: #333;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- 导航栏 --- */
header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 70px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 50px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 35px;
    cursor: pointer;
    transition: color 0.3s;
    font-size: 16px;
    position: relative;
}

nav ul li:hover {
    color: #f39c12;
}

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

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

/* --- 主容器 --- */
main {
    width: 100%;
}

/* --- 通用 Section 样式 --- */
.section {
    width: 100%;
    min-height: 100vh;
    padding-top: 60px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
}

/* --- 模块主标题样式 --- */
.section-header {
    text-align: center;
    margin: 40px 0 30px 0;
    position: relative;
}

.section-title {
    font-size: 36px;
    font-weight: bold;
    color: #2c3e50;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #f39c12;
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- 首页 --- */
#home {
    background: url('https://picsum.photos/seed/bg/1920/1080') no-repeat center center/cover fixed;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    padding-top: 0;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}

#home h1 {
    position: relative;
    z-index: 2;
    font-size: 64px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
    letter-spacing: 5px;
}

#home h2 {
    position: relative;
    z-index: 2;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* --- 模块1：企业概况 --- */
#overview {
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%) !important;
    color: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    padding-top: 80px !important;
    padding-bottom: 60px !important;
    min-height: auto !important;
}

.hero-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-text {
    flex: 1;
    padding-right: 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-divider {
    width: 80px;
    height: 4px;
    background: #00f2fe;
    margin-bottom: 30px;
    border-radius: 2px;
}

.hero-desc {
    font-size: 18px;
    line-height: 1.8;
    color: #d1d8e0;
    margin-bottom: 40px;
    text-align: justify;
}

.hero-features {
    display: flex;
    gap: 30px;
}

.feature-item {
    display: flex;
    flex-direction: column;
}

.feature-num {
    font-size: 32px;
    font-weight: bold;
    color: #00f2fe;
    margin-bottom: 5px;
}

.feature-text {
    font-size: 14px;
    color: #a4b0be;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-video {
    flex: 1;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
    background: #000;
}

.hero-video video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* --- 模块2：产品中心 (全屏通用版) --- */
#products {
    position: relative;
    background-color: #f4f4f4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 60px;
}

#products::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1587293852726-70cdb56c2866?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(8px);
    opacity: 0.4;
    z-index: 0;
    transform: scale(1.1);
}

#products .section-header,
#products .projects-grid,
#products .project-card {
    position: relative;
    z-index: 1;
}

/* 【关键】限定产品中心的网格样式，防止影响承包项目 */
#products .projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

#products .project-card {
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* --- 产品中心内页样式 --- */
.product-layout {
    display: flex;
    width: 90%;
    max-width: 1400px;
    margin: 20px auto;
    min-height: 80vh;
    gap: 30px;
}

/* 左侧导航栏 */
.product-sidebar {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
}

.sidebar-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #f39c12;
    padding-bottom: 10px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    padding: 15px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: 0.3s;
    font-weight: 500;
    color: #555;
}

.sidebar-menu li:hover, .sidebar-menu li.active {
    background-color: #f39c12;
    color: #fff;
    padding-left: 20px;
}

/* 右侧内容区 */
.product-content {
    flex: 3;
}

/* 顶部宣传图 */
.promo-banner {
    width: 100%;
    height: 30vh;
    background: url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?q=80&w=2070&auto=format&fit=crop') center/cover;
    border-radius: 8px;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.promo-text {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 16px;
}

/* 产品网格 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-name {
    padding: 15px 10px;
    text-align: center;
    font-weight: bold;
    color: #333;
    font-size: 15px;
}

/* --- 模块3：公司实景 (滑动) --- */
.gallery-wrapper {
    width: 100%;
    height: 600px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.gallery-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
    align-items: center;
}

.gallery-item {
    min-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.gallery-item img {
    width: 80%;
    max-width: 1000px;
    height: 80%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.gallery-caption {
    margin-top: 20px;
    font-size: 22px;
    font-weight: bold;
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 5px 20px;
    border-radius: 20px;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 24px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-btn:hover {
    background: rgba(255,255,255,0.4);
}

.prev-btn { left: 30px; }
.next-btn { right: 30px; }

/* --- 模块4：生产设备 (四宫格布局) --- */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
}

.equip-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.4s, box-shadow 0.4s;
    display: flex;
    flex-direction: column;
}

.equip-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* 图片容器 */
.equip-img-box {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.equip-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.equip-card:hover .equip-img-box img {
    transform: scale(1.08);
}

/* 添加点击放大提示效果 */
.equip-img-box::after {
    content: '点击放大';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.equip-img-box:hover::after {
    opacity: 1;
}

/* 文字内容区 */
.equip-info {
    padding: 30px;
    text-align: center;
    background: #fff;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.equip-info h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 22px;
    font-weight: bold;
    position: relative;
    display: inline-block;
}

/* 标题下方的装饰线 */
.equip-info h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: #f39c12;
    margin: 10px auto 0;
}

.equip-info p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* --- 模块5：承包项目 (九宫格) --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.project-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

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

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* 为实景展览模块的图片添加点击放大提示效果 */
#gallery .project-card {
    position: relative;
}

#gallery .project-card::after {
    content: '点击放大';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 220px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#gallery .project-card:hover::after {
    opacity: 1;
}

.project-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-info h4 {
    color: #333;
    font-size: 18px;
}

/* --- 模态框 (点击放大) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    animation: zoomIn 0.3s;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-size: 20px;
}

@keyframes zoomIn {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

/* --- 底部 --- */
footer {
    width: 100%;
    background: #2c3e50;
    color: #fff;
    padding: 40px 50px;
}

.footer-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-qrcode {
    width: 120px;
    height: 120px;
    background: #fff;
    padding: 5px;
    border-radius: 4px;
}

.footer-qrcode1,
.footer-qrcode2 {
    width: 100px;
    height: 100px;
    background: #fff;
    padding: 5px;
    border-radius: 4px;
}

.footer-left p {
    margin-top: 8px;
    font-size: 14px;
    color: #bdc3c7;
}

.footer-right {
    flex: 2;
    text-align: right;
}

.footer-right h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #f39c12;
}

.footer-right p {
    margin-bottom: 8px;
    font-size: 14px;
    color: #bdc3c7;
}

.copyright {
    margin-top: 20px;
    font-size: 12px;
    color: #7f8c8d;
}

/* --- 动画定义 --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 响应式适配 (手机端) --- */
@media (max-width: 900px) {
    .hero-container {
        flex-direction: column;
        gap: 30px;
    }

    .hero-text {
        padding-right: 0;
        text-align: center;
    }

    .hero-title {
        font-size: 32px;
    }

    .hero-desc {
        text-align: left;
        font-size: 16px;
    }

    .hero-features {
        justify-content: center;
    }

    .hero-video {
        width: 100%;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0 15px;
        height: auto;
        flex-direction: column;
        padding-bottom: 10px;
    }

    .brand-wrapper {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    nav ul li {
        margin: 0 10px;
        font-size: 14px;
    }

    #home h1 {
        font-size: 32px;
        letter-spacing: 2px;
    }

    #home h2 {
        font-size: 16px;
    }

    .footer-content {
        flex-direction: column-reverse;
        text-align: center;
        gap: 20px;
    }

    .footer-right {
        text-align: center;
        width: 100%;
    }

    .footer-left {
        justify-content: center;
    }

    .gallery-wrapper {
        height: 400px;
    }

    .gallery-item img {
        width: 95%;
        height: 70%;
    }

    .gallery-caption {
        font-size: 16px;
    }

    .equip-row {
        flex-direction: column;
        width: 95%;
        margin: 20px auto;
    }

    .equip-row.reverse {
        flex-direction: column;
    }

    .equip-img {
        width: 100%;
        height: 250px;
    }

    .equip-text {
        padding: 20px;
        width: 100%;
    }

    .equip-text h3 {
        font-size: 18px;
    }

    /* 产品中心手机端：强制单列 */
    #products .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 95%;
    }

    #products .project-card img {
        height: 180px;
    }

    /* 承包项目手机端：强制单列 */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 95%;
    }

    .project-card img {
        height: 180px;
    }

    .section-title {
        font-size: 28px;
    }
}
