/* =========================================
   Qun Wei Design - Modern Industrial Style
   (Color Scheme: Tech Blue & Dark Carbon)
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --bg-light: #f4f4f4;
    --text-main: #e0e0e0;
    --text-muted: #999999;
    
    /* 👇 已修改为科技蓝 👇 */
    --accent: #0088CC; 
    --accent-hover: #006699; 
    
    --border-color: #333333;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* 布局容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================= 导航栏基础排版 (电脑端) ================= */
.site-header {
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

/* Logo 区域 (图文同排) */
.logo {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 15px;
    text-decoration: none;
}

.logo-img {
    height: 40px !important;
    width: auto !important;
    display: block !important;
    margin: 0 !important;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
    white-space: nowrap !important;
    display: inline-block !important;
    line-height: 1 !important;
}

.logo-text span {
    color: var(--accent);
}

/* 电脑端菜单链接 */
.nav nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav nav a:hover {
    color: #fff;
}

.nav nav .btn-nav {
    background: var(--accent);
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
}

.nav nav .btn-nav:hover {
    background: var(--accent-hover);
}

/* 电脑端隐藏汉堡按钮 */
.menu-toggle {
    display: none;
}

/* ================= Hero 区域 ================= */
.hero {
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
    background: url('../assets/hero-bg.jpg') center/cover no-repeat; 
    background-color: #1a1a1a;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(18,18,18,0.95) 0%, rgba(18,18,18,0.6) 100%);
}

.hero-overlay {
    position: relative;
    z-index: 1;
    padding: 0 8%;
    max-width: 900px;
    margin-top: 60px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 24px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

/* ================= 按钮 ================= */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 14px 32px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: transform 0.2s, background 0.2s;
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid #fff;
}

.btn-outline:hover {
    background: #fff;
    color: #000;
}

/* ================= 双轨入口 ================= */
.dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin: -80px auto 80px;
    position: relative;
    z-index: 10;
}

.dual-card {
    background: var(--bg-card);
    padding: 48px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s, transform 0.3s;
    position: relative;
    overflow: hidden;
}

.dual-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 50px; height: 50px;
    border-top: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.dual-card:hover {
    border-color: #444;
    transform: translateY(-5px);
}

.dual-card:hover::after {
    opacity: 1;
}

.dual-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 16px;
}

.dual-card p {
    color: var(--text-muted);
}

/* ================= 标题与网格 ================= */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: #fff;
    margin: 60px 0 32px;
    display: flex;
    align-items: center;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
    margin-left: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
}

/* ================= 卡片 (作品/产品) ================= */
.card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

.card img, .card video {
    height: 240px;
    object-fit: cover;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 24px;
}

.tag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* 修改了背景透明色 */
    background: rgba(0, 136, 204, 0.15); 
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: #fff;
}

/* ================= 内页头部 ================= */
.page-head {
    padding: 160px 24px 60px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 60px;
    text-align: center;
}

.page-head h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #fff;
    margin-bottom: 16px;
}

.page-head p {
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto;
}

/* ================= 产品详情页 ================= */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    padding: 140px 24px 80px; /* 顶部留出导航栏空间 */
}

.product-img {
    width: 100%;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.product-img img, 
.product-img video {
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-info h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #fff;
    margin: 16px 0 24px 0;
}

.specs {
    background: #151515;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    white-space: pre-wrap;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 24px 0;
}

/* ================= 过滤栏 ================= */
.filter-bar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-bar a {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.filter-bar a:hover {
    border-color: #666;
    color: #fff;
}

.filter-bar a.active {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* ================= 联系表单 ================= */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    padding: 40px 24px 80px;
}

.contact-form label {
    display: block;
    margin-bottom: 24px;
    font-weight: 500;
    color: #fff;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: #fff;
    margin-top: 8px;
    font-family: var(--font-main);
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.success {
    background: rgba(0, 200, 83, 0.1);
    color: #00c853;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 200, 83, 0.2);
}

.contact-info {
    background: var(--bg-card);
    padding: 48px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.contact-info h3 {
    font-family: var(--font-heading);
    color: #fff;
    margin-bottom: 16px;
}

/* ================= Footer ================= */
.site-footer {
    background: #0a0a0a;
    padding: 60px 24px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.site-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--accent);
}

/* =========================================
   手机/平板端响应式 (屏幕宽度小于 1024px)
   ========================================= */
@media (max-width: 1024px) {
    
    .nav {
        justify-content: space-between !important;
    }

    /* 显示汉堡按钮 */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        background: transparent !important;
        border: none !important;
        cursor: pointer;
        z-index: 1001;
        padding: 0;
    }

    .menu-toggle span {
        display: block !important;
        width: 100%;
        height: 2px;
        background-color: #ffffff !important;
        transition: all 0.3s ease;
    }

    /* 手机端下拉菜单 */
    .nav nav {
        position: absolute !important;
        top: 80px !important;
        left: 0;
        width: 100%;
        background: #121212 !important;
        flex-direction: column !important;
        align-items: center;
        padding: 20px 0 !important;
        gap: 15px;
        border-bottom: 1px solid #333333;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
        
        /* 默认隐藏 */
        display: none !important; 
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    /* 点击后显示菜单 */
    .nav nav.active {
        display: flex !important;
        opacity: 1;
    }

    /* 手机端下拉链接 */
    .nav nav a {
        margin: 0 !important;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        padding: 12px 0;
        color: #e0e0e0 !important;
        display: block !important; /* 强制显示所有链接 */
    }

    .nav nav .btn-nav {
        width: 80%;
        max-width: 250px;
        border-radius: 4px;
        margin-top: 10px !important;
        color: #fff !important;
    }

    /* 汉堡按钮变成 X 的动画 */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* 其他页面的移动端自适应 */
    .hero h1 { font-size: 2.4rem; }
    .dual, .grid-3, .product-detail, .contact-wrap {
        grid-template-columns: 1fr !important;
    }
    .dual { margin-top: 40px; }
    .product-detail { padding-top: 100px !important; }
}

/* ================= 服务页新增样式 ================= */
.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px 30px;
    transition: transform 0.3s, border-color 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.service-card h2 {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.3;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list li {
    color: var(--text-main);
    font-size: 0.95rem;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.service-list li::before {
    content: '▹';
    color: var(--accent);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.1rem;
}

/* About 页补充 */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 8px;
}
.info-card h3 {
    color: #fff;
    font-family: var(--font-heading);
    margin-bottom: 10px;
}
.info-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ================= 4-Column Service Grid ================= */
.grid-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.grid-services .service-card {
    padding: 30px 20px;
}

.grid-services .service-card h2 {
    font-size: 1.25rem;
}

.grid-services .service-list li {
    font-size: 0.9rem;
}
/* 居中 Services 页面的图标和标题 */
.service-card .service-icon {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.service-card h2 {
    text-align: center !important;
}