/* ============================================
   官网前台样式 - 河南璨智商贸有限公司
   ============================================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; line-height: 1.6; color: #333; background: #fff; }
a { color: #409EFF; text-decoration: none; transition: color .2s; }
a:hover { color: #66b1ff; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn { display: inline-block; padding: 10px 28px; border-radius: 6px; font-size: 15px; font-weight: 500; transition: all .2s; cursor: pointer; border: 2px solid transparent; text-align: center; }
.btn-primary { background: #409EFF; color: #fff; border-color: #409EFF; }
.btn-primary:hover { background: #66b1ff; border-color: #66b1ff; color: #fff; }
.btn-outline { background: transparent; color: #409EFF; border-color: #409EFF; }
.btn-outline:hover { background: #409EFF; color: #fff; }
.btn-block { display: block; width: 100%; }

/* ========== Header ========== */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 20px; font-weight: bold; color: #333; }
.logo:hover { color: #409EFF; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a { display: block; padding: 8px 16px; border-radius: 6px; color: #555; font-size: 15px; transition: all .2s; }
.main-nav a:hover, .main-nav a.active { color: #409EFF; background: rgba(64,158,255,.08); }
.header-phone .phone-btn { display: flex; align-items: center; gap: 6px; color: #409EFF; font-weight: 500; }
.phone-icon { font-size: 18px; }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: #333; }

/* ========== Hero Banner ========== */
.hero-banner { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 80px 0; text-align: center; }
.hero-banner h1 { font-size: 42px; margin-bottom: 16px; }
.hero-banner p { font-size: 18px; opacity: .9; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; }
.hero-actions .btn-outline { color: #fff; border-color: #fff; }
.hero-actions .btn-outline:hover { background: #fff; color: #667eea; }

/* ========== Page Banner ========== */
.page-banner { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 48px 0; text-align: center; }
.page-banner h1 { font-size: 32px; margin-bottom: 8px; }
.breadcrumb { font-size: 14px; opacity: .8; }
.breadcrumb a { color: rgba(255,255,255,.8); }
.breadcrumb a:hover { color: #fff; }

/* ========== Sections ========== */
.section { padding: 60px 0; }
.section:nth-child(even) { background: #f8f9fa; }
.section-title { text-align: center; font-size: 28px; margin-bottom: 8px; color: #333; }
.section-subtitle { text-align: center; font-size: 16px; color: #888; margin-bottom: 40px; }
.section-action { text-align: center; margin-top: 32px; }

/* Feature Grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { background: #fff; border-radius: 12px; padding: 32px; text-align: center; box-shadow: 0 4px 16px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s; }
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.feature-icon { font-size: 40px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; margin-bottom: 12px; color: #333; }
.feature-card p { font-size: 14px; color: #666; line-height: 1.8; }

/* Brand Grid */
.brands-section { text-align: center; }
.brands-section .container { text-align: center; }
.brands-section h1 { font-size: 28px; margin-bottom: 8px; color: #333; text-align: center; }
.brands-section p { font-size: 16px; color: #888; margin-bottom: 40px; text-align: center; }
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1200px; margin: 0 auto; }
.brand-card { background: #fff; border-radius: 12px; padding: 28px; box-shadow: 0 4px 16px rgba(0,0,0,.06); text-align: left; }
.brand-card h2 { font-size: 20px; margin-bottom: 12px; display: flex; align-items: center; }
.brand-tag { display: inline-block; width: 36px; height: 36px; line-height: 36px; text-align: center; border-radius: 8px; font-size: 12px; font-weight: bold; color: #fff; margin-right: 8px; flex-shrink: 0; }
.brand-tag.mi { background: #ff6700; }
.brand-tag.hw { background: #cf0a2c; }
.brand-tag.ap { background: #555; }
.brand-card ul { margin-top: 12px; padding-left: 0; }
.brand-card li { padding: 4px 0; color: #666; font-size: 14px; }

/* Brand Section - Card Layout */
.brands-section { max-width: 1200px; margin: 0 auto; padding: 40px 0; }
.brands-section h1 { 
    text-align: center; 
    font-size: 28px; 
    margin-bottom: 8px; 
    color: #333;
    width: 100%;
    display: block;
}
.brands-section > p, 
.brands-section .subtitle { 
    text-align: center; 
    margin-bottom: 40px; 
    color: #888; 
    font-size: 16px;
    width: 100%;
    display: block;
}

/* Brand cards - flexbox container */
.brands-section .brand-grid,
.brands-section .brands-container,
.brands-section section,
.brands-section > div {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    width: 100%;
}

/* Force h1 and p to be full width in flex container */
.brands-section section > h1,
.brands-section section > h2,
.brands-section section > p,
.brands-section > div > h1,
.brands-section > div > h2,
.brands-section > div > p {
    width: 100%;
    flex: 0 0 100%;
    text-align: center;
}

/* Individual brand card */
.brands-section .brand-card,
.brands-section section > div,
.brands-section section > article,
.brands-section > div > div,
.brands-section > div > article {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    flex: 1;
    min-width: 320px;
    max-width: calc(33.333% - 16px);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid transparent;
    position: relative;
    overflow: hidden;
}
.brands-section .brand-card::before,
.brands-section section > div::before,
.brands-section section > article::before,
.brands-section > div > div::before,
.brands-section > div > article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.brands-section .brand-card:hover::before,
.brands-section section > div:hover::before,
.brands-section section > article:hover::before,
.brands-section > div > div:hover::before,
.brands-section > div > article:hover::before {
    opacity: 1;
}
.brands-section .brand-card:hover,
.brands-section section > div:hover,
.brands-section section > article:hover,
.brands-section > div > div:hover,
.brands-section > div > article:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0,0,0,.12);
}
/* Brand-specific top border colors */
.brands-section > div > div:nth-child(1),
.brands-section > div > article:nth-child(1) {
    border-top-color: #ff6700;
    color: #ff6700;
}
.brands-section > div > div:nth-child(2),
.brands-section > div > article:nth-child(2) {
    border-top-color: #cf0a2c;
    color: #cf0a2c;
}
.brands-section > div > div:nth-child(3),
.brands-section > div > article:nth-child(3) {
    border-top-color: #555;
    color: #555;
}

/* Brand card h2 - with icon circle */
.brands-section .brand-card h2,
.brands-section section > div h2,
.brands-section section > article h2,
.brands-section > div > div h2,
.brands-section > div > article h2 {
    font-size: 20px; 
    margin-bottom: 16px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 12px;
    color: #333;
}

/* Brand icons are injected via JavaScript in index.html */

/* Brand tags (MI/HW/AP) */
.brand-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    flex-shrink: 0;
}
.brand-tag.mi { background: #ff6700; }
.brand-tag.hw { background: #cf0a2c; }
.brand-tag.ap { background: #555; }

.brands-section .brand-card p,
.brands-section section > div p,
.brands-section section > article p,
.brands-section > div > div p,
.brands-section > div > article p {
    color: #666; 
    line-height: 1.8;
    margin-bottom: 16px;
}
.brands-section .brand-card ul,
.brands-section section > div ul,
.brands-section section > article ul,
.brands-section > div > div ul,
.brands-section > div > article ul {
    margin-top: 16px; 
    padding-left: 0; 
    list-style: none;
}
.brands-section .brand-card li,
.brands-section section > div li,
.brands-section section > article li,
.brands-section > div > div li,
.brands-section > div > article li {
    padding: 10px 0; 
    color: #555; 
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-bottom: 1px dashed #f0f0f0;
    transition: background 0.2s;
}
.brands-section .brand-card li:last-child,
.brands-section section > div li:last-child,
.brands-section section > article li:last-child,
.brands-section > div > div li:last-child,
.brands-section > div > article li:last-child {
    border-bottom: none;
}

/* Brand list icons are injected via JavaScript in index.html */

/* Smart Home Section - Card Layout */
.smart-section { max-width: 1200px; margin: 0 auto; padding: 40px 0; }
.smart-section h1 { 
    text-align: center; 
    font-size: 28px; 
    margin-bottom: 8px; 
    color: #333;
    width: 100%;
    display: block;
}
.smart-section > p, 
.smart-section .subtitle { 
    text-align: center; 
    margin-bottom: 40px; 
    color: #888; 
    font-size: 16px;
    width: 100%;
    display: block;
}

/* Smart home cards - flexbox container */
.smart-section .smart-grid,
.smart-section .features-container,
.smart-section section,
.smart-section > div {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    width: 100%;
}

/* Force h1 and p to be full width in flex container */
.smart-section section > h1,
.smart-section section > h2,
.smart-section section > p,
.smart-section > div > h1,
.smart-section > div > h2,
.smart-section > div > p {
    width: 100%;
    flex: 0 0 100%;
    text-align: center;
}

/* Individual smart home card */
.smart-section .feature-item,
.smart-section section > div,
.smart-section section > article,
.smart-section > div > div,
.smart-section > div > article {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,.06);
    flex: 1;
    min-width: 320px;
    max-width: calc(33.333% - 16px);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid transparent;
    position: relative;
    overflow: hidden;
}
.smart-section .feature-item::before,
.smart-section section > div::before,
.smart-section section > article::before,
.smart-section > div > div::before,
.smart-section > div > article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.smart-section .feature-item:hover::before,
.smart-section section > div:hover::before,
.smart-section section > article:hover::before,
.smart-section > div > div:hover::before,
.smart-section > div > article:hover::before {
    opacity: 1;
}
.smart-section .feature-item:hover,
.smart-section section > div:hover,
.smart-section section > article:hover,
.smart-section > div > div:hover,
.smart-section > div > article:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

/* Smart home card - colored top borders */
.smart-section > div > div:nth-child(1),
.smart-section > div > article:nth-child(1) {
    border-top-color: #ff6700;
    color: #ff6700;
}
.smart-section > div > div:nth-child(2),
.smart-section > div > article:nth-child(2) {
    border-top-color: #007bff;
    color: #007bff;
}
.smart-section > div > div:nth-child(3),
.smart-section > div > article:nth-child(3) {
    border-top-color: #28a745;
    color: #28a745;
}
.smart-section > div > div:nth-child(4),
.smart-section > div > article:nth-child(4) {
    border-top-color: #dc3545;
    color: #dc3545;
}
.smart-section > div > div:nth-child(5),
.smart-section > div > article:nth-child(5) {
    border-top-color: #6f42c1;
    color: #6f42c1;
}
.smart-section > div > div:nth-child(6),
.smart-section > div > article:nth-child(6) {
    border-top-color: #fd7e14;
    color: #fd7e14;
}

/* Smart home card content */
.smart-section .feature-item h3,
.smart-section section > div h3,
.smart-section section > article h3,
.smart-section > div > div h3,
.smart-section > div > article h3 {
    font-size: 18px; 
    margin-bottom: 12px; 
    color: #333; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    gap: 10px;
}

/* Smart home icons are injected via JavaScript in index.html */

.smart-section .feature-item p,
.smart-section section > div p,
.smart-section section > article p,
.smart-section > div > div p,
.smart-section > div > article p {
    font-size: 14px; 
    color: #666; 
    line-height: 1.8;
}

/* Case Grid */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,.06); transition: transform .2s; }
.case-card:hover { transform: translateY(-4px); }
.case-cover { height: 200px; overflow: hidden; }
.case-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.case-card:hover .case-cover img { transform: scale(1.05); }
.case-body { padding: 20px; }
.case-body h3 { font-size: 16px; margin-bottom: 8px; color: #333; }
.case-body p { font-size: 13px; color: #888; line-height: 1.6; margin-bottom: 12px; }
.case-link { font-size: 14px; color: #409EFF; }

/* ========== CTA Section ========== */
.cta-section { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; padding: 60px 0; text-align: center; }
.cta-section h2 { font-size: 28px; margin-bottom: 12px; }
.cta-section p { font-size: 16px; opacity: .9; margin-bottom: 24px; }
.cta-section .btn-primary { background: #fff; color: #667eea; border-color: #fff; }
.cta-section .btn-primary:hover { background: transparent; color: #fff; }

/* ========== Page Content ========== */
.page-content { padding: 48px 0; }
.page-content h2 { font-size: 24px; margin: 32px 0 16px; color: #333; border-left: 4px solid #409EFF; padding-left: 12px; }
.page-content h3 { font-size: 18px; margin: 24px 0 12px; color: #444; }
.page-content p { margin-bottom: 12px; line-height: 1.8; color: #555; }
.page-content ul { padding-left: 20px; margin-bottom: 16px; }
.page-content li { padding: 4px 0; color: #555; position: relative; }
.page-content li::before { content: ''; position: absolute; left: -16px; top: 12px; width: 6px; height: 6px; background: #409EFF; border-radius: 50%; }

/* Timeline */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: #e0e0e0; }
.timeline-item { position: relative; margin-bottom: 24px; }
.timeline-item::before { content: ''; position: absolute; left: -26px; top: 6px; width: 12px; height: 12px; background: #409EFF; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px #409EFF; }
.timeline-item .year { font-weight: bold; color: #409EFF; font-size: 18px; }

/* Advantage list */
.advantage-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.advantage-item { background: #f8f9fa; padding: 20px; border-radius: 8px; }
.advantage-item h3 { font-size: 16px; color: #409EFF; margin-bottom: 8px; }

/* ========== Article ========== */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.article-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); transition: transform .2s; }
.article-card:hover { transform: translateY(-4px); }
.article-cover { height: 200px; overflow: hidden; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-body { padding: 20px; }
.article-body h2 { font-size: 16px; margin-bottom: 8px; }
.article-body h2 a { color: #333; }
.article-body h2 a:hover { color: #409EFF; }
.article-summary { font-size: 13px; color: #888; line-height: 1.6; margin-bottom: 12px; }
.article-meta { font-size: 12px; color: #aaa; display: flex; gap: 16px; }

/* Article Detail */
.article-detail { padding: 48px 0; }
.article-content { max-width: 800px; margin: 0 auto; }
.article-hero { margin-bottom: 24px; border-radius: 12px; overflow: hidden; }
.article-meta-detail { display: flex; flex-wrap: wrap; gap: 20px; padding: 16px 0; border-bottom: 1px solid #eee; margin-bottom: 24px; font-size: 14px; color: #888; }
.article-body-content { line-height: 1.8; font-size: 16px; }
.article-body-content img { border-radius: 8px; margin: 16px 0; }
.article-body-content p { margin-bottom: 16px; }
.article-nav { display: flex; justify-content: space-between; padding: 24px 0; border-top: 1px solid #eee; margin-top: 32px; max-width: 800px; margin-left: auto; margin-right: auto; }
.article-nav a { color: #409EFF; }
.nav-disabled { color: #ccc; }
.article-back { text-align: center; margin-top: 24px; }

/* Pagination */
.pagination { text-align: center; margin-top: 32px; }
.pagination a, .pagination span { display: inline-block; padding: 6px 14px; margin: 0 2px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; color: #555; }
.pagination a:hover { border-color: #409EFF; color: #409EFF; }
.pagination .current { background: #409EFF; color: #fff; border-color: #409EFF; }

/* ========== Contact ========== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-info-card, .contact-form-card { background: #fff; border-radius: 12px; padding: 32px; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.contact-info-card h2, .contact-form-card h2 { font-size: 22px; margin-bottom: 16px; }
.contact-details { margin-top: 20px; }
.contact-item { display: flex; gap: 16px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.contact-label { font-weight: 500; color: #333; min-width: 80px; }
.contact-value { color: #666; }

/* Form */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: #555; }
.form-group em { color: #F56C6C; font-style: normal; }
.form-group input, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: border-color .2s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: #409EFF; box-shadow: 0 0 0 2px rgba(64,158,255,.2); }
.form-message { padding: 12px; border-radius: 6px; margin-top: 16px; font-size: 14px; }
.form-message.success { background: #f0f9eb; color: #67C23A; }
.form-message.error { background: #fef0f0; color: #F56C6C; }

/* ========== Smart Home Page ========== */
.smart-page .page-banner { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.smart-page .page-content { padding: 48px 0; }

/* ========== Recruit Page ========== */
.recruit-page .page-banner { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.recruit-page .page-content { padding: 48px 0; }

/* Job Card */
.job-card { background: #fff; border-radius: 12px; padding: 24px; margin-bottom: 20px; box-shadow: 0 2px 12px rgba(0,0,0,.06); transition: transform .2s; }
.job-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.job-card h3 { font-size: 18px; margin-bottom: 8px; color: #333; }
.job-meta { display: flex; gap: 16px; font-size: 13px; color: #888; margin-bottom: 12px; }
.job-desc { font-size: 14px; color: #666; line-height: 1.8; margin-bottom: 12px; }
.job-requirements { font-size: 14px; color: #555; }
.job-requirements li { padding: 4px 0; }

/* ========== Footer ========== */
.site-footer { background: #2c3e50; color: rgba(255,255,255,.7); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 32px; margin-bottom: 32px; }
.footer-col h3 { color: #fff; font-size: 18px; margin-bottom: 12px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.footer-col p { font-size: 14px; line-height: 1.8; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col a { color: rgba(255,255,255,.7); font-size: 14px; }
.footer-col a:hover { color: #fff; }
.footer-links { padding: 16px 0; border-top: 1px solid rgba(255,255,255,.1); }
.footer-links h4 { color: #fff; font-size: 14px; margin-bottom: 8px; }
.link-list { display: flex; flex-wrap: wrap; gap: 12px; }
.link-list a { font-size: 13px; color: rgba(255,255,255,.5); }
.footer-bottom { text-align: center; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.footer-bottom a { color: rgba(255,255,255,.5); }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero-banner { padding: 48px 0; }
    .hero-banner h1 { font-size: 28px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .feature-grid, .brand-grid, .case-grid, .article-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .main-nav { display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: #fff; z-index: 99; padding: 20px; }
    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; }
    .main-nav a { padding: 12px 16px; font-size: 16px; }
    .mobile-menu-btn { display: block; }
    .header-phone { display: none; }
    .section { padding: 40px 0; }
    .section-title { font-size: 22px; }
    .page-banner h1 { font-size: 24px; }
    .article-nav { flex-direction: column; gap: 12px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .feature-grid, .brand-grid { grid-template-columns: repeat(2, 1fr); }
    .case-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
