﻿/* 隐藏整个页面的滚动条 */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
}

    html::-webkit-scrollbar {
        display: none; /* Chrome/Safari/Edge等Webkit浏览器 */
    }

.hero-banner {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.bg-a {
    background-image: url('https://imgs.libvideo.com/yuanlai/ditu_1.jpg');
}

/* 两个背景层重叠 */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
    opacity: 0;
}

    /* 激活层设置为显示 */
    .hero-bg.active {
        opacity: 1;
        z-index: 2;
    }

.hero-overlay {
    top: 26%;
    left: 34%;
    text-align: center;
    z-index: 3;
    padding: 1.5rem;
}

.hero-banner h1,
.hero-banner p {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-banner p {
    margin-top: 1rem;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .hero-overlay {
        top: 26%;
        left: 0%;
    }

        .hero-overlay h1 {
            font-size: 1.75rem;
        }

        .hero-overlay p {
            font-size: 1rem;
        }
}

#section2 {
    background-color: #f8f9fa;
}

    #section2 h2 {
        font-size: 2rem;
    }

    #section2 .card-img-top {
        object-fit: cover;
        width: 300px;
        margin: 0 auto; /* 关键：水平居中 */
        display: block;
    }

@media (max-width: 768px) {
    #section2 h2 {
        font-size: 1.5rem;
    }

    #section2 .card-text {
        font-size: 0.9rem;
    }
}

#section3 {
    background-image: url('https://imgs.libvideo.com/yuanlai/pro_bk.png');
}

.swiper-container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    position: relative;
    padding: 20px 0;
    min-height: 300px;
    overflow: hidden;
}

.swiper-slide {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card {
    min-height: 150px;
    height: 100%;
    border: 1px solid #eee;
    text-align: center;
}

.product-card {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

    .product-card .card-img-box {
        position: relative;
    }

    .product-card img {
        width: 260px;
        height: 210px;
        object-fit: cover;
        transition: transform 0.5s ease;
        display: block;
    }

    .product-card .card-overlay {
        position: absolute;
        bottom: 48px;
        width: 100%;
        background: rgba(0,0,0,0.6);
        color: white;
        padding: 1rem;
        transform: translateY(100%);
        transition: transform 0.4s ease;
        text-align: left;
        font-size: 0.9rem;
    }

.card-title {
    text-align: center;
}

.product-card:hover img {
    transform: scale(1.1);
}

.product-card:hover .card-overlay {
    transform: translateY(48px);
}

@media (max-width: 768px) {
    .product-card img {
        width: 100%;
        height: 100%;
    }

    .product-card .card-overlay {
        bottom: 0;
        transform: translateY(0%) !important;
        position: relative;
        background: rgba(0,0,0,0.7);
    }

    .product-card:hover img {
        transform: scale(1); /* 移动端禁用悬停放大 */
    }
}

/* 默认隐藏箭头 */
.swiper-container .swiper-button-prev,
.swiper-container .swiper-button-next {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 悬停时显示箭头 */
.swiper-container:hover .swiper-button-prev,
.swiper-container:hover .swiper-button-next {
    opacity: 1;
}

/* 样式改为按钮 */
.swiper-button-prev,
.swiper-button-next {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    width: 40px;
    height: 40px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    /* 自定义箭头图标（可选） */
    .swiper-button-prev::after,
    .swiper-button-next::after {
        font-size: 18px;
    }

#section4 {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #333333;
}

.case-redline {
    position: absolute;
    width: 100%;
    height: 10px;
    background-color: red;
    top: 0;
}

.case-swiper-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

/* 三行swiper基础样式 */
.case-swiper-row {
    width: 100%;
    overflow: hidden;
}

    /* 每个slide图片样式 */
    .case-swiper-row .swiper-slide {
        border: 1px solid #555;
        box-sizing: border-box;
    }

    .case-swiper-row img {
        width: 100%;
        height: auto;
        display: block;
    }

/* 保证一行最多7个，自动缩放 */
.swiper-wrapper {
    display: flex;
}

/* swiper 每行最多显示7个 */
@media (min-width: 992px) {
    .case-swiper-row .swiper-slide {
        width: calc((100%) / 7);
    }

        .case-swiper-row .swiper-slide:last-child {
            margin-right: 0;
        }
}

/* 小屏时自动换流动显示（自动宽度） */
@media (max-width: 991px) {
    .case-swiper-row .swiper-slide {
        display: flex;
        width: calc((100%) / 2);
        animation: scrollRow 20s linear infinite;
    }

        .case-swiper-row .swiper-slide:last-child {
            margin-right: 0;
        }

    @keyframes scrollRow {
        from {
            transform: translateX(0);
        }

        to {
            transform: translateX(-100%);
        }
    }
}

.section-contact {
    padding: 4rem 1rem;
    text-align: center;
}

    .section-contact .section-title {
        font-size: 2.5rem;
        font-weight: bold;
        margin-bottom: 3rem;
    }

/* 卡片容器 */
.contact-cards {
    display: flex;
    justify-content: center;
    gap: 6rem;
    flex-wrap: wrap;
    cursor: pointer;
}

/* 单个卡片 */
.contact-card {
    width: 300px;
    aspect-ratio: 1 / 1; /* 正方形 */
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

    .contact-card:hover {
        transform: translateY(-5px);
    }

    /* 图片、标题、文本 */
    .contact-card img {
        width: 60px;
        height: 60px;
        object-fit: contain;
    }

    .contact-card h3 {
        font-size: 1.2rem;
        margin: 1rem 0 0.5rem;
    }

    .contact-card p {
        font-size: 1rem;
        margin: 0;
    }

/* 背景色 */
.bg-red {
    background-color: #F9E0E0;
}

.bg-green {
    background-color: #DDF2F4;
}

.bg-yellow {
    background-color: #EBF3DA;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .contact-cards {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        width: 80%;
    }
}

.card-address {
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

    .card-address .hover-map {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 70%; /* 上半部分 */
        background-color: rgba(0,0,0,0.7);
        z-index: 2;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

        .card-address .hover-map img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

    /* 下方文字整体向下移动一些 */
    .card-address p {
        transition: transform 0.3s ease;
    }

    /* 鼠标悬停时触发 */
    .card-address:hover .hover-map {
        opacity: 1;
    }

    .card-address:hover p {
        transform: translateY(10px);
    }

.card-wechat .qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
}

.card-wechat .qr-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border: 4px solid #fff;
    border-radius: 8px;
}

.card-wechat .qr-label {
    margin-top: 0.5rem;
    font-size: 1rem;
    color: #333;
}

/* 模态框样式 */
.modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 50%;
    max-height: 60%;
    cursor: pointer;
    user-select: none;
}

/* 禁用滚动和点击穿透 */
.no-scroll {
    overflow: hidden;
    width: 100%;
    height: 100%;
}

@media (max-height: 720px) {
    #section2 {
        padding-top: 40px;
    }

    #section3 {
        padding-top: 50px;
    }

    #section4 {
        padding-top: 30px;
    }

    #section5 {
        padding-top: 80px;
    }

    #title-btn {
        margin-bottom: 1rem !important;
    }

    #section5 .contact-card {
        height: 240px;
    }

    .contact-card h3 {
        font-size: 0.95rem;
    }

    .contact-card p {
        font-size: 0.85rem;
    }

    .card-wechat .qr-img {
        width: 60px;
        height: 60px;
    }

    #section2 .card-img-top {
        width: 180px;
    }
}

.swiper-button-disabled {
    pointer-events: auto !important;
    cursor: not-allowed !important;
    color: gray !important;
}
