/* 首页特定样式 */

/* 顶部搜索框样式 */
.top-header {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.search-wrapper {
    background-color: #fff;
    border-radius: 8px;
    padding: 10px 0;
}

.search-form .form-control {
    height: 46px;
    border: 2px solid #e0e0e0;
    font-size: 16px;
    border-radius: 4px;
}

.search-form .form-control:focus {
    border-color: #0056b3;
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

.search-form .btn-lg {
    height: 46px;
    font-weight: 600;
    padding: 0.375rem 1rem;
}

.search-form .btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.search-form .btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.search-tips {
    color: #6c757d;
    font-size: 12px;
}

/* 产品分类导航样式 */
.category-nav {
    border: 1px solid #eee;
    position: relative;
    z-index: 100;
}

/* 分类列表默认只显示6行 */
.category-list {
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-list .category-item:nth-child(n+7) {
    display: none;
}

/* 鼠标悬停时展开所有分类 */
.category-nav:hover .category-list {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    border-radius: 0 0 4px 4px;
    max-height: none;
    overflow: visible;
}

.category-nav:hover .category-list .category-item {
    display: block;
}

.category-nav:hover .category-nav-header {
    position: relative;
    z-index: 1001;
    border-radius: 4px 4px 0 0;
}

/* 确保展开的分类列表在about section上层 */
.category-banner-section {
    position: relative;
    z-index: 100;
}

.about-section {
    position: relative;
    z-index: 50;
}

.category-nav-header {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.category-item {
    transition: all 0.3s ease;
    position: relative;
}

.category-item:hover {
    background-color: #f8f9fa;
}

.category-item a {
    color: #333;
    text-decoration: none;
}

.category-item:hover a {
    color: #0056b3;
}

/* 子分类面板样式 */
.subcategory-panel {
    position: absolute;
    left: 100%;
    top: 0;
    width: 800px;
    min-height: 100%;
    background-color: #fff;
    border: 1px solid #eee;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    z-index: 101;
    display: none;
    border-radius: 0 4px 4px 0;
}

.category-item:hover .subcategory-panel {
    display: block;
}

.subcategory-group {
    margin-bottom: 20px;
}

.subcategory-title {
    font-size: 16px;
    color: #333;
    font-weight: 600;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.subcategory-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.subcategory-list li {
    margin-bottom: 6px;
}

.subcategory-list li a {
    color: #666;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.subcategory-list li a:hover {
    color: #0056b3;
    padding-left: 5px;
}

/* 响应式调整 */
@media (max-width: 991.98px) {
    .subcategory-panel {
        position: static;
        width: 100%;
        display: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid #eee;
        padding: 10px;
    }
    
    .category-item:hover .subcategory-panel {
        display: none;
    }
    
    .category-item.active .subcategory-panel {
        display: block;
    }
}

/* 轮播图样式 */
.hero-section {
    margin-bottom: 1rem;
}

.carousel-item {
    height: 400px;
    background-color: #343a40;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1.5rem;
    border-radius: 0.5rem;
    bottom: 3rem;
    max-width: 500px;
    margin: 0 auto;
    left: 10%;
    right: 10%;
}

/* 导航栏样式调整 */
.navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.top-header .navbar-nav .nav-link {
    color: #333;
}

.top-header .navbar-nav .nav-link:hover {
    color: #0056b3;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .top-header .col-md-2,
    .top-header .col-md-6,
    .top-header .col-md-4 {
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .top-header .navbar-nav {
        justify-content: center !important;
    }
    
    .category-banner-section .col-md-3,
    .category-banner-section .col-md-9 {
        width: 100%;
    }
    
    .category-nav {
        margin-bottom: 1rem;
    }
    
    .carousel-item {
        height: 300px;
    }
}

.carousel-caption h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* 关于我们部分 */
.section-title {
    position: relative;
    margin-bottom: 2rem;
    font-weight: 700;
    color: #0056b3;
}

.section-title:after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #0056b3;
    margin-top: 0.5rem;
}

.text-center .section-title:after {
    margin-left: auto;
    margin-right: auto;
}

/* 产品分类卡片 */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    overflow: hidden;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card .btn {
    transition: all 0.3s ease;
}

.card:hover .btn {
    background-color: #004494;
    border-color: #004494;
}

/* 服务优势 */
.feature-item {
    padding: 1.5rem;
    border-radius: 0.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 0;
}

.feature-item.animated {
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

.fadeInUp {
    opacity: 1;
    animation-name: fadeInUp;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    color: #0056b3;
}

/* 客户案例 */
.client-logo {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
    max-height: 60px;
    transform: scale(1);
}

.client-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

.clients-section {
    overflow: hidden;
}

/* 新闻动态 */
.news-item {
    transition: transform 0.3s;
}

.news-item:hover {
    transform: translateX(5px);
}

.contact-card {
    background: linear-gradient(135deg, #0056b3, #004494);
    box-shadow: 0 10px 20px rgba(0, 86, 179, 0.2);
}

.contact-info li {
    margin-bottom: 0.5rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .carousel-item {
        height: 300px;
    }
    
    .carousel-caption {
        padding: 1rem;
        bottom: 2rem;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}
