/* =============================================
   珂恒光电官网主样式
   主色调：#0d4fa0（深蓝）辅色：#e8620a（橙）
   ============================================= */

:root {
    --primary:   #0d4fa0;
    --secondary: #e8620a;
    --dark:      #1a1a2e;
    --light-bg:  #f8f9fa;
    --text-muted:#6c757d;
    --border:    #dee2e6;
}

/* ---------- 全局 ---------- */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.7;
}

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

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover {
    background-color: #0a3d7a;
    border-color: #0a3d7a;
}

/* ---------- Header ---------- */
.site-header .navbar {
    background: var(--primary) !important;
    padding: 0;
}
.site-header .navbar-brand { padding: 12px 0; }
.site-header .nav-link {
    color: rgba(255,255,255,.85) !important;
    padding: 1rem .85rem;
    font-size: 14px;
    transition: color .2s;
}
.site-header .nav-link:hover,
.site-header .nav-link.active { color: #fff !important; border-bottom: 2px solid #fff; }

.lang-switcher { font-size: 13px; color: rgba(255,255,255,.7); }
.lang-switcher a { color: rgba(255,255,255,.7); margin: 0 3px; }
.lang-switcher a.active { color: #fff; font-weight: bold; }

/* ---------- Hero / 轮播 ---------- */
.hero-swiper { position: relative; }
.hero-swiper .swiper { height: 580px; }
.hero-swiper .swiper-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
}
.hero-swiper .swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}
.hero-caption {
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.5);
    position: relative;
    z-index: 2;
}
.hero-caption h1 { font-size: 2.5rem; font-weight: 700; }
.hero-caption p  { font-size: 1.1rem; margin: 1rem 0; }
.hero-swiper .swiper-pagination-bullet { background: rgba(255,255,255,.5); }
.hero-swiper .swiper-pagination-bullet-active { background: #fff; }
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev { color: #fff; }

/* ---------- Section 通用 ---------- */
.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
    padding-bottom: .5rem;
}
.section-header h2::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--secondary);
    margin: .5rem auto 0;
}

/* ---------- 产品卡片 ---------- */
.product-card {
    border: 1px solid var(--border);
    transition: box-shadow .2s, transform .2s;
    color: #333;
}
.product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    transform: translateY(-3px);
}
.product-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* ---------- 解决方案卡片 ---------- */
.solution-card {
    transition: box-shadow .2s;
}
.solution-card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,.1) !important;
}
.solution-icon { border-radius: 8px; }

/* ---------- 新闻卡片 ---------- */
.news-card { border: 1px solid var(--border); transition: box-shadow .2s; }
.news-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.news-card .card-img-top { height: 180px; object-fit: cover; }
.news-card .card-title a { color: #333; }
.news-card .card-title a:hover { color: var(--primary); }

/* ---------- CTA 条 ---------- */
.section-cta { background: var(--primary) !important; }

/* ---------- Footer ---------- */
.site-footer {
    background: #1a2035;
    color: rgba(255,255,255,.75);
    font-size: 13px;
}
.footer-title { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: .75rem; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.65); }
.footer-links a:hover { color: #fff; }
.contact-info { color: rgba(255,255,255,.75); }
.contact-info p { margin-bottom: 0.5rem; }
.contact-info a { color: rgba(255,255,255,.75); }
.contact-info a:hover { color: #fff; }
.footer-bottom { border-color: rgba(255,255,255,.1) !important; }
.footer-bottom a { color: rgba(255,255,255,.6); }
.footer-bottom a:hover { color: #fff; }

/* ---------- 面包屑页头 ---------- */
.page-hero {
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #f0f4ff 0%, #f8f9fa 100%);
}
.page-hero h1 { font-size: 1.8rem; font-weight: 700; color: var(--primary); margin-bottom: .3rem; }

/* ---------- 搜索结果高亮 ---------- */
mark {
    background: #fff3cd;
    padding: 0 2px;
    border-radius: 2px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .hero-swiper .swiper { height: 260px; }
    .hero-caption h1 { font-size: 1.4rem; }
}
