/* ===== 全局重置与变量 ===== */
:root {
    --primary: #003a8c;
    --primary-light: #1a5bb5;
    --primary-dark: #002766;
    --accent: #0070cc;
    --text: #333;
    --text-light: #666;
    --bg: #f5f7fa;
    --white: #fff;
    --footer-bg: #1a1a2e;
    --footer-text: #ccc;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
    --radius: 6px;
    --transition: .3s ease;
    --nav-height: 64px;
}

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

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ===== 导航栏 ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    height: var(--nav-height);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.navbar-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.navbar-logo-text {
    font-size: 1.4rem;
    font-weight: 700;
}

.navbar-menu {
    list-style: none;
    display: flex;
    gap: 32px;
}

.navbar-link {
    font-size: .95rem;
    color: var(--text);
    padding: 8px 0;
    position: relative;
    transition: color var(--transition);
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
}

.navbar-link:hover,
.navbar-link.active {
    color: var(--accent);
}

.navbar-link:hover::after,
.navbar-link.active::after {
    width: 100%;
}

/* 汉堡菜单 */
.navbar-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

.navbar-hamburger.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.navbar-hamburger.open .hamburger-line:nth-child(2) {
    opacity: 0;
}
.navbar-hamburger.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Banner 轮播 ===== */
.banner-carousel {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    overflow: hidden;
    background: var(--primary-dark);
}

.banner-wrapper { position: relative; width: 100%; height: 100%; }

.banner-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity .8s ease;
}

.banner-slide.active { opacity: 1; z-index: 1; }

.banner-image {
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-color: var(--primary-dark);
}

.banner-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0,42,100,.7) 0%, rgba(0,42,100,.2) 100%);
    display: flex;
    align-items: center;
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    color: var(--white);
}

.banner-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.banner-desc {
    font-size: 1.15rem;
    max-width: 560px;
    line-height: 1.8;
    opacity: .9;
}

.banner-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,.2);
    border: none;
    color: var(--white);
    font-size: 1.6rem;
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--transition);
}

.banner-btn:hover { background: rgba(255,255,255,.4); }
.banner-prev { left: 20px; }
.banner-next { right: 20px; }

.banner-indicators {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 10px;
}

.banner-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.banner-dot.active {
    background: var(--white);
    transform: scale(1.3);
}

/* ===== 通用板块 ===== */
.section {
    padding: 64px 0;
}

.section:nth-child(even) {
    background: var(--bg);
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 48px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ===== 业务布局 ===== */
.business-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.business-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.business-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.business-card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg);
}

.business-card-body {
    padding: 20px;
}

.business-card-name {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.business-card-desc {
    font-size: .9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== 产品分类网格 ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
}

.category-item {
    text-align: center;
    padding: 24px 12px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform var(--transition);
    cursor: pointer;
}

.category-item:hover {
    transform: translateY(-4px);
}

.category-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon img {
    max-width: 100%;
    max-height: 100%;
}

.category-name {
    font-size: .95rem;
    color: var(--text);
    font-weight: 500;
}

/* ===== 新闻动态 ===== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-item {
    display: flex;
    gap: 20px;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}

.news-item:hover {
    transform: translateX(4px);
}

.news-thumb {
    flex-shrink: 0;
    width: 200px;
    min-height: 140px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg);
}

.news-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-title {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 8px;
}

.news-summary {
    font-size: .9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 8px;
}

.news-date {
    font-size: .8rem;
    color: #999;
}

/* ===== 公司动态页 ===== */
.news-page {
    padding: 48px 0 64px;
}

/* ===== 产品介绍页 ===== */
.product-page {
    padding: 48px 0 64px;
}

.page-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 48px;
    position: relative;
}

.page-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

.product-category {
    margin-bottom: 48px;
}

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

.product-category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg);
}

.product-category-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-category-icon img {
    max-width: 100%;
    max-height: 100%;
}

.product-category-name {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.product-category-desc {
    font-size: .9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.product-card-image {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg);
}

.product-card-body {
    padding: 14px;
}

.product-card-name {
    font-size: .95rem;
    color: var(--text);
    margin-bottom: 6px;
    font-weight: 600;
}

.product-card-desc {
    font-size: .8rem;
    color: var(--text-light);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== 关于我们页 ===== */
.about-page {
    padding: 48px 0 64px;
}

.about-section {
    margin-bottom: 48px;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section-title {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg);
}

/* 公司简介 */
.about-intro-text {
    font-size: 1rem;
    color: var(--text);
    line-height: 1.9;
    text-indent: 2em;
}

/* 发展历程时间线 */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent);
}

.timeline-item {
    position: relative;
    padding-bottom: 28px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -28px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--accent);
    z-index: 1;
}

.timeline-content {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.timeline-year {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    min-width: 48px;
}

.timeline-desc {
    font-size: .95rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* 企业文化 */
.culture-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.culture-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}

.culture-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.culture-card-title {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.culture-card-text {
    font-size: .95rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* 联系方式 */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.contact-item {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

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

.contact-value {
    display: block;
    font-size: 1rem;
    color: var(--text);
    font-weight: 500;
}

/* ===== 高德地图 ===== */
.amap-container {
    width: 100%;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
}

/* ===== 页脚 ===== */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 32px 0;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    font-size: .85rem;
}

.footer-link {
    color: var(--footer-text);
    transition: color var(--transition);
}

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

/* ===== 主内容区 ===== */
.main-content {
    min-height: calc(100vh - var(--nav-height) - 96px);
}

/* ===== 404 页面 ===== */
.not-found {
    text-align: center;
    padding: 120px 20px;
}

/* ===== 滚动渐入动画 ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 响应式：平板端 ===== */
@media (max-width: 1024px) {
    .business-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

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

    .amap-container { height: 350px; }

    .banner-title { font-size: 2.2rem; }
    .banner-content { padding: 0 40px; }
}

/* ===== 响应式：移动端 ===== */
@media (max-width: 768px) {
    .navbar-hamburger {
        display: flex;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,.1);
    }

    .navbar-menu.open {
        display: flex;
    }

    .navbar-item {
        border-bottom: 1px solid #eee;
    }

    .navbar-link {
        display: block;
        padding: 14px 20px;
    }

    .banner-carousel {
        height: 50vh;
        min-height: 280px;
    }

    .banner-title { font-size: 1.6rem; }
    .banner-desc { font-size: .95rem; }
    .banner-content { padding: 0 24px; }
    .banner-btn { width: 36px; height: 36px; font-size: 1.2rem; }

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

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .culture-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .amap-container { height: 280px; }

    .timeline-content {
        flex-direction: column;
        gap: 4px;
    }

    .product-category-header {
        flex-direction: column;
        text-align: center;
    }

    .news-item {
        flex-direction: column;
    }

    .news-thumb {
        width: 100%;
        height: 180px;
    }

    .section { padding: 40px 0; }
    .section-title { font-size: 1.4rem; margin-bottom: 32px; }

    .footer-container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}
