/* 基本样式 */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    overflow: hidden;
    height: 150px;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10.01%);
    background-size: 20px 20px;
    opacity: 0.5;
    z-index: 1;
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.1) 50%);
    background-size: 30px 30px;
    opacity: 0.3;
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 15px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    margin-top: 20px;
}

nav ul li {
    margin-right: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
}

/* 各版块样式 */
.hero-section {
    background-color: #f4f4f4;
    height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-top: 150px;
    position: relative; /* 为伪元素定位 */
}

/* 使用伪元素设置半透明背景图片 */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../img/901.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8; /* 设置透明度，可调整0.1-1之间的值 */
    z-index: 1;
}

/* 确保内容在背景图片之上 */
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 30px;
}

/* 产品分类样式 */
.product-categories {
    flex: 0 0 200px;
    max-width: 200px;
    margin-right: auto;
    margin-left: 0;
    padding-left: 0;
    height: 100%; /* 占满整个section的高度 */
    display: flex;
    flex-direction: column;
    justify-content: center; /* 垂直居中 */
}

.product-categories h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #1a2a6c;
    padding-bottom: 10px;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1; /* 占满可用空间 */
    display: flex;
    flex-direction: column;
    justify-content: space-around; /* 均匀分布 */
}

.category-item {
    margin-bottom: 0;
    position: relative;
    flex: 1; /* 每个分类项目等高 */
}

.category-link {
    display: flex;
    align-items: center; /* 垂直居中文字 */
    height: 100%; /* 占满分类项目的高度 */
    padding: 20px 20px; /* 增加内边距 */
    background: transparent;
    color: #333;
    text-decoration: none;
    border-radius: 0;
    transition: all 0.3s ease;
    font-weight: 500;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.1rem; /* 增大字体 */
    line-height: 1.4; /* 增加行高 */
}

.category-link:hover {
    transform: translateX(10px);
    background: rgba(26, 42, 108, 0.1);
    color: #1a2a6c;
    border-bottom-color: #1a2a6c;
}

.category-item:last-child .category-link {
    border-bottom: none;
}

/* 子菜单样式 */
.subcategory-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    min-width: 250px; /* 增加宽度以适应较长的产品名称 */
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 悬停时显示子菜单 */
.category-item:hover .subcategory-list {
    display: block;
}

/* 子菜单链接样式 */
.subcategory-link {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.subcategory-link:hover {
    background-color: #f8f9fa;
    color: #1a2a6c;
    padding-left: 20px;
}

.subcategory-list li:last-child .subcategory-link {
    border-bottom: none;
}

/* 主标题内容样式 */
.hero-text {
    flex: 2;
    text-align: center;
    margin-top: 10px;
    margin-left: auto;
}

.hero-text h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #333;
}

.hero-text p {
    font-size: 2rem;
    color: #666;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
    
    .product-categories {
        max-width: 100%;
        margin-bottom: 30px;
    }
    
    .hero-text h2 {
        font-size: 2.5rem;
    }
    
    .hero-text p {
        font-size: 1.5rem;
    }
}

.products-section {
    padding: 50px 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.product-item {
    border: 1px solid #ddd;
    padding: 20px;
    text-align: center;
}

.about-section, .contact-section {
    padding: 50px 0;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* 添加产品滚动样式 */
.product-scroll-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.product-scroll {
    display: flex;
    width: max-content;
    animation: scroll 30s linear infinite;
}

.product-item {
    min-width: 300px;
    margin: 0 15px;
    padding: 20px;
    border: 1px solid #ddd;
    text-align: center;
    transition: transform 0.3s ease;
}

.product-item:hover {
    transform: scale(1.05);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* 调整各版块的上边距 */
section {
    padding-top: 100px;
    margin-top: 150px;
}

/* 修改第一个section的上边距 */
#home {
    margin-top: 0;
}

.cases-section {
    padding: 50px 0;
    background-color: #f9f9f9;
}

.case-content {
    text-align: center;
    padding: 20px 0;
}

/* 模态窗口样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.product-detail {
    padding: 40px;
}

.product-detail h2 {
    color: #1a2a6c;
    margin-bottom: 20px;
    border-bottom: 2px solid #1a2a6c;
    padding-bottom: 10px;
}

.product-spec {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    margin: 20px 0;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.spec-table th,
.spec-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.spec-table th {
    background-color: #1a2a6c;
    color: white;
}

/* 产品图片轮播样式 */
.product-gallery {
    margin: 20px 0;
    text-align: center;
}

.image-container {
    position: relative;
    height: 300px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image.active {
    opacity: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.image-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.thumbnail.active,
.thumbnail:hover {
    border-color: #1a2a6c;
}

/* 应用领域样式 */
.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.application-category {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #1a2a6c;
}

.application-category h4 {
    color: #1a2a6c;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.application-category ul {
    margin: 0;
    padding-left: 20px;
}

.application-category li {
    margin-bottom: 5px;
    color: #555;
}

/* 产品描述和特点样式 */
.product-description,
.product-features,
.product-advantages {
    margin: 25px 0;
}

.product-description p {
    line-height: 1.8;
    color: #555;
    font-size: 1.05rem;
}

.product-features ul,
.product-advantages ul {
    padding-left: 20px;
}

.product-features li,
.product-advantages li {
    margin-bottom: 8px;
    color: #555;
    line-height: 1.6;
}

/* 无图片占位符样式 */
.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    color: #6c757d;
    font-size: 1.2rem;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
} 