/* ----------------------------------------------------------------
	Custom CSS

	Add all your Custom Styled CSS here for New Styles or
	Overwriting Default Theme Styles for Better Handling Updates
-----------------------------------------------------------------*/

/* 导航栏悬停和选中颜色 */
.primary-menu .menu-container > .menu-item > .menu-link:hover,
.primary-menu .menu-container > .menu-item.current > .menu-link,
.primary-menu .sub-menu-container .menu-item > .menu-link:hover,
.primary-menu .sub-menu-container .menu-item.current > .menu-link {
    color: #2c8355 !important;
}

.hero-shanfeng {
    position: relative;
    background-image: url("../images/shanfeng.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-shanfeng::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.7);
}

.hero-shanfeng > * {
    position: relative;
    z-index: 1;
}

#gotoContact {
    display: none;
}

@media (max-width: 767.98px) {
    #posts, .posts, .entry::after {
        margin-top: 20px;
    }

    .mobile-two-per-row .portfolio-item {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* 强制分类标题在移动端独占一行 */
    .mobile-two-per-row .portfolio-item.category-header,
    .mobile-two-per-row .portfolio-item.load-more-btn,
    .mobile-two-per-row .portfolio-item.portfolio-mobile-toggle {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* 移动端隐藏元素 */
    .mobile-hidden {
        display: none !important;
    }

    .mobile-two-cols > [class*="col-"] {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }

    .mobile-two-cols .i-plain.i-xlarge {
        font-size: 1.6rem;
    }

    .mobile-two-cols .counter,
    .mobile-two-cols .counter span {
        font-size: 1rem;
    }

    .mobile-two-cols p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .mobile-entry-list .entry {
        display: grid;
        grid-template-columns: 100px 1fr;
        grid-column-gap: 12px;
        align-items: center;
    }

    /* 减少该模块在移动端每条文章的上下间距，保持PC端不变 */
    .mobile-entry-list .col-mb-30 {
        --cnvs-col-mb: 16px;
    }

    .mobile-entry-list .entry-image {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .mobile-entry-list .entry-image img {
        width: 100%;
        height: auto;
    }

    .mobile-entry-list .entry-title {
        grid-column: 2;
        grid-row: 1;
        padding-left: 0;
    }

    .mobile-entry-list .entry-meta {
        grid-column: 2;
        grid-row: 2;
        padding-left: 0;
    }

    #gotoTop {
        --cnvs-gotoTop-size: 2rem;
        --cnvs-gotoTop-icon-size: 1.25rem;
        --cnvs-gotoTop-position-boxed-right: 30px;
        --cnvs-gotoTop-position-boxed-bottom: 50px;
        --cnvs-gotoTop-border-radius: 2px;
    }

    #gotoContact {
        position: fixed;
        right: 30px;
        bottom: 100px;
        width: 2rem;
        height: 2rem;
        line-height: 2rem;
        background-color: rgba(0, 0, 0, 0.3);
        color: #05bc5b;
        text-align: center;
        font-size: 1.25rem;
        border-radius: 999px;
        z-index: 600;
        display: inline-block;
        text-decoration: none;
    }
}

/* 移动端与 iPad 端：指定 about 模块右对齐，PC 端保持不变 */
@media (min-width: 768px) {
    .portfolio-mobile-toggle {
        display: none !important;
    }
}

@media (max-width: 1199.98px) {
    .mobile-right-align .emphasis-title {
        text-align: right;
    }
}

.company-timeline {
    position: relative;
}

.company-timeline::before {
    content: "";
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(0, 0, 0, 0.08);
}

.timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 56px;
    margin-bottom: 2rem;
}

.timeline-dot {
    position: absolute;
    left: 10px;
    top: 0;
    width: 30px;
    height: 30px;
    background: url('../images/chaguo.png') no-repeat center center / contain;
    border-radius: 0;
    box-shadow: none;
}

.timeline-date h4 {
    margin: 0;
    transition: color 0.3s ease;
}

.timeline-date h4:hover {
    color: #015227;
    cursor: default;
}

.timeline-media img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.timeline-media {
    width: 100%;
    max-width: none;
}

.company-timeline .timeline-gallery {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
}

.company-timeline .timeline-media {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.company-timeline .timeline-media::-webkit-scrollbar {
    display: none;
}

.company-timeline .timeline-gallery .grid-item {
    flex: 0 0 auto;
    width: 210px !important;
    height: 145px !important;
    position: relative;
}

.company-timeline .timeline-gallery .grid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.company-timeline .timeline-gallery .grid-item:hover::before {
    opacity: 1;
}

.company-timeline .timeline-gallery .grid-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 767.98px) {
    .company-timeline::before {
        left: 18px;
    }

    .timeline-item {
        padding-left: 48px;
        margin-bottom: 1.25rem;
    }

    .timeline-dot {
        left: 7px;
        width: 24px;
        height: 24px;
    }

    .timeline-date h4 {
        font-size: 1rem;
    }

    .timeline-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .company-timeline .timeline-gallery {
        flex-wrap: nowrap;
    }
}

/* 产品筛选样式调整 */
.grid-filter li a {
    font-size: 18px !important; /* 统一加大字号 */
}

/* 未选中状态额外样式 */
.grid-filter li:not(.activeFilter) a {
    font-weight: 600 !important;
    color: #333 !important;
}

/* 产品列表标题样式 */
.portfolio-desc h5 a {
    color: #333 !important; /* 默认深色 */
    transition: color 0.3s ease;
}

.portfolio-desc h5 a:hover {
    color: var(--cnvs-themecolor) !important; /* 悬停主题绿色 */
}

/* 分类标题图标样式 */
.category-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    vertical-align: middle;
    object-fit: contain;
}

@media (max-width: 767.98px) {
    .category-icon {
        width: 24px;
        height: 24px;
        margin-right: 8px;
    }
}

/* 列表项对齐样式 */
#posts .entry .grid-inner {
    display: flex;
    align-items: center;
}

#posts .entry .entry-image {
    display: flex;
    align-items: center;
    height: 100%;
    margin-bottom: 0;
}

#posts .entry .entry-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

@media (max-width: 768px) {
    #posts .entry .entry-image {
        margin-bottom: 20px;
    }
}


.admin-bar .sticky-header #header-wrap {
    top: 30px;
}


.max-1-lines {
    display: -webkit-box; /* 使用Webkit弹性盒子模型 */
    -webkit-box-orient: vertical; /* 垂直排列子元素 */
    -webkit-line-clamp: 1; /* 限制显示两行 */
    overflow: hidden; /* 隐藏超出内容 */
    text-overflow: ellipsis; /* 使用省略号 */
}

.max-2-lines {
    display: -webkit-box; /* 使用Webkit弹性盒子模型 */
    -webkit-box-orient: vertical; /* 垂直排列子元素 */
    -webkit-line-clamp: 2; /* 限制显示两行 */
    overflow: hidden; /* 隐藏超出内容 */
    text-overflow: ellipsis; /* 使用省略号 */
}

.max-3-lines {
    display: -webkit-box; /* 使用Webkit弹性盒子模型 */
    -webkit-box-orient: vertical; /* 垂直排列子元素 */
    -webkit-line-clamp: 3; /* 限制显示两行 */
    overflow: hidden; /* 隐藏超出内容 */
    text-overflow: ellipsis; /* 使用省略号 */
}

.entry-image .wp-post-image {
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.product-image img {
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.page-title-parallax::after {
    display: block;
    width: 100%;
    height: 100%;
    content: "";
    background: rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}



