/* 企业官网自定义样式 - 优化版 */

/* CSS变量 */
:root {
    --primary-color: #0073aa;
    --text-dark: #333;
    --text-muted: #666;
    --bg-light: #f9f9f9;
    --border-color: #ddd;
    --success-color: #46b450;
    --warning-color: #ffb900;
    --white: #ffffff;
}

/* 全局样式 */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    font-size: 16px;
    margin: 0;
    padding: 0;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.h1, h1 { font-size: 2.5rem; }
.h2, h2 { font-size: 2rem; }
.h3, h3 { font-size: 1.75rem; }
.h4, h4 { font-size: 1.5rem; }
.h5, h5 { font-size: 1.25rem; }

/* 导航栏 */
.navbar {
    transition: box-shadow 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    background: var(--white) !important;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--text-dark) !important;
    text-decoration: none !important;
}

.navbar-brand:hover {
    text-decoration: none !important;
}

.navbar-nav.ms-auto {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center;
    margin-left: auto !important;
    width: auto !important;
}

.navbar-nav.ms-auto .nav-item {
    flex: none !important;
    text-align: center;
    margin: 0 0.25rem;
}

.navbar-nav .nav-link {
    font-weight: 400 !important;
    transition: all 0.3s ease !important;
    padding: 0.75rem 1rem !important;
    color: var(--text-dark) !important;
    border-radius: 0 !important;
    position: relative !important;
    display: block !important;
    text-align: center !important;
    background-color: transparent !important;
    text-decoration: none !important;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: transparent !important;
    text-decoration: none !important;
}

.navbar-nav .nav-link:focus {
    text-decoration: none !important;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link.active:focus,
.navbar-nav .nav-link.active:hover {
    background-color: transparent !important;
    color: var(--primary-color) !important;
    position: relative !important;
    font-weight: 500 !important;
    text-decoration: none !important;
}

.navbar-nav .nav-link.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: -1px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 70% !important;
    height: 3px !important;
    background-color: var(--primary-color) !important;
    border-radius: 2px !important;
    z-index: 10 !important;
    display: block !important;
}

/* 英雄区域 */
.hero-section {
    min-height: 500px;
    padding: 4rem 0 !important;
}

.min-vh-50 {
    min-height: 50vh;
}

.hero-image-placeholder {
    border-radius: 8px;
}

/* 首页标题优化 */
.hero-section .display-4 {
    font-size: 2.8rem;
    white-space: nowrap;
    line-height: 1.2;
    font-weight: 700;
}

/* 卡片样式 */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* 按钮样式 */
.btn {
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 3px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border: 1px solid transparent;
}

.btn:hover {
    text-decoration: none;
}

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

.btn-primary:hover {
    background: #005a87;
    border-color: #005a87;
    color: white;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

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

.btn-warning {
    background: var(--warning-color);
    border-color: var(--warning-color);
    color: #333;
}

.btn-warning:hover {
    background: #e5a500;
    border-color: #e5a500;
    color: #333;
}

/* 图标动画 */
.feature-icon, .service-icon {
    transition: transform 0.2s ease;
}

.feature-box:hover .feature-icon,
.service-card:hover .service-icon {
    transform: scale(1.05);
}

/* 页脚 */
footer {
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
}

footer p {
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 0.25rem 0;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

footer a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* 表单样式 */
.form-control, .form-select {
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
    outline: 0;
}

/* 验证码样式 */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-image {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.captcha-image:hover {
    border-color: var(--primary-color);
}

.captcha-refresh {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
}

.captcha-refresh:hover {
    color: #005a87;
    text-decoration: underline;
}

/* 分页样式 */
.page-link {
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    margin: 0 2px;
    font-weight: 400;
    transition: all 0.2s ease;
    padding: 0.5rem 0.75rem;
}

.page-link:hover {
    color: #005a87;
    background-color: var(--bg-light);
    border-color: var(--border-color);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    border-radius: 3px;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

/* 警告框样式 */
.alert {
    border: 1px solid transparent;
    border-radius: 4px;
    font-weight: 400;
    padding: 0.75rem 1rem;
}

.alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 文本样式 */
.text-primary {
    color: var(--primary-color) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-dark {
    color: var(--text-dark) !important;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.6;
}

/* 链接样式 */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: #005a87;
    text-decoration: underline;
}

/* 列表样式 */
.list-unstyled {
    padding-left: 0;
    list-style: none;
}

.list-unstyled li {
    margin-bottom: 0.25rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-section {
        padding: 3.5rem 0 !important;
        min-height: 400px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
        white-space: normal;
        line-height: 1.2;
        font-weight: 700;
    }
    
    .h1, h1 { font-size: 2rem; }
    .h2, h2 { font-size: 1.75rem; }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* 移动端导航栏样式 */
    .navbar-nav.ms-auto {
        display: block !important;
        width: 100%;
    }
    
    .navbar-nav.ms-auto .nav-item {
        flex: none;
        text-align: left;
        margin: 0;
    }
    
    .navbar-nav .nav-link {
        text-align: left !important;
        padding: 0.5rem 1rem !important;
    }
    
    .navbar-nav .nav-link.active::after {
        left: 1rem !important;
        transform: none !important;
        width: calc(100% - 2rem) !important;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 2.5rem 0 !important;
        min-height: 300px;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section .display-4 {
        font-size: 1.5rem;
        white-space: normal;
        line-height: 1.2;
        font-weight: 700;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }
}

/* 性能优化 */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 图片优化 */
img {
    max-width: 100%;
    height: auto;
}

/* 减少重绘 */
.card-img-top {
    will-change: transform;
}

/* 预加载关键字体 */
@font-face {
    font-family: system-ui;
    font-display: swap;
}

/* 时间轴样式 */
.timeline {
    position: relative;
    visibility: visible !important;
    opacity: 1 !important;
}

.timeline .d-flex {
    position: relative;
    align-items: flex-start !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    margin-bottom: 1.5rem !important;
}

.timeline .d-flex:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 25px; /* 圆形图标中心位置 */
    top: 60px; /* 从圆形图标底部开始 */
    width: 2px;
    height: calc(100% + 0.5rem); /* 连接到下一个元素 */
    background-color: #dee2e6;
    z-index: 1;
}

.timeline .rounded-circle {
    position: relative;
    z-index: 2;
    font-size: 0.75rem;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
    margin-right: 1rem !important;
    margin-top: 0.25rem !important; /* 与文字顶部对齐 */
    /* 确保文本完美居中 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
}

.timeline .rounded-circle small {
    font-size: inherit !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    text-align: center !important;
}

.timeline .flex-grow-1 {
    min-width: 0;
    visibility: visible !important;
    opacity: 1 !important;
    padding-top: 0.25rem !important; /* 与圆形图标对齐 */
}

.timeline .flex-grow-1 h6 {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1rem;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.3 !important;
}

.timeline .flex-grow-1 p {
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 0.9rem;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 0 !important;
}

/* 发展历程容器强制显示 */
.timeline, 
.timeline * {
    visibility: visible !important;
    opacity: 1 !important;
}

/* 移动端时间轴优化 */
@media (max-width: 768px) {
    .timeline .d-flex {
        margin-bottom: 1.25rem !important;
    }
    
    .timeline .d-flex:not(:last-child)::after {
        left: 20px; /* 适应较小的圆形图标 */
        top: 50px;
        height: calc(100% + 0.25rem);
    }
    
    .timeline .rounded-circle {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        font-size: 0.65rem !important;
        margin-right: 0.75rem !important;
    }
    
    .timeline .rounded-circle small {
        font-size: inherit !important;
    }
    
    .timeline .flex-grow-1 h6 {
        font-size: 0.95rem;
    }
    
    .timeline .flex-grow-1 p {
        font-size: 0.85rem;
    }
}

/* 导航栏链接特殊样式 - 覆盖全局链接样式 */
.navbar-nav .nav-link {
    color: var(--text-dark) !important;
    text-decoration: none !important;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    text-decoration: none !important;
}

.navbar-nav .nav-link:focus,
.navbar-nav .nav-link:active,
.navbar-nav .nav-link:visited {
    text-decoration: none !important;
}

.navbar-brand {
    color: var(--text-dark) !important;
    text-decoration: none !important;
}

.navbar-brand:hover,
.navbar-brand:focus,
.navbar-brand:active,
.navbar-brand:visited {
    color: var(--text-dark) !important;
    text-decoration: none !important;
} 