/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

html {
    scroll-behavior: smooth;
}

/* ========== 导航栏样式 ========== */
.navbar-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-color: rgba(23, 179, 98, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ========== 渐变文字 ========== */
.gradient-text {
    background: linear-gradient(135deg, #17b363 0%, #0F8A4A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== 网格背景 ========== */
.grid-pattern {
    background-image:
        linear-gradient(rgba(23, 179, 98, 0.03) 1.5px, transparent 1.5px),
        linear-gradient(90deg, rgba(23, 179, 98, 0.03) 1.5px, transparent 1.5px);
    background-size: 60px 60px;
}

/* ========== 淡入动画 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* ========== 服务卡片浮动动画 ========== */
@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-float-card {
    opacity: 0;
    animation: floatUp 0.6s ease-out forwards;
}

/* ========== 平滑过渡 ========== */
.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 卡片悬停效果增强 ========== */
.service-card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card-hover: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);
}

/* ========== 按钮脉冲效果 ========== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* ========== 滚动条样式（使用默认） ========== */
/* 已移除自定义滚动条样式，使用浏览器默认 */

/* ========== 选中文字颜色 ========== */
::selection {
    background-color: #17b363;
    color: white;
}

::-moz-selection {
    background-color: #17b363;
    color: white;
}

/* ========== 响应式图片 ========== */
img {
    max-width: 100%;
    height: auto;
}

/* ========== 链接下划线动画 ========== */
.nav-link {
    position: relative;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #17b363;
    transition: width 0.3s ease;
}

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

/* ========== 加载优化 ========== */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 打印优化 ========== */
@media print {
    nav, footer {
        display: none;
    }

    body {
        font-size: 12pt;
    }

    a {
        text-decoration: underline;
    }
}

/* ========== 暗色模式支持（可选） ========== */
@media (prefers-color-scheme: dark) {
    /* 如果需要暗色模式，可以在这里添加样式 */
}

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

/* ========== 焦点可见性 ========== */
:focus-visible {
    outline: 2px solid #17b363;
    outline-offset: 2px;
}

/* ========== 移动端优化 ========== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }

    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .grid-pattern {
        background-size: 40px 40px;
    }

    /* 增大触摸目标 */
    button, a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* 优化输入框 */
    input, textarea {
        font-size: 16px; /* 防止iOS缩放 */
    }
}

/* 横屏优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .min-h-screen {
        min-height: auto;
    }
}

/* ========== 减少动画（可访问性） ========== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== 在线状态指示器 ========== */
.online-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #10b981; /* 绿色 */
    border-radius: 50%;
    margin-right: 8px;
    animation: statusPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

/* ========== 英雄区CTA按钮动画 ========== */
.hero-cta-button {
    position: relative;
    animation: ctaPulse 3s ease-in-out infinite;
}

/* 脉冲发光效果 */
@keyframes ctaPulse {
    0%, 100% {
        box-shadow:
            0 10px 15px -3px rgba(23, 179, 99, 0.3),
            0 4px 6px -2px rgba(23, 179, 99, 0.2),
            0 0 0 0 rgba(23, 179, 99, 0.7);
    }
    50% {
        box-shadow:
            0 10px 15px -3px rgba(23, 179, 99, 0.4),
            0 4px 6px -2px rgba(23, 179, 99, 0.3),
            0 0 20px 5px rgba(23, 179, 99, 0.4);
    }
}

/* 按钮前的脉冲圆环效果 */
.hero-cta-button::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(23, 179, 99, 0.3), rgba(15, 138, 74, 0.2));
    opacity: 0;
    animation: ctaRing 3s ease-in-out infinite;
    z-index: -1;
}

@keyframes ctaRing {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* 悬停时停止脉冲，显示稳定的发光 */
.hero-cta-button:hover {
    animation: none;
    box-shadow:
        0 20px 25px -5px rgba(23, 179, 99, 0.4),
        0 10px 10px -5px rgba(23, 179, 99, 0.3),
        0 0 30px 8px rgba(23, 179, 99, 0.3) !important;
}

.hero-cta-button:hover::before {
    animation: none;
    opacity: 0;
}
