/* 擎元数智 - 自定义样式 */

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #0066CC;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0052a3;
}

/* 导航栏动画 */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: #0066CC;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* 产品卡片悬停效果 */
.product-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 解决方案卡片动画 */
.solution-card {
    transition: all 0.3s ease;
}

.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 按钮动画效果 */
button {
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(45deg, #0066CC, #00AA44);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero区域动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* 浮动动画 */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* 脉冲动画 */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* 移动端菜单动画 */
.mobile-menu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.mobile-menu.active {
    max-height: 300px;
}

/* 返回顶部按钮动画 */
#backToTop {
    transition: all 0.3s ease;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

/* 表单焦点效果 */
input:focus,
textarea:focus {
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* 加载动画 */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* 客户案例卡片动画 */
.client-card {
    transition: all 0.3s ease;
    opacity: 0.8;
}

.client-card:hover {
    opacity: 1;
    transform: scale(1.05);
}

/* 技术特点图标动画 */
.tech-icon {
    transition: all 0.3s ease;
}

.tech-icon:hover {
    transform: rotate(10deg) scale(1.1);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .product-card {
        margin-bottom: 1rem;
    }

    .solution-card {
        margin-bottom: 1rem;
    }

    .nav-link::after {
        display: none;
    }
}

/* 深色模式支持（预留） */
@media (prefers-color-scheme: dark) {
    /* 深色模式样式可以在这里添加 */
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {

    .product-card,
    .solution-card {
        border: 2px solid #000;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* 打印样式 */
@media print {

    .fixed,
    #backToTop,
    nav,
    footer {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
    }

    .product-card,
    .solution-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* 自定义工具类 */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow-custom {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.backdrop-blur-custom {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 性能优化 */
.product-card img,
.solution-card img {
    will-change: transform;
}

/* 可访问性优化 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 焦点可见性 */
*:focus {
    outline: 2px solid #0066CC;
    outline-offset: 2px;
}

/* 跳过链接 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #0066CC;
    color: white;
    padding: 8px;
    text-decoration: none;
    transition: top 0.3s;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}