/* 表单验证和提交动画样式 */
/* 表单字段验证状态 */
#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);
}

/* 语言切换按钮 */
.lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 30px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 15px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}
.lang-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-1px);
}
.lang-toggle-btn:active {
    transform: translateY(0);
}
.nav-scrolled .lang-toggle-btn {
    color: #165DFF;
    background: rgba(22, 93, 255, 0.08);
    border-color: rgba(22, 93, 255, 0.2);
}
.nav-scrolled .lang-toggle-btn:hover {
    background: rgba(22, 93, 255, 0.14);
    border-color: rgba(22, 93, 255, 0.35);
}

/* 滚动后导航栏中logo图片容器保持白色背景 */
.nav-scrolled img[alt="方帅网络科技Logo"] {
    background-color: transparent !important;
}

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

/* 滚动后导航栏中公司名称样式调整 */
.nav-scrolled span[class*="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;
}

/* 滚动后移动端菜单按钮颜色调整 */
.nav-scrolled #menu-toggle {
    color: #1D2129 !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;
}

/* ===== 顶部导航滑动指示器（药丸高亮） ===== */
.nav-tabs {
    position: relative;
}

.nav-pill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 34px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.16);
    transform: translate(var(--pill-x, 0), -50%);
    width: var(--pill-w, 0);
    transition: transform .55s cubic-bezier(.34, 1.56, .64, 1),
                width .55s cubic-bezier(.34, 1.56, .64, 1),
                background-color .3s ease;
    pointer-events: none;
    z-index: 0;
}

.nav-tabs > a {
    position: relative;
    z-index: 1;
}

/* 滚动后（白色导航栏）药丸配色 */
.nav-scrolled .nav-pill {
    background: rgba(22, 93, 255, 0.12);
}

/* ===== 首页首屏：多分辨率满屏适配 ===== */
/* 100vh 兜底 → 100svh(小视口,地址栏展开也不遮挡) → calc(var(--vh)*100) JS兜底 */
#home {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    min-height: calc(var(--vh, 1vh) * 100);
    /* 顶部避开固定导航栏(约 4rem)，底部为下箭头留白，极小高度时内容可撑开滚动 */
    padding: 5.5rem 0 5rem;
}

/* 大屏高度充足时垂直严格居中，小高度时自然流式排列避免截断 */
@media (min-height: 640px) {
    #home {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

#home > .container {
    width: 100%;
}

#home .hero-particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#home > .container {
    position: relative;
    z-index: 1;
}

/* 首屏底部向下箭头 */
.hero-scroll-down {
    position: absolute;
    left: 50%;
    bottom: 2rem;
    z-index: 2;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    transition: color .3s ease;
    animation: hero-bounce 2s ease-in-out infinite;
}

.hero-scroll-down:hover {
    color: #fff;
}

@keyframes hero-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 10px); }
}

@media (max-width: 767px) {
    .hero-scroll-down { display: none; }
}

/* ===== 全国合作布局：点阵地球 + 城市标注 + 蓝色定位点 ===== */
.partner-map {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
}
.partner-earth {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* 城市标注容器：铺满地图 */
.partner-city-tabs {
    position: absolute;
    inset: 0;
    z-index: 2;
}
/* 每个城市的小圆点 */
.partner-city-tabs .city-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(29, 33, 41, 0.45);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
/* 城市名称标签 */
.partner-city-tabs .city-tab {
    position: absolute;
    transform: translate(-50%, -50%);
    color: #1D2129;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 500;
    transition: color .25s ease;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(2px);
}
.partner-city-tabs .city-tab:hover {
    color: #165DFF;
}
.partner-city-tabs .city-tab.active {
    color: #165DFF;
    font-weight: 700;
}
.partner-city-tabs .city-tab .hq-tag {
    font-size: 10px;
    background: #165DFF;
    color: #fff;
    border-radius: 3px;
    padding: 0 4px;
    margin-left: 3px;
    vertical-align: middle;
    font-style: normal;
}

/* 蓝色定位点 */
.partner-pin {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #165DFF;
    border: 2px solid #fff;
    box-shadow: 0 0 0 3px rgba(22,93,255,0.35), 0 0 10px rgba(22,93,255,0.6);
    transform: translate(-50%, -50%);
    z-index: 3;
    transition: left .9s cubic-bezier(.34,1.56,.64,1), top .9s cubic-bezier(.34,1.56,.64,1);
    pointer-events: none;
}
.partner-pin::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: rgba(22,93,255,0.3);
    animation: partner-pulse 1.8s ease-out infinite;
}
@keyframes partner-pulse {
    0% { transform: scale(0.6); opacity: 0.8; }
    100% { transform: scale(2.2); opacity: 0; }
}

@media (max-width: 640px) {
    .partner-city-tabs .city-tab { font-size: 11px; }
    .partner-pin { width: 10px; height: 10px; }
}

/* ===== 页脚：腾讯云风格白色底 ===== */
.site-footer {
    background: #fff;
    border-top: 1px solid #f0f0f0;
    color: #1D2129;
    padding: 48px 0 0;
    font-size: 14px;
}

/* 服务保障行 */
.footer-services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-bottom: 32px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 32px;
}
.footer-service-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer-service-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(22,93,255,0.08);
    color: #165DFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.footer-service-text h5 {
    font-size: 14px;
    font-weight: 600;
    color: #1D2129;
    margin: 0;
}
.footer-service-text p {
    font-size: 12px;
    color: #86909c;
    margin: 2px 0 0;
}

/* 链接区 */
.footer-links {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr 1.5fr;
    gap: 32px;
    padding-bottom: 32px;
}
.footer-col h6 {
    font-size: 14px;
    font-weight: 600;
    color: #1D2129;
    margin: 0 0 16px;
}
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-col ul li {
    margin-bottom: 10px;
    color: #4e5969;
    font-size: 13px;
    line-height: 1.6;
}
.footer-col ul li i {
    color: #165DFF;
    margin-right: 6px;
    width: 14px;
    text-align: center;
}
.footer-col ul li a {
    color: #4e5969;
    text-decoration: none;
    transition: color .2s;
}
.footer-col ul li a:hover {
    color: #165DFF;
}

/* 关注我们 */
.footer-social {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}
.footer-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f2f3f5;
    color: #4e5969;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all .2s;
}
.footer-social-btn:hover {
    background: #165DFF;
    color: #fff;
}
.footer-contact-btn {
    display: inline-block;
    padding: 6px 20px;
    background: #165DFF;
    color: #fff !important;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: background .2s;
}
.footer-contact-btn:hover {
    background: #0e42d2;
}

/* 底部版权 */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}
.footer-brand {
    font-size: 14px;
    font-weight: 600;
    color: #1D2129;
}
.footer-bottom-right {
    font-size: 12px;
    color: #86909c;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-bottom-right a {
    color: #86909c;
    text-decoration: none;
    transition: color .2s;
}
.footer-bottom-right a:hover {
    color: #165DFF;
}
.footer-divider {
    color: #c9cdd4;
}

@media (max-width: 768px) {
    .footer-services { grid-template-columns: repeat(2, 1fr); }
    .footer-links { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}
