/* index.css - 首页专用样式 */

/* ========= 容器 ========= */
#container {
    width: 100%;
    overflow-x: hidden;
}

/* ========= Section 1: Banner ========= */
#section1 {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    background: url('https://img.hp-waterjet.com/images/articles/20250825/d7909fc2abd8c5c8b93c4d5d58bc1866.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    color: white;
}

.video-wrapper {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: clamp(1.5rem, 2vw, 3rem);
    font-weight: bold;
    text-align: center;
    text-shadow: 0 0 10px rgba(0,0,0,0.7);
}

.banner-title {
    font-size: clamp(2rem, 4vw, 5rem);
    color: #ff0000;
    margin: 0;
}

.banner-desc {
    font-size: clamp(1rem, 2vw, 2rem);
    color: #fff;
    margin-top: 20px;
}

/* ========= Section 2: Business ========= */
#section2 {
    min-height: 850px;
    background-color: #111;
}

.business-title {
    color: #ff0000;
    font-size: clamp(2rem, 4vw, 5rem);
    text-align: center;
    margin-bottom: 40px;
}

.section2-scope {
    overflow: hidden;
    position: relative;
}

.section2-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.section2-item {
    min-width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.section2-text {
    width: 50%;
    padding: 65px;
}

.section2-text h3 {
    color: #ffffff;
    font-size: clamp(1.5rem, 2vw, 3rem);
    margin: 0;
}

.section2-text p {
    color: #ffffff;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    line-height: 1.8em;
    padding-top: 20px;
    text-indent: 2em;
}

.section2-text a {
    display: inline-block;
    margin-top: 20px;
    float: right;
    color: #ffffff;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
}

/* PC: Business 图片固定 717x538，小图居中 */
.section2-image {
    width: 717px;
    height: 538px;
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin: 0 auto;
}

.section2-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ========= Section 3: Case ========= */
#section3 {
    min-height: 850px;
    background-color: #222;
}

.case-title {
    color: #ff0000;
    font-size: clamp(2rem, 4vw, 5rem);
    margin-bottom: 20px;
}

.case-scope {
    overflow: hidden;
    position: relative;
}

.case-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

/* PC: Case 容器 717x538，小图居中 */
.case-item {
    min-width: 100%;
    display: flex;
    gap: 20px;
    box-sizing: border-box;
}

.case-image {
    width: 717px;
    height: 538px;
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.case-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.case-text {
    padding: 65px;
    flex: 1;
    color: #fff;
}

.case-text h3 {
    font-size: clamp(1.5rem, 2vw, 3rem);
    margin-bottom: 20px;
}

.case-text p {
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    line-height: 1.8em;
    text-indent: 2em;
}

/* ========= Section 4: Device ========= */
#section4 {
    min-height: 850px;
}

.device-scope {
    overflow: hidden;
    position: relative;
}

.device-slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.device-item {
    min-width: 100%;
    display: flex;
    justify-content: center;
    overflow: hidden;
}

.device-text {
    width: 50%;
    padding: 65px;
}

.device-text h3 {
    color: #ffffff;
    font-size: clamp(1.5rem, 2vw, 3rem);
    margin: 0;
}

.device-text p {
    color: #ffffff;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    line-height: 1.8em;
    padding-top: 20px;
    text-indent: 2em;
}

.device-text a {
    display: inline-block;
    margin-top: 20px;
    float: right;
    color: #ffffff;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
}

/* PC: Device 图片固定 717x538，小图居中 */
.device-image {
    width: 717px;
    height: 538px;
    background-color: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin: 0 auto;
}

.device-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ========= Section 5: Passion ========= */
#section5 {
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 547px;
}

.passion-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.passion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.passion-text {
    text-align: center;
    padding: 60px 20px;
    color: #ffffff;
}

.passion-text h2 {
    font-size: clamp(2rem, 4vw, 4.5rem);
    color: #ff0000;
    margin-bottom: 30px;
}

.passion-text p {
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    line-height: 1.8em;
    max-width: 960px;
    margin: 0 auto;
    text-indent: 2em;
}

/* ========= Section 6: News ========= */
#section6 {
    background-color: #111;
    padding: 60px 20px;
    box-sizing: border-box;
}

.news-title {
    color: #ff0000;
    font-size: clamp(2rem, 3vw, 4rem);
    text-align: center;
    margin-bottom: 40px;
}

.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-rows: 1fr;
    gap: 20px;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
}

.news-card {
    background-color: #222;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    border: 1px solid rgba(255,255,255,0.05);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.5);
    background-color: #2a2a2a;
}

.news-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.news-image {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-text {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.news-date {
    font-size: clamp(0.8rem, 1vw, 1rem);
    color: #bbbbbb;
    margin-bottom: 5px;
    font-weight: 500;
}

.news-heading {
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.news-desc {
    font-size: clamp(0.9rem, 1vw, 1.2rem);
    color: #ddd;
    line-height: 1.5em;
    text-indent: 2em;
    overflow: hidden;
}

.news-more-wrapper {
    margin-top: 20px;
    text-align: center;
}

.news-more {
    display: inline-block;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    padding: 12px 30px;
    background-color: #ff0000;
    color: #ffffff;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.news-more:hover {
    background-color: #cc0000;
}

/* ========= 场动画 ========= */
.animate-fade-in {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.animate-fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* ========= Dots ========= */
.case-dots,
.section2-dots,
.device-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.case-dots span,
.section2-dots span,
.device-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
}

.case-dots span.active,
.section2-dots span.active,
.device-dots span.active {
    background-color: #ff0000;
}

/* ========= 移动端覆盖 ========= */
@media (max-width: 1200px) {
    .section2-item,
    .device-item,
    #section3 .case-item {
        flex-direction: column;
        align-items: center;
    }

    .section2-text,
    .device-text,
    #section3 .case-text {
        width: 100%;
        padding: 20px;
        margin-bottom: 10px;
        text-align: center;
    }

    .section2-image,
    .device-image {
        width: 370px;
        height: 230px;
        margin-bottom: 20px;
    }

    .section2-image img,
    .device-image img,
    #section3 .case-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    #section3 .case-image {
        width: 370px;
        height: 230px;
        margin-bottom: 20px;
    }

    #section5 {
        min-height: auto;
    }

    .passion-image img {
        object-fit: cover;
        object-position: center center;
    }
}

/* ========= 新闻板块小屏微调 ========= */
@media (max-width: 992px) {
    .news-more {
        font-size: clamp(0.9rem, 2vw, 1.2rem);
        padding: 10px 20px;
    }
}

@media (max-width: 768px) {
    
    #section2 {
        min-height: auto;
    }
    .news-list {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .news-title {
        font-size: clamp(1.2rem, 4vw, 2rem);
    }

    .news-heading {
        font-size: clamp(0.8rem, 3vw, 1rem);
    }

    .news-desc {
        font-size: clamp(0.7rem, 2vw, 0.9rem);
        line-height: 1.2em;
    }

    .news-more {
        font-size: clamp(0.8rem, 2vw, 1rem);
        padding: 8px 16px;
    }
}

/* ========= 超小屏增强 ========= */
@media (max-width: 576px) {
    .news-text {
        padding: 10px;
    }

    .news-heading,
    .news-desc {
        line-height: 1.2em;
    }
}
