/* ==========================================
   基础重置与变量 (Mobile-First)
   ========================================== */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #333;
    --accent-color: #0066cc;
    --text-light: #666;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --transition: all 0.3s ease;
    
    /* 响应式字体大小 (使用 clamp 实现流体排版) */
    --font-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --font-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
    --font-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --font-lg: clamp(1.25rem, 1rem + 1vw, 1.5rem);
    --font-xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    --font-xxl: clamp(2rem, 1.5rem + 2.5vw, 3rem);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    font-weight: 500;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    overflow-x: hidden; /* 防止横向滚动 */
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==========================================
   导航栏 (Mobile-First)
   ========================================== */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: var(--font-xl);
    font-weight:300;
    color: var(--primary-color);
    letter-spacing: 0.4em;
}

/* 汉堡菜单按钮 */
.mobile-menu-toggle {
    display: block; /* 移动端显示 */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: var(--transition);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* 汉堡菜单动画 */
.mobile-menu-toggle.active .hamburger {
    background: transparent;
}

.mobile-menu-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* 导航菜单 (移动端默认隐藏) */
.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 17%;
    max-width: 300px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    transition: var(--transition);
    display: flex;
    z-index: 999;
}

.nav-menu.active {
    right: 0;
}

.nav-menu a {
    font-size: var(--font-base);
    font-weight: 500;
    color: var(--secondary-color);
    padding: 0.5rem 0;
    display: block;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* ==========================================
   主横幅区域 (Hero)
   ========================================== */
.hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    max-height: 800px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: left;
}

.hero-subtitle {
    font-size: var(--font-lg);
    font-weight:80;
    color: var(--white);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    line-height: 1.3;
    letter-spacing: 1em;
}

/* 移动端换行控制 */
.mobile-break {
    display: block;
}

/* ==========================================
   页脚 (Footer)
   ========================================== */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}


.footer-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: var(--font-base);
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-section p {
    font-size: var(--font-sm);
    margin-bottom: 0.5rem;
    color: #ccc;
    line-height: 1.8;
}

/* 页脚链接 */
.footer-links ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
}

.footer-links a {
    font-size: var(--font-sm);
    color: #ccc;
    transition: var(--transition);
    display: block;
    padding: 0.3rem 0;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    font-size: var(--font-xs);
    color: #999;
}

/* ==========================================
   平板适配 (Tablet - 768px+)
   ========================================== */
@media (min-width: 768px) {
    .nav-container {
        padding: 1rem 2rem;
    }

    /* 显示桌面导航，隐藏汉堡菜单 */
    .mobile-menu-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        box-shadow: none;
        flex-direction: row;
        padding: 0;
        gap: 2rem;
        display: flex !important;
        right: auto;
    }

    .nav-menu a {
        font-size: var(--font-sm);
        padding: 0.5rem 0;
        border-bottom: 2px solid transparent;
    }

    .hero {
        height: 70vh;
    }

    .hero-content {
        padding: 3rem;
    }

    .mobile-break {
        display: none; /* 平板以上不换行 */
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 3rem;
    }

    .footer-section.company-info {
        flex: 1;
        max-width: 500px; /* 限制最大宽度，但允许缩放 */
    }

    .footer-links ul {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* ==========================================
   桌面适配 (Desktop - 1024px+)
   ========================================== */
@media (min-width: 1024px) {
    .nav-container {
        padding: 1rem 3rem;
    }

    .nav-menu {
        gap: 3rem;
    }

    .hero {
        height: 80vh;
    }

    .hero-content {
        padding: 4rem;
    }

    .footer-content {
        gap: 5rem;
    }

    .footer-links ul {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem 2rem;
    }
}

/* ==========================================
   大屏幕 (Large Desktop - 1400px+)
   ========================================== */
@media (min-width: 1400px) {
    .nav-container,
    .hero-content,
    .container {
        max-width: 1400px;
    }
}

/* ==========================================
   辅助功能与细节优化
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .nav-menu a {
        padding: 1rem 0; /* 增大触摸区域 */
    }
    
    .footer-links a {
        padding: 0.8rem 0;
    }
}

/* 打印样式 */
@media print {
    .navbar,
    .hero-video,
    .mobile-menu-toggle {
        display: none;
    }
    
    .hero {
        height: auto;
        color: #000;
    }
    
    .hero-subtitle {
        color: #000;
        text-shadow: none;
    }
}