/* ============================================================
   服务展示模块 V2 — 新独立命名空间（hf-svc2-* + #id）
   目的：不与全局 .w1200 / .container / .service-list / 其他模块
        同名类冲突；全部宽高/间距/响应式自洽，不依赖任何外部 CSS。
   策略：用 viewport 单位 + left:50% translateX(-50%) 跳出父级限制
   ============================================================ */

/* ---------- 根容器：跳出 #primary / .main / #page 宽度限制 ---------- */
#services-v2 {
    position: relative;
    display: block;
    /* 100vw 直接按视口宽计算（不参考父级），max-width:100% 防横向滚动条 */
    width: 100vw;
    max-width: 100%;
    left: 50%;
    right: auto;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    padding: 60px 0 80px;
    background: #fff;
    margin: 0;
    overflow: hidden;
    z-index: 1;
}

/* 波浪背景（新命名，不碰全局 .wave-bg 样式） */
#services-v2-wave {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
    line-height: 0;
    z-index: 0;
}
#services-v2-wave svg {
    position: relative;
    display: block;
    width: 100%;
    height: 100px;
}

/* ---------- 内层内容容器（替代全局 .w1200） ---------- */
#services-v2-wrap {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

/* ---------- 标题 ---------- */
#services-v2-title {
    text-align: center;
    margin-bottom: 50px;
    width: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
#services-v2-title > span {
    font-size: 36px;
    color: #666666;
    font-weight: 700;
    position: relative;
    display: inline-block;
}
#services-v2-title > span::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: -webkit-gradient(linear, left top, right top, from(#0066cc), to(#1a75e0));
    background: linear-gradient(90deg, #0066cc, #1a75e0);
    border-radius: 2px;
}
#services-v2-title > p {
    font-size: 15px;
    color: #666666;
    margin-top: 25px;
    letter-spacing: 1px;
}

/* ---------- Tabs（分类标签+子菜单） ---------- */
.hf-svc2-tabs {
    margin-bottom: 40px;
    width: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.hf-svc2-tabs > ul {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-flex-wrap: wrap;
        -ms-flex-wrap: wrap;
            flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.hf-svc2-tabs > ul > li {
    position: relative;
    min-width: 0;
    max-width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}
.hf-svc2-tabs > ul > li > a {
    display: block;
    padding: 12px 30px;
    background: #fff;
    border: 2px solid #e8ecf1;
    color: #666666;
    font-size: 15px;
    font-weight: 500;
    border-radius: 30px;
    text-decoration: none;
    -webkit-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.hf-svc2-tabs > ul > li > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: -webkit-gradient(linear, left top, right top, from(#0066cc), to(#0052a3));
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    -webkit-transition: width 0.3s;
    transition: width 0.3s;
    z-index: -1;
}
.hf-svc2-tabs > ul > li:hover > a,
.hf-svc2-tabs > ul > li.active > a {
    border-color: #0066cc;
    color: #fff;
    -webkit-transform: translateY(-2px);
    -ms-transform: translateY(-2px);
    transform: translateY(-2px);
    -webkit-box-shadow: 0 6px 20px rgba(0, 102, 204, 0.25);
            box-shadow: 0 6px 20px rgba(0, 102, 204, 0.25);
}
.hf-svc2-tabs > ul > li:hover > a::before,
.hf-svc2-tabs > ul > li.active > a::before {
    width: 100%;
}

/* 子分类（新命名 .hf-svc2-sub，不碰全局 .sub） */
.hf-svc2-sub {
    display: none;
    position: absolute;
    top: -webkit-calc(100% + 10px);
    top: calc(100% + 10px);
    left: 50%;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    min-width: 200px;
    background: #fff;
    border-radius: 8px;
    -webkit-box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 100;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 0;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    list-style: none;
    margin: 0;
}
.hf-svc2-sub::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}
.hf-svc2-tabs > ul > li:hover > .hf-svc2-sub,
.hf-svc2-tabs > ul > li:hover > a + .hf-svc2-sub {
    display: block;
    opacity: 1;
    visibility: visible;
}
.hf-svc2-sub li {
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}
.hf-svc2-sub li a {
    display: block;
    background: #fff;
    border: none;
    border-radius: 0;
    color: #666666;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 400;
    text-align: left;
    text-decoration: none;
    -webkit-transition: all 0.2s;
    transition: all 0.2s;
}
.hf-svc2-sub li a:hover {
    background: #f8f9fa;
    color: #3385ff;
    -webkit-transform: none;
    -ms-transform: none;
    transform: none;
    -webkit-box-shadow: none;
            box-shadow: none;
    padding-left: 25px;
}

/* ---------- Panels / List（卡片栅格） ---------- */
.hf-svc2-panels {
    position: relative;
    width: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.hf-svc2-panel {
    display: none;
    width: 100%;
}
.hf-svc2-panel.active {
    display: block;
    -webkit-animation: hfSvc2FadeIn 0.4s ease;
            animation: hfSvc2FadeIn 0.4s ease;
    width: 100%;
}
@-webkit-keyframes hfSvc2FadeIn {
    from { opacity: 0; -webkit-transform: translateY(10px); transform: translateY(10px); }
    to   { opacity: 1; -webkit-transform: translateY(0);    transform: translateY(0); }
}
@keyframes hfSvc2FadeIn {
    from { opacity: 0; -webkit-transform: translateY(10px); transform: translateY(10px); }
    to   { opacity: 1; -webkit-transform: translateY(0);    transform: translateY(0); }
}

.hf-svc2-list {
    display: block;
    width: -webkit-calc(100% + 24px);
    width: calc(100% + 24px);
    max-width: none;
    list-style: none;
    padding: 0;
    margin: 0 -12px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    overflow: hidden;
}
.hf-svc2-list::after {
    content: '';
    display: table;
    clear: both;
}
.hf-svc2-list > li {
    float: left;
    width: 25%;
    padding: 12px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    list-style: none;
    margin: 0;
    min-width: 0;
}
.hf-svc2-list > li > a {
    display: block;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    -webkit-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    -webkit-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    border: none;
    width: 100%;
    min-width: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.hf-svc2-list > li > a:hover {
    -webkit-box-shadow: 0 12px 32px rgba(0, 102, 204, 0.15);
            box-shadow: 0 12px 32px rgba(0, 102, 204, 0.15);
    -webkit-transform: translateY(-8px);
    -ms-transform: translateY(-8px);
    transform: translateY(-8px);
}

/* 卡片图像区（新命名 .hf-svc2-img，不依赖全局 .img 可能有的任何样式） */
.hf-svc2-img {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: -webkit-gradient(linear, left top, right bottom, from(#f5f7fa), to(#e8ecf1));
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    width: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.hf-svc2-img::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(60%, transparent), to(rgba(0, 0, 0, 0.03)));
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.03) 100%);
    pointer-events: none;
}
.hf-svc2-img img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    max-width: 100%;
}
.hf-svc2-list > li > a:hover .hf-svc2-img img {
    -webkit-transform: scale(1.08);
    -ms-transform: scale(1.08);
    transform: scale(1.08);
}

/* 卡片标题 h3 */
.hf-svc2-list h3 {
    padding: 16px 15px;
    text-align: center;
    font-size: 14px;
    color: #666666;
    background: #fff;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    min-width: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    position: relative;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
}
.hf-svc2-list > li > a:hover h3 {
    color: #3385ff;
    background: -webkit-gradient(linear, left top, right top, from(#fff), color-stop(50%, #fff8f5), to(#fff));
    background: linear-gradient(to right, #fff 0%, #fff8f5 50%, #fff 100%);
}
.hf-svc2-list h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #0066cc;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
}
.hf-svc2-list > li > a:hover h3::after {
    width: 40px;
}

/* ---------- 查看更多按钮 ---------- */
.hf-svc2-more {
    text-align: center;
    margin-top: 50px;
    width: 100%;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.hf-svc2-more a {
    display: -webkit-inline-box;
    display: -webkit-inline-flex;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 8px;
    padding: 14px 45px;
    background: -webkit-gradient(linear, left top, right top, from(#0066cc), to(#0052a3));
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: #fff;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    -webkit-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
            box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    border: none;
    position: relative;
    overflow: hidden;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.hf-svc2-more a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: -webkit-gradient(linear, left top, right top, from(transparent), color-stop(rgba(255, 255, 255, 0.2)), to(transparent));
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    -webkit-transition: left 0.5s;
    transition: left 0.5s;
}
.hf-svc2-more a:hover {
    -webkit-transform: translateY(-3px);
    -ms-transform: translateY(-3px);
    transform: translateY(-3px);
    -webkit-box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
            box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
}
.hf-svc2-more a:hover::before {
    left: 100%;
}
.hf-svc2-more a::after {
    content: '→';
    font-size: 18px;
    -webkit-transition: -webkit-transform 0.3s;
    transition: transform 0.3s;
}
.hf-svc2-more a:hover::after {
    -webkit-transform: translateX(4px);
    -ms-transform: translateX(4px);
    transform: translateX(4px);
}

/* ===============================================================
   响应式（全部用新命名空间，完全不依赖全局 @media 的 w1200 重写）
   =============================================================== */

@media screen and (max-width: 992px) {
    #services-v2-title > span { font-size: 30px; }
    .hf-svc2-tabs > ul > li > a { padding: 10px 24px; font-size: 14px; }
    .hf-svc2-list > li { width: 33.3333%; }
}

@media screen and (max-width: 768px) {
    #services-v2 {
        padding: 0 0 50px;
        width: 100vw;
        max-width: 100%;
    }
    #services-v2-wave,
    #services-v2-wave svg { height: 60px; }
    #services-v2-wave { top: -60px; }

    #services-v2-wrap {
        max-width: 100%;
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    #services-v2-title { margin-bottom: 35px; }
    #services-v2-title > span { font-size: 26px; }
    #services-v2-title > span::after { width: 40px; height: 3px; }
    #services-v2-title > p { font-size: 13px; margin-top: 20px; }

    .hf-svc2-tabs { margin-bottom: 30px; }
    .hf-svc2-tabs > ul { gap: 8px; }
    .hf-svc2-tabs > ul > li > a {
        padding: 8px 18px;
        font-size: 13px;
        border-width: 1px;
    }
    /* 手机端彻底关闭子分类下拉（移动端无hover，点击由JS接管tab切换） */
    .hf-svc2-sub,
    .hf-svc2-tabs > ul > li:hover > .hf-svc2-sub {
        display: none;
        opacity: 0;
        visibility: hidden;
    }

    .hf-svc2-list {
        width: -webkit-calc(100% + 12px);
        width: calc(100% + 12px);
        margin: 0 -6px;
    }
    .hf-svc2-list > li {
        width: 50%;
        padding: 6px;
    }
    .hf-svc2-list > li > a { border-radius: 6px; }
    .hf-svc2-list h3 { padding: 12px 10px; font-size: 12px; }

    .hf-svc2-more { margin-top: 35px; }
    .hf-svc2-more a { padding: 12px 35px; font-size: 14px; }
}

@media screen and (max-width: 480px) {
    #services-v2-wrap {
        padding-left: 10px;
        padding-right: 10px;
    }
}
