/* ============================================
   demo.css - 首页样式（移动端适配版）
   ============================================ */

/* ===== 轮播容器 ===== */
#container {
    width: 100%;
    height: 500px;
    margin: 0 auto;
    padding: 0;
    margin-top: 120px;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

#container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#container .cell,
#container .carousel-cell,
#container .slide {
    width: 100%;
    height: 100%;
    float: left;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== 公司简介 ===== */
#introduction {
    min-height: auto;
    padding: 40px 0;
}

.company-intro {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
    text-align: center;
}

.company-intro .en-title {
    font-size: 14px;
    letter-spacing: 6px;
    color: #b8860b;
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.company-intro .zh-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 24px;
    letter-spacing: 4px;
    position: relative;
}

.company-intro .zh-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #b8860b;
    margin: 12px auto 0;
}

.company-intro .desc {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.company-intro .slogan {
    font-size: 18px;
    font-weight: 600;
    color: #b8860b;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #f0e8d8;
    letter-spacing: 2px;
    line-height: 1.8;
}

/* ===== 背景图区域 ===== */
.tmbeij {
    margin-top: 60px;
    margin-bottom: 60px;
    padding: 60px 20px;
    background-image: url('../image/baiwei.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* 移除 fixed，移动端不支持 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.tmbeij::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.text-wrap {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #ffffff;
    padding: 0 20px;
    margin-bottom: 40px;
    margin-top: 60px;
}

.text-wrap h2 {
    font-size: 42px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 16px;
}

.text-wrap p {
    font-size: 20px;
    letter-spacing: 2px;
}

/* ===== 淡入动画 ===== */
.fade-item {
    opacity: 0;
    transition: all 0.8s ease;
    margin-bottom: 16px;
}

.fade-item:nth-child(even) {
    transform: translateX(-60px);
}

.fade-item:nth-child(odd) {
    transform: translateX(60px);
}

.fade-item.show {
    opacity: 1;
    transform: translateX(0px);
}

/* ===== 业务服务区 ===== */
.service-section {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 50px;
    background-color: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 3;
    margin-top: 150px;
}

.main-title {
    font-size: 36px;
    color: #222e3e;
    font-weight: 600;
    margin-bottom: 24px;
}

.desc-text {
    font-size: 20px;
    color: #4a5a6b;
    line-height: 1.8;
    margin-bottom: 40px;
}

.block-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 20px;
}

.hover-item {
    position: relative;
    padding: 22px 10px;
    text-align: center;
    background: #ffffff;
    border: 1px solid #e7ebf1;
    border-radius: 16px;
    cursor: pointer;
    transition: 0.3s ease;
}

.hover-item:hover {
    border-color: #222e3e;
    box-shadow: 0 6px 20px rgba(34, 46, 62, 0.12);
    transform: translateY(-3px);
}

.hover-item h4 {
    font-size: 18px;
    color: #222e3e;
}

.pop-tip {
    visibility: hidden;
    opacity: 0;
    width: 330px;
    background-color: #222e3e;
    color: #fff;
    text-align: left;
    border-radius: 10px;
    padding: 18px;
    position: absolute;
    z-index: 999;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.3s;
    font-size: 15px;
    line-height: 1.7;
}

.hover-item:hover .pop-tip {
    visibility: visible;
    opacity: 1;
}

/* ===== 案例展示 ===== */
.case-show-section {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
}

.case-title {
    font-size: 36px;
    color: #222e3e;
    font-weight: 600;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.case-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: #b8860b;
    margin: 12px auto 0;
}

/* ===== 3D场景容器 ===== */
.scene-wrap {
    width: 100%;
    height: 420px;
    position: relative;
    perspective: 1200px;
    overflow: hidden;
}

.carousel-3d {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transform-style: preserve-3d;
    animation: rotateCarousel 24s linear infinite;
}

.scene-wrap:hover .carousel-3d {
    animation-play-state: paused;
}

/* ===== 案例卡片 ===== */
.case-card {
    position: absolute;
    width: 260px;
    height: 340px;
    left: 50%;
    top: 50%;
    margin-left: -130px;
    margin-top: -170px;
    cursor: pointer;
}

.case-card-inner {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transition: all 0.35s ease;
}

.case-card-inner:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
}

.case-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.case-info {
    padding: 16px;
    text-align: center;
}

.case-info h3 {
    font-size: 18px;
    color: #222e3e;
    margin-bottom: 8px;
}

.case-info p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.case-card a {
    text-decoration: none;
}

/* ===== 3D旋转动画 ===== */
@keyframes rotateCarousel {
    0% {
        transform: translate(-50%, -50%) rotateY(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateY(360deg);
    }
}

/* ===== 卡片分布 ===== */
.case-card:nth-child(1) {
    transform: rotateY(0deg) translateZ(450px);
}

.case-card:nth-child(2) {
    transform: rotateY(60deg) translateZ(450px);
}

.case-card:nth-child(3) {
    transform: rotateY(120deg) translateZ(450px);
}

.case-card:nth-child(4) {
    transform: rotateY(180deg) translateZ(450px);
}

.case-card:nth-child(5) {
    transform: rotateY(240deg) translateZ(450px);
}

.case-card:nth-child(6) {
    transform: rotateY(300deg) translateZ(450px);
}

.case-card:nth-child(7) {
    transform: rotateY(360deg) translateZ(450px);
}

.case-card:nth-child(8) {
    transform: rotateY(420deg) translateZ(450px);
}

/* ==========================================
   📱 移动端适配
   ========================================== */

/* ===== 平板（992px 以下） ===== */
@media (max-width: 992px) {
    .scene-wrap {
        height: 380px;
    }

    .case-card {
        width: 220px;
        height: 300px;
        margin-left: -110px;
        margin-top: -150px;
    }

    .case-card img {
        height: 150px;
    }

    .case-card:nth-child(1) {
        transform: rotateY(0deg) translateZ(420px);
    }

    .case-card:nth-child(2) {
        transform: rotateY(60deg) translateZ(420px);
    }

    .case-card:nth-child(3) {
        transform: rotateY(120deg) translateZ(420px);
    }

    .case-card:nth-child(4) {
        transform: rotateY(180deg) translateZ(420px);
    }

    .case-card:nth-child(5) {
        transform: rotateY(240deg) translateZ(420px);
    }

    .case-card:nth-child(6) {
        transform: rotateY(300deg) translateZ(420px);
    }

    .case-card:nth-child(7) {
        transform: rotateY(360deg) translateZ(450px);
    }

    .case-card:nth-child(8) {
        transform: rotateY(420deg) translateZ(450px);
    }
}

/* ===== 手机（768px 以下） ===== */
@media (max-width: 768px) {

    /* 轮播图 */
    #container {
        height: 300px;
        margin-top: 60px;
    }

    /* 简介 */
    .company-intro {
        padding: 20px 16px;
    }

    .company-intro .zh-title {
        font-size: 28px;
    }

    .company-intro .desc {
        font-size: 14px;
        line-height: 1.8;
    }

    .company-intro .slogan {
        font-size: 16px;
    }

    /* 背景图 */
    .tmbeij {
        padding: 40px 16px;
        margin-top: 40px;
        margin-bottom: 40px;
    }

    .text-wrap {
        margin-top: 30px;
        margin-bottom: 20px;
    }

    .text-wrap h2 {
        font-size: 28px;
    }

    .text-wrap p {
        font-size: 16px;
    }

    /* 服务区域 */
    .service-section {
        padding: 30px 16px;
        margin-top: 80px;
    }

    .main-title {
        font-size: 24px;
    }

    .desc-text {
        font-size: 16px;
    }

    .block-wrap {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hover-item {
        padding: 16px 8px;
    }

    .hover-item h4 {
        font-size: 15px;
    }

    .pop-tip {
        width: 200px;
        font-size: 13px;
        padding: 14px;
        bottom: 110%;
        left: 50%;
        transform: translateX(-50%);
    }

    /* 案例展示 */
    .case-show-section {
        margin: 40px auto;
        padding: 0 12px;
    }

    .case-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .scene-wrap {
        height: 280px;
        perspective: 600px;
    }

    .case-card {
        width: 140px;
        height: 210px;
        margin-left: -70px;
        margin-top: -105px;
    }

    .case-card img {
        height: 100px;
    }

    .case-info {
        padding: 10px;
    }

    .case-info h3 {
        font-size: 14px;
    }

    .case-info p {
        font-size: 11px;
    }

    .case-card:nth-child(1) {
        transform: rotateY(0deg) translateZ(240px);
    }

    .case-card:nth-child(2) {
        transform: rotateY(60deg) translateZ(240px);
    }

    .case-card:nth-child(3) {
        transform: rotateY(120deg) translateZ(240px);
    }

    .case-card:nth-child(4) {
        transform: rotateY(180deg) translateZ(240px);
    }

    .case-card:nth-child(5) {
        transform: rotateY(240deg) translateZ(240px);
    }

    .case-card:nth-child(6) {
        transform: rotateY(300deg) translateZ(240px);
    }

    /* 隐藏悬停提示（手机上不好用） */
    .hover-item .pop-tip {
        display: none;
    }

    .hover-item:active {
        background: #f0f0f0;
    }
}

/* ===== 小屏手机（480px 以下） ===== */
@media (max-width: 480px) {
    #container {
        height: 220px;
        margin-top: 55px;
    }

    .company-intro .zh-title {
        font-size: 22px;
    }

    .company-intro .desc {
        font-size: 13px;
    }

    .text-wrap h2 {
        font-size: 22px;
    }

    .text-wrap p {
        font-size: 14px;
    }

    .main-title {
        font-size: 20px;
    }

    .desc-text {
        font-size: 14px;
    }

    .block-wrap {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .hover-item h4 {
        font-size: 13px;
    }

    .scene-wrap {
        height: 200px;
        perspective: 400px;
    }

    .case-card {
        width: 100px;
        height: 160px;
        margin-left: -50px;
        margin-top: -80px;
    }

    .case-card img {
        height: 70px;
    }

    .case-info {
        padding: 6px;
    }

    .case-info h3 {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .case-info p {
        font-size: 10px;
    }

    .case-card:nth-child(1) {
        transform: rotateY(0deg) translateZ(170px);
    }

    .case-card:nth-child(2) {
        transform: rotateY(60deg) translateZ(170px);
    }

    .case-card:nth-child(3) {
        transform: rotateY(120deg) translateZ(170px);
    }

    .case-card:nth-child(4) {
        transform: rotateY(180deg) translateZ(170px);
    }

    .case-card:nth-child(5) {
        transform: rotateY(240deg) translateZ(170px);
    }

    .case-card:nth-child(6) {
        transform: rotateY(300deg) translateZ(170px);
    }
}