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

body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 1200px;  /* 这个限制可能需要调整 */
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    overflow: visible;
}

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
    background: transparent !important; /* 提高优先级 */
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

/* Logo样式 */
.logo img {
    height: 50px;
}

/* 导航菜单 */
.nav-menu ul {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin: 0 15px;
}

.nav-menu a {
    text-decoration: none;
    color: #fff;
    font-size: 16px;
    transition: opacity 0.3s;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); /* 文字阴影提高可读性 */
}

.nav-menu a:hover,
.nav-menu a.active {
    opacity: 0.8;
}

/* 语言切换 */
.language-switch {
    display: flex;
    align-items: center;
}

.language-switch a {
    text-decoration: none;
    color: #fff;
    padding: 0 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.language-switch span {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.language-switch a.active {
    opacity: 0.8;
}

/* 首页轮播图 */
.hero-slider {
    height: 100vh;
    position: relative;
    padding: 0; /* 移除内边距 */
    margin-top: 0; /* 确保没有上边距 */
}

.hero-slider .swiper-container {
    width: 100%;
    height: 100vh; /* 使用视口高度 */
    position: absolute; /* 绝对定位 */
    top: 0;
    left: 0;
}

.hero-slider .swiper-slide {
    width: 100% !important;
    height: 100vh; /* 使用视口高度 */
    background-color: #333;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 2;
}

/* 添加遮罩层使文字更清晰 */
.hero-slider .swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* 半透明黑色遮罩 */
}

.slide-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content h1 {
    font-size: 48px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 轮播图导航按钮样式 */
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    color: #fff;
}

.hero-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.7;
}

.hero-slider .swiper-pagination-bullet-active {
    background: #fff;
    opacity: 1;
}

/* 各个部分的通用样式 */
section:not(.hero-slider) {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
}

/* 关于我们部分 */
.about-section {
    background: #1a1a1a;
    padding: 80px 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.about-text {
    flex: 0 0 auto;
    width: 500px;
    min-height: 300px;
    padding: 40px;
    background: linear-gradient(135deg, #C6A57E 0%, #C6A57E 100%);
    color: #fff;
    border-radius: 8px;
    position: relative;
    border: 2px solid #C6A57E;
    z-index: 2;
    margin-right: -100px;
}

.about-text h2 {
    color: #fff;
    font-size: 32px;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.about-text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #191816;
}

.about-text p {
    color: #fff;
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 16px;
}

.about-text .read-more {
    display: inline-block;
    padding: 10px 25px;
    background: #fff;
    color: #C6A57E;
    text-decoration: none;
    margin-top: 20px;
    transition: all 0.3s ease;
    font-weight: bold;
    border-radius: 8px;
}

.about-text .read-more:hover {
    background: #7e9fc5;
    transform: translateY(-2px);
}

.about-image {
    flex: 1;
    position: relative;
    height: 500px;
    z-index: 1;
}

.about-image img {
    width: 130%;
    height: 130%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.about-text h2,
.about-text p,
.about-text .read-more {
    position: relative;
    z-index: 3;
}

/* 产品中心 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.product-item {
    position: relative;
    overflow: hidden;
    background: #262626;
    cursor: pointer;
    border-radius: 8px;
    width: 100%;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-item img {
    width: 100%;
    height: 250px;  /* 固定图片高度 */
    object-fit: cover;
    display: block;  /* 移除图片底部间隙 */
}

.product-item h3 {
    background: #C6A57E;  /* 文字背景色改为要求的颜色 */
    color: #fff;
    margin: 0;  /* 移除外边距 */
    padding: 15px;  /* 增加内边距 */
    text-align: center;
    flex-grow: 1;  /* 让文字区域填充剩余空间 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.product-item p {
    font-size: 14px;
    color: #ffffff;
    margin: 0 15px 15px;
}

/* 技术服务 */
.services-slider {
    padding: 20px 0;
}

.service-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
}

.service-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.service-item h3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    text-align: center;
    z-index: 2;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.service-item:hover h3 {
    opacity: 0;
}

.service-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(198, 165, 126, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.service-item:hover .overlay {
    opacity: 1;
}

.service-item .description {
    color: #fff;
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.service-item:hover .description {
    opacity: 1;
    transform: translateY(0);
}

/* 添加遮罩层使标题更清晰 */
.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.service-item:hover::before {
    opacity: 0;
}

/* 新闻中心 */
.news-slider {
    position: relative;
    margin: 40px auto;
    padding: 0 60px; /* 修改内边距，为箭头留出空间 */
    max-width: 1400px; /* 限制最大宽度 */
}

/* 页脚 */
.footer {
    background: #333;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-qr img {
    width: 120px;
    margin-bottom: 10px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom a {
    color: #fff;
    text-decoration: none;
}

/* 滚动状态下的样式 */
.header.scrolled {
    background: rgba(0, 0, 0, 0.8) !important; /* 提高优先级 */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 15px 0;
}

/* 内页通用样式 */
.inner-page .header {
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

/* 确保内页滚动状态正确 */
.inner-page .header.scrolled {
    position: fixed;
    background: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* 导航文字阴影，确保在透明背景时可读 */
.header .nav-menu a,
.header .language-switch a,
.header .language-switch span {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 滚动状态下移除文字阴影 */
.header.scrolled .nav-menu a,
.header.scrolled .language-switch a,
.header.scrolled .language-switch span {
    text-shadow: none;
}

/* 产品中心样式更新 */
.products-section {
    background: #1a1a1a;
    padding: 80px 0;
}

.section-title {
    color: #fff;
}

.products-slider {
    position: relative;
    padding: 20px 0;
    margin-bottom: 20px;
}

.products-slider .swiper-container {
    padding: 20px;
    overflow: hidden;
}

/* 轮播容器样式调整 */
.products-slider .swiper-slide {
    height: auto;  /* 让滑块高度自适应 */
    display: flex;
}

.products-slider .swiper-slide a {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-decoration: none;
}

/* 导航按钮样式 */
.products-slider .swiper-button-next,
.products-slider .swiper-button-prev {
    color: #333;
    background: #C6A57E;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.products-slider .swiper-button-next:after,
.products-slider .swiper-button-prev:after {
    font-size: 20px;
}

/* 查看更多按钮样式 */
.view-more {
    display: inline-block;
    padding: 12px 30px;
    background: #C6A57E;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.view-more:hover {
    background: #B8860B;
    transform: translateY(-2px);
}

/* 技术服务部分样式更新 */
.services-section {
    padding: 80px 0;
    background: #1a1a1a;
}

.services-section .section-title {
    color: #fff;
    margin-bottom: 40px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.service-item {
    position: relative;
    height: 300px;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
}

.service-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.service-item h3 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 24px;
    text-align: center;
    z-index: 2;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.service-item:hover h3 {
    opacity: 0;
}

.service-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(198, 165, 126, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.service-item:hover .overlay {
    opacity: 1;
}

.service-item .description {
    color: #fff;
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.service-item:hover .description {
    opacity: 1;
    transform: translateY(0);
}

/* 添加遮罩层使标题更清晰 */
.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.service-item:hover::before {
    opacity: 0;
}

/* 首页新闻轮播样式 */
.news-section {
    background: #1a1a1a;
    padding: 80px 0;
}

.news-slide {
    display: flex;
    align-items: center;
    background: #262626;
    padding: 30px;
    border-radius: 8px;
}

.news-slide-content {
    flex: 1;
    padding-right: 40px;
}

.news-slide-title {
    font-size: 24px;
    color: #fff;
    margin-bottom: 20px;
}

.news-slide-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-slide-title a:hover {
    color: #C6A57E;
}

.news-slide-preview {
    color: #888;
    margin-bottom: 20px;
    line-height: 1.6;
}

.news-slide-date {
    color: #666;
    font-size: 14px;
}

.news-slide-image {
    width: 40%;
}

.news-slide-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 4px;
}

/* 修改新闻轮播导航按钮样式 */
.news-slider .swiper-button-next,
.news-slider .swiper-button-prev {
    color: #333;
    background: #C6A57E;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-slider .swiper-button-next {
    right: 0; /* 修改位置 */
}

.news-slider .swiper-button-prev {
    left: 0; /* 修改位置 */
}

/* 调整箭头图标大小 */
.news-slider .swiper-button-next:after,
.news-slider .swiper-button-prev:after {
    font-size: 16px;
    font-weight: bold;
}

/* 悬停效果 */
.news-slider .swiper-button-next:hover,
.news-slider .swiper-button-prev:hover {
    background: rgba(198, 165, 126, 1);
    box-shadow: 0 0 10px rgba(198, 165, 126, 0.3);
}

/* 调整分页器位置 */
.news-slider .swiper-pagination {
    bottom: -30px;
}

.news-slider .swiper-pagination-bullet {
    background: #C6A57E;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.news-slider .swiper-pagination-bullet-active {
    opacity: 1;
    width: 20px;
    border-radius: 5px;
}

/* 新闻banner样式 */
.news-banner {
    height: 400px;
    background-image: url('../images/news/news-banner.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
}

.news-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.news-banner h1 {
    color: #fff;
    font-size: 48px;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* 新闻详情页顶部间距 */
.news-detail-section {
    margin-top: 120px; /* 为固定导航栏留出空间 */
}

/* 首页产品中心部分特定样式 - 使用更具体的选择器 */
body .products-section.home-products {
    padding-top: 120px;    /* 上方间距 */
    padding-bottom: 0px;  /* 下方间距 */
}