/* =========================================
   Fuli Page - 福利待遇页面样式
   ========================================= */

/* Header 样式与 index.html 保持一致 - 使用 styles.css 中的样式 */

/* Hero Section - 福利待遇 */
.fuli-hero {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
}

.fuli-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/fuli_top_bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.fuli-hero-container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 302px;
}

.fuli-hero-title {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 64px;
    font-weight: 700;
    line-height: 1.5em;
    color: #F8F8F8;
    margin-bottom: 32px;
}

.fuli-hero-desc {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.2em;
    color: rgba(255, 255, 255, 0.8);
    max-width: 576px;
}

/* Company Benefits Section - 公司福利 */
.company-benefits {
    background: #FCFCFC;
    padding: 86px 0 100px;
    min-height: 746px;
    width: 100%;
    overflow-x: hidden; /* 防止横向滚动 */
}

.benefits-container {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* 整体水平居中 */
}

.benefits-title {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 48px;
    font-weight: 500;
    line-height: 1.4em;
    color: #111111;
    margin-bottom: 0;
    position: relative;
    padding-bottom: 21px; /* 174 - 86 - 67 = 21px (从标题底部到线的距离) */
    margin-top: 0;
    width: 1496px; /* 内容区域总宽度：1708 - 212 = 1496px (从第一个卡片左边缘到最后一个卡片右边缘) */
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 90px; /* 302 - 212 = 90px (标题相对于内容区域左边缘的偏移) */
}

.benefits-title::after {
    content: '';
    position: absolute;
    left: 90px; /* 302 - 212 = 90px (相对于内容区域左边缘) */
    bottom: 0;
    width: 96px;
    height: 1px;
    background: #3B3B3B;
    opacity: 0.6;
}

.benefits-line {
    display: none; /* 使用 ::after 伪元素实现 */
}

.benefits-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0;
    margin-top: 107px; /* 281 - 174 = 107px (从线底部到第一个卡片顶部) */
    width: 1496px; /* 内容区域总宽度：1708 - 212 = 1496px */
    max-width: 100%;
    box-sizing: border-box;
}

/* 根据 Figma 精确布局：
   社会保险: x:212, y:281, width:300, height:257
   交通补贴: x:511, y:286, width:300, height:188
   休假制度: x:810, y:281, width:300, height:225
   工作制度: x:1109, y:285, width:300, height:221
   其他: x:1408, y:283, width:300, height:223
   
   卡片间距计算（从左边缘到左边缘）：
   - 社会保险到交通补贴: 511 - 212 = 299px
   - 交通补贴到休假制度: 810 - 511 = 299px
   - 休假制度到工作制度: 1109 - 810 = 299px
   - 工作制度到其他: 1408 - 1109 = 299px
   
   每个卡片宽度300px，所以卡片之间的实际间距为 299 - 300 = -1px（几乎重叠）
   最后一个卡片的右边缘: 1408 + 300 = 1708px
   容器总宽度1920px，所以右侧剩余空间: 1920 - 1708 = 212px
*/

.benefit-card {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    margin-right: -1px; /* 根据计算，卡片几乎重叠，间距为-1px */
}

.benefit-icon {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px; /* 83 - 58.8 = 24.2px，约24px (从图标底部到标题顶部的距离) */
    height: 58.8px; /* 根据 Figma 图标高度 */
    min-height: 58.8px;
}

.benefit-icon img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 58.8px;
}

/* PC端：除第一个图片外，其他图片高度设为51px */
@media (min-width: 769px) {
    .benefit-card:nth-child(n+2) .benefit-icon img {
        max-height: 51px;
        height: 51px;
    }
}

.benefit-content {
    width: 100%;
}

.benefit-title {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 24px;
    font-weight: 500;
    line-height: 1.25em;
    color: #1A1A1A;
    margin-bottom: 21px; /* 从标题底部到列表顶部的距离，根据 Figma 计算 */
    margin-top: 0;
    text-align: center;
    height: 30px; /* 根据 Figma height:30 */
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.benefit-list li {
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 2em; /* 根据 Figma desktop-ch/desc-16-regular */
    color: #1A1A1A;
    opacity: 0.6;
    margin-bottom: 0;
}

/* 响应式适配 (1440px) */
@media (min-width: 769px) and (max-width: 1440px) {
    .fuli-hero {
        height: 480px;
    }

    .fuli-hero-container {
        padding: 0 80px;
    }

    .fuli-hero-title {
        font-size: 54px;
        margin-bottom: 24px;
    }

    .fuli-hero-desc {
        font-size: 20px;
        max-width: 500px;
    }

    .company-benefits {
        padding: 60px 0 80px;
        min-height: 650px;
        overflow-x: hidden;
    }

    .benefits-container {
        padding: 0;
        max-width: 1440px;
        align-items: center; /* 保持水平居中 */
    }

    .benefits-title {
        font-size: 40px;
        padding-bottom: 18px;
        padding-left: 0;
        width: 100%;
        max-width: 1200px;
        text-align: left;
    }

    .benefits-title::after {
        left: 0;
        width: 70px;
    }

    .benefits-grid {
        margin-top: 80px;
        padding-left: 0;
        padding-right: 0;
        gap: 15px;
        justify-content: center;
        flex-wrap: wrap;
        overflow-x: visible;
        width: 100%;
        max-width: 1200px;
    }

    .benefit-card {
        width: calc((100% - 60px) / 5); /* 5个卡片，减去gap总和 */
        max-width: 240px;
        min-width: 180px;
        margin-right: 0;
        margin-bottom: 40px;
    }

    .benefit-icon {
        height: 50px;
        margin-bottom: 20px;
    }

    .benefit-title {
        font-size: 20px;
        margin-bottom: 16px;
        height: 26px;
    }

    .benefit-list li {
        font-size: 14px;
    }
}

/* 1920px 到 1440px 之间的流体适配 */
@media (min-width: 1450px) and (max-width: 1910px) {
    .benefits-container {
        max-width: 100vw;
        align-items: center; /* 保持水平居中 */
    }

    .benefits-title {
        font-size: calc(40px + (48px - 40px) * ((1920px - 100vw) / (1920px - 1440px)));
        width: calc(1200px + (1496px - 1200px) * ((1920px - 100vw) / (1920px - 1440px)));
        max-width: 100%;
        padding-left: calc(0px + (90px - 0px) * ((1920px - 100vw) / (1920px - 1440px)));
    }

    .benefits-title::after {
        left: calc(0px + (90px - 0px) * ((1920px - 100vw) / (1920px - 1440px)));
        width: calc(70px + (96px - 70px) * ((1920px - 100vw) / (1920px - 1440px)));
    }

    .benefits-grid {
        margin-top: calc(80px + (107px - 80px) * ((1920px - 100vw) / (1920px - 1440px)));
        width: calc(1200px + (1496px - 1200px) * ((1920px - 100vw) / (1920px - 1440px)));
        max-width: 100%;
        gap: calc(15px + (-1px - 15px) * ((1920px - 100vw) / (1920px - 1440px)));
    }

    .benefit-card {
        width: calc(200px + (300px - 200px) * ((1920px - 100vw) / (1920px - 1440px)));
        margin-right: calc(0px + (-1px - 0px) * ((1920px - 100vw) / (1920px - 1440px)));
    }
}

/* =========================================
   多语言支持样式 - 福利待遇页面
   ========================================= */

/* 福利卡片标题：使用 min-height 替代固定 height */
.benefit-title {
    height: auto;
    min-height: 30px;
}

/* 福利列表项：允许换行 */
.benefit-list li {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal; /* 严禁单词断行，确保在空格处换行 */
    white-space: normal;
}

/* 多语言差异化排版 */
:lang(en) .benefit-title {
    min-height: 2em;
}

:lang(en) .benefit-list li {
    line-height: 1.6;
}

:lang(ja) .benefit-list li {
    line-height: 2;
}

/* 福利卡片容器：自适应高度 */
.benefit-card {
    min-height: auto;
    height: auto;
}

.benefit-content {
    min-height: auto;
    height: auto;
}

/* =========================================
   Fuli Page - 移动端适配 (768px以下)
   严格按照Figma设计稿还原
   ========================================= */
@media (max-width: 768px) {
    /* Hero Section - 移动端 */
    .fuli-hero {
        height: 296px; /* 按照Figma设计稿精确高度 */
        padding-top: 60px; /* 为固定header留出空间 */
    }
    
    .fuli-hero-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url('../images/fuli_top_bg.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    .fuli-hero-container {
        position: relative;
        z-index: 2;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 0;
        margin: 0 auto;
        max-width: 390px;
    }
    
    .fuli-hero-title {
        font-family: 'Noto Sans SC', sans-serif;
        font-size: 30px; /* 按照Figma设计稿精确字体大小 */
        font-weight: 700; /* 按照Figma设计稿精确字重 */
        line-height: 1.2em; /* 按照Figma设计稿精确行高 */
        color: #FFFFFF; /* 按照Figma设计稿精确颜色 */
        margin: 0;
        margin-top: 52px; /* y:112 - 60(header) = 52px */
        text-align: center;
        width: auto; /* H5端去掉固定宽度，改为自适应 */
        height: auto; /* H5端去掉固定高度，改为自适应 */
    }
    
    .fuli-hero-desc {
        font-family: 'Noto Sans SC', sans-serif;
        font-size: 14px; /* 按照Figma设计稿精确字体大小 */
        font-weight: 500; /* 按照Figma设计稿精确字重 */
        line-height: 1.8em; /* 按照Figma设计稿精确行高 */
        color: #D4D4D4; /* 按照Figma设计稿精确颜色 */
        margin: 0;
        margin-top: 21px; /* y:169 - y:148(title bottom) = 21px */
        text-align: center;
        width: 336px; /* 按照Figma设计稿精确宽度 */
        height: auto;
        max-width: 336px;
    }
    
    /* H5端中文和繁体：fuli-hero-desc固定宽度210px */
    :lang(zh-CN) .fuli-hero-desc,
    :lang(zh-TW) .fuli-hero-desc {
        width: 210px;
        max-width: 210px;
    }
    
    /* Company Benefits Section - 移动端 */
    .company-benefits {
        background: #F6F6F6; /* 按照Figma设计稿精确背景色 */
        padding: 31px 0 0; /* y:327 - 296(hero) = 31px */
        min-height: auto;
        width: 100%;
        margin: 0 auto;
        padding-bottom: 40px;
    }
    
    .benefits-container {
        max-width: 390px; /* 页面宽度 */
        margin: 0 auto;
        padding: 0 22px; /* 标题位置x:22 */
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .benefits-title {
        font-family: 'Noto Sans SC', sans-serif;
        font-size: 17px; /* mobile-ch/heading-17-medium */
        font-weight: 500;
        line-height: 1.41em;
        color: #727272; /* 按照Figma设计稿精确颜色 */
        margin: 0;
        margin-bottom: 46px; /* y:397 - y:327 - 24(title height) = 46px */
        padding: 0;
        width: auto;
        text-align: left;
        position: relative;
        padding-left: 0;
        align-self: flex-start;
    }
    
    .benefits-title::after {
        display: none; /* 移动端不显示下划线 */
    }
    
    .benefits-line {
        display: none;
    }
    
    .benefits-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 38px; /* 按照Figma设计稿精确间距 */
        margin-top: 0;
        width: 100%;
        padding: 0;
    }
    
    /* Benefit Card - 移动端 */
    .benefit-card {
        width: 100%;
        max-width: 230px; /* 按照Figma设计稿最大宽度 */
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        position: relative;
        margin-right: 0;
        margin-bottom: 0;
    }
    
    /* 社会保险 */
    .benefit-card:nth-child(1) {
        width: 156px; /* 按照Figma设计稿精确宽度 */
        height: auto; /* H5端去掉固定高度，改为自适应 */
    }
    
    /* 交通补贴 */
    .benefit-card:nth-child(2) {
        width: 186px; /* 按照Figma设计稿精确宽度 */
        height: auto; /* H5端去掉固定高度，改为自适应 */
    }
    
    /* 休假制度 */
    .benefit-card:nth-child(3) {
        width: 198px; /* 按照Figma设计稿精确宽度 */
        height: auto; /* H5端去掉固定高度，改为自适应 */
    }
    
    /* 工作制度 */
    .benefit-card:nth-child(4) {
        width: 188px; /* 按照Figma设计稿精确宽度 */
        height: auto; /* H5端去掉固定高度，改为自适应 */
    }
    
    /* 其他 */
    .benefit-card:nth-child(5) {
        width: 230px; /* 按照Figma设计稿精确宽度 */
        height: auto; /* H5端去掉固定高度，改为自适应 */
    }
    
    .benefit-icon {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        margin-bottom: 24px; /* 从图标底部到标题顶部的距离：82.8-58.8=24px */
        height: auto;
        position: relative;
    }
    
    /* 图标高度 - 根据Figma设计稿 */
    .benefit-card:nth-child(1) .benefit-icon {
        height: 58.8px; /* 按照Figma设计稿精确高度 */
    }
    
    .benefit-card:nth-child(2) .benefit-icon {
        height: 49.7px; /* 按照Figma设计稿精确高度 */
    }
    
    .benefit-card:nth-child(3) .benefit-icon {
        height: 54.7px; /* 按照Figma设计稿精确高度 */
    }
    
    .benefit-card:nth-child(4) .benefit-icon {
        height: 49.9px; /* 按照Figma设计稿精确高度 */
    }
    
    .benefit-card:nth-child(5) .benefit-icon {
        height: 52.5px; /* 按照Figma设计稿精确高度 */
    }
    
    .benefit-icon img {
        width: auto;
        height: 100%;
        object-fit: contain;
    }
    
    /* 图标宽度根据Figma设计稿 */
    .benefit-card:nth-child(1) .benefit-icon img {
        width: 46.5px; /* 按照Figma设计稿精确宽度 */
    }
    
    .benefit-card:nth-child(2) .benefit-icon img {
        width: 73.4px; /* 按照Figma设计稿精确宽度 */
    }
    
    .benefit-card:nth-child(3) .benefit-icon img {
        width: 62.5px; /* 按照Figma设计稿精确宽度 */
    }
    
    .benefit-card:nth-child(4) .benefit-icon img {
        width: 60.2px; /* 按照Figma设计稿精确宽度 */
    }
    
    .benefit-card:nth-child(5) .benefit-icon img {
        width: 55.1px; /* 按照Figma设计稿精确宽度 */
    }
    
    .benefit-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1;
    }
    
    .benefit-title {
        font-family: 'Noto Sans SC', sans-serif;
        font-size: 20px; /* 按照Figma设计稿精确字体大小 */
        font-weight: 500; /* 按照Figma设计稿精确字重 */
        line-height: 1.5em; /* 按照Figma设计稿精确行高 */
        color: #1A1A1A; /* 按照Figma设计稿精确颜色 */
        margin: 0 0 14px 0; /* 从标题底部到列表顶部的距离：44-30=14px */
        padding: 0;
        text-align: center;
        height: 30px; /* 按照Figma设计稿精确高度 */
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    
    /* 其他卡片标题使用24px */
    .benefit-card:nth-child(5) .benefit-title {
        font-size: 24px; /* desktop-ch/heading-24-medium */
        line-height: 1.25em;
        height: 30px; /* 保持高度一致 */
    }
    
    .benefit-list {
        list-style: none;
        padding: 0;
        margin: 0;
        text-align: center;
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .benefit-list li {
        font-family: 'Noto Sans SC', sans-serif;
        font-size: 16px; /* 按照Figma设计稿精确字体大小 */
        font-weight: 400; /* 按照Figma设计稿精确字重 */
        line-height: 2em; /* 按照Figma设计稿精确行高 */
        color: #1A1A1A; /* 按照Figma设计稿精确颜色 */
        opacity: 0.6; /* 按照Figma设计稿精确透明度 */
        margin: 0;
        padding: 0;
        text-align: center;
    }
}

