/* Key&I 平台样式 - 修复版本 */

/* CSS变量 - 修复后的色彩系统 */
:root {
    /* 主色调 */
    --primary-color: #1F27C4;
    --primary-dark: #161C99;
    --text-primary: #1C163C;
    --text-secondary: #1C163C;
    --text-muted: #1C163C;
    --text-light: #1C163C;
    
    /* 背景色 - 改为纯白色 */
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-card: #f8f9fa;
    --bg-hover: #e9ecef;
    --bg-footer: #ffffff;
    
    /* 边框色 */
    --border-color: #1F27C4;
    
    /* 间距系统 - 修复后的间距 */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 20px;
    --spacing-xl: 24px;
    --spacing-2xl: 32px;
    --spacing-3xl: 40px;
    --spacing-4xl: 48px;
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* 重置和基础样式 - 修复字体重叠问题 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 修复字体渲染问题 */
h1, h2, h3, h4, h5, h6, p, span, div, a, button {
    font-family: inherit;
    line-height: inherit;
}

/* 导航栏模块 - 修复布局问题 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80px;
    background: var(--bg-primary);
    border-bottom: none;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

/* Logo - 图片样式 */
.nav-logo {
    display: flex;
    align-items: center;
    height: 100%;
    padding-left: var(--spacing-sm);
}

.nav-logo .logo-image {
    height: 32px;
    width: auto;
    object-fit: contain;
    margin-left: 0;
    display: block;
}

/* 导航链接 - 修复字体和间距 */
.nav-links {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-link {
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.2s ease;
    white-space: nowrap;
    padding: 8px 12px;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: #1F27C4;
    font-weight: 600;
}

/* 下拉菜单样式 */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown .nav-link {
    position: relative;
    padding-right: 28px;
}

.nav-dropdown .nav-link::after {
    content: '▾';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--primary-color);
    transition: transform 0.2s ease;
    font-weight: bold;
}

.nav-dropdown:hover .nav-link::after {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: white;
    border: 1px solid rgba(31, 39, 196, 0.15);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(31, 39, 196, 0.12);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    padding: 12px 0;
    backdrop-filter: blur(10px);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(31, 39, 196, 0.08), transparent);
    transition: left 0.5s ease;
}

.dropdown-item:hover::before {
    left: 100%;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #FAF9FF 0%, #F0F0FF 100%);
    color: var(--primary-color);
    transform: translateX(4px);
}


/* 操作按钮 - 修复字体和间距 */
.nav-buttons {
    display: flex;
    gap: var(--spacing-md);
    margin-right: var(--spacing-xl);
}

.btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1F27C4 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    background: white;
    border: 2px solid #1F27C4;
    width: 100px;
    height: 36px;
}

/* 使用更具体的选择器确保优先级 */
.nav-buttons .btn-text:hover,
button.btn-text:hover,
.btn-text:hover {
    background: #1F27C4 !important;
    color: white !important;
    /* 调试信息：确保悬浮样式生效 */
    border-color: #1F27C4 !important;
    transform: scale(1.02) !important;
}

/* 核心业务展示区 - 修复布局问题 */
.hero-section {
    padding: calc(80px + var(--spacing-3xl)) 0 var(--spacing-3xl);
    background: var(--bg-primary);
    min-height: 360px;
    display: flex;
    align-items: center;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-4xl);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-3xl);
}

/* 左侧文案区 - 修复字体问题 */
.hero-content {
    flex: 1;
    padding-left: 0;
    max-width: 500px;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: 50px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    margin-bottom: 16px;
    text-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
}

.impact-word {
    color: #1F27C4;
}

.hero-subtitle {
    font-size: 14px;
    color: #1F27C4;
    line-height: 1.5;
    margin-bottom: var(--spacing-xl);
    margin-bottom: 24px;
    max-width: 100%;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* 右侧功能预览区 - 修复布局 */
.hero-preview {
    flex: 1.5;
    min-height: 300px;
    padding: var(--spacing-2xl) 0;
    display: flex;
    align-items: center;
}

.preview-container {
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: var(--radius-md);
    padding: var(--spacing-2xl) var(--spacing-2xl) var(--spacing-2xl) var(--spacing-md);
    box-shadow: none;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
}

/* 平台截图占位符 */
.platform-screenshot {
    width: auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* 截图图片样式 */
.screenshot-image {
    max-width: 90%;
    max-height: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: none;
    transform: scale(1.8);
    transform-origin: left center;
    margin: var(--spacing-4xl) 0 var(--spacing-2xl) 0;
}

.screenshot-placeholder {
    text-align: center;
    color: var(--text-light);
}

.screenshot-icon {
    font-size: 48px;
    display: block;
    margin-bottom: var(--spacing-md);
    opacity: 0.6;
}

.screenshot-text {
    font-size: 14px;
    color: rgba(28, 22, 60, 0.5);
    font-weight: 500;
}

/* 按钮样式 - 修复尺寸和字体 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-outline {
    background: white;
    border: 3px solid var(--border-color);
    color: var(--primary-color);
    width: 190px;
    height: 45px;
    font-size: 16px;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    font-size: 16px;
    width: 190px;
    height: 45px;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* 企业信任背书区 - 修复布局 */
.trust-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-primary);
    min-height: 120px;
    display: flex;
    align-items: center;
}

.trust-container {
    text-align: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.trust-title {
    font-family: 'Inter', sans-serif;
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    margin-bottom: 8px;
}

.trust-subtitle {
    font-size: 14px;
    color: rgba(28, 22, 60, 0.4);
    line-height: 1.5;
    margin-bottom: var(--spacing-lg);
    margin-bottom: 20px;
}

.company-logos {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    align-items: center;
    flex-wrap: wrap;
    overflow: visible;
    width: 100%;
    position: relative;
}

/* 滚动容器 */
.logo-scroll-container {
    width: 100vw;
    max-width: none;
    overflow: visible;
    position: relative;
    margin-left: calc(-50vw + 50%);
}

/* 滚动轨道 */
.logo-scroll-track {
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
    animation: scrollLogos 90s linear infinite;
    width: max-content;
    padding: 0 var(--spacing-3xl);
    overflow: visible;
    will-change: transform;
    transform: translateZ(0);
}

/* 悬浮时暂停，减轻眩晕感 */
.logo-scroll-container:hover .logo-scroll-track {
    animation-play-state: paused;
}

/* 滚动动画 */
@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 单个Logo项 */
.logo-item {
    flex-shrink: 0;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    overflow: visible;
}

/* 企业图片 */
.company-image {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    object-fit: none;
    border-radius: var(--radius-sm);
    transition: transform 0.2s ease;
    display: block;
    transform: scale(0.8);
}

.company-image:hover {
    transform: scale(1.1);
}

/* 性能优化：延迟渲染非首屏区块，保持视觉不变 */
.trust-section {
    content-visibility: auto;
    contain-intrinsic-size: 160px;
}

.advantages-section {
    content-visibility: auto;
    contain-intrinsic-size: 260px;
}

.business-section {
    content-visibility: auto;
    contain-intrinsic-size: 300px;
}

.footer {
    content-visibility: auto;
    contain-intrinsic-size: 100px;
}

/* 平台优势区 - 修复布局 */
.advantages-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-primary);
    min-height: 200px;
}

.advantages-container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    align-items: flex-start;
}

/* 平台优势区标题样式 - 与Trusted By保持一致 */
.advantages-header {
    width: 100%;
    text-align: left;
    margin-bottom: var(--spacing-sm);
    padding-left: var(--spacing-xl);
    margin-right: 0;
    margin-left: 0;
}

.advantages-title {
    font-family: 'Inter', sans-serif;
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    margin-bottom: 8px;
}

/* 优势卡片容器 */
.advantages-cards {
    display: flex;
    gap: var(--spacing-4xl);
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
}

.advantage-card {
    flex: 1;
    min-width: 250px;
    max-width: 280px;
    text-align: left;
    padding: var(--spacing-xl);
    background: transparent !important;
    border-radius: var(--radius-sm);
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    box-shadow: none;
    border: none;
    animation: none;
}

.advantage-card:hover {
    background: transparent !important;
    box-shadow: none;
    border: none;
}

.advantage-card:focus {
    background: transparent !important;
    box-shadow: none;
    border: none;
}

.advantage-icon {
    width: 32px;
    height: 32px;
    background: #FAF9FF;
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 16px;
    flex-shrink: 0;
}

.icon-image {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.advantage-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
    margin-bottom: 8px;
    text-align: left;
}

.advantage-description {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    text-align: left;
}

/* 业务分类区 - 修复布局 */
.business-section {
    padding: var(--spacing-3xl) 0;
    background: var(--bg-primary);
    min-height: 240px;
}

.business-container {
    display: flex;
    gap: var(--spacing-4xl);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    flex-wrap: wrap;
    justify-content: center;
}

.business-card {
    width: 45%;
    min-width: 300px;
    padding: var(--spacing-xl);
    background: #FAF9FF;
    border-radius: var(--radius-lg);
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.business-title {
    font-family: 'Inter', sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    margin-bottom: 16px;
}

.business-features {
    list-style: none;
    margin-bottom: var(--spacing-xl);
    margin-bottom: 24px;
    flex: 1;
}

.business-features li {
    font-size: 20px;
    color: var(--text-primary);  /* 改为与标题相同的颜色 */
    line-height: 1.8;
    margin-bottom: var(--spacing-xs);
    margin-bottom: 8px;
    display: flex;
    align-items: center;  /* 改为center，让圆点和文字在同一水平线上 */
    gap: var(--spacing-sm);
}

.bullet {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    margin-top: 0;  /* 移除top margin，让圆点与文字对齐 */
    flex-shrink: 0;
}

.btn-business {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    background: #FAF9FF;  /* 改为FAF9FF背景色 */
    width: 240px;
    height: 48px;
    align-self: flex-start;
}

.btn-business:hover {
    background: var(--primary-color);
    color: white;
}

.btn-student {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
    background: #FAF9FF;  /* 改为FAF9FF背景色 */
    width: 240px;
    height: 48px;
    align-self: flex-start;
}

.btn-student:hover {
    background: var(--primary-color);
    color: white;
}

/* 页脚模块 - 修复布局 */
.footer {
    background: transparent;
    min-height: 64px;
    display: flex;
    align-items: center;
    margin-top: var(--spacing-2xl);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-xl) var(--spacing-xl) var(--spacing-xl);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-lead {
    font-size: 16px;
    color: rgba(28, 22, 60, 0.5);
    text-align: left;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border-top: 1px solid rgba(28, 22, 60, 0.2);
    margin-top: 2px;
    padding-top: var(--spacing-sm);
}

.footer-copyright {
    font-size: 12px;
    color: rgba(28, 22, 60, 0.5);
    flex: 1;
    min-width: 200px;
}

.footer-policies {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
}

.policy-link {
    font-size: 12px;
    color: rgba(28, 22, 60, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.policy-link:hover {
    color: rgba(28, 22, 60, 0.7);
}

.policy-separator {
    font-size: 12px;
    color: rgba(28, 22, 60, 0.5);
}

/* 动画效果 - 修复性能问题 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.advantage-card,
.business-card {
    animation: none;
}

.advantage-card:nth-child(1) { animation: none; }
.advantage-card:nth-child(2) { animation: none; }
.advantage-card:nth-child(3) { animation: none; }
.advantage-card:nth-child(4) { animation: none; }

/* 无障碍访问支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-muted: #000000;
    }
    
    .btn-outline {
        border-width: 2px;
    }
}

/* 焦点样式 */
.btn:focus,
.nav-link:focus,
.policy-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    .navbar,
    .hero-buttons,
    .company-logos {
        display: none;
    }
    
    .hero-section {
        padding: var(--spacing-md) 0;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}
