/* ===== 全局重置 & 基础 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    line-height: 1.6;
    background: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 导航栏 ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
    transition: box-shadow 0.3s;
}

header.scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 800;
    color: #007bff;
    text-decoration: none;
}

.logo-text-img {
    height: 40px;
    width: auto;
    vertical-align: middle;
}
/* Note: .logo-text-img defaults to height:40px — override only when context demands a different size */

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #007bff, #00d4ff);
    border-radius: 8px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-menu a {
    font-size: 14px;
    color: #333;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover {
    color: #007bff;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #007bff;
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ===== Language Switcher (Custom Dropdown) ===== */
.lang-switch {
    position: relative;
    display: inline-flex;
}

/* Hide the native select — kept for i18n JS compatibility */
.lang-switch-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
}

/* ---- Trigger pill ---- */
.lang-switch-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px 6px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    line-height: 1;
    outline: none;
    white-space: nowrap;
    user-select: none;
}

.lang-switch-trigger:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.lang-switch-trigger:focus-visible {
    outline: 2px solid rgba(0, 123, 255, 0.35);
    outline-offset: 2px;
}

/* Chevron — rotates when dropdown is open */
.lang-switch-chevron {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #94a3b8;
    margin-left: -2px;
}

.lang-switch.open .lang-switch-chevron {
    transform: rotate(180deg);
}

/* Globe icon */
.lang-switch-globe {
    display: inline-flex;
    align-items: center;
    color: #94a3b8;
    transition: color 0.25s;
}

.lang-switch-trigger:hover .lang-switch-globe {
    color: #64748b;
}

/* ---- Dropdown panel ---- */
.lang-switch-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 140px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.06),
        0 10px 25px -5px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px) scale(0.96);
    transform-origin: top right;
    transition:
        opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s 0.25s;
    z-index: 1001;
}

.lang-switch.open .lang-switch-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition:
        opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s 0s;
}

/* ---- Option buttons ---- */
.lang-switch-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    text-align: left;
    line-height: 1.4;
}

.lang-switch-option:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Active option — blue accent dot */
.lang-switch-option.active {
    color: #007bff;
    font-weight: 600;
    background: #f0f7ff;
}

.lang-switch-option.active::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #007bff;
    flex-shrink: 0;
    margin-left: 8px;
    box-shadow: 0 0 6px rgba(0, 123, 255, 0.4);
}

/* ===== 按钮 ===== */
.btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff, #0069d9);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0069d9, #0056b3);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
}

.btn-outline:hover {
    background: #f0f7ff;
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
    border-radius: 8px;
}

/* ===== 页脚 ===== */
footer {
    background: #1a1a1a;
    color: #999;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(5, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.3s, transform 0.3s;
}

.social-link:hover {
    background: #007bff;
    transform: translateY(-2px);
}

.footer-column h4 {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    font-size: 13px;
    color: #999;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: white;
}

/* ===== 页脚 flex 布局：主体 + 右侧二维码 ===== */
.footer-inner {
    display: flex;
    align-items: flex-start;
    gap: 80px;
}

.footer-main {
    flex: 1;
    min-width: 0;  /* 防止 flex 子元素溢出 */
}

/* ===== 右侧客服二维码卡片 ===== */
.footer-qr {
    flex-shrink: 0;
    padding-top: 0;
}

.footer-qr-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 14px;
    text-align: center;
    box-shadow:
        0 0 40px rgba(59, 130, 246, 0.06),
        0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.footer-qr-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 56px rgba(59, 130, 246, 0.1),
        0 12px 40px rgba(0, 0, 0, 0.4);
}

/* 二维码图片区 — 纯白底保证可扫性 */
.footer-qr-img {
    background: #ffffff;
    border-radius: 10px;
    padding: 10px;
    line-height: 0;
    margin-bottom: 14px;
}

.footer-qr-img img {
    width: 170px;
    height: 170px;
    display: block;
    border-radius: 4px;
}

/* 标题 */
.footer-qr-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 4px 0;
}

/* 副标题 */
.footer-qr-sub {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 12px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 12px;
    color: #666;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #999;
}

/* ===== 联系客服弹窗 ===== */
.contact-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
    overflow-y: auto;
}
.contact-overlay.active {
    display: flex;
    animation: contactFadeIn 0.25s ease;
}
@keyframes contactFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.contact-modal {
    position: relative;
    background: #ffffff;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    padding: 44px 36px 32px;
    box-shadow: 0 30px 80px rgba(13, 71, 161, 0.25);
    animation: contactSlideUp 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
    text-align: center;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}
@keyframes contactSlideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

.contact-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    font-size: 24px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}
.contact-close:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: rotate(90deg);
}

/* 图标 */
.contact-icon-wrap {
    margin-bottom: 20px;
}
.contact-icon-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

/* 标题 */
.contact-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
    margin: 0 0 8px 0;
}

/* 描述 */
.contact-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.7;
    margin: 0 0 24px 0;
}

/* 邮箱卡片 */
.contact-email-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 14px;
    transition: border-color 0.2s;
}
.contact-email-card:hover {
    border-color: #bfdbfe;
}

.contact-email-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
}

.contact-email-text {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    text-align: left;
    word-break: break-all;
    user-select: all;
}

.contact-copy-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    border: 1.5px solid #3b82f6;
    background: #ffffff;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.contact-copy-btn:hover {
    background: #3b82f6;
    color: #ffffff;
}
.contact-copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

/* 工作时间 */
.contact-hours {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 0 20px 0;
}

/* 发送邮件按钮 */
.contact-mailto-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(59, 130, 246, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}
.contact-mailto-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.45);
}
.contact-mailto-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s;
}
.contact-mailto-btn:hover svg {
    transform: translateX(3px);
}

/* ===== 汉堡菜单按钮 ===== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    z-index: 1001;
    border-radius: 8px;
    transition: background 0.3s;
}

.hamburger:hover {
    background: #f5f5f5;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 80px 32px 32px;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        padding: 14px 0;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu a::after {
        display: none;
    }

    /* 移动端遮罩层 */
    body.nav-open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 998;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* flex 换为纵向，二维码居中 */
    .footer-inner {
        flex-direction: column;
        gap: 24px;
    }
    .footer-qr {
        align-self: center;
    }
    .footer-qr-img img {
        width: 140px;
        height: 140px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .navbar {
        padding: 0 16px;
    }
    .footer-bottom {
        flex-direction: column;
    }
}

/* ===== Toast 提示 ===== */
.ys-toast {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(-120px);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    z-index: 99999;
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.25s;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}

.ys-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.ys-toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.ys-toast-msg { line-height: 1.4; }

/* types */
.ys-toast-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.ys-toast-success .ys-toast-icon { background: #10b981; color: white; }

.ys-toast-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.ys-toast-error .ys-toast-icon { background: #ef4444; color: white; }

.ys-toast-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.ys-toast-warning .ys-toast-icon { background: #f59e0b; color: white; }

.ys-toast-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.ys-toast-info .ys-toast-icon { background: #3b82f6; color: white; }