/* ========================================
   拓冰企业网站定制 - 全局样式
   物流货运风格：深蓝 + 橘红 + 纯白
======================================== */

/* CSS Reset & 基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    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 {
    --primary-blue: #1a3a5c;      /* 深蓝主色 */
    --secondary-blue: #2c5282;    /* 次级蓝 */
    --accent-orange: #e65100;     /* 橘红强调色 */
    --light-orange: #ff7043;      /* 浅橘色 */
    --pure-white: #ffffff;        /* 纯白 */
    --light-gray: #f5f7fa;        /* 浅灰背景 */
    --medium-gray: #90a4ae;       /* 中灰 */
    --dark-text: #263238;         /* 深色文字 */
}

/* ========================================
   顶部导航栏 (重构：二级菜单 + 宽间距)
======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: all 0.4s ease;
    height: 80px;
    display: flex;
    align-items: center;
}

.header.scrolled {
    background: rgba(26, 58, 92, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    height: 70px;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
}

.logo img {
    height: 45px;
    width: auto;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--pure-white);
    letter-spacing: 2px;
}

/* 导航包装器 */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 12px 20px;
    color: var(--pure-white);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(230, 81, 0, 0.15);
    color: var(--pure-white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-orange);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 60%;
}

/* 下拉箭头 */
.has-dropdown > .nav-link::before {
    content: '▼';
    font-size: 7px;
    margin-left: 6px;
    opacity: 0.7;
    vertical-align: middle;
}

/* CTA 按钮 */
.cta-btn {
    background: var(--accent-orange) !important;
    padding: 10px 24px !important;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(230, 81, 0, 0.3);
}

.cta-btn:hover {
    background: #bf4300 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 81, 0, 0.4);
}

.cta-btn::after { display: none; }

/* ========================================
   二级下拉菜单 (PC 端)
======================================== */
.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: #fff;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    overflow: hidden;
}

.dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    box-shadow: -2px -2px 5px rgba(0,0,0,0.05);
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown li a {
    display: block;
    padding: 11px 24px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.dropdown li a:hover {
    background: #f5f7fa;
    color: var(--accent-orange);
    border-left-color: var(--accent-orange);
    padding-left: 28px;
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1002;
    width: 30px;
    height: 20px;
    position: relative;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background: var(--pure-white);
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { top: 18px; }

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 9px;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    top: 9px;
}

/* 遮罩层 */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Hero Banner (时间轴起点)
======================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 40px;
}

.hero-title {
    font-size: 56px;
    font-weight: 800;
    color: var(--pure-white);
    margin-bottom: 24px;
    line-height: 1.2;
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

.hero-subtitle {
    font-size: 22px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.hero-cta {
    display: inline-flex;
    gap: 20px;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.btn {
    display: inline-block;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-orange);
    color: var(--pure-white);
    box-shadow: 0 4px 20px rgba(230, 81, 0, 0.4);
}

.btn-primary:hover {
    background: var(--light-orange);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(230, 81, 0, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--pure-white);
    border: 2px solid var(--pure-white);
}

.btn-outline:hover {
    background: var(--pure-white);
    color: var(--primary-blue);
    transform: translateY(-3px);
}

/* 滚动指示器 */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 40px;
    height: 40px;
    fill: var(--pure-white);
    opacity: 0.7;
}

/* ========================================
   时间轴容器
======================================== */
.timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 40px;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--accent-orange), var(--primary-blue));
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-node {
    position: relative;
    width: 50%;
    padding: 40px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.timeline-node.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-node:nth-child(odd) {
    left: 0;
    padding-right: 80px;
    text-align: right;
}

.timeline-node:nth-child(even) {
    left: 50%;
    padding-left: 80px;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    top: 50%;
    width: 24px;
    height: 24px;
    background: var(--accent-orange);
    border: 4px solid var(--pure-white);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 20px rgba(230, 81, 0, 0.5);
    transition: all 0.3s ease;
    z-index: 10;
}

.timeline-node:nth-child(odd) .timeline-dot {
    right: -12px;
}

.timeline-node:nth-child(even) .timeline-dot {
    left: -12px;
}

.timeline-node:hover .timeline-dot {
    transform: translateY(-50%) scale(1.3);
    box-shadow: 0 0 30px rgba(230, 81, 0, 0.8);
}

.timeline-card {
    background: var(--pure-white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-orange), var(--primary-blue));
}

.timeline-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.timeline-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.timeline-card h3 {
    font-size: 22px;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.timeline-card p {
    color: var(--medium-gray);
    font-size: 15px;
    line-height: 1.8;
}

.timeline-card .card-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--accent-orange);
    font-weight: 600;
    font-size: 14px;
}

.timeline-card .card-link:hover {
    color: var(--primary-blue);
}

/* ========================================
   核心优势板块
======================================== */
.features-section {
    padding: 100px 40px;
    background: var(--pure-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 42px;
    color: var(--primary-blue);
    margin-bottom: 16px;
}

.section-header p {
    font-size: 18px;
    color: var(--medium-gray);
    max-width: 700px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: var(--light-gray);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    background: var(--pure-white);
    border-color: var(--accent-orange);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--accent-orange), var(--light-orange));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 40px;
    height: 40px;
}

.feature-card h3 {
    font-size: 20px;
    color: var(--primary-blue);
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--medium-gray);
    font-size: 14px;
    line-height: 1.8;
}

/* ========================================
   快速入口
======================================== */
.quick-access {
    padding: 80px 40px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.access-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.4s ease;
}

.access-card:hover {
    background: var(--accent-orange);
    transform: translateY(-5px);
}

.access-card img {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
}

.access-card h4 {
    color: var(--pure-white);
    font-size: 18px;
    margin-bottom: 8px;
}

.access-card span {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

/* ========================================
   新闻资讯
======================================== */
.news-section {
    padding: 100px 40px;
    background: var(--light-gray);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.news-card {
    background: var(--pure-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 24px;
}

.news-date {
    color: var(--accent-orange);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.news-title {
    font-size: 18px;
    color: var(--primary-blue);
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-excerpt {
    color: var(--medium-gray);
    font-size: 14px;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   页脚
======================================== */
.footer {
    background: var(--primary-blue);
    color: var(--pure-white);
    padding: 60px 40px 30px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 2;
    margin-top: 20px;
}

.footer-column h4 {
    font-size: 18px;
    margin-bottom: 24px;
    color: var(--accent-orange);
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
}

.footer-column ul li a:hover {
    color: var(--accent-orange);
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 30px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

/* ========================================
   动画关键帧
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-15px);
    }
    60% {
        transform: translateX(-50%) translateY(-7px);
    }
}

/* ========================================
   响应式设计
======================================== */
@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .access-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: var(--primary-blue);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 20px 20px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 30px rgba(0,0,0,0.2);
        gap: 0;
        overflow-y: auto;
        z-index: 999;
    }

    .nav-wrapper.active {
        right: 0;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .nav-link {
        padding: 16px 0;
        font-size: 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav-link::after { display: none; }
    
    .has-dropdown > .nav-link::before {
        content: '+';
        font-size: 18px;
        margin-left: 0;
        transition: transform 0.3s;
    }
    
    .nav-item.mobile-open > .nav-link::before {
        transform: rotate(45deg);
    }

    /* 移动端二级菜单 (手风琴) */
    .dropdown {
        position: static;
        transform: none;
        box-shadow: none;
        background: rgba(0,0,0,0.2);
        max-height: 0;
        overflow: hidden;
        opacity: 1;
        visibility: visible;
        padding: 0;
        margin: 0;
        transition: max-height 0.4s ease;
    }
    
    .dropdown::before { display: none; }

    .nav-item.mobile-open .dropdown {
        max-height: 500px;
    }

    .dropdown li a {
        padding: 14px 0 14px 20px;
        color: rgba(255,255,255,0.7);
        border-left: none;
        font-size: 14px;
    }
    
    .dropdown li a:hover {
        background: transparent;
        color: var(--accent-orange);
        padding-left: 20px;
    }

    .cta-btn {
        margin-top: 20px;
        text-align: center;
        width: 100%;
    }
    
    .timeline-line {
        left: 30px;
    }
    
    .timeline-node {
        width: 100%;
        left: 0 !important;
        padding: 40px 40px 40px 80px !important;
        text-align: left !important;
    }
    
    .timeline-dot {
        left: 18px !important;
        right: auto !important;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* 移除旧的 mobile-menu 样式，使用新的 nav-wrapper */
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .timeline-container {
        padding: 60px 20px;
    }
    
    .timeline-node {
        padding: 30px 30px 30px 70px !important;
    }
    
    .features-grid,
    .access-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .section-header h2 {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}
