/* =========================================================================
 * home.css — 前台首页（1:1 还原原 CmsEasy/Divi 模板首页 index.html）
 * 仅抽取首页真正用到的规则：et_pb 基础布局、slider、heng1/heng2、
 * 产品网格、新闻网格、客户评价、区块标题等。不引入庞大的 min.css。
 * ========================================================================= */

/* ---------- 基础容器 ---------- */
.home-section {
    width: 80%;
    max-width: 1100px;
    margin: 0 auto;
}

/* ---------- 1. 全宽轮播 slider ---------- */
.home-slider {
    position: relative;
    height: 480px;
    overflow: hidden;
    background: #000;
}
.home-slider .slide-item {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    opacity: 0;
    transition: opacity .8s ease;
}
.home-slider .slide-item.active {
    opacity: 1;
}
.lunbo-wenzi {
    position: absolute;
    z-index: 1;
    top: 30%;
    left: 20%;
    width: 60%;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}
.lunbo-wenzi .p1 {
    height: 65px;
    padding-top: 35px;
    padding-left: 30px;
    background: url('/static/cms/images/apostrof-1.png') no-repeat;
    background-position: -10px 0;
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}
.lunbo-wenzi .p2 {
    font-size: 40px;
    font-weight: bold;
    margin: 30px 0 0;
    line-height: 48px;
}
.slider-arrow {
    position: absolute;
    top: 45%;
    z-index: 2;
    opacity: .8;
}
.slider-arrow:hover { opacity: 1; }
.slider-arrow-left { left: 30px; }
.slider-arrow-right { right: 30px; }
.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}
.slider-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
    margin: 0 5px;
    cursor: pointer;
}
.slider-dots span.on { background: #dc291e; }

/* ---------- 2. heng1：WHAT DO WE CREATE ---------- */
.heng1 {
    width: 80%;
    max-width: 1100px;
    margin: 0 auto;
    margin-top: 80px;
    display: flex;
    align-items: center;
}
.heng1 .l {
    flex: 0 0 25%;
}
.heng1 .l p {
    margin: 0;
    padding: 0;
    font-size: 24px;
}
.heng1 .l .p2 {
    color: #dc291e;
}
.heng1 .shuxian {
    flex: 0 0 5%;
    align-self: stretch;
    border-left: 2px solid #dc291e;
}
.heng1 .r {
    flex: 1 1 auto;
    padding-left: 24px;
    font-size: 15px;
    line-height: 1.9;
    color: #555;
}
.heng1 .r span {
    color: #2e7d32;
}
.heng1 .r a {
    color: #e2001a;
    font-weight: bold;
}

/* ---------- 3. heng2：公司简介 + 视频 ---------- */
.heng2 {
    width: 80%;
    max-width: 1100px;
    margin: 0 auto;
    margin-top: 100px;
    overflow: auto;
    padding-bottom: 30px;
}
.heng2 .l {
    width: 55%;
    float: left;
}
.heng2 .l .p1 {
    position: relative;
    z-index: 1;
    height: 65px;
    display: flex;
    align-items: center;
    padding-top: 0;
    padding-left: 25px;
    color: #8a8a8a;
    margin: 0;
    background: none;
}
.heng2 .l .p1::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 24px;
    height: 45px;
    background: #dc291e;
    transform: skewX(-15deg);
    /* 锚点改到左下角：斜出的部分落在容器内，避免被 .heng2 的 overflow 裁掉，
       左边缘不再是垂直线 → 呈现完整平行四边形 */
    transform-origin: left bottom;
    z-index: -1;
}
.heng2 .l .p2 {
    font-size: 28px;
    font-weight: bold;
    height: 60px;
    padding-left: 30px;
    margin-top: 20px;
    color: #222;
}
.heng2 .l .p3 {
    padding-left: 30px;
    padding-right: 60px;
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.9;
    color: #555;
}
.heng2 .l .p4 {
    overflow: auto;
}
.heng2 .l .p4 a {
    display: block;
    width: 100px;
    height: 30px;
    border-bottom: 2px solid #e2001a;
    float: right;
    margin-top: 20px;
    color: #000;
    font-weight: bold;
    text-decoration: none;
}
.heng2 .l .p4 a:hover {
    color: #e2001a;
}
.heng2 .r {
    width: 45%;
    float: right;
}
.heng2 .r .tu {
    padding-left: 50px;
}
.heng2 .r .tu img {
    max-width: 100%;
    height: auto;
}

/* ---------- 4. 公司简介 + 核心产品网格 ---------- */
.company-intro {
    margin: 50px 0 30px;
}
.company-intro h1 {
    font-size: 24px;
    text-align: justify;
    color: #222;
    margin: 0;
    line-height: 1.4;
}
.company-intro h1::after {
    content: '';
    display: block;
    width: 56px;
    height: 3px;
    background: #dc291e;
    margin: 18px 0 24px;
}
.company-intro p {
    font-size: 15px;
    line-height: 1.9;
    color: #555;
    text-align: justify;
    margin: 0;
}
.company-intro--bottom {
    margin-top: 40px;
}
.reliability-title {
    text-align: center;
    font-size: 22px;
    padding: 50px 0 25px;
    color: #222;
    font-weight: normal;
}
.reliability-title .slash {
    color: #dc291e;
}

.seco-products {
    color: #000;
    width: 100%;
}
.seco-products__list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
}
.seco-products__list__item {
    /* 原 min-width/max-width 死写 185px，导致 5 个块封顶 5×185=925px，
       而父块 .home-section 宽屏为 1100px，右侧空一截且中间尺寸会溢出。
       改为随父块等分伸缩，保证 5 块铺满父块。 */
    flex: 1;
    min-width: 0;
}
.seco-products__list__item:nth-child(even) .seco-product {
    background-color: #343434;
    color: #fff;
}
.seco-products__list__item:nth-child(odd) .seco-product {
    background-color: #1C1B1B;
    color: #fff;
}
.seco-products__list__item__container {
    position: relative;
    width: 100%;
    padding-top: 200%; /* 1:2 瘦高比例，还原原站 */
}
.seco-product {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}
.seco-product__poster {
    width: 100%;
    height: 50%;
    overflow: hidden;
}
.seco-product__poster > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.seco-product__info {
    text-align: center;
    width: 100%;
    height: 50%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem .75rem .75rem;
    box-sizing: border-box;
}
.seco-product__info__title {
    font-size: 24px;
    font-weight: bold;
    flex: 3;
}
.seco-product-info {
    display: none; /* 默认隐藏，还原原站 disable-animation 行为（描述悬停展开面板） */
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}
.seco-product-info__wrapper {
    background-color: #343434;
    color: #fff;
    padding: 2rem;
    text-align: center;
    height: 100%;
    box-sizing: border-box;
}
.seco-product-info__wrapper__content__title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 2rem;
}
.seco-product-info__wrapper__content__button {
    margin-top: 2rem;
}
.seco-button {
    display: block;
    margin: 0 auto 20px;
    width: 95px;
    height: 28px;
    line-height: 28px;
    font-size: 14px;
    background: #e60012;
    color: #fff;
    text-align: center;
    text-decoration: none;
    transform: skew(-20deg);
}
.seco-button:hover {
    color: #fff;
}
.seco-button__text {
    display: inline-block;
    transform: skew(20deg);
}

/* ---------- 5. 区块标题（红色斜杠） ---------- */
.seco-title {
    font-size: 26px;
    margin: 50px 0 24px;
    color: #222;
    font-weight: bold;
}
.seco-title .slash {
    color: #dc291e;
}

/* ---------- 5/6. 通用横向轮播 ---------- */
.carousel {
    position: relative;
    display: flex;
    align-items: center;
}
.carousel-viewport {
    overflow: hidden;
    flex: 1 1 auto;
    width: 100%;
}
.carousel-track {
    display: flex;
    gap: 24px;
    transition: transform .45s ease;
    will-change: transform;
}
.carousel-arrow {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 1px solid #ddd;
    background: #fff;
    color: #dc291e;
    font-size: 20px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 8px;
    transition: background .2s, color .2s, border-color .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.carousel-arrow:hover {
    background: #dc291e;
    color: #fff;
    border-color: #dc291e;
}
/* 公司新闻轮播箭头：红色矩形（覆盖通用圆按钮） */
.news-carousel .carousel-arrow {
    border-radius: 0;
    background: #dc291e;
    color: #fff;
    border-color: #dc291e;
}
.news-carousel .carousel-arrow:hover {
    background: #b30015;
    border-color: #b30015;
}

/* 公司新闻卡片 */
/* 公司新闻区（横屏贯穿浅灰底，内容限宽，对应原站浅色区块） */
.news-section {
    width: 100%;
    max-width: 100%;
    margin: 30px 0 0;
    padding: 50px 0;
    background: #fafafa;
    box-sizing: border-box;
}
.news-inner {
    width: 80%;
    max-width: 1100px;
    margin: 0 auto;
}

.news-card {
    flex: 0 0 calc((100% - 48px) / 3);
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    box-sizing: border-box;
}
.news-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.news-card__body {
    padding: 14px;
}
.news-card__title {
    font-size: 16px;
    line-height: 1.5;
    min-height: 48px;
}
.news-card__title a {
    color: #333;
    text-decoration: none;
}
.news-card__title a:hover {
    color: #dc291e;
}
.news-card__date {
    color: #999;
    font-size: 13px;
    margin-top: 8px;
}
.more-link {
    display: inline-block;
    margin-top: 18px;
    color: #dc291e;
    text-decoration: none;
    font-weight: bold;
}

/* 客户评价区（标题在背景带上方、深色背景带横屏贯通，对应原站 et_pb_section_5 + cytaty.jpg） */
.testimonial-section {
    width: 100%;
    max-width: 100%;
    margin: 60px 0 0;
}
.testimonial-head {
    width: 80%;
    max-width: 1100px;
    margin: 0 auto 18px;
}
.testimonial-head .seco-title {
    margin: 0;
    color: #222;
}
.testimonial-bg {
    width: 100%;
    padding: 50px 0;
    overflow: hidden;
    background: linear-gradient(rgba(20,20,20,.3), rgba(20,20,20,.3)),
                url(/static/cms/images/cytaty.jpg) center center / cover no-repeat;
}
.testimonial-inner {
    width: 80%;
    max-width: 1100px;
    margin: 0 auto;
}
.testimonial-card {
    flex: 0 0 calc((100% - 48px) / 3);
    background: rgba(255, 255, 255, 0.56);
    padding: 26px 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 230px;
}
.testimonial-card .t-content {
    font-style: italic;
    color: #424242;
    font-size: 15px;
    line-height: 1.8;
    flex: 1 1 auto;
}
.testimonial-card .t-quote {
    color: #dc291e;
    font-weight: bold;
}
.testimonial-card .t-by {
    margin-top: 16px;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}
.testimonial-card .t-title {
    font-size: 16px;
    font-weight: bold;
    color: #222;
}
.testimonial-card .t-desc {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

/* ---------- 响应式 ---------- */
@media screen and (max-width: 980px) {
    .seco-products__list { flex-wrap: wrap; justify-content: center; }
    /* 小屏按约 185px 换行居中，避免 5 等分被压得过窄 */
    .seco-products__list__item { flex: 0 1 185px; }
    .news-card,
    .testimonial-card { flex: 0 0 calc((100% - 24px) / 2); }
    .lunbo-wenzi .p2 { font-size: 32px; line-height: 40px; }
}
@media screen and (max-width: 760px) {
    .home-slider { height: 320px; }
    .lunbo-wenzi { top: 8%; left: 10%; width: 80%; }
    .lunbo-wenzi .p1 { font-size: 14px; padding-top: 20px; height: 45px; }
    .lunbo-wenzi .p2 { font-size: 24px; line-height: 32px; margin-top: 14px; }
    .heng1 { margin-top: 40px; flex-direction: column; align-items: flex-start; }
    .heng1 .l,
    .heng1 .r { width: 100%; flex: 1 1 auto; }
    .heng1 .r { padding-left: 0; }
    .heng1 .shuxian { display: none; }
    .heng2 { margin-top: 50px; }
    .heng2 .l,
    .heng2 .r { float: none; width: 100%; }
    .heng2 .r .tu { padding-left: 0; text-align: center; margin-top: 24px; }
    .seco-products__list { justify-content: center; }
    .news-card,
    .testimonial-card { flex: 0 0 100%; }
    .home-section:not(.testimonial-section) { width: 90%; }
    .news-inner { width: 90%; }
    .heng2 .l .p1 { padding-left: 20px; }
    .heng2 .l .p1::before { width: 18px; height: 40px; top: 12px; }
}
