/* ========================================
   链上汽车 - 全局样式文件
   风格：高端汽车风（深灰 + 哑光银 + 中国红）
   布局：全屏一屏一主题视差布局
======================================== */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background-color: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.8;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 颜色变量 */
:root {
    --color-primary: #c41230; /* 中国红 */
    --color-primary-dark: #8b0d22;
    --color-secondary: #8c8c8c; /* 哑光银 */
    --color-bg-dark: #1a1a1a; /* 深灰背景 */
    --color-bg-darker: #0f0f0f;
    --color-bg-light: #2a2a2a;
    --color-text-main: #e0e0e0;
    --color-text-muted: #999999;
    --color-white: #ffffff;
    --color-black: #000000;
    --gradient-primary: linear-gradient(135deg, #c41230 0%, #8b0d22 100%);
    --gradient-silver: linear-gradient(135deg, #8c8c8c 0%, #b8b8b8 100%);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 20px 60px rgba(196, 18, 48, 0.3);
    --transition-fast: 0.3s ease;
    --transition-normal: 0.5s ease;
    --transition-slow: 0.8s ease;
}

/* 容器 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* ========================================
   导航栏样式
======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-normal);
    background: transparent;
}

.header.scrolled {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--color-white);
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-link {
    color: var(--color-text-main);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--color-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: var(--color-white);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-bg-darker);
        flex-direction: column;
        padding: 80px 30px;
        gap: 25px;
        transition: right var(--transition-normal);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }
}

/* ========================================
   页脚样式
======================================== */
.footer {
    background: var(--color-bg-darker);
    padding: 80px 0 40px;
    border-top: 3px solid var(--color-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-section h4 {
    color: var(--color-white);
    font-size: 18px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gradient-primary);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary);
    padding-left: 8px;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--color-text-muted);
    font-size: 14px;
    margin-bottom: 15px;
}

.contact-icon {
    width: 35px;
    height: 35px;
    background: var(--color-bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 16px;
    flex-shrink: 0;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--color-bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-main);
    font-size: 18px;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--gradient-primary);
    color: var(--color-white);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid var(--color-bg-light);
    padding-top: 30px;
    text-align: center;
}

.footer-copyright {
    color: var(--color-text-muted);
    font-size: 14px;
}

/* ========================================
   按钮样式
======================================== */
.btn {
    display: inline-block;
    padding: 14px 35px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-bg-dark);
}

.btn-large {
    padding: 18px 45px;
    font-size: 16px;
}

/* ========================================
   标题样式
======================================== */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 42px;
    color: var(--color-white);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--gradient-primary);
}

.section-title p {
    color: var(--color-text-muted);
    font-size: 16px;
    max-width: 600px;
    margin: 25px auto 0;
    line-height: 1.8;
}

/* ========================================
   卡片样式
======================================== */
.card {
    background: var(--color-bg-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-card);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 20px;
    color: var(--color-white);
    margin-bottom: 12px;
    font-weight: 600;
}

.card-text {
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* ========================================
   动画效果
======================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   通用工具类
======================================== */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--color-primary);
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   面包屑导航
======================================== */
.breadcrumb {
    padding: 150px 0 40px;
    background: var(--color-bg-darker);
    text-align: center;
}

.breadcrumb-title {
    font-size: 36px;
    color: var(--color-white);
    margin-bottom: 15px;
}

.breadcrumb-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    color: var(--color-text-muted);
}

.breadcrumb-nav a {
    color: var(--color-text-muted);
}

.breadcrumb-nav a:hover {
    color: var(--color-primary);
}

.breadcrumb-separator {
    color: var(--color-primary);
}

/* ========================================
   内页内容区
======================================== */
.page-content {
    padding: 80px 0;
    background: var(--color-bg-dark);
}

/* ========================================
   新闻列表页专用样式
======================================== */
.news-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .news-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .news-list {
        grid-template-columns: 1fr;
    }
}

.news-item {
    background: var(--color-bg-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.news-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.news-item:hover .news-image img {
    transform: scale(1.1);
}

.news-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--gradient-primary);
    color: var(--color-white);
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.news-content {
    padding: 25px;
}

.news-title {
    font-size: 18px;
    color: var(--color-white);
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.news-excerpt {
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--color-bg-dark);
}

.news-more {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-more:hover {
    gap: 10px;
}

/* ========================================
   新闻详情页专用样式
======================================== */
.article-main {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 0;
}

.article-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--color-bg-light);
}

.article-title {
    font-size: 36px;
    color: var(--color-white);
    margin-bottom: 20px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    gap: 30px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-body {
    color: var(--color-text-main);
    line-height: 2;
    font-size: 16px;
}

.article-body p {
    margin-bottom: 25px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
}

.article-body h2,
.article-body h3 {
    color: var(--color-white);
    margin: 40px 0 20px;
}

.article-body ul,
.article-body ol {
    margin: 20px 0;
    padding-left: 25px;
}

.article-body li {
    margin-bottom: 10px;
}

/* 相关文章 */
.related-articles {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid var(--color-bg-light);
}

.related-title {
    font-size: 24px;
    color: var(--color-white);
    margin-bottom: 30px;
}

/* ========================================
   表单样式
======================================== */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    color: var(--color-white);
    font-size: 14px;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-bg-darker);
    border-radius: 6px;
    color: var(--color-white);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(196, 18, 48, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}
