/* ============================================
   广西中显电子科技 - 巴科风格CSS
   简洁大气 高端科技感
   ============================================ */

/* --- CSS变量 --- */
:root {
    --primary: #1a56db;
    --primary-dark: #173ba7;
    --primary-light: #3b82f6;
    --accent: #f59e0b;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* --- 基础重置 --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--gray-700);
    line-height: 1.6;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ========== 容器系统 ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn.primary {
    background: var(--primary);
    color: var(--white);
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn.secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn.secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* ========== 导航栏 ========== */
.header {
    position: fixed;
    top: 30px;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
}

.logo-text-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-text-wrap .logo-main-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
}

.logo-text-wrap .logo-sub-text {
    font-size: 0.52rem;
    color: var(--gray-500);
    letter-spacing: 0.5px;
    font-family: Arial, sans-serif;
    white-space: nowrap;
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
    border-radius: 6px;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
    background: var(--gray-50);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

/* ========== 英雄区 ========== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #0c1445 0%, #1a365d 100%);
    color: var(--white);
    text-align: center;
}
.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* ========== 首页波浪案例背景 ========== */
.hero-wave {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    z-index: 0;
}
.hero-wave-row {
    display: flex;
    white-space: nowrap;
    height: 25%;
}
.hero-wave-row img {
    height: 100%;
    width: auto;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 4px;
    margin: 0 3px;
    opacity: 0.35;
    filter: brightness(0.7) saturate(1.3);
}
.hero-wave-scroll {
    display: flex;
    animation: waveScroll var(--speed, 30s) linear infinite;
}
@keyframes waveScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
/* 波浪错位效果 */
.hero-wave-row:nth-child(1) .hero-wave-scroll { --speed: 20s; animation-direction: normal; }
.hero-wave-row:nth-child(2) .hero-wave-scroll { --speed: 28s; animation-direction: reverse; }
.hero-wave-row:nth-child(3) .hero-wave-scroll { --speed: 24s; animation-direction: normal; }
.hero-wave-row:nth-child(4) .hero-wave-scroll { --speed: 18s; animation-direction: reverse; }

/* ========== 区块标题 ========== */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 1rem;
    margin-bottom: 48px;
}

/* ========== 关于我们 ========== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 60px;
    align-items: start;
}

.about-text p {
    color: var(--gray-700);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.stat-item {
    text-align: center;
    padding: 24px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin-top: 4px;
}

/* ========== 关于我们 - 亮点 ========== */
.about-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.highlight-item i {
    font-size: 1.4rem;
    color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.highlight-item h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.highlight-item p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin: 0;
}

/* ========== 产品系列标题（首页&产品页共用） ========== */
.series-header {
    background: linear-gradient(135deg, #1a56db, #2563eb);
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.series-header i {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ========== 首页产品型号网格 ========== */
.hp-model-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.hp-model-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.hp-model-card:hover {
    border-color: var(--primary);
    box-shadow: 0 3px 10px rgba(26,86,219,0.1);
    transform: translateY(-1px);
}

.hp-model-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
}

.hp-model-card img {
    width: 100%;
    height: 100px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 6px;
    background: #f8fafc;
}

.model-card img {
    width: 100%;
    height: 140px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #f8fafc;
}

/* ========== 产品展示 ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-card-img {
    height: 200px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 3rem;
    overflow: hidden;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-body {
    padding: 24px;
}

.product-card-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.product-card-body p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ========== 为什么选择 ========== */
.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.why-item {
    text-align: center;
}

.why-item .why-num {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.2;
    line-height: 1;
}

.why-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 8px 0;
}

.why-item p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ========== 案例 ========== */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.case-card {
    position: relative;
    height: 250px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--gray-100);
}

.case-card picture {
    width: 100%;
    height: 100%;
    display: block;
}

.case-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.case-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
}

.case-card-overlay h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.case-card-overlay p {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ========== 联系 ========== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-info-item i {
    font-size: 1.5rem;
    color: var(--primary);
    width: 40px;
}

.contact-info-item h4 {
    font-size: 0.9rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 4px;
}

.contact-info-item p {
    font-size: 1rem;
    color: var(--dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* ========== 页脚 ========== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--gray-300);
    font-size: 0.9rem;
    margin-top: 16px;
    line-height: 1.7;
}

.footer h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer ul li {
    margin-bottom: 12px;
}

.footer ul a {
    color: var(--gray-300);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer ul a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.85rem;
}

/* ========== 社交按钮 ========== */
.footer-social {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    color: var(--gray-300);
    background: rgba(255,255,255,0.1);
}

.social-btn:hover {
    transform: translateY(-3px);
}

.social-btn.wechat:hover {
    background: #07C160;
    color: white;
}

.social-btn.qq:hover {
    background: #12B7F5;
    color: white;
}

.social-btn.helmet:hover {
    background: #FF6B00;
    color: white;
}

/* ========== 二维码弹窗 ========== */
.qr-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.qr-modal.show {
    display: flex;
}

.qr-modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    max-width: 320px;
    position: relative;
}

.qr-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
}

.qr-modal-close:hover {
    color: var(--gray-700);
}

.qr-modal-content img {
    width: 200px;
    height: 200px;
    margin-bottom: 16px;
}

.qr-modal-content p {
    color: var(--gray-700);
    font-size: 0.95rem;
}

/* ========== 登录弹窗 ========== */
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.login-modal.show {
    display: flex;
}

.login-modal-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    width: 100%;
    max-width: 380px;
    position: relative;
}

.login-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
}

.login-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
}

.login-modal-header h3 i {
    color: var(--primary);
    margin-right: 8px;
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .products-grid,
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .products-grid,
    .cases-grid,
    .why-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}
/* 新增：顶部固定联系电话条 */
.top-phone-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: #fff;
    text-align: center;
    padding: 6px 20px;
    font-size: 13px;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}
.top-phone-bar a {
    color: #fff;
    text-decoration: none;
}
.top-phone-bar a:hover {
    text-decoration: underline;
}

/* 导航栏下移以避让顶部电话条 */
body {
    padding-top: 30px;
}
.header {
    top: 30px;
}

@media (max-width: 768px) {
    .top-phone-bar {
        font-size: 12px;
        gap: 16px;
        padding: 5px 10px;
    }
}