/* ==================== 1. 全局变量定义 (:root) ==================== */
:root {
    /* 核心色板 */
    --primary-color: #0d6efd;       /* 商务蓝 */
    --primary-dark: #0a58ca;
    --secondary-color: #0dcaf0;     /* 科技青 */
    --accent-color: #6610f2;        /* 强调紫 (用于渐变) */
    
    /* 背景色 */
    --bg-dark: #0f172a;             /* 深色背景 */
    --bg-light-gray: #f8f9fa;       
    
    /* 间距与尺寸 */
    --nav-height: 80px;
    --border-radius-lg: 1rem;
}

/* ==================== 2. 通用设置 ==================== */
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    overflow-x: hidden;
}

.section-padding {
    padding: 100px 0;
}

.tracking-wider {
    letter-spacing: 0.1em;
}

.bg-light-gray {
    background-color: var(--bg-light-gray);
}

.text-gradient-primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 链接悬停效果 */
.hover-white:hover {
    color: #fff !important;
}

/* ==================== 3. 导航栏 (Navbar) ==================== */
#mainNav {
    padding: 20px 0;
    transition: all 0.4s ease;
    background-color: transparent; /* 初始透明 */
}

/* 滚动后的导航栏样式 (由 JS 添加类名) */
#mainNav.navbar-scrolled {
    background-color: rgba(15, 23, 42, 0.95); /* 深色磨砂背景 */
    backdrop-filter: blur(10px);
    padding: 10px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.brand-text {
    font-size: 1.25rem;
    color: #fff;
    letter-spacing: 1px;
}

.brand-sub {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    font-weight: normal;
}

.nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    margin: 0 10px;
    position: relative;
}

.nav-link.active, .nav-link:hover {
    color: #fff !important;
}

/* 导航下划线动效 */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* ==================== 4. 首屏 (Hero) ==================== */
#hero {
    min-height: 100vh;
    background-color: var(--bg-dark);
    /* 径向渐变背景 */
    background-image: radial-gradient(circle at 10% 20%, rgba(13, 110, 253, 0.2) 0%, transparent 40%),
                      radial-gradient(circle at 90% 80%, rgba(102, 16, 242, 0.2) 0%, transparent 40%);
    padding-top: var(--nav-height);
}

.hero-image-container {
    position: relative;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg); /* 3D 倾斜效果 */
    transition: transform 0.5s ease;
}

.hero-image-container:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

/* 浮动卡片动画 */
.floating-card {
    position: absolute;
    bottom: 30px;
    left: -30px;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* ==================== 5. 核心业务 (Services) ==================== */
.service-card {
    transition: all 0.3s ease;
    border-radius: var(--border-radius-lg);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.card-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* 浅色背景辅助类 */
.bg-blue-soft { background-color: rgba(13, 110, 253, 0.1); }
.bg-cyan-soft { background-color: rgba(13, 202, 240, 0.1); }
.bg-indigo-soft { background-color: rgba(102, 16, 242, 0.1); }
.text-indigo { color: var(--accent-color); }

/* ==================== 6. 其他组件 ==================== */
.icon-box-sm {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.divider-line {
    width: 60px;
    height: 4px;
    border-radius: 2px;
}

/* 底部 CTA 渐变 */
.cta-bg {
    background: linear-gradient(135deg, var(--bg-dark), var(--primary-dark));
}

.hover-scale:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* 移动端适配 */
@media (max-width: 991px) {
    #hero {
        text-align: center;
        padding-top: 120px;
        height: auto;
        padding-bottom: 80px;
    }
    
    #mainNav {
        background-color: var(--bg-dark); /* 移动端导航栏始终深色 */
    }

    .hero-image-container {
        margin-top: 50px;
        transform: none;
    }
    
    .floating-card {
        display: none; /* 移动端隐藏悬浮卡片 */
    }
}


/* ==================== [新增] 通用 3D 悬浮卡片组件 ==================== */
/* 这是一个通用的容器类，任何想实现“首页同款3D效果”的地方都可以用 */
.card-3d-container {
    position: relative;
    /* 核心 3D 倾斜参数 */
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease;
    border-radius: var(--border-radius-lg);
    /* 给容器本身加一个深色阴影，增加厚重感 */
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.2); 
}

/* 鼠标悬停时回正 */
.card-3d-container:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

/* 内部图片样式强制覆盖 */
.card-3d-container img {
    border-radius: var(--border-radius-lg);
    /* 加上微弱的白边，增加精致感 */
    border: 1px solid rgba(255,255,255,0.1); 
    width: 100%;
    height: auto;
}

/* 悬浮小卡片样式 (确保 style.css 里有这段) */
.floating-card {
    position: absolute;
    bottom: 30px;
    left: -20px; /* 让它稍微突出去一点 */
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    animation: float 4s ease-in-out infinite;
    z-index: 10;
    min-width: 160px;
}

/* 浮动动画关键帧 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

/* 移动端取消 3D 效果，防止布局错乱 */
@media (max-width: 991px) {
    .card-3d-container {
        transform: none;
        margin-top: 30px;
    }
    .card-3d-container:hover {
        transform: none;
    }
    .floating-card {
        left: 0;
        bottom: -20px;
    }
}


/* ==================== 统一 Footer 样式 (放在 style.css) ==================== */

/* 链接悬停变白效果 */
.hover-white:hover {
    color: #fff !important;
}

/* 通用过渡效果 */
.transition-all {
    transition: all 0.3s ease;
}

/* 底部合规声明框的微光效果 */
.bg-opacity-10 {
    --bs-bg-opacity: 0.1;
}

/* 社交图标悬停跳动 */
.hover-white i {
    display: inline-block;
    transition: transform 0.3s ease;
}
.hover-white:hover i {
    transform: translateY(-3px);
}