/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.animate-fadeInUp {
    animation-name: fadeInUp;
    animation-duration: 1s;
    animation-fill-mode: both;
}

.animation-delay-300 {
    animation-delay: 0.3s;
}

.animation-delay-600 {
    animation-delay: 0.6s;
}

/* 导航栏样式 */
#header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

#header.scrolled .text-blue-800 {
    color: #1e3a8a;
}

/* 头部处于页面顶部（未滚动）时，使用白色文字，适配透明背景 -- 仅首页生效 */
body[data-page="home"] #header:not(.scrolled) a,
body[data-page="home"] #header:not(.scrolled) .logo span,
body[data-page="home"] #header:not(.scrolled) .language-switcher a,
body[data-page="home"] #header:not(.scrolled) #menu-toggle,
body[data-page="home"] #header:not(.scrolled) #menu-toggle i {
    color: #ffffff !important;
}

/* 顶部状态下，分隔符与图标也置白 -- 仅首页生效 */
body[data-page="home"] #header:not(.scrolled) .text-gray-400,
body[data-page="home"] #header:not(.scrolled) .fa {
    color: #ffffff !important;
}

/* 如果 logo 使用深色图片且提供白色版，可在顶部状态下替换（保留为可选钩子）
#header:not(.scrolled) .logo img[data-dark-logo] {
    content: attr(data-dark-logo);
}
*/

/* 移动菜单样式 */
.submenu-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.submenu-content.active {
    max-height: 200px;
    padding-top: 10px;
}

/* 轮播图样式 */
.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: inline-block;
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background-color: #ffffff;
    width: 30px;
    border-radius: 6px;
}

/* 产品卡片样式 */
.product-item {
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
}

/* 计数器动画 */
.counter {
    transition: all 0.6s ease;
}

/* 表单样式 */
.form-control {
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    color: #fff;
    background-color: #1e40af;
    border-color: #1e40af;
}

.btn-primary:hover {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
}

.btn-outline-primary {
    color: #1e40af;
    border-color: #1e40af;
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #1e40af;
    border-color: #1e40af;
}

/* 响应式表格样式 */
@media (max-width: 640px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.tag-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.tag-secondary {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* 卡片阴影效果 */
.shadow-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

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

/* 产品列表页面样式 */
.product-filter {
    background-color: #f8fafc;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.product-filter h4 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1e293b;
}

.product-filter .filter-group {
    margin-bottom: 1.5rem;
}

.product-filter label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #475569;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 0.5rem 1rem;
    list-style: none;
    background-color: #f8fafc;
    border-radius: 0.375rem;
    margin-bottom: 2rem;
}

.breadcrumb-item {
    display: inline-block;
}

.breadcrumb-item + .breadcrumb-item::before {
    display: inline-block;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
    color: #64748b;
    content: ">";
}

.breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #1e40af;
}

.breadcrumb-item.active {
    color: #1e293b;
    font-weight: 500;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.pagination li {
    display: inline-block;
    margin: 0 0.25rem;
}

.pagination a {
    display: block;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #1e40af;
}

.pagination .active a {
    background-color: #1e40af;
    border-color: #1e40af;
    color: #ffffff;
}

/* 解决方案页面样式 */
.solution-item {
    transition: all 0.3s ease;
}

.solution-item:hover {
    transform: translateY(-5px);
}

/* 团队成员样式 */
.team-member {
    text-align: center;
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member .member-info {
    margin-top: 1rem;
}

.team-member h4 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.team-member p {
    color: #64748b;
    font-size: 0.875rem;
}

.team-member .social-links {
    margin-top: 0.75rem;
}

.team-member .social-links a {
    display: inline-block;
    margin: 0 0.25rem;
    color: #64748b;
    transition: color 0.2s ease;
}

.team-member .social-links a:hover {
    color: #1e40af;
}

/* 新闻详情页样式 */
.news-detail h1 {
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.news-detail .meta-info {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.news-detail .content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #334155;
}

.news-detail .content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
}

.news-detail .content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.news-detail .content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.news-detail .content p {
    margin-bottom: 1rem;
}

.news-detail .content ul,
.news-detail .content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

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

/* 联系我们页面样式 */
.contact-form {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 2rem;
}

.contact-info {
    background-color: #f8fafc;
    border-radius: 0.5rem;
    padding: 2rem;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact-info .info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-info .info-item i {
    color: #1e40af;
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.contact-info .info-item .info-content h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-info .info-item .info-content p {
    color: #64748b;
}

/* 地图样式 */
.map-container {
    height: 400px;
    border-radius: 0.5rem;
    overflow: hidden;
    margin-top: 2rem;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    h1 {
        font-size: 1.875rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1.25rem;
    }
    .navbar-brand {
        font-size: 1.25rem;
    }
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    .carousel-caption p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    h2 {
        font-size: 1.25rem;
    }
    h3 {
        font-size: 1.125rem;
    }
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

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

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #121212;
        --text-color: #e0e0e0;
        --card-bg: #1e1e1e;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .card {
        background-color: var(--card-bg);
    }
}

/* 文本裁剪工具（兼容现有 class 使用） */
.line-clamp-1 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.line-clamp-4 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }

/* 首页新闻卡片布局优化：卡片内上下分布，摘要裁剪，按钮靠下 */
.news-item { display: flex; flex-direction: column; height: 100%; }
.news-item .p-6 { display: flex; flex-direction: column; justify-content: flex-start; gap: .5rem; height: 100%; }
.news-item h3 a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* 新闻列表页标题两行裁剪，防止行高过长 */
#newsListContainer h3 a { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

/* 可选：统一新闻卡片图片高度（已有 h-48，这里作为兜底） */
.news-item .relative { height: 12rem; }
.news-item .relative img { width: 100%; height: 100%; object-fit: cover; }
