/*
Theme Name: zhzb
Theme URI: https://eark.ca
Author: 一片舟科技
Author URI: https://eark.ca
Description: 广西正海招标有限公司官方网站。如需技术支持，请联系重庆一片舟科技有限公司。
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: zhzb
Tags: custom-logo, custom-menu, post-thumbnails, sidebar-widgets, footer-widgets, bootstrap, responsive-layout
*/

:root {
    /* 主色调（Bootstrap 风格） */
    --primary-color: #5686AE;
    --primary-color-hover: #b20000;

    /* 辅助色 */
    --secondary-color: #6c757d;
    --secondary-color-hover: #5a6268;

    /* 背景色 */
    --body-bg: #f8f9fa;
    --white-bg: #ffffff;
    --dark-bg: #212529;
    --dark-bg-light: #343a40;

    /* 文字颜色 */
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --text-white: #ffffff;
    --text-gray-light: #adb5bd;

    /* 边框/阴影色 */
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-color-deep: rgba(0, 0, 0, 0.15);
}

/* ==============================================
   1. 基础样式重置 & 全局样式
   ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

input,
textarea,
select,
button {
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"] {
    width: 100%;
    height: 44px;
    padding: 0 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    background-color: var(--white-bg);
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="search"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

input[type="text"]:disabled,
input[type="text"][readonly],
input[type="password"]:disabled,
input[type="password"][readonly] {
    background-color: var(--body-bg);
    color: var(--text-secondary);
    cursor: not-allowed;
    border-color: var(--border-color);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="email"]::placeholder {
    color: var(--text-secondary);
    opacity: 1;
}

input[type="radio"],
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    vertical-align: middle;
    cursor: pointer;
}

textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    background-color: var(--white-bg);
    outline: none;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

textarea:disabled,
textarea[readonly] {
    background-color: var(--body-bg);
    color: var(--text-secondary);
    cursor: not-allowed;
    border-color: var(--border-color);
}

textarea::placeholder {
    color: var(--text-secondary);
    opacity: 1;
}

select {
    width: 100%;
    height: 44px;
    padding: 0 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    background-color: var(--white-bg);
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-6-6 1.5-1.5L8 8.5l4.5-4.5L14 5.5l-6 6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
}

select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
}

select:disabled {
    background-color: var(--body-bg);
    color: var(--text-secondary);
    cursor: not-allowed;
    border-color: var(--border-color);
}

/* Search */
.search-button {
    background-color: #000;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
}

input.search-input {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
    border: none;
}

/* Buttons */
button {
    border: none;
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    border-radius: 4px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
}

a {
    color: #0d6efd;
    /* Bootstrap 主色 */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: #0a58ca;
    text-decoration: underline;
}

/* 容器样式（适配 Bootstrap 网格） */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 标题样式 */
h1,
h2,
h3,
h4,
h5,
h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: #212529;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

/* ==============================================
   2. 头部 & Logo 样式
   ============================================== */
.site-header {
    background-color: var(--primary-color);
    padding-top: 20px;
    padding-bottom: 20px;

}

/* Logo 容器 */
.custom-logo-link {
    display: inline-block;
    max-width: 100%;
}

.custom-logo {
    height: auto;
    max-height: 100px;
    /* 匹配 functions.php 中 Logo 最大高度 */
}

/* 站点标题（备用，当未设置 Logo 时显示） */
.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.site-description {
    font-size: 1rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

/* ==============================================
   3. 导航菜单样式
   ============================================== */
/* 主导航 */
.main-navigation {
    background-color: #000;
}

.navbar-nav {
    display: flex;
    list-style: none;
    position: relative;
    margin: 0;
    padding: 0;
	justify-content:space-between;
}

.navbar-nav li {
    position: relative;
    /* 关键：作为二级菜单定位参考 */
}

.navbar-nav li a {
    display: block;
    padding: 1rem 1.5rem;
    font-weight: 500;
    color: var(--text-white);
    text-decoration: none;
    transition: background-color 0.3s ease;
    /* 新增：过渡效果更丝滑 */
}

.navbar-nav li a:hover,
.navbar-nav li.current-menu-item a {
    color: var(--text-white);
    text-decoration: none;
    background-color: var(--primary-color-hover);
}

/* 二级菜单容器 - 核心等高逻辑 */
.navbar-nav li .sub-menu {
    display: none;
    /* 默认隐藏 */
    position: absolute;
    top: 100%;
    /* 定位到一级菜单下方 */
    left: 0;
    min-width: 200px;
    margin: 0;
    padding: 0;
    list-style: none;
    background-color: #000;
    /* 匹配主导航黑色背景 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    /* 轻微阴影提升层级 */
    z-index: 9999;
    /* 防止被遮挡 */
    /* Flex 等高核心 */
    flex-direction: column;
    align-items: stretch;
    /* 强制子元素高度一致 */
}

/* 二级菜单项 - 等高关键 */
.navbar-nav li .sub-menu li {
    flex: 1;
    /* 高度自适应容器 */
}

/* 二级菜单链接 */
.navbar-nav li .sub-menu a {
    padding: 1rem 1.5rem;
    /* 匹配一级菜单内边距 */
    color: var(--text-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* 分隔线增强可读性 */
}

/* 二级菜单链接 hover/激活状态 */
.navbar-nav li .sub-menu a:hover,
.navbar-nav li .sub-menu .current-menu-item a {
    background-color: var(--primary-color-hover);
    color: var(--text-white);
}

/* 鼠标悬停显示二级菜单 */
.navbar-nav li:hover>.sub-menu {
    display: flex;
    /* 显示并启用Flex等高 */
}

/* 三级菜单（可选） */
.navbar-nav li .sub-menu li .sub-menu {
    top: 0;
    left: 100%;
    /* 定位到父菜单右侧 */
}

/* 响应式适配（移动端） */
@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column;
    }

    .navbar-nav li .sub-menu {
        position: static;
        /* 取消绝对定位，改为流式布局 */
        box-shadow: none;
        padding-left: 1rem;
        /* 缩进显示 */
    }
}

/* ==============================================
   首页轮播（home-slider）样式 - 强制高度一致
   ============================================== */
/* 轮播容器：固定高度，所有轮播项继承此高度 */
.home-slider {
    position: relative;
    width: 100%;
    height: 600px;
    /* 统一轮播高度（可根据需求调整） */
    max-height: 100vh;
    /* 防止超出视口高度 */
    overflow: hidden;
    margin: 0 auto;
}

/* 轮播项：强制100%继承容器高度，确保所有项高度一致 */
.home-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100% !important;
    /* 强制高度，覆盖任何内联样式 */
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 0;
    /* 确保轮播项本身不被拉伸 */
    display: block;
}

/* 激活的轮播项 */
.home-slider .slide.active {
    opacity: 1;
    z-index: 1;
}

/* 轮播图片：强制等高，裁剪多余部分，不拉伸 */
.home-slider .slide img {
    width: 100%;
    height: 100% !important;
    /* 强制继承轮播项高度 */
    object-fit: cover !important;
    /* 核心：裁剪适配，保持比例 */
    object-position: center center;
    /* 居中显示图片核心区域 */
    /* 清除WordPress自动添加的内联样式干扰 */
    max-height: none !important;
    aspect-ratio: unset !important;
}

/* 轮播切换按钮 */
.home-slider .slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2;
    pointer-events: none;
}

.home-slider .slider-nav button {
    pointer-events: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.home-slider .slider-nav button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 轮播指示器（小圆点）- 修复拉伸 + 高度一致 */
.home-slider .slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
}

.home-slider .slider-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    line-height: 0;
    font-size: 0;
}

.home-slider .slider-dots button.active {
    background-color: #fff;
    width: 12px;
    height: 12px;
}

/* 响应式适配：不同屏幕保持高度一致 */
@media (max-width: 1200px) {
    .home-slider {
        height: 400px;
        /* 大屏适配，仍保持统一高度 */
    }
}

@media (max-width: 768px) {
    .home-slider {
        height: 300px;
        /* 平板适配 */
    }

    .home-slider .slider-nav button {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .home-slider {
        height: 200px;
        /* 手机适配 */
    }
}

/* 底部导航 */
.footer-nav {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-nav li a {
    color: #adb5bd;
    font-size: 0.9rem;
}

.footer-nav li a:hover {
    color: #ffffff;
}

/* ==============================================
   4. 主内容区域样式
   ============================================== */

/* ==============================================
   面包屑导航（Breadcrumbs）样式
   ============================================== */
.breadcrumbs {
    padding: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background-color: #f7f7f7;
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
    flex-wrap: wrap;
    /* 移动端自动换行 */
}

/* 分隔符样式 */
.breadcrumbs-separator {
    color: var(--border-color);
    font-weight: 300;
    padding: 0 0.25rem;
}

/* 面包屑项样式 */
.breadcrumbs-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* 当前页样式（无链接） */
.breadcrumbs-current {
    color: var(--text-primary);
    font-weight: 500;
    cursor: default;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .breadcrumbs {
        padding: 0.75rem 0;
        margin: 0 0 1.5rem;
        font-size: 0.85rem;
    }
}

/* 侧边栏导航 */
aside {
    border-right: 1px solid #eaeaea;
}

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

.nav-item a {
    padding: 1rem;
    display: block;
}

.nav-item.current-page a {
    border-left: 6px solid var(--primary-color);
    background-color: #f7f7f7;
}

.content-area {
    padding: 1rem;
}

/* 首页 */
.homepage-title{
    text-align: center;
    margin-top:4rem;
    margin-bottom:4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.homepage-title::after{
    content: url("include/images/tit_bg.png");
}
.newslist-container{
    margin-bottom:2rem;
}
.newslist-title{
    background: url("include/images/zh_tit_bg.png") no-repeat bottom left;
    height: 40px;
    display:flex;
    justify-content: space-between;
    align-items: center;
}
.newslist-title h3{
    margin-left: 2.4rem;
    font-size: 22px;
    margin-bottom: .6rem;
    color:#495057;
}
.newslist{
    margin: 10px 0;
}
.newslist li{
    line-height: 37px;
    background: url(include/images/jw_dot.jpg) no-repeat 5px;
    padding-left: 18px;
    border-bottom: 0px dashed #dddddd;
    display: flex;
    justify-content: space-between;
    align-items:top;
    gap:1rem;
}
.newslist li p{
    color: #495057;
    white-space: nowrap;
}
.newslist li a{
    color:#333;
}
.newslist li a:hover{
    background: #F3F7FA;
}
.newslist-left{
    width: 100%;
    height: 100%;
	background-repeat:no-repeat;
	background-size:cover;
	min-height:245px;
}
.newslist-left.one{
    background-image:url(include/images/zh_r1_c1.jpg);
}
.newslist-left.two{
    background-image:url(include/images/zh_r3_c1.jpg);
}
.newslist-left.three{
    background-image:url(include/images/zh_r5_c1.jpg);
}
.newslist-left.four{
    background-image:url(include/images/zh_r7_c1.jpg);
}
.homepage-about{
    background: url(include/images/z_bg.png) no-repeat center #f8f8f8;
    border-top: 1px solid #DDD;
    border-bottom: 1px solid #DDD;
    padding-bottom:2rem;
}
.homepage-links{
    background-color:#f8f8f8;
      border-top: 1px solid #DDD;
    border-bottom: 1px solid #DDD;
    padding-bottom:2rem;
    margin-top:2rem;
}
.us_ico{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom:1rem;
}
.us_ico div{
    text-align: center;
}
.us_ico p{
    color:#495057;
    font-weight: bold;
}
.homepage-intro{
    color:#5a6268;
    line-height: 35px;
    margin-bottom:1rem;
}
.us_phone{
    border-left: 3px solid #333;
height: 30px;
padding-left: 10px;
font-size: 28px;
font-weight: bold;
line-height: 30px;
}
.zh_link{
width: 1200px;
margin: 0 auto;
display: grid;
justify-content: center;
flex-wrap: wrap;
grid-template-columns: 1fr 1fr 1fr;
}
.zh_link a{
	margin: 10px 18px;
	border: 1px solid #ddd;
	height:50px;
}
.zh_link img{
	width:100%;
	height:50px;
	object-fit:cover;
}
/* 文章样式 */
.post-title {
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.posts-list article {
    padding: 2rem;
    background-color: #f7f7f7;
    border-bottom: 1px solid #eaeaea;
}

.posts-list article:last-child {
    border-bottom: none;
}

.posts-list .publish-time {
    margin-bottom: 1rem;
    display: block;
    color: #8e8e8e;
}
.posts-list .post-read-more{
    margin-top:1rem;
}
.posts-list article:hover{
    background-color:#fffee5;
}

.post-meta {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
    text-align: center;
}

.post-excerpt {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-primary);
    /* 核心：强制显示5行，超出隐藏 */
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-all;
    /* 中文换行友好 */
    margin-bottom: 1rem;
}

/* 移动端适配（可选：减少为4行） */
@media (max-width: 768px) {
    .post-excerpt {
        -webkit-line-clamp: 4;
        font-size: 0.95rem;
    }
}

/* 内容展示 */
.entry-content p {
    margin-bottom: 1rem;
    text-indent: 25pt;
}
.entry-content img {
    max-width: 100%;
    height: auto;
    border: none;
    padding: 0;
    margin: 1.5rem auto;
    transition: all 0.3s ease;
    object-fit: cover;
}
.entry-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.entry-content .alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}
.entry-content .alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}
.entry-content .wp-caption-text {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-top: 0.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.entry-content figure{
	max-width:100%;
}
.entry-content:after {
    content: "";
    display: table;
    clear: both;
}
.entry-content table{
	width:100%;
	border-collapse:collapse;
	margin-bottom:1rem;
	border:1px solid #ddd;
}
.entry-content table tr td{
	padding:10px;
	border: 1px solid #ddd;
	color: #666;
}
.entry-content table tr:nth-child(even) {
	background-color: #fafafa;
}
.entry-content table tr:hover {
	background-color: #f9f9f9;
	cursor: default;
}

/* 文章缩略图 */
.post-thumbnail {
    margin-bottom: 1rem;
}

.post-thumbnail img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}



/* ==============================================
   5. 小工具（Widget）样式
   ============================================== */
.widget {
    background-color: #ffffff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0d6efd;
}

/* 侧边栏小工具 */
.sidebar-1 .widget {
    margin-bottom: 2rem;
}

/* 底部小工具 */
.footer-left,
.footer-right {
    color: #ffffff;
}

.footer-left .widget,
.footer-right .widget {
    background-color: #212529;
    color: #adb5bd;
}

.footer-left .widget-title,
.footer-right .widget-title {
    color: #ffffff;
    border-bottom-color: #495057;
}

/* ==============================================
   6. 底部区域样式
   ============================================== */
.site-footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 2rem 0;
    margin-top: 2rem;
}

.copyright-section {
    background-color: #333;
    padding: 1rem 0;
}

.footer-copyright {
    text-align: center;
    font-size: 0.9rem;
    color: #fff;
}

/* ==============================================
   7. 响应式适配
   ============================================== */
@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .site-main {
        padding: 1rem 0;
    }

    .post {
        padding: 1rem;
    }
}