/* 自定义样式 -Trivo Precision企业官网 */

/* 基础样式 */
:root {
    --primary-color: #0066cc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Markdown内容样式 */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6,
.card-text h1,
.card-text h2,
.card-text h3,
.card-text h4,
.card-text h5,
.card-text h6 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.25;
}

.article-content h1 { font-size: 2rem; }
.article-content h2 { font-size: 1.75rem; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.25rem; }
.article-content h5 { font-size: 1.1rem; }
.article-content h6 { font-size: 1rem; }

.article-content p,
.card-text p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
}

.article-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: #e83e8c;
}

.article-content pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.article-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

.article-content table {
    width: 100%;
    margin: 1rem 0;
    border-collapse: collapse;
}

.article-content table th,
.article-content table td {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
}

.article-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content hr {
    margin: 2rem 0;
    border: none;
    border-top: 1px solid #dee2e6;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
}

/* 轮播图样式 */
.carousel-item {
    position: relative;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 2rem;
}

.carousel-caption h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.carousel-caption p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* 卡片样式 */
.card {
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    transition: transform 0.3s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* 按钮样式 */
.btn {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #0099ff);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0052a3, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

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

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--dark-color);
}

.display-4 {
    font-weight: 700;
}

/* 图标样式 */
.fa {
    transition: transform 0.3s ease, color 0.3s ease;
}

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

/* 背景样式 */
.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0099ff 100%) !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #495057 100%);
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* 表单样式 */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* 面包屑导航 */
.breadcrumb {
    background: transparent;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #ffffff;
}

/* 分页样式 */
.pagination .page-link {
    border-radius: 25px;
    margin: 0 2px;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* 文章内容样式 */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .carousel-caption h2 {
        font-size: 1.8rem;
    }

    .carousel-caption p {
        font-size: 1rem;
    }

    .display-4 {
        font-size: 2rem;
    }

    .btn {
        padding: 0.5rem 1.5rem;
    }
}

@media (max-width: 576px) {
    .carousel-caption {
        padding: 1rem;
    }

    .carousel-caption h2 {
        font-size: 1.5rem;
    }

    .display-4 {
        font-size: 1.5rem;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 102, 204, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 高亮效果 */
.highlight {
    background: linear-gradient(120deg, #a8e6cf 0%, #dcedc1 100%);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

/* 阴影效果 */
.shadow-sm {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.shadow {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

/* 工具提示样式 */
.tooltip {
    font-size: 0.875rem;
}

/* 模态框样式 */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 15px 15px;
}

/* 表格样式 */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    border-top: none;
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 102, 204, 0.05);
}

/* 徽章样式 */
.badge {
    border-radius: 25px;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

/* 进度条样式 */
.progress {
    border-radius: 25px;
    height: 1rem;
}

.progress-bar {
    border-radius: 25px;
}

/* 警告框样式 */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-primary {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, rgba(0, 153, 255, 0.1) 100%);
    color: var(--primary-color);
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(72, 199, 116, 0.1) 100%);
    color: var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(231, 76, 60, 0.1) 100%);
    color: var(--danger-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 206, 84, 0.1) 100%);
    color: #856404;
}

/* 语言切换器样式 */
.language-switcher {
    position: relative;
    border-radius: 20px;
    padding: 0.5rem 1rem !important;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.language-switcher:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
}

.language-menu {
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: none;
    min-width: 160px;
    margin-top: 0.5rem;
}

.language-menu .dropdown-item {
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.language-menu .dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0099ff 100%);
    color: #ffffff;
    transform: translateX(5px);
}

.language-menu .dropdown-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0099ff 100%);
    color: #ffffff;
}

.language-menu .dropdown-item i {
    width: 16px;
    text-align: center;
}

/* 移动端语言切换器 */
@media (max-width: 991px) {
    .language-switcher {
        background: transparent;
        padding: 0.5rem 0 !important;
    }
    
    .language-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 5px;
        margin-top: 0.5rem;
    }
    
    .language-menu .dropdown-item {
        color: #ffffff;
    }
    
    .language-menu .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        color: #000 !important;
        background: #fff !important;
    }
}
