﻿/*
Theme Name: 南联电子
Theme URI: https://nle.cc
Description: 专业的电子制造企业网站主题，仿照szypdz.com设计
Author: SMT-NLE Team
Author URI: https://nle.cc
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: smt-nle
Tags: enterprise, electronics, custom-menu, featured-images, threaded-comments, translation-ready

SMT-NLE Theme, Copyright 2023 nle.cc
SMT-NLE is distributed under the terms of the GNU GPL
*/

/**
 * 重置样式
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

a {
    text-decoration: none;
    color: #0066cc;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0; /* 移除容器内边距 */
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/**
 * 头部样式
 */
.site-header {
    position: relative;
    left: 0;
    top: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.header-top {
    position: relative;
    width: 100%;
    background: #272727;
    color: white;
    padding: 5px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-top .container {
    display: flex;
    justify-content: space-between;
}

.header-contact span {
    margin-right: 20px;
}

.header-social a {
    color: white;
    margin-left: 10px;
}

.header-lower {
    position: relative;
}

.main-header {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    
}

.logo-box {
    position: relative;
    flex: 0 0 auto;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    color: #333;
    text-decoration: none;
}

.logo img {
    height: 50px; /* 从 60px 调整为 40px */
    max-width: 100%;
    margin-right: 15px;
}

.logo h1 {
    margin: 0;
    font-size: 25px; /* 从 24px 调整为 20px */
    color: #333;
}

.main-navigation {
    flex: 0 0 auto;
}

.main-navigation .navigation {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-navigation .navigation > li {
    position: relative;
    display: inline-block;
    margin-left: 30px;
    padding: 15px 0 15px 0;
}

.main-navigation .navigation > li:first-child {
    margin-left: 0;
}

.main-navigation .navigation > li > a {
    position: relative;
    display: block;
    color: #333;
    font-weight: bold;
    font-size: 16px;
    padding: 10px 0;
    text-decoration: none;
    transition: all 500ms ease;
}

.main-navigation .navigation > li > a:hover {
    color: #0066cc;
    text-decoration: none; /* 取消文字本身的下划线 */
}

.main-navigation .navigation > li > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #0066cc;
    transition: width 0.3s ease;
}

.main-navigation .navigation > li > a:hover::before {
    width: 100%;
}

/* 为特定菜单项添加背景色条 */
.main-navigation .navigation > li.menu-item-about-us > a,
.main-navigation .navigation > li.menu-item-news > a {
    background-color: #003366;
    color: white;
    border-radius: 4px;
    padding: 10px 15px;
    margin: 0 5px;
    transition: background-color 0.3s;
}

.main-navigation .navigation > li.menu-item-about-us > a:hover,
.main-navigation .navigation > li.menu-item-news > a:hover {
    background-color: #002244;
    color: white;
    text-decoration: none;
}

.main-navigation .navigation > li.menu-item-about-us > a::after,
.main-navigation .navigation > li.menu-item-news > a::after {
    display: none; /* 隐藏下划线效果 */
}

/* 下拉菜单样式 */
.main-navigation .navigation li ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    min-width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.main-navigation .navigation li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .navigation li ul li {
    display: block;
    margin: 0;
    padding: 0;
}

.main-navigation .navigation li ul li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-weight: normal;
    transition: all 0.3s ease;
}

.main-navigation .navigation li ul li a:hover {
    background-color: #f5f5f5;
    color: #0066cc;
    padding-left: 25px;
}

/* 浮动导航样式 */
.site-header.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.3s ease;
    backdrop-filter: blur(10px);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/**
 * 首页横幅样式
 */
.hero-banner {
    height: 500px;
    display: flex;
    align-items: center;
    color: white; /* 保持文字为白色 */
    text-align: center;
    position: relative;
    /* 添加背景图片过渡效果 */
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('images/banner.jpg') center/cover;
    transition: background 0.5s ease-in-out;
    margin-bottom: -10px; /* 减少与下一部分的间距，从30px调整为10px */
    transition: opacity 0.5s ease-in-out; /* 添加淡入淡出过渡效果 */
    background-repeat: no-repeat; /* 防止图片重复 */
    background-position: center; /* 居中显示 */
}

/* 添加横幅内容区域样式 */
.hero-content {
    position: relative;
    top: 30px; /* 下移30px */
    transition: all 0.5s ease-in-out; /* 添加文字过渡效果 */
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: none; /* 保持无文字阴影 */
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: none; /* 保持无文字阴影 */
}

/* 添加左右箭头样式 */
.hero-banner .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.8); /* 添加边框增强可见性 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999; /* 提高z-index确保箭头在最上层 */
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3); /* 将阴影透明度从0.5调整为0.3 */
}

.hero-banner .slider-arrow:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
    border-color: white; /* 悬停时边框更明显 */
}

.hero-banner .slider-arrow.left {
    left: 30px;
}

.hero-banner .slider-arrow.right {
    right: 30px;
}

.hero-banner:hover .slider-arrow {
    opacity: 1;
}

.hero-banner .slider-arrow::before {
    content: "";
    display: inline-block;
    width: 25px;
    height: 25px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.hero-banner .slider-arrow.left::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z'/%3E%3C/svg%3E");
}

.hero-banner .slider-arrow.right::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z'/%3E%3C/svg%3E");
}

/* 动态背景容器 */
.hero-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #0066cc;
    color: white;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}



.btn1{
  color: #007bff;
  text-decoration: none;
  background-color: transparent;
}

.btn:hover {
    background-color: #004c99;
    text-decoration: none;
}

/**
 * 其他页面横幅样式
 */
.page-hero-banner {
    height: 240px; /* 调整为首页横幅的48% (500px * 0.48)，统一所有非首页横幅高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0; /* 确保无顶部外边距 */
    padding: 0; /* 确保无内边距 */
    line-height: 1; /* 保持低行高以减少文字占据的垂直空间 */
}

/* 页面横幅背景容器 */
.page-hero-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        url('images/page-banner.jpg') center/cover;
    z-index: -1;
}

/* 为各个页面设置特定的横幅背景 */
.page-hero-banner.about-banner::before {
    background: 
        url('images/about-banner.jpg') center/cover;
}

.page-hero-banner.contact-banner::before {
    background: 
        url('images/contact-banner.jpg') center/cover;
}

.page-hero-banner.products-banner::before {
    background: 
        url('images/products-banner.jpg') center/cover;
}

.page-hero-banner.news-banner::before {
    background: 
        url('images/news-banner.jpg') center/cover;
}

.page-hero-banner.power-banner::before {
    background: 
        url('images/power-banner.jpg') center/cover;
}

.page-hero-banner.culture-banner::before {
    background: 
        url('images/culture-banner.jpg') center/cover;
}

.page-hero-content h1 {
    font-size: 36px;
    margin-bottom: 0; /* 移除标题下方间距 */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1; /* 减少行高以减少垂直空间 */
}

.page-hero-content p {
    font-size: 18px;
    margin-bottom: 0; /* 移除描述下方间距 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    line-height: 1.2; /* 减少行高以减少垂直空间 */
}

/**
 * 主要内容区域
 */
.main-content {
    padding: 0 0 20px; /* 进一步减少上下内边距 */
    margin-top: 0; /* 移除顶部边距 */
    position: relative; /* 确保定位正确 */
    z-index: 1; /* 确保层级正确 */
}

.section-title {
    text-align: center;
    margin-bottom: 15px; /* 进一步减少标题区域下方间距 */
}

.section-title h2 {
    font-size: 36px;
    color: #003366;
    margin-bottom: 5px; /* 进一步减少标题下方间距 */
}

.section-title p {
    color: #666;
    font-size: 18px;
}

/**
 * 关于我们页面样式
 */
.about-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.sidebar {
    flex: 0 0 250px;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    align-self: flex-start; /* 使侧边栏对齐到容器顶部 */
    position: -webkit-sticky; /* Safari兼容 */
    position: sticky; /* 实现随滚动固定位置的效果 */
    top: 60px; /* 修改为60px */
    z-index: 999; /* 确保层级正确 */
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    border-radius: 4px;
    transition: all 0.3s;
}

.sidebar-menu a:hover,
.sidebar-menu .active a {
    background-color: #0066cc;
    color: white;
    text-decoration: none;
}

.sidebar-menu .active a {
    background-color: #003366;
}

.content {
    flex: 1;
}

.content-header h1 {
    color: #003366;
    margin-bottom: 20px;
    padding-bottom: 10px;
    /* border-bottom: 2px solid #003366; */
}

.content-body {
    line-height: 1.8;
}

.company-intro p,
.culture-vision p,
.history-timeline p,
.honors-intro p {
    margin-bottom: 20px;
}

/**
 * 产品展示区域
 */
.products-section {
    background-color: #f8f9fa;
    padding: 80px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-item {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-item:hover {
    transform: translateY(-10px);
}

.product-image {
    height: 200px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    margin-bottom: 10px;
    color: #003366;
}

.product-info p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

.read-more {
    color: #0066cc;
    font-weight: bold;
}

/**
 * 公司介绍区域
 */
.about-section {
    padding: 50px 0;
    background-color: #fff;
}

.about-wrapper {
    display: -webkit-box; /* 老版本WebKit浏览器 */
    display: -moz-box; /* 老版本Firefox浏览器 */
    display: -ms-flexbox; /* IE10 */
    display: -webkit-flex; /* 新版本WebKit浏览器 */
    display: flex; /* 现代浏览器 */
    gap: 30px;
    -webkit-box-align: start;
    -moz-box-align: start;
    -ms-flex-align: start;
    -webkit-align-items: flex-start;
    align-items: flex-start;
}

.about-content {
    -webkit-box-flex: 0;
    -moz-box-flex: 0;
    -webkit-flex: 0 0 55%;
    -ms-flex: 0 0 55%;
    flex: 0 0 55%;
}

.about-content h2,
.about-content h4 {
    color: #003366;
    text-align: center;  
    border-radius: 5px;
    margin: 0 0 5px 0;
}

.about-content h2 {
    font-size: 36px;
}

.about-content h4 {
    font-size: 20px;
}

.about-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.about-image {
    -webkit-box-flex: 0;
    -moz-box-flex: 0;
    -webkit-flex: 0 0 45%;
    -ms-flex: 0 0 45%;
    flex: 0 0 45%;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    -webkit-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    -moz-box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 响应式设计 - 在小屏幕设备上切换为上下排列 */
@media (max-width: 768px) {
    .about-wrapper {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -moz-box-orient: vertical;
        -moz-box-direction: normal;
        -webkit-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
    }
    
    .about-content,
    .about-image {
        -webkit-box-flex: 0;
        -moz-box-flex: 0;
        -webkit-flex: 0 0 auto;
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
        width: 100%;
    }
    
    .about-image {
        margin-bottom: 30px;
    }
}

/**
 * 新闻动态区域
 */
.news-section {
    background-color: #f8f9fa;
    padding: 80px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-item {
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-date {
    background-color: #003366;
    color: white;
    padding: 15px;
    text-align: center;
}

.news-date .day {
    font-size: 24px;
    font-weight: bold;
    display: block;
}

.news-date .month {
    font-size: 14px;
    color: white;
}

.news-content {
    padding: 20px;
}

.news-content h3 {
    margin-bottom: 10px;
    color: #003366;
}

.news-content p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
}

/**
 * 联系我们表单样式
 */
.contact-form p {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #003366;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

.contact-form input[type="submit"] {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
}

.contact-form input[type="submit"]:hover {
    background-color: #004c99;
}

/**
 * 页脚样式
 */
.site-footer {
    background-color: #003366;
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: #0066cc;
}

.footer-column p,
.footer-column li {
    margin-bottom: 10px;
    color: #ccc;
}

.footer-column ul {
    list-style: none;
}

.footer-column a {
    color: #ccc;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #ccc;
    font-size: 14px;
}

/**
 * 响应式设计
 */
@media (max-width: 768px) {
    .header-top .container {
        flex-direction: column;
        text-align: center;
    }
    
    .main-header {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-box {
        margin-bottom: 15px;
        justify-content: center;
    }
    
    .logo img {
        margin-right: 10px;
    }
    
    .main-navigation {
        margin-top: 15px;
    }
    
    .main-navigation .navigation {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .main-navigation .navigation > li {
        margin: 5px 10px;
        padding: 15px 0;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .page-hero-content h1 {
        font-size: 28px;
    }
    
    .page-hero-content p {
        font-size: 16px;
    }
    
    .about-section {
        flex-direction: column;
    }
    
    .about-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        flex: 0 0 auto;
        position: static; /* 在小屏幕上取消sticky定位 */
    }
    
    .main-content {
        margin-top: 0; /* 在小屏幕上取消顶部边距 */
    }
    
    .page-hero-banner {
        margin-top: 120px; /* 在小屏幕上调整顶部边距 */
        height: 250px; /* 调整高度适配小屏幕 */
    }
}

/**
 * 面包屑导航样式
 */
.breadcrumb {
    background-color: #f8f9fa;
    padding: 2px 15px; /* 进一步减少上下内边距 */
    border-radius: 4px;
    margin: 2px 0; /* 进一步减少上下外边距 */
    font-size: 14px;
    display: block; /* 确保面包屑显示为块级元素 */
    clear: both; /* 清除浮动影响 */
}

.breadcrumb a {
    color: #0066cc;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 客服人员图片样式 */
.customer-support {
    display: flex;
    justify-content: center;
    align-items: center;
}

.customer-support img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.customer-support img:hover {
    transform: scale(1.05);
}
