/* 表单验证和提交动画样式 */
/* 表单字段验证状态 */
#contactForm input.border-red-500,
#contactForm select.border-red-500,
#contactForm textarea.border-red-500 {
    border-color: #ef4444 !important;
}

#contactForm input.border-green-500,
#contactForm select.border-green-500,
#contactForm textarea.border-green-500 {
    border-color: #10b981 !important;
}

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

.animate-spin {
    animation: spin 1s linear infinite;
}

/* 表单状态消息过渡效果 */
#formSuccess,
#formError {
    transition: all 0.3s ease-in-out;
    transform: translateY(0);
}

#formSuccess.hidden,
#formError.hidden {
    transform: translateY(-10px);
    opacity: 0;
}

/* 提交按钮状态 */
#submitButton:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 加载指示器背景动画 */
#loadingIndicator {
    backdrop-filter: blur(2px);
}

/* 错误消息动画 */
.error-message {
    animation: fadeIn 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

.hero-gradient {
    background: linear-gradient(135deg, #165DFF 0%, #36CFC9 100%);
}

body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 确保文本在各种背景下都清晰可读 */
.text-on-light {
    color: #1D2129;
}

.text-on-dark {
    color: #FFFFFF;
}

.text-on-primary {
    color: #FFFFFF;
}

.text-muted {
    color: #5C6773;
}

/* 登录按钮样式 */
.login-btn {
    position: relative;
    z-index: 10;
    transition: all 0.3s ease;
}

/* 移动端登录按钮样式 */
.mobile-link {
    background-color: #165DFF;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 滚动后导航栏样式调整 */
.nav-scrolled {
    background-color: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 滚动后导航栏中登录按钮样式调整 */
.nav-scrolled .login-btn {
    color: #165DFF !important;
}

/* 滚动后导航栏中公司名称和英文翻译样式调整 */
.nav-scrolled .text-white {
    color: #1D2129 !important;
}

.nav-scrolled .text-white\/80 {
    color: #5C6773 !important;
}

/* 滚动后导航链接样式调整 */
.nav-scrolled a:not(.mobile-link) {
    color: #1D2129 !important;
}

.nav-scrolled a:not(.mobile-link):hover {
    color: #165DFF !important;
}

/* 确保移动菜单中的登录按钮背景色 */
#mobile-menu .login-btn {
    background-color: #165DFF;
    border-radius: 8px;
}

/* 图片加载优化样式 */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* 图片容器背景占位 */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 图片加载失败样式 */
img.error {
    display: none;
}

img.error + .img-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    color: #999;
    font-size: 14px;
}

/* 页面加载器样式 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #165DFF 0%, #36CFC9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loader-text {
    font-size: 1.125rem;
    font-weight: 500;
}

/* 时间轴样式 */
.timeline-content {
    transition: all 0.3s ease;
}

.timeline-details {
    transition: max-height 0.3s ease;
}
