/* 全局样式 */
:root {
    --primary-color: #1e40af;
    /* 蓝色 */
    --secondary-color: #f3f4f6;
    /* 浅灰色 */
    --accent-color: #ea580c;
    /* 橙色 */
    --text-dark: #1f2937;
    --text-light: #6b7280;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* 导航栏样式 */
nav {
    transition: all 0.3s ease;
}

.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 下拉菜单动画 */
nav .group:hover .group-hover\:block {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮样式 */
.btn {
    transition: all 0.3s ease;
}

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

/* 卡片样式 */
.card {
    transition: all 0.3s ease;
}

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

/* 数字计数器动画 */
.counter-container {
    position: relative;
}

.counter {
    transition: all 0.5s ease;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

table th {
    background-color: var(--primary-color);
    color: white;
}

table tbody tr:hover {
    background-color: #f9fafb;
}

/* 表单样式 */
input,
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.2);
}

/* 浮动咨询窗口 */
.floating-contact {
    transition: all 0.3s ease;
}

.floating-contact:hover {
    transform: translateX(-5px);
}

/* 响应式媒体查询 */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

.slide-in-left {
    animation: slideInLeft 1s ease-in-out;
}

.slide-in-right {
    animation: slideInRight 1s ease-in-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 3D产品展示区域 */
.product-3d-view {
    height: 400px;
    position: relative;
    overflow: hidden;
    background-color: #f9fafb;
    border-radius: 8px;
}

/* 产品参数表格高亮 */
.param-highlight {
    background-color: rgba(30, 64, 175, 0.1);
}

/* 案例筛选按钮 */
.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background-color: var(--secondary-color);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(30, 64, 175, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 面包屑导航 */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "/";
    margin: 0 8px;
    color: var(--text-light);
}

/* 智能表单进度条 */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 32px;
}

.form-progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.form-progress-step::before {
    content: "";
    height: 2px;
    background-color: #e5e7eb;
    position: absolute;
    top: 16px;
    left: 0;
    right: 0;
    z-index: 1;
}

.form-progress-step:first-child::before {
    left: 50%;
}

.form-progress-step:last-child::before {
    right: 50%;
}

.form-progress-step.active::before,
.form-progress-step.completed::before {
    background-color: var(--primary-color);
}

.form-progress-indicator {
    width: 32px;
    height: 32px;
    background-color: #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.form-progress-step.active .form-progress-indicator,
.form-progress-step.completed .form-progress-indicator {
    background-color: var(--primary-color);
    color: white;
}

/* 移动端字体统一设置（8号字体） */
@media (max-width: 767px) {

    body,
    p,
    a,
    li,
    td,
    th,
    input,
    button,
    select,
    textarea,
    label,
    span,
    div {
        font-size: 0.875rem !important;
        /* 8号字体，约14px */
    }

    .text-sm,
    .text-xs {
        font-size: 0.75rem !important;
        /* 更小文本保持比例 */
    }

    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }

    h3 {
        font-size: 1.125rem !important;
    }

    h4,
    h5,
    h6 {
        font-size: 1rem !important;
    }

    .text-xl {
        font-size: 1.125rem !important;
    }

    .text-2xl {
        font-size: 1.25rem !important;
    }

    .text-3xl {
        font-size: 1.375rem !important;
    }

    .text-4xl {
        font-size: 1.5rem !important;
    }
}

#consultWindow {
    transition: transform 0.3s ease-in-out;
    position: relative;
}

#toggleBtn {
    transition: all 0.3s ease-in-out;
}

#toggleBtn:hover {
    background-color: #2563eb;
}