/**
 * YUE YUAN Lighting - Homepage V5.1 Optimized Dark Design System
 * Synchronized with product-page.css spacing, font-weight, and margin standards.
 */

 :root {
    --yy-black: #050505;
    --yy-dark: #0d0d0d;
    --yy-white: #ffffff;
    --yy-gray: #a6a6a6;
    --yy-border: rgba(255, 255, 255, 0.12);
    --yy-gold: #c9a227;
    --yy-container: 1200px; /* 统一收窄至与产品页一致的 1200px 容器 */
    --yy-radius: 8px;
    --yy-transition: all .35s ease;
}

/* 1. 彻底隐藏 AI/SEO 后台爬虫文本，不占位、不影响视觉 */
.hidden-ai-content {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
}

/* 2. Hero 轮播动画基础样式：默认隐藏所有 slide，只显示 active */
.hero-background .hero-slide {
    display: none;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.hero-background .hero-slide.active {
    display: block !important;
    opacity: 1 !important;
}

/* 3. Hero 内容往下移动 10 行位置（约 10 行文字高度或行高叠加间距，约 160px - 200px） */
.hero-section .hero-content {
    transform: translateY(200px); /* 往下平移 10 行距离 */
}

/* 9.1 Global Homepage Reset */
.home-page {
    background: var(--yy-black);
    color: var(--yy-white);
    overflow-x: hidden;
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

/* 优化区块上下间距，避免过大的留白 */
.home-page section {
    position: relative;
    padding: 15px 0; 
}

.home-container {
    max-width: var(--yy-container);
    margin: auto;
    padding: 0 8px;
}

/* 9.3 Section Header System (强制左侧靠齐、减少空白占用) */
.section-header {
    max-width: 100%;
    margin: 0 auto 15px auto; /* 减小底部间距，避免留白过多 */
    text-align: left !important; /* 强制左侧靠齐 */
}

.section-header h2 {
    font-size: 1.25rem; /* 适当减小 H2 字体大小，避免过大 */
    font-weight: 500;
    letter-spacing: 0.5px;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    color: var(--yy-white);
    text-align: left !important;
}

.section-header p {
    color: var(--yy-gray);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    text-align: left !important;
}

/* 9.4 Hero Section CSS */
.hero-section {
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0;
}

.hero-background {
    position: absolute;
    inset: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, .85), rgba(0, 0, 0, .35), rgba(0, 0, 0, .75));
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--yy-container);
    margin: 0 auto;
    padding: 0 15px;
}

.hero-content {
    max-width: 760px;
}

.hero-content h1 {
    font-size: 2.5em;
    line-height: 1.1;
    font-weight: 500;
    margin-bottom: 15px;
    color: var(--yy-white);
}

.hero-content p {
    font-size: 1.1rem;
    line-height: 1.1;
    color: var(--yy-gray);
    margin-bottom: 15px;
}

/* Button System */
.btn-primary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--yy-transition);
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--yy-gold);
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, .5);
    color: white;
    margin-left: 15px;
}

.btn-outline:hover {
    background: white;
    color: black;
}

/* 9.5 Featured Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.product-card {
    background: #111;
    border: 1px solid var(--yy-border);
    border-radius: var(--yy-radius);
    overflow: hidden;
    transition: var(--yy-transition);
}

.product-card img {
    width:85%;
    height:220px;
    object-fit:contain;
    margin:auto;
    display:block;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--yy-gold);
}

.product-image {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #151515;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    transition: .4s;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--yy-gold);
    color: #000;
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}

.product-info {
    padding: 8px;
}

.product-category {
    display: block;
    font-size: 12px;
    color: var(--yy-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.product-info h3 {
    font-size: 1.0em;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--yy-white);
}

.product-info p {
    color: var(--yy-gray);
    font-size: 0.9em;
    line-height: 1.0;
    margin-bottom: 6px;
}

.product-applications {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 5px;
}

.app-tag {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--yy-border);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--yy-gray);
}

.product-link {
    color: var(--yy-white);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.product-link:hover {
    color: var(--yy-gold);
}

/* 9.6 Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.category-card {
    position: relative;
    height: 380px;
    overflow: hidden;
    border-radius: var(--yy-radius);
    transition: .4s ease;
    border: 1px solid var(--yy-border);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover img {
    transform: scale(1.05);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
}

.category-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
}

.category-content h3 {
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--yy-white);
}

.category-content p {
    color: var(--yy-gray);
    font-size: 0.85em;
}

/* 9.7 Video Section */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.martin-video-cover {
    position: relative;
    cursor: pointer !important;
    overflow: hidden;
    display:block;
    width:100%;
    background:#000;
    border-radius: var(--yy-radius);
    margin-bottom: 15px; /* 图片和文字间留点空隙 */
}

.martin-video-cover img {
    width: 100%;
    height:260px;
    display: block;
    aspect-ratio: 16 / 9; /* 强制统一比例 */
    object-fit: contain; 
    background:#000;
    pointer-events:none;
    transition: transform 0.3s ease;
}

.martin-video-cover:hover .play-button-overlay{
    transform:translate(-50%,-50%) scale(1.08);
}

.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 42px;
    cursor:pointer;
    background: #ff0000;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0.9;
}

.play-button-overlay::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 8px 0 8px 15px;
    border-color: transparent transparent transparent #ffffff;
}

/* 如果你还需要显示标题 */
.video-title {
    margin-top: 15px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--yy-white);
}

/* 优化视频标题字体大小 */
.video-card h3, 
.video-grid h3 {
    font-size: 0.95rem !important; /* 减小视频部分的 H3 字体 */
    font-weight: 500;
    color: #fff;
    margin-top: 8px;
    line-height: 1.3;
}

.video-card p,
.video-grid p {
    color: #cfcfcf;
    font-size: 0.85rem;
}

/* 确保 Explore Product 链接有颜色和手形 */
.explore-link {
    display: inline-block;
    color: var(--yy-gold); 
    text-decoration: none;
    font-weight: 600;
    margin-top: 10px;
    cursor: pointer;
}

/* 9.8 SECTION 5
   APPLICATIONS GRID */
   .application-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

/* CARD */
.application-card {
    position: relative;
    height: 380px;
    overflow: hidden;
    border-radius: var(--yy-radius);
    border: 1px solid var(--yy-border);
    transition: .4s ease;
}

/* IMAGE */
.application-card img {
    width:100%;
    height:100%;
    object-fit:contain;
    transition:transform .4s ease;
}

.application-card:hover img {
    transform:scale(1.03);
}

/* DARK OVERLAY */
.application-card::after {
    content:"";
    position:absolute;
    inset:0;
    background:
    linear-gradient(
        transparent,
        rgba(0,0,0,0.85)
    );
}

/* CONTENT */
.application-content {
    position:absolute;
    bottom:20px;
    left:20px;
    right:20px;
    z-index:2;
}

/* CATEGORY */
.application-category {
    display:inline-block;
    font-size:.75rem;
    text-transform:uppercase;
    letter-spacing:.8px;
    color:#c8a251;
    margin-bottom:8px;
    font-weight:500;
}

/* TITLE */
.application-content h3 {
    font-size:1.1em;
    font-weight:500;
    margin-bottom:8px;
    color:var(--yy-white);
}

/* DESCRIPTION */
.application-content p {
    color:var(--yy-gray);
    font-size:.85em;
    line-height:1.4;
    margin-bottom:0;
}

/* LOCATION */
.application-location {
    font-size:11px;
    color:var(--yy-gold);
    text-transform:uppercase;
    letter-spacing:.05em;
    margin-bottom:5px;
}

/* 9.9 Solutions Section */
.home-solutions-section {
    padding: 40px 0; /* 减小整个模块的上下留白 */
    background: #050505;
}
    
.solution-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; /* 减小卡片之间的间距 */
}

.solution-card {
    padding: 16px 14px;
    background: #111;
    border-radius: 12px;
    text-align: center;
    overflow: hidden;
    transition: .3s ease; 
    border: 1px solid rgba(255,255,255,.08);  
}
    
.solution-card:hover {
    border-color: var(--yy-gold);
    transform: translateY(-4px);
}
.solution-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px; /* 图片加点圆角更精致 */
}
    
.solution-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .4s ease;
}

.solution-card:hover img {
    transform: scale(1.05);
}
    
.solution-content {
    padding: 12px 6px 6px 6px;   
}
    
.solution-label {
    font-size: 11px; /* 稍微调小标签字号，使其精致 */
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
}
    
.solution-content h3 {
    font-size: 1.15rem; /* 从 26px 压小到更合理的 1.15rem，解决换行过多问题 */
    font-weight: 500;
    margin: 8px 0;
    line-height: 1.35;
    color: #fff; 
}
     
.solution-content p {
    color: #b0b0b0;
    line-height: 1.4;
    font-size: 0.85rem; /* 修正原本 10px 过小、看不清的问题 */
    margin-bottom: 15px;
}

.solution-applications {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* 让标签居中排布，更协调 */
    gap: 6px;
    margin: 15px 0 10px 0;
}
    
.solution-applications span {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 0.75rem;   
    color: #ccc;   
}
     
.solution-link {
    display: inline-block; 
    margin-top: 8px;
    color: #d4af37; 
    font-weight: 450;
    text-decoration: none;
    font-size: 0.85rem;   
}
    
.solution-link:hover {
    color: #fff;
}

@media(max-width: 768px) {
.solution-grid {
    grid-template-columns: 1fr; 
}

.solution-content h3 {
    font-size: 1.1rem; 
    }   
}

/* 9.10 Trust Section */
.trust-section {
    background: #0b0b0b;
}

.trust-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 5px;
}

.trust-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--yy-border);
    border-radius: var(--yy-radius);
    padding: 8px 6px;
    text-align: center;
}

.trust-item h3 {
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--yy-white);
}

.trust-item p {
    color: var(--yy-gray);
    font-size: 0.95em;
    line-height: 1.0;
}

.trust-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    text-align: center;
    padding-top: 6px;
    border-top: 1px solid var(--yy-border);
}

.trust-stats strong {
    font-size: 1.1em;
    font-weight: 450;
    color: var(--yy-gold);
    line-height: 1.0;
    margin-bottom: 5px;
}

.trust-stats span {
    font-size: 0.85em;
    color: var(--yy-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 9.12 BOTTOM WIDGET & INQUIRY (修复AI助手折叠点击失效) */
.floating-faq-widget {
    max-width: 1200px;
    margin: 8px auto;
    padding: 0 7px;
    position: relative !important;
}

.ai-toggle-btn {
    background: #111111 !important;
    color: #ffffff !important;
    width: 100% !important;
    text-align: left !important;
    padding: 10px 16px;
    border-radius: 6px !important;
    font-size: 1rem !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    z-index: 10;
}

/* 核心：确保折叠面板默认隐藏，激活状态(`.active`)下显示，解决点击无反应问题 */
.ai-panel-content {
    display: none !important; 
    background: #fdfdfd !important;
    border: 1px solid #ddd !important;
    border-top: none !important;
    border-radius: 0 0 6px 6px !important;
    padding: 10px !important;
}
.ai-panel-content.active,
.ai-panel-content.show {
    display: block !important;
}

.inquiry-box {
    background: #f8f9fa !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 6px !important;
    padding: 10px !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
}

.engineering-inquiry-section,
#inquiry-container {
    width: 100%;
    background: #f8fafc;
    padding: 10px 0;
    border-top: 1px solid #e5e7eb;
}

/* 9.13 Responsive Mobile & Tablet */
@media(max-width: 992px) {
    .product-grid,
    .category-grid,
    .video-grid,
    .project-grid,
    .trust-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .solution-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 600px) {
    .home-page section {
        padding: 10px 0;
    }
    .hero-content h1 {
        font-size: 2em;
    }
    .product-grid,
    .category-grid,
    .video-grid,
    .project-grid,
    .trust-container,
    .trust-stats,
    .solution-grid {
        grid-template-columns: 1fr;
    }
    .btn-outline {
        margin-left: 0;
        margin-top: 6px;
    }
}

/* 强制所有 Martin 视频封面及其子元素在悬停时显示手形 */
.martin-video-cover,
.martin-video-cover * {
    cursor: pointer !important;
}

/* ===============================
   Video Modal Fix
================================ */
.video-modal {
    display:flex;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.85);
    z-index:9999;
    align-items:center;
    justify-content:center;
}

.video-modal-content {
    width:90%;
    max-width:1200px;
    aspect-ratio:16 / 9;
    position:relative;
    background:#000;
}

.video-modal iframe {
    width:100%;
    height:100%;
    border:none;
    display:block;
}

.video-close {
    position:absolute;
    top:-45px;
    right:0;
    font-size:36px;
    color:white;
    background:none;
    border:none;
    cursor:pointer;
    z-index:10000;
}

/* Inquiry 表单折叠控制样式 */
.collapsible-form-body {
    display: none !important; /* 默认完全隐藏表单主体 */
    margin-top: 15px;
}

.collapsible-form-body.active {
    display: block !important; /* 点击后通过 active 类名展开 */
}

.form-toggle-banner {
    cursor: pointer !important;
    user-select: none;
    transition: all 0.3s ease;
}

.form-toggle-banner:hover {
    opacity: 0.85;
}
