/* 专业领域部分 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.service-header {
    background-color: transparent;
    color: #333;
    padding: 20px 0 10px 0;
    text-align: left;
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    margin: 20px 0 10px 0;
    grid-column: 1 / -1;
}

.service-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}



.service-feature {
    display: flex;
    margin-bottom: 20px;
    cursor: pointer;
    /* 拆分 transition，避免布局相关属性引起的性能问题 */
    transition: box-shadow 0.35s cubic-bezier(.4,.0,.2,1), transform 0.35s cubic-bezier(.4,.0,.2,1), border-color .35s ease;
    padding: 0;
    border-radius: 0;
    background-color: white;
    border: 1px solid rgba(0, 86, 162, 0.1);
    overflow: hidden;
    height: 160px;
    position: relative;
    will-change: transform; /* 提前让浏览器优化合成层 */
}

.service-feature-image {
    width: 150px;
    height: 160px; /* 与父容器同高，方便垂直居中 */
    flex-shrink: 0;
    overflow: hidden;
    display: flex; /* 使内部图片垂直水平居中 */
    align-items: center;
    justify-content: center;
}

.service-feature-image img {
    width: 100%;
    height: 120px; /* 统一显示高度 */
    object-fit: cover; /* 超出裁剪 */
    object-position: center; /* 居中裁剪 */
    transition: transform 0.6s cubic-bezier(.25,.8,.25,1), filter .6s ease;
}

/* .service-feature:hover .service-feature-image img {
    transform: scale(1.05);
} */

.service-feature-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
}

.service-feature-icon {
    width: 150px;
    height: 160px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
    color: var(--primary-color);
    font-size: 3rem;
    transition: all 0.3s ease;
}

.service-feature:hover .service-feature-icon {
    background-color: var(--primary-color);
    color: white;
}

.service-feature-text {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    border: none;
    transition: all 0.3s ease;
    flex: 1;
}

/* 主悬停与键盘聚焦效果 */
.service-feature:hover,
.service-feature:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -6px rgba(0,0,0,0.12), 0 4px 10px -2px rgba(0,0,0,0.08);
    border-color: rgba(0, 86, 162, 0.25);
}

.service-feature:hover .service-feature-image img,
.service-feature:focus-visible .service-feature-image img {
    transform: scale(1.08) rotate(.5deg);
    filter: brightness(1.05) saturate(1.1);
}

.service-feature:hover .service-feature-text,
.service-feature:focus-visible .service-feature-text {
    background-color: transparent;
    box-shadow: none;
    border-color: transparent;
}

/* 交互提示的伪元素边框闪烁（只在 hover 初次出现）*/
.service-feature::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border: 0 solid var(--primary-color, #0056a2);
    transition: border-width .5s cubic-bezier(.4,0,.2,1), opacity .5s ease;
    opacity: 0;
}
.service-feature:hover::after,
.service-feature:focus-visible::after {
    border-width: 2px;
    opacity: .25;
}

.service-feature-text h4 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    line-height: 1.4;
    color: #000000;
    font-weight: 600;
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

.service-feature-text p {
    margin: 0 0 35px 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    text-align: justify;
}

.service-more-btn {
    position: absolute;
    bottom: 8px;
    right: 20px;
    background-color: transparent;
    color: #000000;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: none;
    transition: color .3s ease, transform .35s cubic-bezier(.4,.0,.2,1), background-color .35s ease;
}

/* .service-feature:hover .service-more-btn {
    background-color: #003d7a;
    transform: translateX(3px);
} */

.service-more-btn:hover,
.service-feature:hover .service-more-btn,
.service-feature:focus-visible .service-more-btn {
    color: var(--primary-color);
    transform: translateX(4px);
}

/* 键盘访问性：让卡片可聚焦 */
.service-feature {
    outline: none;
}
.service-feature:focus-visible {
    outline: 2px dashed var(--primary-color, #0056a2);
    outline-offset: 3px;
}

/* 轻微的进入动画，可选 */
@keyframes serviceCardFadeIn {
    0% { opacity: 0; transform: translateY(14px); }
    60% { opacity: 1; transform: translateY(-2px); }
    100% { opacity: 1; transform: translateY(0); }
}

.services-grid .service-feature {
    animation: serviceCardFadeIn .65s cubic-bezier(.4,0,.2,1) both;
    animation-delay: calc(var(--service-index, 0) * 60ms);
}

/* 如果用户偏好减少动效，禁用复杂动画 */
@media (prefers-reduced-motion: reduce) {
    .service-feature,
    .service-feature-image img,
    .service-more-btn { transition: none !important; }
    .services-grid .service-feature { animation: none !important; }
}

.auth-section {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.auth-input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.professional-manner {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    margin-top: -40px;
    margin-bottom: 40px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    max-height: 500px;
}

.professional-manner img {
    width: 100%;
    height: 180px;
    display: block;
    transition: transform 0.5s ease;
    object-fit: cover;
    object-position: center;
}

.manner-text {
    position: absolute;
    bottom: 0;
    left: 130px;
    width: calc(100% - 20px);
    color: white;
    padding: 30px;
    text-align: left;
}

.manner-text h3 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 15px;
    }
    
    .manner-text {
        padding: 20px;
    }
    
    .manner-text h3 {
        font-size: 1.8rem;
    }
    
    .service-header {
        grid-column: 1;
    }
    
    .service-header h3 {
        font-size: 1.3rem;
    }
    
    .service-feature {
        flex-direction: column;
        min-height: auto;
        height: auto; /* 重置高度，防止内容被截断 */
    }
    
    .service-feature-image {
        width: 100%;
        height: 140px; /* 移动端稍微降低整体高度 */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .service-feature-icon {
        width: 100%;
        height: 100px;
        font-size: 2.5rem;
    }
    
    .service-feature-image img {
    width: 100%;
    height: 110px; /* 移动端统一高度 */
    object-fit: cover;
    object-position: center;
    }
    
    .service-feature-content {
        padding: 15px;
    }
    
    .service-feature-text h4 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .service-feature-text p {
        font-size: 0.85rem;
        margin-bottom: 30px;
    }
    
    .service-more-btn {
        position: static;
        align-self: flex-end;
        margin-top: auto;
    }
}
