
@font-face {
  font-family: 'Noto Sans SC';
  font-weight: 400;
  src: url('../webfonts/NotoSansSC-Regular.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans SC';
  font-weight: 500;
  src: url('../webfonts/NotoSansSC-Medium.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans SC';
  font-weight: 700;
  src: url('../webfonts/NotoSansSC-Bold.ttf') format('truetype');
  font-display: swap;
}

html {
    scroll-behavior: smooth;
    font-family: 'Noto Sans SC';
}


::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 工具类组件 */
.icon-circle {
    margin-top: 0.125rem;
    width: 1rem;
    height: 1rem;
    border-radius: 9999px;
    background-color: rgba(253, 224, 71, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}



/* 表单动画 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* 表单消息样式 */
.form-message {
    transition: all 0.3s ease-in-out;
}

.form-message.show {
    animation: slideIn 0.3s ease-out;
}

/* ==================== 滚动触发动画 ==================== */

/* 初始状态：隐藏元素 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* 动画激活状态：显示元素 */
.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 淡入向上动画 */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* 从左侧滑入 */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

/* 从右侧滑入 */
.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

/* 缩放淡入 */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}



/* 对比行动画 */
.comparison-rows .grid {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.comparison-rows .grid.animate {
    opacity: 1;
    transform: translateX(0);
}

/* 四风模块动画 */
.wind-item {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.wind-item.animate {
    opacity: 1;
    transform: scale(1);
}

/* 响应式：移动端减弱动画效果 */
@media (max-width: 768px) {
    .navbar {
      padding-top: 1rem !important;
      padding-bottom: 1rem !important;
}
    .animate-on-scroll {
        transform: translateY(20px);
    }
    
    .slide-in-left,
    .slide-in-right {
        transform: translateY(20px);
    }
    
    .wind-item {
        transform: scale(0.95);
    }
}

/* 减弱动画偏好的用户 */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .fade-in-up,
    .slide-in-left,
    .slide-in-right,
    .scale-in,
    .service-cards-grid .group,
    .advantage-cards-grid .group,
    .dust-cards-grid .bg-white,
    .comparison-rows .grid,
    .wind-item {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* ==================== 返回顶部按钮 ==================== */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}
#back-to-top i {
    color: white;
    transition: transform 0.3s ease;
}
#back-to-top:hover i {
    transform: translateY(-3px);
}
@media (max-width: 768px) {
    #back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 48px;
        height: 48px;
    }
}