/* ===== 基础重置与变量 ===== */
:root {
    --primary: #1565c0;
    --primary-dark: #0d47a1;
    --primary-light: #42a5f5;
    --accent: #1e88e5;
    --text: #2c3e50;
    --text-light: #5f6f82;
    --bg: #ffffff;
    --bg-alt: #f4f8fc;
    --border: #e3ecf5;
    --white: #ffffff;
    --shadow: 0 6px 24px rgba(21, 101, 192, 0.08);
    --radius: 12px;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
    color: var(--text);
    line-height: 1.7;
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ===== 顶部导航栏 ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 0 var(--border);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: 0 2px 12px rgba(21, 101, 192, 0.12);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: var(--white);
    font-weight: 700;
    font-size: 16px;
    padding: 8px 14px;
    border-radius: 8px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.logo-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.nav {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 15px;
    color: var(--text);
    border-radius: 6px;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.header-tel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.3;
}

.tel-label {
    font-size: 12px;
    color: var(--text-light);
}

.tel-number {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== 首屏 Banner（纯图，文案在图片内） ===== */
.hero {
    padding-top: 72px;
    background: var(--bg-alt);
}

.hero-banner-link {
    display: block;
    line-height: 0;
}

.hero-banner-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 640px;
    object-fit: cover;
    object-position: center;
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    padding: 13px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(21, 101, 192, 0.25);
}

.btn-outline-dark {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-dark:hover {
    background: rgba(21, 101, 192, 0.08);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
    background: var(--primary);
    color: var(--white);
}

.btn-block:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== 通用 Section ===== */
.section {
    padding: 90px 0;
}

.section-head {
    text-align: center;
    margin-bottom: 56px;
}

.section-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.section-sub {
    font-size: 14px;
    letter-spacing: 4px;
    color: var(--primary);
    text-transform: uppercase;
}

/* ===== 关于我们 ===== */
.about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 56px;
    align-items: center;
}

.about-lead {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 16px;
}

.about-text p {
    margin-bottom: 16px;
    color: var(--text-light);
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 32px;
}

.stat {
    text-align: center;
}

.stat-num {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary);
    display: block;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 8px;
    display: block;
}

.about-card {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 40px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.about-card-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.about-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.about-card p {
    color: var(--text-light);
}

/* ===== 产品中心（三分区横向排列） ===== */
.products {
    background: var(--bg-alt);
}

.product-zone {
    margin-bottom: 56px;
}

.product-zone:last-child {
    margin-bottom: 0;
}

.zone-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.zone-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 72px;
    height: 2px;
    background: var(--primary);
}

.zone-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
}

.zone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

.product-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(21, 101, 192, 0.16);
}

.product-img {
    height: 230px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--white);
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.product-card:hover .product-img img {
    transform: scale(1.05);
}

.product-body {
    padding: 24px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.product-desc {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== 核心优势 ===== */
.advantages {
    background: var(--white);
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.advantage-item {
    text-align: center;
    padding: 32px 24px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.advantage-item:hover {
    background: var(--bg-alt);
    box-shadow: var(--shadow);
}

.advantage-icon {
    font-size: 44px;
    margin-bottom: 16px;
}

.advantage-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-dark);
}

.advantage-item p {
    font-size: 14px;
    color: var(--text-light);
}

/* ===== 软著专利 ===== */
.patents {
    background: var(--white);
}

.patent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.patent-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.patent-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(21, 101, 192, 0.16);
}

.patent-img {
    background: var(--bg-alt);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.patent-img img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.patent-body {
    padding: 20px 24px;
    text-align: center;
}

.patent-body h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.patent-body p {
    font-size: 13px;
    color: var(--text-light);
}

/* ===== 成像效果 ===== */
.gallery {
    background: var(--bg-alt);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gallery-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(21, 101, 192, 0.16);
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: var(--white);
    display: block;
    padding: 12px;
}

.gallery-caption {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border);
}

.gallery-caption h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.gallery-caption p {
    font-size: 13px;
    color: var(--text-light);
}

/* ===== 联系我们 ===== */
.contact {
    background: var(--bg-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info,
.contact-form {
    background: var(--white);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.contact-info h3,
.contact-form h3 {
    font-size: 20px;
    color: var(--primary-dark);
    margin-bottom: 24px;
}

.contact-list li {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
}

.contact-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.contact-label {
    font-size: 13px;
    color: var(--text-light);
    display: block;
    margin-bottom: 2px;
}

.contact-list p {
    font-size: 15px;
    color: var(--text);
}

.contact-branches {
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.branch-title {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 14px;
}

.contact-branches p {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-tip {
    text-align: center;
    margin-top: 12px;
    font-size: 14px;
    color: var(--primary);
    min-height: 20px;
}

/* ===== 页脚 ===== */
.footer {
    background: #0d1b2a;
    color: rgba(255, 255, 255, 0.75);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    padding-top: 48px;
    padding-bottom: 40px;
}

.footer-brand {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}

.footer-info p {
    font-size: 14px;
    margin-bottom: 6px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    font-size: 14px;
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding: 18px 0;
    font-size: 13px;
}

/* ===== 返回顶部 ===== */
.back-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(21, 101, 192, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 900;
}

.back-top.show {
    opacity: 1;
    visibility: visible;
}

.back-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .zone-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .patent-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .advantage-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 16px 24px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        display: none;
    }

    .nav.open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .header-tel {
        display: none;
    }

    .logo-text {
        display: none;
    }

    .section {
        padding: 64px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .zone-grid {
        grid-template-columns: 1fr;
    }

    .patent-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .zone-title {
        font-size: 19px;
    }

    .about-stats {
        gap: 20px;
        flex-wrap: wrap;
    }

    .footer-inner {
        flex-direction: column;
    }
}
