/*
Theme Name: 视能智控企业主题
Theme URI: https://www.snzkteck.com
Author: snzkteck
Description: 为视能智控定制的企业官网主题：Banner 轮播、主营业务、产品中心、案例中心、关于我们、新闻资讯、联系版块，全部内容可在后台"网站设置"维护。
Version: 1.0.0
Text Domain: snzk-corp
*/

:root {
    --c-primary: #0b4da2;
    --c-primary-dark: #083a7d;
    --c-accent: #1a8fff;
    --c-ink: #1f2a3a;
    --c-gray: #5c6b80;
    --c-line: #e6ebf2;
    --c-bg: #f5f8fc;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(11, 61, 122, .08);
}

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

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: var(--c-ink);
    background: #fff;
    line-height: 1.7;
    font-size: 15px;
}

a { color: var(--c-primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-accent); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 顶栏 ---------- */

.topbar {
    background: var(--c-primary-dark);
    color: rgba(255, 255, 255, .85);
    font-size: 13px;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
}
.topbar a { color: rgba(255, 255, 255, .85); }
.topbar a:hover { color: #fff; }
.topbar .topbar-right span { margin-left: 18px; }

/* ---------- 头部导航 ---------- */

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 6px rgba(15, 45, 90, .05);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}
.logo { display: flex; align-items: center; gap: 12px; color: var(--c-ink); }
.logo:hover { color: var(--c-ink); }
.logo img { max-height: 48px; width: auto; }
.logo-text .logo-name {
    display: block;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--c-primary-dark);
}
.logo-text .logo-tag {
    display: block;
    font-size: 12px;
    color: var(--c-gray);
    letter-spacing: 2px;
}
.main-nav .menu {
    display: flex;
    gap: 6px;
}
.main-nav .menu-item a {
    display: block;
    padding: 26px 16px;
    color: var(--c-ink);
    font-size: 16px;
    position: relative;
}
.main-nav .menu-item a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 18px;
    height: 3px;
    border-radius: 2px;
    background: var(--c-accent);
    transform: scaleX(0);
    transition: transform .25s;
}
.main-nav .menu-item a:hover::after,
.main-nav .current-menu-item > a::after { transform: scaleX(1); }
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--c-ink);
    margin: 5px 0;
}

/* ---------- 首页 Banner ---------- */

.hero { position: relative; overflow: hidden; }
.hero-slide {
    min-height: 460px;
    background-size: cover;
    background-position: center;
    display: none;
    align-items: center;
    position: relative;
}
.hero-slide.active { display: flex; }
.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(6, 32, 70, .82) 15%, rgba(6, 32, 70, .35) 60%, rgba(6, 32, 70, .15));
}
.hero-slide.no-img { background: linear-gradient(120deg, #0b3d7a, #0b4da2 55%, #1a8fff); }
.hero-text {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 640px;
}
.hero-text h2 {
    font-size: 38px;
    line-height: 1.35;
    margin-bottom: 16px;
    font-weight: 700;
}
.hero-text p {
    font-size: 17px;
    color: rgba(255, 255, 255, .88);
    margin-bottom: 30px;
}
.btn {
    display: inline-block;
    padding: 12px 34px;
    border-radius: 4px;
    font-size: 15px;
    letter-spacing: 1px;
}
.btn-primary {
    background: var(--c-accent);
    color: #fff;
}
.btn-primary:hover { background: #3ea1ff; color: #fff; }
.btn-outline {
    border: 1px solid rgba(255, 255, 255, .7);
    color: #fff;
    margin-left: 14px;
}
.btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.hero-dots {
    position: absolute;
    bottom: 26px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 2;
}
.hero-dots button {
    width: 34px;
    height: 4px;
    border: none;
    border-radius: 2px;
    background: rgba(255, 255, 255, .4);
    cursor: pointer;
}
.hero-dots button.active { background: #fff; }

/* ---------- 版块通用 ---------- */

.section { padding: 72px 0; }
.section.alt { background: var(--c-bg); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head .en {
    font-size: 13px;
    letter-spacing: 4px;
    color: var(--c-accent);
    text-transform: uppercase;
    display: block;
    margin-bottom: 8px;
}
.section-head h2 { font-size: 30px; color: var(--c-primary-dark); }
.section-head .bar {
    width: 48px;
    height: 4px;
    border-radius: 2px;
    background: var(--c-accent);
    margin: 16px auto 0;
}

/* ---------- 主营业务 ---------- */

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.service-card {
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: var(--radius);
    padding: 34px 28px;
    text-align: center;
    transition: transform .25s, box-shadow .25s;
}
.section.alt .service-card { border-color: transparent; }
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}
.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.service-icon img { max-height: 64px; max-width: 64px; width: auto; }
.service-icon svg { width: 64px; height: 64px; color: var(--c-primary); }
.service-card h3 { font-size: 18px; margin-bottom: 10px; color: var(--c-ink); }
.service-card p { font-size: 14px; color: var(--c-gray); }

/* ---------- 卡片列表（产品/案例/新闻） ---------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 26px rgba(11, 61, 122, .14); }
.card-img {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #dfe9f6, #cfe0f4);
    overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img svg { width: 100%; height: 100%; }
.card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 16px; line-height: 1.5; margin-bottom: 8px; }
.card-body h3 a { color: var(--c-ink); }
.card-body h3 a:hover { color: var(--c-primary); }
.card-body p { font-size: 13px; color: var(--c-gray); flex: 1; }
.card-meta { font-size: 12px; color: #93a1b3; margin-top: 10px; }

.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- 关于我们 ---------- */

.about-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
}
.about-img {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #dfe9f6, #cfe0f4);
    aspect-ratio: 4 / 3;
}
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { font-size: 30px; color: var(--c-primary-dark); margin-bottom: 20px; }
.about-text p { color: var(--c-gray); margin-bottom: 14px; }
.about-more { margin-top: 18px; display: inline-block; font-weight: 600; }

/* ---------- 新闻列表（首页双栏） ---------- */

.news-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.news-feature .card-img { aspect-ratio: 16 / 9; }
.news-list li {
    display: flex;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--c-line);
}
.news-list .date {
    flex-shrink: 0;
    width: 74px;
    text-align: center;
    border-radius: 6px;
    background: var(--c-bg);
    padding: 8px 0;
    align-self: flex-start;
}
.news-list .date b { display: block; font-size: 22px; color: var(--c-primary); line-height: 1.2; }
.news-list .date span { font-size: 12px; color: var(--c-gray); }
.news-list h3 { font-size: 15px; line-height: 1.5; }
.news-list h3 a { color: var(--c-ink); }
.news-list h3 a:hover { color: var(--c-primary); }

/* ---------- 联系版块 ---------- */

.contact-band {
    background: linear-gradient(120deg, #0b3d7a, #0b4da2 60%, #1a6fd6);
    color: #fff;
}
.contact-band .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 52px;
    padding-bottom: 52px;
    gap: 30px;
    flex-wrap: wrap;
}
.contact-band h2 { font-size: 26px; margin-bottom: 8px; }
.contact-band p { color: rgba(255, 255, 255, .85); }
.contact-band .phone { font-size: 30px; font-weight: 700; letter-spacing: 1px; }

/* ---------- 页脚 ---------- */

.site-footer { background: #10233d; color: rgba(255, 255, 255, .72); }
.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1.4fr;
    gap: 48px;
    padding: 56px 0 40px;
}
.footer-main h4 {
    color: #fff;
    font-size: 17px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.footer-main p { font-size: 14px; margin-bottom: 8px; }
.footer-nav li { margin-bottom: 8px; }
.footer-nav a { color: rgba(255, 255, 255, .72); font-size: 14px; }
.footer-nav a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 18px 0;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
}
.footer-bottom a { color: rgba(255, 255, 255, .5); }

/* ---------- 内页 ---------- */

.page-banner {
    background: linear-gradient(120deg, #0b3d7a, #0b4da2 60%, #1a6fd6);
    color: #fff;
    padding: 64px 0;
}
.page-banner h1 { font-size: 32px; }
.page-banner .crumb { font-size: 13px; color: rgba(255, 255, 255, .75); margin-top: 8px; }
.page-banner .crumb a { color: rgba(255, 255, 255, .75); }

.content-area { padding: 60px 0 80px; }
.content-area .container-narrow { max-width: 860px; margin: 0 auto; padding: 0 20px; }

.article-list li {
    display: flex;
    gap: 22px;
    padding: 24px 0;
    border-bottom: 1px solid var(--c-line);
}
.article-list .thumb {
    flex-shrink: 0;
    width: 220px;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #dfe9f6, #cfe0f4);
}
.article-list .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-list h2 { font-size: 18px; margin-bottom: 8px; }
.article-list h2 a { color: var(--c-ink); }
.article-list h2 a:hover { color: var(--c-primary); }
.article-list .meta { font-size: 12px; color: #93a1b3; margin-bottom: 8px; }
.article-list p { font-size: 14px; color: var(--c-gray); }

.single-article h1 { font-size: 28px; margin-bottom: 12px; color: var(--c-primary-dark); }
.single-article .meta { font-size: 13px; color: #93a1b3; margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--c-line); }
.single-article .entry { font-size: 15px; color: #33445a; }
.single-article .entry p { margin-bottom: 14px; }
.single-article .entry img { margin: 12px auto; border-radius: 8px; }

.page-content h1 { font-size: 28px; margin-bottom: 24px; color: var(--c-primary-dark); }
.page-content .entry { font-size: 15px; color: #33445a; }
.page-content .entry p { margin-bottom: 14px; }
.page-content .entry img { margin: 12px auto; border-radius: 8px; }

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}
.pagination .page-numbers {
    display: inline-block;
    min-width: 38px;
    text-align: center;
    padding: 8px 12px;
    border: 1px solid var(--c-line);
    border-radius: 6px;
    color: var(--c-ink);
    font-size: 14px;
}
.pagination .page-numbers.current { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* ---------- 占位图 ---------- */

.ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #8ba7c9; }
.ph svg { width: 56px; height: 56px; }

/* ---------- 响应式 ---------- */

@media (max-width: 960px) {
    .card-grid, .card-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .about-wrap, .news-wrap { grid-template-columns: 1fr; gap: 30px; }
    .footer-main { grid-template-columns: 1fr; gap: 30px; }
    .hero-text h2 { font-size: 28px; }
    .hero-slide { min-height: 380px; }
}

@media (max-width: 720px) {
    .topbar .topbar-right span:first-child { display: none; }
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--c-line);
        box-shadow: 0 12px 20px rgba(15, 45, 90, .1);
    }
    .main-nav.open { display: block; }
    .main-nav .menu { flex-direction: column; padding: 8px 0; }
    .main-nav .menu-item a { padding: 12px 24px; }
    .main-nav .menu-item a::after { display: none; }
    .card-grid, .card-grid.cols-3 { grid-template-columns: 1fr; }
    .service-grid { grid-template-columns: 1fr; }
    .article-list li { flex-direction: column; }
    .article-list .thumb { width: 100%; }
    .section { padding: 48px 0; }
    .hero-text h2 { font-size: 24px; }
    .contact-band .phone { font-size: 24px; }
}
