/* 基础重置与通用样式 */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; 
    color: #fff; 
    line-height: 1.6; 
    background: #000;
    overflow-x: hidden; /* 防止横向滚动 */
}

.text-center { 
    text-align: center; 
}

.img-fluid { 
    max-width: 100%; 
    height: auto; 
    display: block; /* 消除图片底部间隙 */
}

.list-unstyled { 
    list-style: none; 
    padding-left: 0; 
    margin: 0; 
}

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

a:hover { 
    opacity: 0.8; 
}

/* 主横幅区域 - 修复背景跳动问题 */
.main-banner {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 使用伪元素创建固定背景，避免跳动 */
.main-banner::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url(../images/banner.jpg) no-repeat center;
    background-size: cover;
    z-index: -1;
}

.banner-info {
    padding-top: 3em;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.w3pvt-logo {
    text-align: center;
    margin-bottom: 2em;
}

.w3pvt-logo a {
    color: #fff;
    font-size: 2em;
    font-weight: 700;
    text-shadow: 2px 5px 3px rgba(0,0,0,.06);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.middile-inner-con {
    width: 100%;
}

/* 标签导航 - 修复移动端滑动问题 */
.tab-main {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.tab-nav {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    width: 100%;
    flex-wrap: nowrap; /* 确保不换行 */
}

.tab-nav input {
    display: none;
}

.tab-nav label {
    display: inline-block;
    padding: 12px 20px;
    font-weight: 600;
    text-align: center;
    color: #595a5a;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: #fff;
    font-size: 0.9em;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 1; /* 允许缩小 */
    margin: 0 5px; /* 添加间距 */
}

.tab-nav label:hover {
    color: #ff4c4c;
    border-color: #ff4c4c;
}

.tab-nav input:checked + label {
    color: #ff4c4c;
    border: 2px solid #fff;
    background: #fff;
}

.tab-nav span {
    margin-right: 8px;
}

/* 标签内容区域 */
.tab-content section {
    display: none;
}

.tab-content section.active {
    display: block;
}

.inner-w3layouts-wrap {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 0;
    text-align: center;
}

.inner-w3layouts-wrap h2, 
.head-w3ls {
    color: #fff;
    font-size: 1.6em;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 5px 3px rgba(0,0,0,.06);
    margin: 0 0 1.5em;
}

.inner-w3layouts-wrap h4 {
    color: #fff;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 2px 5px 3px rgba(0,0,0,.06);
    margin: 1em 0;
}

.inner-w3layouts-wrap p {
    font-size: 1em;
    color: #fff;
    line-height: 1.8;
    letter-spacing: 1px;
    margin-bottom: 1.5em;
}

/* 修复admin图片居中问题 */
.admin-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5em;
}

img.admin {
    border-radius: 50%;
    background: rgba(223, 240, 247, 0.2);
    padding: 5px;
    width: 150px;
    height: 150px;
    object-fit: cover;
}

/* 关于页面样式 */
.about-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.feature-item span {
    font-size: 2.5em;
    color: #ff4c4c;
    margin-bottom: 15px;
    display: block;
}

.feature-item h4 {
    margin: 15px 0;
    font-size: 1.2em;
}

.feature-item p {
    font-size: 0.9em;
    margin: 0;
}

/* 产品页面样式 - 修复图片无缝拼接问题 */
.product-gallery {
    margin-bottom: 40px;
    width: 100%;
}

.gallery-columns {
    display: flex;
    justify-content: center;
    gap: 0; /* 消除列间距 */
    width: 100%;
}

.gallery-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    max-width: 33.333%; /* 三列布局 */
}

.gallery-col img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
}

/* 确保图片之间无缝拼接 */
.gallery-col img + img {
    margin-top: 0; /* 消除图片之间的间隙 */
}

/* 联系页面样式 */
.contact-info {
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-item span {
    font-size: 1.5em;
    color: #ff4c4c;
    margin-right: 15px;
}

.contact-item p {
    margin: 0;
    text-align: left;
}

.social-links h4 {
    margin-bottom: 20px;
}

.w3pvt_social_list {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.w3pvt_social_list li a {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.w3pvt_social_list li a:hover {
    background: #ff4c4c;
    transform: translateY(-5px);
}

.w3pvt_social_list li a span {
    color: #333;
    font-size: 1.2em;
}

.w3pvt_social_list li a:hover span {
    color: #fff;
}

/* 版权信息 */
.copy-w3layouts-right {
    padding: 20px 15px;
    background: rgba(0, 0, 0, 0.5);
}

.copy-w3layouts-right p {
    font-size: 0.85em;
    line-height: 1.5;
    letter-spacing: 1px;
    margin: 0;
}

.copy-w3layouts-right a {
    color: #ff4c4c;
}

/* Font Awesome 图标 */
@font-face {
  font-family: 'FontAwesome';
  src: url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2');
  font-weight: normal;
  font-style: normal;
}

.fa {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.fa-home:before { content: "\f015"; }
.fa-users:before { content: "\f0c0"; }
.fa-files-o:before { content: "\f0c5"; }
.fa-envelope:before { content: "\f0e0"; }
.fa-weibo:before { content: "\f18a"; }
.fa-wechat:before { content: "\f1d7"; }
.fa-qq:before { content: "\f1d6"; }
.fa-google-plus:before { content: "\f0d5"; }
.fa-leaf:before { content: "\f06c"; }
.fa-coffee:before { content: "\f0f4"; }
.fa-shield:before { content: "\f132"; }
.fa-shopping-cart:before { content: "\f07a"; }
.fa-info-circle:before { content: "\f05a"; }

/* 响应式设计 */
@media (max-width: 1024px) {
    .tab-main {
        width: 95%;
    }
    
    .inner-w3layouts-wrap {
        width: 95%;
    }
}

@media (max-width: 768px) {
    .banner-info {
        padding-top: 2em;
    }
    
    .w3pvt-logo a {
        font-size: 1.6em;
    }
    
    .tab-nav {
        gap: 5px;
    }
    
    .tab-nav label {
        padding: 10px 15px;
        font-size: 0.85em;
    }
    
    .inner-w3layouts-wrap h2, 
    .head-w3ls {
        font-size: 1.4em;
    }
    
    .inner-w3layouts-wrap h4 {
        font-size: 1.1em;
    }
    
    .about-features {
        gap: 20px;
    }
    
    .feature-item {
        min-width: 100%;
    }
    
    /* 移动端产品图片布局 */
    .gallery-columns {
        flex-wrap: wrap;
    }
    
    .gallery-col {
        max-width: 50%; /* 移动端改为两列 */
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .w3pvt-logo a {
        font-size: 1.4em;
    }
    
    /* 移动端导航 - 不换行，不滑动，适屏缩小 */
    .tab-nav {
        justify-content: center;
        flex-wrap: wrap;
        overflow-x: visible;
        padding-bottom: 0;
    }
    
    .tab-nav label {
        padding: 8px 10px;
        font-size: 0.75em;
        margin: 0 2px 5px;
        flex: 0 0 calc(25% - 10px); /* 四个标签平均分配宽度 */
        max-width: calc(25% - 10px);
        box-sizing: border-box;
        text-align: center;
    }
    
    .inner-w3layouts-wrap {
        padding: 20px 0;
    }
    
    .inner-w3layouts-wrap h2, 
    .head-w3ls {
        font-size: 1.2em;
        margin-bottom: 1em;
    }
    
    img.admin {
        width: 120px;
        height: 120px;
    }
    
    /* 移动端产品图片布局 */
    .gallery-columns {
        flex-wrap: wrap;
    }
    
    .gallery-col {
        max-width: 100%; /* 移动端小屏幕改为单列 */
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-item span {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .contact-item p {
        text-align: center;
    }
    
    .copy-w3layouts-right p {
        font-size: 0.75em;
    }
}

/* 超小屏幕设备 */
@media (max-width: 375px) {
    .tab-nav label {
        padding: 6px 8px;
        font-size: 0.7em;
        margin: 0 1px 5px;
        flex: 0 0 calc(25% - 6px); /* 四个标签平均分配宽度 */
        max-width: calc(25% - 6px);
    }
    
    .inner-w3layouts-wrap {
        width: 98%;
        padding: 15px 0;
    }
    
    .banner-info {
        padding-top: 1.5em;
    }
    
    .copy-w3layouts-right p {
        font-size: 0.7em;
    }
}