/* ========================================
   芯一光电 - 主样式文件
   风格：简约大气 科技感
   ======================================== */

/* CSS变量 */
:root {
    --primary: #0052CC;
    --primary-dark: #003D99;
    --primary-light: #E6F0FF;
    --secondary: #1A1A2E;
    --accent: #00B4D8;
    --text: #333333;
    --text-light: #666666;
    --text-muted: #999999;
    --bg-light: #F5F7FA;
    --bg-dark: #0F1923;
    --white: #FFFFFF;
    --border: #E8ECF1;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* 基础样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

.section-padding { padding: 80px 0; }

/* ========== 顶部信息栏 ========== */
.top-bar {
    background: var(--secondary);
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    padding: 8px 0;
}
.top-bar span { display: inline-flex; align-items: center; gap: 5px; }

/* ========== 导航栏 ========== */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar { padding: 12px 0; }

.navbar-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}
.logo-sub {
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text) !important;
    padding: 8px 16px !important;
    position: relative;
}
.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--primary);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 8px 0;
}
.dropdown-item { font-size: 14px; padding: 8px 20px; }
.dropdown-item:hover { background: var(--primary-light); color: var(--primary); }

.search-form .form-control {
    border-radius: 20px 0 0 20px;
    border: 1px solid var(--border);
    font-size: 14px;
    padding: 6px 16px;
}
.search-form .btn {
    border-radius: 0 20px 20px 0;
    padding: 6px 16px;
}

/* ========== 轮播图 Banner ========== */
.hero-banner { position: relative; }

.banner-slide {
    height: 560px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    position: relative;
}
.banner-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,30,80,0.85) 0%, rgba(0,82,204,0.6) 100%);
}

.banner-1 { background: linear-gradient(135deg, #0a1628 0%, #0052CC 100%); }
.banner-2 { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); }
.banner-3 { background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%); }

.banner-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 600px;
}
.banner-content h1 {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}
.banner-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: var(--white);
    opacity: 0.6;
}
.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover { opacity: 1; }

.hero-swiper .swiper-pagination-bullet {
    background: var(--white);
    opacity: 0.5;
}
.hero-swiper .swiper-pagination-bullet-active { opacity: 1; }

/* ========== 核心优势 ========== */
.advantages {
    padding: 0;
    margin-top: -40px;
    position: relative;
    z-index: 10;
}
.adv-item {
    background: var(--white);
    padding: 30px 20px;
    text-align: center;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.adv-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.adv-icon {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 12px;
}
.adv-item h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}
.adv-item p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* ========== 通用区块标题 ========== */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
}
.section-tag.light { color: var(--accent); }

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 12px;
}
.bg-dark .section-header h2 { color: var(--white); }

.section-header p {
    font-size: 16px;
    color: var(--text-light);
    max-width: 500px;
    margin: 0 auto;
}
.bg-dark .section-header p { color: rgba(255,255,255,0.7); }

/* ========== 关于我们 ========== */
.about-image {
    border-radius: var(--radius);
    overflow: hidden;
}
.about-placeholder {
    background: linear-gradient(135deg, var(--primary-light) 0%, #d0e2ff 100%);
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: var(--primary);
}
.about-placeholder i { font-size: 80px; opacity: 0.3; }
.about-placeholder span { margin-top: 10px; opacity: 0.5; }

.about-text {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 12px;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-num {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}
.stat-plus {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
}
.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========== 产品分类 ========== */
.product-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
}
.product-cat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    color: var(--primary);
}
.cat-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 12px;
    transition: var(--transition);
}
.product-cat-card:hover .cat-icon { transform: scale(1.1); }

.product-cat-card h5 {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}
.cat-arrow {
    opacity: 0;
    transition: var(--transition);
    color: var(--primary);
}
.product-cat-card:hover .cat-arrow { opacity: 1; }

/* ========== 品牌展示 ========== */
.brand-wall {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}
.brand-logo-item {
    background: var(--bg-light);
    padding: 24px 16px;
    text-align: center;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
}
.brand-logo-item:hover {
    background: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.brand-logo-item span {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    transition: var(--transition);
}
.brand-logo-item:hover span { color: var(--white); }

.brand-logo-item small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    transition: var(--transition);
}
.brand-logo-item:hover small { color: rgba(255,255,255,0.8); }

/* ========== 应用领域 ========== */
.app-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    transition: var(--transition);
}
.app-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--accent);
    transform: translateY(-3px);
}
.app-card i {
    font-size: 36px;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
}
.app-card h5 {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

/* ========== 新闻动态 ========== */
.news-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    transition: var(--transition);
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.news-img { position: relative; overflow: hidden; }
.news-placeholder {
    height: 200px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e0e7ef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.news-placeholder i { font-size: 48px; color: var(--border); }

.news-date {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: var(--primary);
    color: var(--white);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 4px;
}
.news-body { padding: 20px; }
.news-cat {
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
}
.news-body h5 {
    font-size: 16px;
    font-weight: 600;
    margin: 8px 0;
    line-height: 1.5;
}
.news-body h5 a { color: var(--text); }
.news-body h5 a:hover { color: var(--primary); }
.news-body p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== CTA询价 ========== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 60px 0;
}
.cta-content h2 {
    color: var(--white);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}
.cta-content p {
    color: rgba(255,255,255,0.85);
    font-size: 16px;
    margin: 0;
}

/* ========== 底部 ========== */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}
.footer-brand h4 {
    color: var(--white);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 2px;
}
.footer-brand-sub {
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 16px;
}
.footer-desc { font-size: 14px; line-height: 1.8; }

.footer h5 {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}
.footer-links {
    list-style: none;
    padding: 0;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--white); padding-left: 5px; }

.footer-contact {
    list-style: none;
    padding: 0;
}
.footer-contact li {
    margin-bottom: 12px;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.footer-contact i { color: var(--accent); margin-top: 3px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    margin-top: 40px;
}
.footer-bottom p {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin: 0;
}

/* ========== 回到顶部 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,82,204,0.3);
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ========== 按钮样式 ========== */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ========== 响应式 ========== */
@media (max-width: 991px) {
    .top-bar { display: none; }
    .banner-slide { height: 400px; }
    .banner-content h1 { font-size: 28px; }
    .banner-content p { font-size: 15px; }
    .section-padding { padding: 50px 0; }
    .section-header { margin-bottom: 30px; }
    .section-header h2 { font-size: 26px; }
    .brand-wall { grid-template-columns: repeat(3, 1fr); }
    .about-stats { gap: 20px; }
    .search-form { margin-top: 12px; }
    .advantages { margin-top: -20px; }
}

@media (max-width: 767px) {
    .banner-slide { height: 320px; }
    .banner-content h1 { font-size: 24px; }
    .banner-content p { font-size: 14px; margin-bottom: 20px; }
    .banner-content .btn-lg { font-size: 14px; padding: 8px 20px; }
    .adv-item { padding: 20px 12px; }
    .adv-icon { font-size: 28px; }
    .adv-item h4 { font-size: 14px; }
    .adv-item p { font-size: 12px; }
    .about-placeholder { height: 250px; }
    .about-stats { flex-wrap: wrap; gap: 16px; }
    .stat-num { font-size: 28px; }
    .brand-wall { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .brand-logo-item { padding: 16px 8px; }
    .brand-logo-item span { font-size: 13px; }
    .cta-section { text-align: center; }
    .cta-content .text-lg-end { text-align: center !important; margin-top: 20px; }
    .footer { padding: 40px 0 0; }
    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev { display: none; }
}

@media (max-width: 575px) {
    .banner-slide { height: 280px; }
    .banner-content h1 { font-size: 20px; }
    .banner-content .btn { font-size: 13px; padding: 6px 16px; }
    .banner-content .ms-2 { margin-left: 0.25rem !important; }
    .brand-wall { grid-template-columns: repeat(2, 1fr); }
    .product-cat-card { padding: 20px 12px; }
    .cat-icon { font-size: 30px; }
    .product-cat-card h5 { font-size: 13px; }
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.6s ease forwards; }

/* 数字滚动动画 */
.stat-num { transition: none; }