/* style.css - 科技感深色主题 */

:root {
    --dark-navy: #0a192f;
    --light-navy: #112240;
    --lightest-navy: #233554;
    --slate: #8892b0;
    --light-slate: #a8b2d1;
    --lightest-slate: #ccd6f6;
    --accent-color: #00aaff; /* 科技蓝/青色 */
    --accent-glow: rgba(0, 170, 255, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; 
}

body {
    font-family: 'Noto Sans SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    background-color: var(--dark-navy);
    color: var(--slate);
}

/* --- 动态粒子背景 --- */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 100px 0;
}

h1, h2, h3 {
    font-weight: 700;
    color: var(--lightest-slate);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}
.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}
.section-title h2::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 3px;
    background: var(--accent-color);
    bottom: -10px;
    left: 10%;
    border-radius: 5px;
}
.section-title p {
    font-size: 1.1rem;
    color: var(--light-slate);
    max-width: 600px;
    margin: 30px auto 0;
}

/* --- 按钮样式 --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-color);
}
.btn:focus, a:focus, button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
.btn-primary {
    background-color: var(--accent-color);
    color: var(--dark-navy);
}
.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}
.btn-secondary {
    background-color: transparent;
    color: var(--accent-color);
}
.btn-secondary:hover {
    background-color: var(--accent-color);
    color: var(--dark-navy);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* --- 玻璃拟态导航栏 --- */
.header {
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.logo img { height: 45px; display: block; }

.nav-menu { list-style: none; display: flex; align-items: center; }
.nav-item { margin-left: 30px; }
.nav-link {
    text-decoration: none;
    color: var(--light-slate);
    font-weight: 500;
    padding: 5px 0;
    transition: color 0.3s;
}
.nav-link:hover, .nav-link.active { color: var(--accent-color); }
.hamburger {
    display: none; cursor: pointer; font-size: 24px;
    color: var(--lightest-slate); background: none; border: none; padding: 5px;
}

/* --- 首屏 Banner --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 10vh; /* 避免内容太靠下 */
}
.hero-content { max-width: 800px; }
.hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.8rem); /* 调整了字体大小，使其更可能保持单行 */
    margin-bottom: 20px;
    color: var(--lightest-slate);
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    white-space: nowrap; /* 强制不换行 */
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-weight: 300;
    color: var(--light-slate);
}
.hero-buttons .btn { margin: 0 10px; }

/* --- 解决方案卡片 (玻璃拟态) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.service-card {
    background: rgba(35, 53, 84, 0.5);
    border: 1px solid var(--lightest-navy);
    padding: 40px 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px var(--accent-glow);
}
.service-card .icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}
.service-card h3 { font-size: 1.5rem; margin-bottom: 15px; }
.service-card p { color: var(--slate); font-size: 0.95rem; }

/* --- 我们的优势 --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 60px;
}
.feature-item { padding: 20px; }
.feature-item .icon { font-size: 2.5rem; color: var(--accent-color); margin-bottom: 15px; }
.feature-item h3 { margin-bottom: 10px; }
.feature-item p { color: var(--slate); }

/* --- 成功案例 --- */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.case-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background-color: var(--light-navy);
}
.case-item img {
    width: 100%; height: 100%; object-fit: cover;
    display: block; transition: transform 0.4s, opacity 0.4s;
}
.case-item:hover img {
    transform: scale(1.1);
    opacity: 0.1;
}
.case-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    color: var(--lightest-slate);
    background: linear-gradient(to top, rgba(17, 34, 64, 0.9), rgba(17, 34, 64, 0.5));
    opacity: 0;
    transition: opacity 0.4s;
}
.case-item:hover .case-overlay { opacity: 1; }
.case-overlay h3 { color: var(--lightest-slate); margin-bottom: 5px; }
.case-overlay span { font-size: 0.9rem; color: var(--accent-color); }

/* --- 合作伙伴 --- */
.partners-container {
    display: flex; justify-content: space-around; align-items: center;
    flex-wrap: wrap; gap: 30px;
}
.partner-logo {
    opacity: 0.6;
    transition: all 0.3s;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--slate);
    text-decoration: none;
}
.partner-logo:hover { opacity: 1; color: var(--accent-color); }

/* --- 页脚 --- */
.footer {
    background-color: var(--light-navy);
    color: var(--slate);
    padding: 80px 0 0;
    border-top: 1px solid var(--lightest-navy);
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}
.footer-col h4 {
    color: var(--lightest-slate);
    margin-bottom: 20px;
    font-size: 1.2rem;
}
.footer-col a { color: var(--slate); text-decoration: none; transition: color 0.3s; }
.footer-col a:hover { color: var(--accent-color); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col .qr-code { border-radius: 5px; }
.footer-bottom {
    border-top: 1px solid var(--lightest-navy);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}
.footer-bottom a { color: var(--slate); text-decoration: underline; }

/* --- 滚动入场动画 --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    transition-delay: var(--delay, 0s);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- 响应式设计 --- */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--light-navy);
        width: 100%;
        height: calc(100vh - 80px);
        text-align: center;
        transition: 0.3s ease-in-out;
        align-items: stretch;
        overflow-y: auto;
        padding-top: 40px;
    }
    .nav-menu.active { left: 0; }
    .nav-item { margin: 20px 0; }
    .hamburger { display: block; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    /* --- 全局调整 --- */
    section {
        padding: 60px 0; /* 减小区块的上下间距，使页面在手机上更紧凑 */
    }

    /* --- 首页标题自适应 --- */
    .hero h1 {
        white-space: normal; /* 【重要】允许标题在手机上自然换行，防止溢出 */
        font-size: clamp(2rem, 8vw, 2.5rem); /* 调整字体大小范围，更适合手机 */
    }

    .hero p {
        font-size: 1rem; /* 调整首页描述文字大小 */
    }

    /* --- 标题样式调整 --- */
    .section-title {
        margin-bottom: 40px; /* 减小标题和内容的间距 */
    }
    .section-title h2 {
        font-size: 2rem; 
    }

    /* --- 合作伙伴Logo调整 --- */
    .partner-logo {
        font-size: 1.2rem; /* 调整合作伙伴文字logo大小 */
    }

    /* --- 页脚布局优化 --- */
    .footer-grid {
        grid-template-columns: 1fr; /* 保持单列布局 */
        text-align: center;
        gap: 30px; /* 调整页脚各模块间距 */
    }

    .footer-col h4 {
        margin-bottom: 15px; /* 减小页脚小标题和内容的间距 */
    }

    .footer-col .qr-code {
        margin: 0 auto;
        /* 让二维码在手机上自适应 */
        width: 45%;         
        max-width: 160px;   
        height: auto;       
    }
}

/* --- 公安备案号样式 --- */
.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* 允许在小屏幕上换行 */
    gap: 10px 20px; /* 设置垂直和水平间距 */
}

.footer-bottom a {
    text-decoration: none; /* 移除下划线，保持统一 */
}

.psb-record {
    display: inline-flex; /* 使用 flex 布局对齐图标和文字 */
    align-items: center;
}

.psb-record img {
    width: 18px;
    height: 18px;
    margin-right: 5px; /* 图标和文字之间的间距 */
}

/* 针对已经存在的手机端媒体查询进行微调 */
@media (max-width: 768px) {
    .footer-bottom p {
        flex-direction: column; /* 在手机上垂直堆叠 */
        gap: 12px; /* 调整垂直堆叠时的间距 */
    }
}

/* --- 背景音乐按钮样式 --- */
.music-control {
    position: fixed;
    bottom: 80px; /* 位于页脚上方 */
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.6); /* 半透明黑色背景 */
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000; /* 确保在最上层 */
    font-size: 20px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    user-select: none; /* 防止选中文字 */
}

.music-control:hover {
    background-color: var(--primary-color); /* 鼠标悬停变色 */
    transform: scale(1.1);
}

/* 旋转动画类 - 当音乐播放时添加此样式 */
.music-control.playing {
    animation: rotate 3s linear infinite;
    background-color: var(--primary-color);
    border-color: #fff;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 针对手机端的微调 */
@media (max-width: 768px) {
    .music-control {
        bottom: 20px; /* 手机上位置稍微靠下 */
        right: 15px;
    }
}
