/* 全局平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 导航栏优化 */
.nav-item {
    position: relative;
}
.nav-btn {
    position: relative;
    padding-bottom: 2px;
}
/* 导航按钮下划线动效 */
.nav-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #165DFF;
    transition: width 0.3s ease;
}
.nav-btn:hover::after {
    width: 100%;
}

/* 解决方案下拉菜单 */
.has-solution {
    position: relative;
}
.solution-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 850px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 25px 30px;
    display: none;
    z-index: 9999;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}
.has-solution:hover .solution-dropdown {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.solution-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}
.solution-col h4 {
    font-size: 16px;
    font-weight: bold;
    color: #165DFF;
    margin: 0 0 15px 0;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #e8f0fe;
}
.solution-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.solution-col ul li {
    margin: 0 0 10px 0;
}
.solution-col ul li a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}
.solution-col ul li a:hover {
    color: #165DFF;
    padding-left: 4px;
}

/* 列表样式清除 */
.nav,
.nav li,
.solution-col ul li {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0;
}
li.has-solution::marker {
    content: none !important;
}

/* 工具类 */
@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .bg-gradient {
        background: linear-gradient(135deg, #165DFF 0%, #36CFC9 100%);
    }
}

/* ====================== 首页动画 ====================== */
#home {
    isolation: isolate;
    perspective: 1000px;
}
.hero-text, .hero-img {
    opacity: 0;
    will-change: transform, opacity;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* 文字淡入 */
@keyframes fadeIn {
    0% { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);
    }
}
/* 图片右侧滑入 */
@keyframes slideRight {
    0% { 
        opacity: 0; 
        transform: translateX(60px) scale(0.98); 
    }
    80% {
        opacity: 0.95;
        transform: translateX(5px) scale(1.005); 
    }
    100% { 
        opacity: 1; 
        transform: translateX(0) scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 2s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
    animation-delay: 0.3s !important;
}
.animate-slide-right {
    animation: slideRight 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards !important;
    animation-delay: 0.8s !important;
}

/* ====================== 卡片悬浮动画 ====================== */
#products a {
    transition: all 0.4s ease !important;
}
#products a:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}
#products a img {
    transition: transform 0.5s ease !important;
}
#products a:hover img {
    transform: scale(1.1) !important;
}

/* ====================== 滚动模块淡入动画 ====================== */
.fade-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}
.fade-section.active {
    opacity: 1;
    transform: translateY(0);
}

/* ====================== 鼠标下滑动画 ====================== */
.scroll-mouse {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 0;
    animation: fadeIn 1.2s ease 1s forwards;
}
.mouse-icon {
    width: 26px;
    height: 42px;
    border: 2px solid #0F4C81;
    border-radius: 20px;
    position: relative;
}
.mouse-wheel {
    width: 5px;
    height: 9px;
    background: #0F4C81;
    border-radius: 3px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: wheelMove 1.6s infinite ease-in-out;
}
@keyframes wheelMove {
    0% { top: 8px; opacity: 1; }
    100% { top: 24px; opacity: 0; }
}