/*
Theme Name: DY MOD 旗舰动态轮播版
Description: 新增 Swiper 轮播，丰富产品展示，深度优化手机端体验。
Author: Custom Theme
Version: 7.0
*/

:root {
    --primary-color: #0B2541; 
    --accent-color: #D4AF37; 
    --text-color: #333333;
    --light-bg: #F8FAFC;
    --white: #FFFFFF;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif; color: var(--text-color); background-color: var(--white); line-height: 1.8; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }
.container { width: 90%; max-width: 1300px; margin: 0 auto; }

/* 按钮规范 */
.btn { display: inline-block; padding: 15px 35px; font-size: 15px; font-weight: bold; text-transform: uppercase; border-radius: 4px; transition: all 0.3s; cursor: pointer; letter-spacing: 1px;}
.btn-primary { background-color: var(--accent-color); color: #fff; box-shadow: 0 4px 15px rgba(212,175,55,0.4); }
.btn-primary:hover { background-color: #bfa030; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(212,175,55,0.6); }

/* --- 导航栏 --- */
.site-header { position: fixed; top: 0; width: 100%; z-index: 9999; background-color: rgba(11, 37, 65, 0.95); box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
.top-bar { font-size: 13px; padding: 8px 0; color: #ccc; border-bottom: 1px solid rgba(255,255,255,0.1); }
.top-bar .container { display: flex; justify-content: flex-end; gap: 20px; }
.main-nav { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }
.nav-menu { display: flex; gap: 30px; }
.nav-menu a { font-weight: bold; color: var(--white); text-transform: uppercase; font-size: 14px; position: relative; }
.nav-menu a::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--accent-color); transition: 0.3s; }
.nav-menu a:hover::after { width: 100%; }

/* ==========================================================================
   FINAL SWIPER TEXT CENTERING REPAIR (绝对定位暴力居中，无视干扰)
   请完整清空并替换你原本 CSS 里的 Swiper 板块
   ========================================================================== */

.hero-swiper {
    width: 100%;
    height: 100vh !important; /* 强制大图填满屏幕高度 */
    background-color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.swiper-slide {
    position: relative; /* 核心：让子元素以此为基准定位 */
    width: 100%;
    height: 100vh !important; /* 强制幻灯片填满屏幕高度 */
    overflow: hidden;
    /* 彻底清除 Flexbox 代码，避免冲突 */
    display: block !important; 
}

.slide-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: -2;
    transform: scale(1.05);
    transition: transform 6s ease;
}

.swiper-slide-active .slide-bg { transform: scale(1); }

.slide-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(rgba(11,37,65,0.4), rgba(11,37,65,0.7));
    z-index: -1;
}

/* THE FIX: 终极暴力居中解决方案 */
.slide-content {
    /* 1. 声明绝对定位 */
    position: absolute !important; 
    /* 2. 强制定位到父元素（.swiper-slide）的正几何中心 */
    top: 50% !important; 
    left: 50% !important; 
    /* 3. 使用 transform 向上、向左偏移自身高度和宽度的一半，实现完美的绝对对齐 */
    transform: translate(-50%, -50%) !important; 
    
    z-index: 10;
    width: 90%; /* 手机端占据大部分宽度 */
    max-width: 1000px; /* 电脑端封顶宽度 */
    text-align: center;
    color: var(--white);
    
    /* 彻底清除所有可能干扰的边距 */
    margin: 0 !important; 
    padding: 0 20px !important; 
}

.slide-content h1 {
    font-size: 64px;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
    text-transform: uppercase;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 22px;
    margin-bottom: 40px;
    color: #fff;
    font-weight: 500;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.swiper-pagination-bullet { background: var(--white); opacity: 0.5; width: 12px; height: 12px; }
.swiper-pagination-bullet-active { background: var(--accent-color); opacity: 1; width: 30px; border-radius: 6px; }

/* 深度优化手机端适配 */
@media (max-width: 768px) {
    /* 手机端缩短大图高度 */
    .hero-swiper, .swiper-slide { height: 60vh !important; }
    .slide-content h1 { font-size: 32px; margin-bottom: 10px; }
    .slide-content p { font-size: 15px; margin-bottom: 20px; }
}

/* --- 通用版块 --- */
.section-padding { padding: 100px 0; }
.section-title { text-align: center; font-size: 40px; font-weight: 900; color: var(--primary-color); margin-bottom: 20px; }
.section-subtitle { text-align: center; font-size: 18px; color: #666; margin-bottom: 60px; max-width: 700px; margin-left: auto; margin-right: auto; }

/* --- 数据悬浮卡片 --- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; background: var(--white); padding: 40px; border-radius: 12px; box-shadow: 0 15px 40px rgba(0,0,0,0.08); margin-top: -80px; position: relative; z-index: 20; }
.stats-grid h3 { font-size: 46px; color: var(--accent-color); font-weight: 900; margin-bottom: 5px; }

/* ==========================================================================
   8.0 终极交互版：场景化联动 & 沉浸式弹窗
   ========================================================================== */

/* --- 场景化联动产品展示 (Interactive Contextual Showcase) --- */
.interactive-showcase { padding: 120px 0; background: var(--white); border-bottom: 1px solid #f0f0f0; }
.interactive-showcase:nth-child(even) { background: #F8FAFC; }
.showcase-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: center; }
.interactive-showcase:nth-child(even) .showcase-grid { grid-template-columns: 1fr 1.2fr; }

/* 左侧联动大图容器 */
.showcase-images { position: relative; height: 600px; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 60px rgba(11,37,65,0.15); }
.showcase-img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.05); transition: opacity 0.6s ease, transform 1.5s ease; z-index: 1; }
.showcase-img.active { opacity: 1; transform: scale(1); z-index: 2; }

/* 右侧交互面板 */
.showcase-content h3 { font-size: 42px; font-weight: 900; color: var(--primary-color); margin-bottom: 15px; text-transform: uppercase; }
.showcase-desc { font-size: 18px; color: #666; margin-bottom: 40px; line-height: 1.8; }

/* 动态手风琴菜单 (Tabs) */
.scenario-tabs { display: flex; flex-direction: column; gap: 15px; }
.scenario-tab { padding: 25px 30px; background: var(--light-bg); border-left: 4px solid transparent; cursor: pointer; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); border-radius: 0 12px 12px 0; }
.scenario-tab:hover { background: #f0f4f8; }
.scenario-tab.active { background: var(--white); border-left-color: var(--accent-color); box-shadow: 0 20px 40px rgba(0,0,0,0.08); transform: translateX(15px); }

.scenario-tab h4 { font-size: 20px; font-weight: 800; color: var(--primary-color); margin-bottom: 0; display: flex; justify-content: space-between; align-items: center; transition: 0.3s; }
.scenario-tab h4 i { color: #ccc; transition: transform 0.4s ease; }
.scenario-tab.active h4 { color: var(--accent-color); }
.scenario-tab.active h4 i { color: var(--accent-color); transform: rotate(180deg); }

/* 展开的详情内容 */
.scenario-details { max-height: 0; overflow: hidden; opacity: 0; transition: all 0.5s ease; }
.scenario-tab.active .scenario-details { max-height: 300px; opacity: 1; margin-top: 15px; }
.scenario-details p { font-size: 15px; color: #555; margin-bottom: 15px; line-height: 1.7; }

/* 标签列 */
.scenario-features { display: flex; gap: 10px; flex-wrap: wrap; }
.scenario-features span { font-size: 12px; font-weight: 800; color: var(--primary-color); background: #e2e8f0; padding: 6px 14px; border-radius: 30px; text-transform: uppercase; letter-spacing: 0.5px;}
.scenario-tab.active .scenario-features span { background: rgba(212,175,55,0.1); color: var(--accent-color); }

/* --- 核心优势：卡片悬浮提示 --- */
.feature-box { position: relative; cursor: pointer; overflow: hidden; z-index: 1; }
.feature-box::after { content: 'CLICK TO LEARN MORE'; position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--white); background: var(--accent-color); padding: 5px 15px; border-radius: 20px; opacity: 0; transition: all 0.3s ease; font-weight: bold; }
.feature-box:hover::after { bottom: 20px; opacity: 1; }

/* --- 核心优势：沉浸式高级弹窗 (Glassmorphism Modal) --- */
.premium-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(11,37,65,0.85); backdrop-filter: blur(10px); z-index: 99999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.4s ease; }
.premium-modal-overlay.active { opacity: 1; visibility: visible; }
.premium-modal-content { background: var(--white); width: 90%; max-width: 650px; padding: 60px 50px; border-radius: 20px; position: relative; transform: translateY(50px) scale(0.95); transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 40px 80px rgba(0,0,0,0.4); text-align: center; }
.premium-modal-overlay.active .premium-modal-content { transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 20px; right: 20px; font-size: 24px; color: #999; cursor: pointer; transition: 0.3s; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #f0f4f8; border: none; outline: none; }
.modal-close:hover { color: var(--white); background: var(--primary-color); transform: rotate(90deg); }
.modal-icon { font-size: 70px; color: var(--accent-color); margin-bottom: 25px; }
.modal-title { font-size: 36px; font-weight: 900; color: var(--primary-color); margin-bottom: 20px; text-transform: uppercase; }
.modal-desc { font-size: 18px; color: #555; line-height: 1.8; }

/* 手机端适配优化 */
@media (max-width: 992px) {
    .showcase-grid, .interactive-showcase:nth-child(even) .showcase-grid { grid-template-columns: 1fr; gap: 40px; }
    .interactive-showcase:nth-child(even) .showcase-images { order: -1; /* 手机端保证图片始终在上面 */ }
    .showcase-images { height: 400px; }
    .scenario-tab.active { transform: translateX(0); transform: scale(1.02); }
}

/* --- 核心优势网格 --- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.feature-box { text-align: center; padding: 40px 25px; background: var(--light-bg); border-radius: 12px; transition: all 0.4s; border-bottom: 4px solid transparent; }
.feature-box:hover { transform: translateY(-15px); background: var(--white); box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-bottom: 4px solid var(--accent-color); }
.feature-icon { font-size: 45px; color: var(--primary-color); margin-bottom: 25px; transition: 0.3s; }
.feature-box:hover .feature-icon { color: var(--accent-color); transform: scale(1.1); }
.feature-box h4 { font-size: 22px; color: var(--primary-color); margin-bottom: 15px; font-weight: 800; }

/* --- 新闻卡片 --- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.news-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.06); transition: transform 0.3s; }
.news-card:hover { transform: translateY(-10px); }
.news-img-box { width: 100%; height: 240px; background-color: #eee; }
.news-img-box img { width: 100%; height: 100%; object-fit: cover; }
.news-content { padding: 30px; }

/* ================= 手机端极致优化 ================= */
@media (max-width: 992px) {
    .product-showcase, .product-showcase:nth-child(even) { flex-direction: column; gap: 30px; }
    .product-img-box img { height: 300px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-menu { display: none; } /* 隐藏菜单 */
}
@media (max-width: 768px) {
    .top-bar { display: none; }
    .hero-swiper { height: 60vh; } /* 缩短首屏高度 */
    .slide-content h1 { font-size: 32px; margin-bottom: 10px; }
    .slide-content p { font-size: 15px; margin-bottom: 20px; }
    .section-padding { padding: 50px 0; } /* 减小板块间距 */
    .stats-grid { grid-template-columns: 1fr; margin-top: -30px; padding: 20px; }
    .stats-grid h3 { font-size: 32px; }
    .features-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .mobile-hide { display: none; } /* 隐藏冗长文字，保持手机端干净 */
    .product-text h3 { font-size: 24px; }
    .product-list li { font-size: 14px; margin-bottom: 10px; }
}

/* ==========================================================================
   9.0 整合版产品切换 & 无缝滚动组件 (Integrated Showcase & Marquees)
   ========================================================================== */

/* --- 整合版产品动态展示区 (Master Product Showcase) --- */
.master-product-section { padding: 100px 0; background: #F8FAFC; }
.master-product-wrapper { display: flex; background: var(--white); border-radius: 20px; box-shadow: 0 30px 60px rgba(11,37,65,0.08); overflow: hidden; }

/* 左侧：动态选项卡控制区 */
.master-tabs { width: 35%; background: var(--primary-color); padding: 50px 0; display: flex; flex-direction: column; justify-content: center; }
.m-tab { padding: 25px 40px; color: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.4s; position: relative; border-left: 4px solid transparent; }
.m-tab:hover { color: rgba(255,255,255,0.8); }
.m-tab.active { color: var(--white); background: rgba(255,255,255,0.05); border-left-color: var(--accent-color); }
.m-tab h4 { font-size: 24px; font-weight: 800; margin-bottom: 10px; text-transform: uppercase; }
.m-tab p { font-size: 14px; line-height: 1.6; display: none; color: #ccc; }
.m-tab.active p { display: block; animation: fadeIn 0.5s ease forwards; }

/* 右侧：产品内容切换区 */
.master-content { width: 65%; position: relative; }
.m-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: all 0.6s ease; display: flex; flex-direction: column; }
.m-slide.active { opacity: 1; visibility: visible; position: relative; }
.m-slide-img { width: 100%; height: 400px; object-fit: cover; }
.m-slide-text { padding: 40px 50px; background: var(--white); flex-grow: 1; }
.m-slide-text ul { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 30px; }
.m-slide-text li { font-weight: 700; color: var(--primary-color); font-size: 15px; }
.m-slide-text i { color: var(--accent-color); margin-right: 8px; }

/* --- 连续无缝滚动动画强制线性 (Linear Marquee for Factory & Partners) --- */
.continuous-swiper .swiper-wrapper { transition-timing-function: linear !important; }

/* 工厂实景展示 */
.factory-section { padding: 80px 0; background: var(--white); overflow: hidden; }
.factory-swiper { width: 100%; padding-bottom: 20px; }
.factory-slide img { width: 100%; height: 300px; object-fit: cover; border-radius: 12px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

/* 合作单位 Logo 墙 */
.partners-section { padding: 60px 0; background: var(--light-bg); border-top: 1px solid #eee; overflow: hidden; }
.partners-swiper { width: 100%; }
.partner-slide { display: flex; align-items: center; justify-content: center; height: 100px; background: var(--white); border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.partner-slide img { max-width: 60%; max-height: 60px; object-fit: contain; filter: grayscale(100%) opacity(0.6); transition: 0.3s; }
.partner-slide:hover img { filter: grayscale(0%) opacity(1); transform: scale(1.1); }

/* 动画帧 */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* 手机端适配 */
@media (max-width: 992px) {
    .master-product-wrapper { flex-direction: column; }
    .master-tabs { width: 100%; padding: 20px 0; flex-direction: row; justify-content: space-around; }
    .m-tab { padding: 15px; text-align: center; border-left: none; border-bottom: 3px solid transparent; }
    .m-tab.active { border-bottom-color: var(--accent-color); border-left: none; }
    .m-tab p { display: none !important; } /* 手机端隐藏导航描述省空间 */
    .master-content { width: 100%; }
    .m-slide-text ul { grid-template-columns: 1fr; }
}

/* ==========================================================================
   10.0 终极排版优化：极简建筑风标题 & 严格锁死滚动容器 (Fixed Marquee)
   ========================================================================== */

/* 1. 极简奢华风标题排版 (摒弃胶囊，采用大厂留白+点睛分割线) */
.section-header { text-align: center; margin-bottom: 70px; display: flex; flex-direction: column; align-items: center; }
.section-header h2 { font-size: 42px; font-weight: 900; color: var(--primary-color); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; }
/* 高级点睛之笔：香槟金短横线 */
.header-divider { width: 60px; height: 4px; background: var(--accent-color); margin: 0 auto 20px; }
.section-header p { font-size: 16px; color: #666; font-weight: 500; line-height: 1.8; max-width: 700px; margin: 0 auto; }

/* 2. 强制 Swiper 跑马灯匀速不卡顿 */
.swiper-wrapper { transition-timing-function: linear !important; }

/* 3. 工厂实景：锁死高度，消灭下方空白 */
.factory-section { padding: 80px 0; background: var(--white); overflow: hidden; }
.factory-swiper { width: 100%; padding-bottom: 10px; }
.factory-slide { height: 280px !important; /* 严格锁死高度，防止撑爆排版 */ }
.factory-slide img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

/* 4. 合作伙伴：锁死高度，改为透明极简底色 */
.partners-section { padding: 60px 0; background: #F8FAFC; border-top: 1px solid #eee; overflow: hidden; }
.partners-swiper { width: 100%; height: 80px; /* 锁死容器总高度 */ }
.partner-slide { height: 80px !important; display: flex; align-items: center; justify-content: center; background: transparent; }
/* 图片统一缩放规则，防变形 */
.partner-slide img { max-width: 80%; max-height: 50px; object-fit: contain; filter: grayscale(100%) opacity(0.5); transition: all 0.3s ease; display: block; }
.partner-slide:hover img { filter: grayscale(0%) opacity(1); transform: scale(1.1); }