/* ============================================
   金湖凯铭仪表 首页新版样式
   参照 jskmyb.com Astra 风格
   主蓝 #4d6fd9 / 深藏青 #0b1b42 / 白底
   容器最大 1240px，全站响应式
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    color: #333;
    background: #f5f7fa;
    line-height: 1.6;
}

a { text-decoration: none; color: #333; }
ul { list-style: none; }
img { max-width: 100%; }

.h-container {
    width: 92%;
    max-width: 1240px;
    margin: 0 auto;
}

/* ---------- 顶部客服条 ---------- */
.h-topbar {
    background: #0b1b42;
    color: #cfd8ee;
    font-size: 13px;
    padding: 7px 0;
    letter-spacing: 1px;
}

/* ---------- 头部 ---------- */
.h-header {
    background: #4d6fd9;
    position: sticky;
    top: 0;
    z-index: 100;
}

.h-header-inner {
    display: flex;
    align-items: center;
    height: 80px;
}

.h-logo {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-right: 40px;
    white-space: nowrap;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
}

.h-logo-img {
    height: 44px;
    width: auto;
    margin-right: 12px;
}

.h-nav {
    display: flex;
    flex: 1;
    justify-content: flex-end;
}

.h-nav li a {
    display: block;
    padding: 0 18px;
    font-size: 15px;
    color: #fff;
    letter-spacing: 2px;
}

.h-nav li a:hover, .h-nav li.active a { color: #ffde01; }

.h-burger {
    display: none;
    font-size: 26px;
    cursor: pointer;
    margin-left: auto;
    color: #fff;
}

#h-menu-toggle { display: none; }

/* ---------- Banner ---------- */
.h-banner {
    background: #fff;
    overflow: hidden;
    line-height: 0;
}

.h-banner img {
    display: block;
    width: 100vw;
    max-width: 100vw;
    height: auto;
}

/* ---------- 通用区块 ---------- */
.h-section {
    padding: 30px 0;
}

.h-bg { background: #f7f9fc; }

.h-section-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 25px;
    padding: 0 20px 10px;
    border-bottom: 2px solid #4d6fd9;
}

.h-section-title h2 {
    font-size: 22px;
    color: #0b1b42;
    font-weight: 600;
}

.h-section-title a {
    font-size: 13px;
    color: #4d6fd9;
}

/* ---------- 产品卡片网格 ---------- */
.h-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.h-product-card {
    border: 1px solid #eaeaea;
    background: #fff;
    transition: all .2s;
}

.h-product-card:hover {
    border-color: #4d6fd9;
    box-shadow: 0 6px 18px rgba(77,111,217,.12);
}

.h-card-img {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-bottom: 1px solid #eaeaea;
    overflow: hidden;
}

.h-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.h-card-name {
    padding: 12px;
    font-size: 14px;
    text-align: center;
    color: #333;
}

.h-product-card:hover .h-card-name { color: #4d6fd9; }

/* ---------- 新闻两栏 ---------- */
.h-news-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.h-news-col ul li {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px dashed #e5e5e5;
    font-size: 14px;
}

.h-news-col ul li a { color: #444; }
.h-news-col ul li a:hover { color: #4d6fd9; }
.h-news-col ul li span { color: #999; font-size: 13px; white-space: nowrap; margin-left: 15px; }

/* ---------- 资质荣誉 横向滚动 ---------- */
.h-honor-wrap {
    overflow: hidden;
    width: 92%;
    max-width: 1240px;
    margin: 0 auto;
}

.h-honor-track {
    display: flex;
    gap: 20px;
    width: max-content;
    animation: h-scroll 30s linear infinite;
}

.h-honor-wrap:hover .h-honor-track { animation-play-state: paused; }

.h-honor-item {
    flex: 0 0 auto;
}

.h-honor-item img {
    height: 200px;
    width: auto;
    display: block;
    border: 1px solid #eaeaea;
    background: #fff;
    padding: 8px;
}

@keyframes h-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------- 友情链接 ---------- */
.h-friendlinks {
    padding: 25px 0;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #999;
}

.h-friendlinks a { color: #999; }
.h-friendlinks a:hover { color: #4d6fd9; }

/* ---------- 响应式：平板 ---------- */
@media (max-width: 992px) {
    .h-news-wrap { grid-template-columns: 1fr; gap: 25px; }
}

/* ---------- 响应式：手机 ---------- */
@media (max-width: 768px) {
    .h-topbar { display: none; }
    .h-header-inner { height: auto; flex-wrap: wrap; padding: 12px 0; }
    .h-logo { margin-right: 0; font-size: 18px; }
    .h-logo-img { height: 34px; margin-right: 8px; }
    .h-burger { display: block; }
    .h-nav {
        display: none;
        flex-direction: column;
        width: 100%;
    }
    #h-menu-toggle:checked ~ .h-nav { display: flex; }
    .h-nav li { border-top: 1px solid rgba(255,255,255,.15); }
    .h-nav li a { padding: 12px 5px; }

    .h-section { padding: 30px 0; }
    .h-product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .h-section-title h2 { font-size: 18px; }
}

@media (max-width: 480px) {
    .h-section-title h2 { font-size: 17px; }
}
