/* ============================================
   术码信息技术（四川）有限公司 - 优化样式
   2026-05-13 下午优化补充
   ============================================ */

/* --- 页脚渐变顶部边框 --- */
.footer::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

/* --- 按钮悬停效果增强 --- */
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(79, 142, 247, 0.4); }
.btn-outline:hover { transform: translateY(-3px); }

/* --- 焦点可见样式（无障碍优化） --- */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* --- 卡片悬停效果统一增强 --- */
.team-card:hover { transform: translateY(-12px); }
.news-card:hover, .case-card:hover, .testimonial-card:hover { transform: translateY(-8px); }

/* --- 服务流程步骤交互动画 --- */
.step-number { transition: all 0.3s ease; }
.process-step:hover .step-number { transform: scale(1.1); }

/* --- 加载进度条动态渐变 --- */
.loader-bar {
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--primary), var(--secondary));
    background-size: 200% 100%;
    animation: loaderProgress 1.2s ease-out forwards, loaderShimmer 2s linear infinite;
}
@keyframes loaderShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- 板块背景微妙装饰 --- */
.section:nth-child(odd) { position: relative; }
.section:nth-child(odd)::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(79, 142, 247, 0.015) 0%, transparent 40%);
    pointer-events: none; z-index: 0;
}

/* --- 导航栏滚动效果增强 --- */
.navbar.scrolled { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.18); }
[data-theme="light"] .navbar.scrolled { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06); }

/* ============================================
   第三轮深度优化 - 2026-05-13
   ============================================ */

/* 1. Hero渐变动画 */
@keyframes heroGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(-45deg, rgba(79,142,247,0.08), rgba(108,92,231,0.06), rgba(0,184,148,0.05), rgba(79,142,247,0.08));
    background-size: 400% 400%;
    animation: heroGradient 15s ease infinite;
    z-index: 1;
    pointer-events: none;
}

/* 2. 滚动指示器脉冲 */
@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(6px); }
}
.scroll-indicator .wheel {
    animation: scrollPulse 2s ease-in-out infinite;
}

/* 3. 卡片边框光效 */
@keyframes borderGlow {
    0%, 100% { border-color: rgba(79,142,247,0.15); }
    50% { border-color: rgba(79,142,247,0.35); }
}
.business-card:hover {
    animation: borderGlow 2s ease-in-out infinite;
}

/* 4. Section tag 更醒目 */
.section-tag {
    letter-spacing: 4px;
    font-weight: 700;
    text-transform: uppercase;
}

/* 5. 按钮 ripple 效果增强 */
.btn-primary {
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}
.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

/* 6. 统计数字更醒目 */
.stat-num {
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 20px rgba(79,142,247,0.3);
}

/* 7. 技术标签悬停 */
.business-tags li {
    transition: transform 0.2s ease, background-color 0.2s ease !important;
}
.business-tags li:hover {
    transform: translateY(-2px);
}

/* 8. 时间线hover效果 */
.timeline-item:hover .timeline-content {
    border-left-color: #4F8EF7 !important;
    box-shadow: 4px 0 15px rgba(79,142,247,0.1);
}

/* 9. FAQ展开动画 */
.faq-item .faq-answer {
    transition: max-height 0.35s ease, padding 0.35s ease !important;
}

/* 10. 合作伙伴logo hover缩放 */
.partner-item {
    transition: transform 0.3s ease, filter 0.3s ease !important;
}
.partner-item:hover {
    transform: scale(1.08);
    filter: brightness(1.1);
}

/* --- 返回顶部按钮淡入动画 --- */
.back-to-top.visible { animation: fadeInUp 0.4s ease; }
@keyframes fadeInUp { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }

/* --- 表单输入框焦点增强 --- */
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.12);
}

/* --- 合作伙伴滚动更平滑 --- */
.partners-scroll { animation: scrollPartners 30s linear infinite; }

/* --- 资质证书3D翻转优化 --- */
.flip-inner { transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); }

/* --- 移动端底部导航活跃指示器 --- */
.mbnav-item.active { position: relative; }
.mbnav-item.active::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 20px; height: 3px; border-radius: 0 0 2px 2px;
    background: var(--primary);
}

/* ============================================
   ƶH5Ż - 2026-05-14
   ============================================ */

/* --- 豸hoverЧƳ --- */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover { color: inherit; background: transparent; }
    .business-tags li:hover { transform: none; background: rgba(79, 142, 247, 0.06); }
    .timeline-item:hover .timeline-content { border-left-color: var(--border-color); box-shadow: none; }
    .process-step:hover .step-number { transform: none; }
    .team-card:active, .business-card:active, .news-card:active, .case-card:active, .cert-card:active, .testimonial-card:active { transform: scale(0.98); }
}

/* --- ƶ˰ťŻ --- */
@media (max-width: 768px) {
    .btn-primary:active, .btn-outline:active { transform: scale(0.97); box-shadow: none; }
}

/* --- ƶFAQչŻ --- */
@media (max-width: 768px) {
    .faq-answer { transition: max-height 0.25s ease, padding 0.25s ease !important; }
    .faq-item.active .faq-answer { max-height: 250px; }
}

/* --- ƶ֤תhover --- */
@media (max-width: 768px) {
    .flip-card { cursor: pointer; }
    .flip-card:active .flip-inner, .flip-card:focus .flip-inner { transform: rotateY(180deg); }
}

/* --- ƶ˺Ż --- */
@media (max-width: 768px) {
    .partners-scroll { animation-duration: 18s; }
}

/* --- ƶ˷ضŻ --- */
@media (max-width: 768px) {
    .back-to-top.visible { animation: fadeInUp 0.3s ease; }
}

/* --- ƶ˵˵Ż --- */
@media (max-width: 768px) {
    .nav-menu { will-change: transform; }
    .nav-link { will-change: background-color, color; }
}

/* --- ƶ˱Ż --- */
@media (max-width: 768px) {
    .form-group input, .form-group textarea { -webkit-appearance: none; appearance: none; border-radius: 10px; }
    .form-group input:-webkit-autofill, .form-group input:-webkit-autofill:hover, .form-group input:-webkit-autofill:focus {
        -webkit-box-shadow: 0 0 0 100px var(--bg-card) inset;
        -webkit-text-fill-color: var(--text);
    }
}

/* --- ƶ˿ƬӰŻܣ --- */
@media (max-width: 768px) {
    .team-card, .business-card, .news-card, .case-card, .testimonial-card, .tech-card {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    }
}

/* --- ƶƽŻ --- */
@media (max-width: 768px) {
    html { scroll-behavior: auto; }
}

/* --- ƶĻת --- */
@media (max-height: 500px) and (orientation: landscape) {
    .hero { min-height: 100vh; }
    .hero-stats { padding: 12px 20px; }
    .hero-content { padding-top: 60px; }
}

/* --- ߶Աȶģʽ֧ --- */
@media (prefers-contrast: high) {
    .nav-link, .mbnav-item, .footer-links a { text-decoration: underline; }
    .btn { border: 2px solid currentColor; }
}

/* --- ٶƫ֧ --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .partners-scroll { animation: none; }
    .scroll-indicator { animation: none; }
    .cs-btn { animation: none; }
    #particleCanvas { display: none; }
}
