/* ============================================================
   鸿芯科技 · 企业官网样式
   分层结构：
     1. 变量与重置（:root, *, 基础元素）
     2. 通用布局（容器、栅格、按钮、卡片、标题）
     3. 导航栏（navbar）
     4. 轮播图（carousel）
     5. 首页区块（优势 / 服务 / 文章）
     6. 内页（页头横幅 / 关于 / 时间线 / 团队）
     7. 文章页（列表 / 详情）
     8. 联系我们（联系信息 / 表单 / 结果）
     9. 页脚（footer）
    10. 响应式（媒体查询）
   ============================================================ */

/* ========== 1. 变量与重置 ========== */
:root {
    /* 主色板 */
    --primary: #0b2447;          /* 深藏蓝 */
    --primary-dark: #081a35;
    --accent: #2f6bff;           /* 科技蓝 */
    --accent-light: #5b8cff;
    --accent-dark: #1e4fd6;
    --gold: #f5b942;             /* 点缀金 */
    --text: #1f2937;
    --text-muted: #6b7280;
    --bg: #ffffff;
    --bg-alt: #f5f8fd;           /* 浅蓝灰背景 */
    --border: #e5e9f2;
    --shadow: 0 6px 24px rgba(11, 36, 71, 0.08);
    --shadow-lg: 0 16px 48px rgba(11, 36, 71, 0.14);
    --radius: 14px;
    --radius-lg: 22px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    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", "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ========== 2. 通用布局 ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 820px;
}

.section {
    padding: 84px 0;
}

.section-alt {
    background: var(--bg-alt);
}

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

.section-head h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.section-head p {
    color: var(--text-muted);
    font-size: 16px;
}

.section-more {
    text-align: center;
    margin-top: 44px;
}

/* 栅格系统 */
.grid {
    display: grid;
    gap: 28px;
}

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

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    box-shadow: 0 8px 20px rgba(47, 107, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(47, 107, 255, 0.45);
}

.btn-light {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.btn-light:hover {
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

.btn-block {
    width: 100%;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px 28px;
    transition: var(--transition);
    border: 1px solid var(--border);
}

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

/* 标签 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 20px;
    background: #eef3ff;
    color: var(--accent);
    margin: 0 4px 4px 0;
    white-space: nowrap;
}

.tag-primary {
    background: var(--accent);
    color: #fff;
}

/* ========== 3. 导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    border-bottom-color: var(--border);
    box-shadow: 0 4px 20px rgba(11, 36, 71, 0.08);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    font-size: 28px;
}

.logo-text span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.nav-links a:hover {
    color: var(--accent);
    background: #eef3ff;
}

.nav-links a.active {
    color: var(--accent);
    font-weight: 600;
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 2px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

/* 移动端菜单按钮 */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

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

/* ========== 4. 轮播图 ========== */
.carousel {
    position: relative;
    height: 88vh;
    min-height: 520px;
    max-height: 720px;
    overflow: hidden;
    margin-top: 0;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
}

/* 三张幻灯片的兜底背景色（真实图片加载前 / 加载失败时显示） */
.banner-1 { background-color: #0b2447; }
.banner-2 { background-color: #08203e; }
.banner-3 { background-color: #1a0533; }

/* 轮播图背景图片：铺满整张幻灯片 */
.slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.carousel-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.25) 100%);
    pointer-events: none;
}

.carousel-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: 0 24px;
    animation: fadeUp 0.8s ease both;
}

.carousel-content h2 {
    font-size: 52px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.carousel-content p {
    font-size: 20px;
    margin-bottom: 36px;
    opacity: 0.92;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 切换按钮 */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
    backdrop-filter: blur(4px);
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.carousel-btn.prev { left: 28px; }
.carousel-btn.next { right: 28px; }

/* 指示圆点 */
.carousel-dots {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 5;
}

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

.dot.active {
    width: 34px;
    border-radius: 6px;
    background: #fff;
}

/* ========== 5. 首页区块 ========== */
.advantage-card {
    text-align: center;
}

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

.advantage-card h3 {
    font-size: 19px;
    color: var(--primary);
    margin-bottom: 10px;
}

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

.service-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

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

.service-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 18px;
}

.service-card .btn {
    margin-top: 16px;
}

.tag-list {
    margin-top: 6px;
}

/* 文章卡片 */
.article-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-card h3 {
    font-size: 17px;
    color: var(--primary);
    line-height: 1.5;
    transition: var(--transition);
}

.article-card:hover h3 {
    color: var(--accent);
}

.article-card p {
    color: var(--text-muted);
    font-size: 14px;
    flex: 1;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.article-date {
    color: var(--text-muted);
    font-size: 13px;
}

.article-more {
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

/* ========== 6. 内页 ========== */
.page-header {
    padding: 150px 0 70px;
    background: radial-gradient(circle at 70% 20%, rgba(91, 140, 255, 0.25), transparent 50%),
        linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    text-align: center;
}

.page-header-inner h1 {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.page-header-inner p {
    font-size: 17px;
    opacity: 0.85;
}

/* 关于我们 */
.about-intro {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 56px;
    align-items: center;
}

.about-text h2 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 16px;
    font-size: 15px;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.stat-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--accent);
}

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

/* 时间线 */
.timeline {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    transform: translateX(-50%);
    background: linear-gradient(var(--accent-light), var(--accent));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 44px 44px 0;
}

.timeline-item.right {
    margin-left: 50%;
    padding: 0 0 44px 44px;
}

.timeline-dot {
    position: absolute;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--accent);
    z-index: 1;
}

.timeline-item.left .timeline-dot { right: -8px; }
.timeline-item.right .timeline-dot { left: -8px; }

.timeline-content {
    background: #fff;
    border-radius: var(--radius);
    padding: 22px 26px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.timeline-year {
    color: var(--accent);
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 14px;
}

/* 团队卡片 */
.team-card {
    text-align: center;
}

.team-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.team-card h3 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 4px;
}

.team-role {
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
}

.team-desc {
    color: var(--text-muted);
    font-size: 13px;
}

/* 步骤卡片 */
.step-card {
    text-align: center;
    position: relative;
}

.step-num {
    font-size: 40px;
    font-weight: 800;
    color: #dbe4f5;
    margin-bottom: 8px;
}

.step-card h3 {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 8px;
}

.step-card p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== 7. 文章页 ========== */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-row:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
}

.article-row-body h3 {
    font-size: 20px;
    color: var(--primary);
    margin: 10px 0 8px;
    transition: var(--transition);
}

.article-row:hover h3 {
    color: var(--accent);
}

.article-row-body p {
    color: var(--text-muted);
    font-size: 14px;
}

.article-author {
    color: var(--text-muted);
    font-size: 13px;
}

.article-row-arrow {
    font-size: 28px;
    color: var(--accent);
    flex-shrink: 0;
}

.empty {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 0;
}

/* 文章详情 */
.article-detail {
    padding: 150px 0 60px;
}

.article-detail-head {
    margin-bottom: 32px;
}

.article-detail-head h1 {
    font-size: 34px;
    color: var(--primary);
    line-height: 1.4;
    margin-top: 16px;
}

.article-detail-content {
    font-size: 16px;
    color: var(--text);
    line-height: 1.9;
}

.article-detail-content p {
    margin-bottom: 20px;
}

.article-detail-back {
    margin-top: 40px;
}

/* 404 */
.not-found {
    text-align: center;
    padding: 60px 0;
}

.nf-code {
    font-size: 120px;
    font-weight: 800;
    color: #dbe4f5;
    line-height: 1;
}

.nf-text {
    color: var(--text-muted);
    font-size: 18px;
    margin: 20px 0 30px;
}

/* ========== 8. 联系我们 ========== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 40px;
    align-items: start;
}

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

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.contact-info-list li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.ci-icon {
    font-size: 24px;
    line-height: 1.4;
}

.contact-info-list strong {
    display: block;
    color: var(--primary);
    font-size: 15px;
}

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

.contact-form {
    padding: 40px 36px;
}

.form-tip {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.12);
}

.form-group input.error,
.form-group textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.form-group .error-msg {
    display: none;
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input {
    width: auto;
}

.form-check label {
    margin: 0;
    font-weight: 400;
    color: var(--text-muted);
    cursor: pointer;
}

/* 结果页 */
.result-container {
    text-align: center;
    padding: 50px 40px;
}

.result-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.result-title {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 8px;
}

.result-sub {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    text-align: left;
}

.result-table th,
.result-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.result-table th {
    width: 140px;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--bg-alt);
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* ========== 9. 页脚 ========== */
.footer {
    background: var(--primary-dark);
    color: #cbd5e1;
    padding: 60px 0 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 14px;
    color: #94a3b8;
}

.footer-col h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 18px;
}

.footer-col ul li {
    margin-bottom: 12px;
    font-size: 14px;
}

.footer-col ul li a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 22px 24px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

.footer-bottom p {
    margin-bottom: 4px;
}

/* ========== 10. 响应式 ========== */
@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .about-intro { grid-template-columns: 1fr; }
    .contact-layout { grid-template-columns: 1fr; }
    .carousel-content h2 { font-size: 38px; }

    .nav-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        padding: 12px 0;
        display: none;
    }
    .nav-links.open { display: flex; }
    .nav-links a { width: 100%; text-align: center; padding: 14px; }
    .nav-links a.active::after { display: none; }

    .timeline::before { left: 16px; }
    .timeline-item,
    .timeline-item.right {
        width: 100%;
        margin-left: 0;
        padding: 0 0 32px 48px;
    }
    .timeline-item.left .timeline-dot,
    .timeline-item.right .timeline-dot { left: 8px; right: auto; }
}

@media (max-width: 600px) {
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .carousel-content h2 { font-size: 30px; }
    .carousel-btn { width: 40px; height: 40px; font-size: 20px; }
    .carousel-btn.prev { left: 12px; }
    .carousel-btn.next { right: 12px; }
    .section { padding: 60px 0; }
}
