/* 
 * services.css - 业务页面特有样式
 * 优化版：外链图片 + 移动适配优化 + 样式修正
 */

/* === 全局变量 === */
:root {
    --gradient-bg: linear-gradient(135deg, #fdfcfa 0%, #f9f5ee 100%);
    --module-bg: #f7f7f7;
}

/* === 板块2: Banner === */
.services-banner {
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    background: 
        linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)),
        url('/wp-content/themes/geo-theme/img/geobj.jpg') no-repeat center center;
    background-size: cover;
    /* 修复：移除 margin-top 注释，添加实际值 */
    margin-top: 0;
}

.services-banner .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.services-banner h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.services-banner p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Banner讨论链接 */
.services-banner .discuss-link {
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* === 板块3: 特色 === */
.services-features {
    margin-top: -220px;
    background-color: var(--module-bg);
    padding-bottom: 60px;
}

.features-container {
    background: var(--gradient-bg);
    border-radius: 30px;
    padding: 80px 60px;
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    margin-top: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.feature-card {
    text-align: center;
    position: relative;
    padding: 0 20px;
}

/* 卡片之间的竖线分隔 */
.feature-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 0;
    height: calc(100% - 40px);
    width: 1px;
    background-color: rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.feature-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

/* === 板块4: 业务 === */
.services-business {
    padding-top: 40px;
    padding-bottom: 100px;
    background-color: var(--module-bg);
}

.business-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 每一行的容器 */
.business-row {
    display: flex;
    gap: 20px;
    height: 450px;
}

/* === 业务卡片图片定义（12个卡片）=== */

/* 卡片1: 定制化官网建设 */
.business-card-1 {
    background-image: url('/wp-content/themes/geo-theme/img/web-card-1.jpg');
    background-image: -webkit-image-set(
        url('/wp-content/themes/geo-theme/img/web-card-1.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/web-card-1.jpg') 1x
    );
    background-image: image-set(
        url('/wp-content/themes/geo-theme/img/web-card-1.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/web-card-1.jpg') 1x
    );
}

/* 卡片2: 响应式官网建设 */
.business-card-2 {
    background-image: url('/wp-content/themes/geo-theme/img/web-card-2.jpg');
    background-image: -webkit-image-set(
        url('/wp-content/themes/geo-theme/img/web-card-2.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/web-card-2.jpg') 1x
    );
    background-image: image-set(
        url('/wp-content/themes/geo-theme/img/web-card-2.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/web-card-2.jpg') 1x 
    );
}

/* 卡片3: AI可见度审计与策略 */
.business-card-3 {
    background-image: url('/wp-content/themes/geo-theme/img/geo-card-1.jpg');
    background-image: -webkit-image-set(
        url('/wp-content/themes/geo-theme/img/geo-card-1.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/geo-card-1.jpg') 1x
    );
    background-image: image-set(
        url('/wp-content/themes/geo-theme/img/geo-card-1.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/geo-card-1.jpg') 1x
    );
}

/* 卡片4: 内容结构化与AI化改造 */
.business-card-4 {
    background-image: url('/wp-content/themes/geo-theme/img/geo-card-2.jpg');
    background-image: -webkit-image-set(
        url('/wp-content/themes/geo-theme/img/geo-card-2.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/geo-card-2.jpg') 1x
    );
    background-image: image-set(
        url('/wp-content/themes/geo-theme/img/geo-card-2.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/geo-card-2.jpg') 1x
    );
}

/* 卡片5: 官网改版与AI重构 */
.business-card-5 {
    background-image: url('/wp-content/themes/geo-theme/img/web-card-3.jpg');
    background-image: -webkit-image-set(
        url('/wp-content/themes/geo-theme/img/web-card-3.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/web-card-3.jpg') 1x
    );
    background-image: image-set(
        url('/wp-content/themes/geo-theme/img/web-card-3.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/web-card-3.jpg') 1x
    );
}

/* 卡片6: 信任背书与权威建设 */
.business-card-6 {
    background-image: url('/wp-content/themes/geo-theme/img/geo-card-3.jpg');
    background-image: -webkit-image-set(
        url('/wp-content/themes/geo-theme/img/geo-card-3.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/geo-card-3.jpg') 1x
    );
    background-image: image-set(
        url('/wp-content/themes/geo-theme/img/geo-card-3.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/geo-card-3.jpg') 1x
    );
}

/* 卡片7: SEO与GEO整合优化 */
.business-card-7 {
    background-image: url('/wp-content/themes/geo-theme/img/seo-card-1.jpg');
    background-image: -webkit-image-set(
        url('/wp-content/themes/geo-theme/img/seo-card-1.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/seo-card-1.jpg') 1x
    );
    background-image: image-set(
        url('/wp-content/themes/geo-theme/img/seo-card-1.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/seo-card-1.jpg') 1x
    );
}

/* 卡片8: 品牌出海官网建设 */
.business-card-8 {
    background-image: url('/wp-content/themes/geo-theme/img/web-card-4.jpg');
    background-image: -webkit-image-set(
        url('/wp-content/themes/geo-theme/img/web-card-4.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/web-card-4.jpg') 1x
    );
    background-image: image-set(
        url('/wp-content/themes/geo-theme/img/web-card-4.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/web-card-4.jpg') 1x
    );
}

/* 卡片9: 微信小程序开发 */
.business-card-9 {
    background-image: url('/wp-content/themes/geo-theme/img/soft-card-1.jpg');
    background-image: -webkit-image-set(
        url('/wp-content/themes/geo-theme/img/soft-card-1.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/soft-card-1.jpg') 1x
    );
    background-image: image-set(
        url('/wp-content/themes/geo-theme/img/soft-card-1.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/soft-card-1.jpg') 1x
    );
}

/* 卡片10: SSL证书与安全防护 */
.business-card-10 {
    background-image: url('/wp-content/themes/geo-theme/img/seo-card-2.jpg');
    background-image: -webkit-image-set(
        url('/wp-content/themes/geo-theme/img/seo-card-2.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/seo-card-2.jpg') 1x
    );
    background-image: image-set(
        url('/wp-content/themes/geo-theme/img/seo-card-2.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/seo-card-2.jpg') 1x

    );
}

/* 卡片11: 网站运维与托管 */
.business-card-11 {
    background-image: url('/wp-content/themes/geo-theme/img/seo-card-3.jpg');
    background-image: -webkit-image-set(
        url('/wp-content/themes/geo-theme/img/seo-card-3.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/seo-card-3.jpg') 1x
    );
    background-image: image-set(
        url('/wp-content/themes/geo-theme/img/seo-card-3.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/seo-card-3.jpg') 1x
    );
}

/* 卡片12: 品牌广告投放 */
.business-card-12 {
    background-image: url('/wp-content/themes/geo-theme/img/seo-card-4.jpg');
    background-image: -webkit-image-set(
        url('/wp-content/themes/geo-theme/img/seo-card-4.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/seo-card-4.jpg') 1x
    );
    background-image: image-set(
        url('/wp-content/themes/geo-theme/img/seo-card-4.webp') 1x type('image/webp'),
        url('/wp-content/themes/geo-theme/img/seo-card-4.jpg') 1x
    );
}

/* 业务项通用样式 */
.business-item {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.4s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-start;
    padding: 30px;
}

/* 修复：a标签样式合并 */
a.business-item {
    display: block;
    text-decoration: none;
    color: inherit;
}

a.business-item:hover {
    text-decoration: none;
    color: inherit;
}

.business-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0) 100%);
    transition: all 0.4s ease;
    z-index: 1;
}

.business-grid h2 {
    position: relative;
    z-index: 2;
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    text-align: left;
    max-width: 90%;
    transition: all 0.3s ease;
}

.business-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 3;
    backdrop-filter: blur(0px);
}

.overlay-content {
    width: 100%;
    text-align: center;
    margin-top: 60px;
}

.overlay-content h2 {
    color: var(--white);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
}

.overlay-bottom {
    width: 100%;
}

.business-desc {
    color: var(--white);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: left;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.2s;
}

.business-btn-container {
    width: 100%;
}

.business-btn {
    background-color: #fffcf5;
    color: var(--dark);
    padding: 12px 0;
    border-radius: 48px;
    font-weight: 400;
    transition: all 0.3s ease;
    border: none;
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease 0.3s;
    text-align: center;
    display: block;
}

.business-btn:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* 悬停效果 */
.business-item:hover {
    transform: scale(1.02);
}

.business-item:hover h2 {
    transform: translateY(50px);
    opacity: 0;
}

.business-item:hover::before {
    background: rgba(0, 0, 0, 0.7);
}

.business-item:hover .business-overlay {
    opacity: 1;
    backdrop-filter: blur(5px);
}

.business-item:hover .overlay-content h2,
.business-item:hover .business-desc,
.business-item:hover .business-btn {
    opacity: 1;
    transform: translateY(0);
}

/* 布局配置 */
/* 第一排: 2个,左70%，右30% */
.row-1 .business-item:nth-child(1) {
    flex: 70%;
}
.row-1 .business-item:nth-child(2) {
    flex: 30%;
}

/* 第二排: 2个,左30%，右70% */
.row-2 .business-item:nth-child(1) {
    flex: 30%;
}
.row-2 .business-item:nth-child(2) {
    flex: 70%;
}

/* 第三排: 3个,33%，33%，33% */
.row-3 .business-item:nth-child(1),
.row-3 .business-item:nth-child(2),
.row-3 .business-item:nth-child(3) {
    flex: 1;
}

/* 第四排: 3个,40%，30%，30% */
.row-4 .business-item:nth-child(1) {
    flex: 40%;
}
.row-4 .business-item:nth-child(2),
.row-4 .business-item:nth-child(3) {
    flex: 30%;
}

/* 第五排: 2个,左70%，右30% */
.row-5 .business-item:nth-child(1) {
    flex: 70%;
}
.row-5 .business-item:nth-child(2) {
    flex: 30%;
}

/* === 响应式设计优化 === */

@media (max-width: 1200px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 30px;
    }
    
    .feature-card:not(:last-child)::after {
        display: none;
    }
    
    .feature-card:nth-child(2)::after {
        display: block;
        right: -15px;
    }
    
    .business-row {
        height: 380px;
    }
    
    .business-grid h2 {
        font-size: 1.5rem;
    }
    
    .overlay-content h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 992px) {
    .business-row {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }
    
    .business-item {
        height: 350px;
        margin-bottom: 0;
    }
    
    .overlay-content h2 {
        margin-top: 20px;
        font-size: 1.8rem;
    }
    
    .business-desc {
        font-size: 1rem;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .services-banner {
        height: 50vh;
        min-height: 400px;
    }
    
    .services-banner h1 {
        font-size: 2.8rem;
    }
    
    .services-features {
        margin-top: -180px;
    }
    
    .features-container {
        padding: 50px 30px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .feature-card:nth-child(2)::after {
        display: none;
    }
    
    .business-item {
        height: 320px;
        padding: 25px;
    }
    
    .business-grid h2 {
        font-size: 1.5rem;
    }
    
    .overlay-content h2 {
        font-size: 1.7rem;
        margin-bottom: 15px;
    }
    
    .business-desc {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .business-btn {
        padding: 14px 0;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .services-banner {
        height: 45vh;
        min-height: 350px;
    }
    
    .services-banner h1 {
        font-size: 2.2rem;
    }
    
    .services-banner p {
        font-size: 1.1rem;
    }
    
    .services-features {
        margin-top: -150px;
    }
    
    .features-container {
        padding: 40px 20px;
        margin-top: 30px;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
    }
    
    .feature-icon i {
        font-size: 1.8rem;
    }
    
    .feature-card h3 {
        font-size: 1.3rem;
    }
    
    .business-item {
        height: 280px;
        padding: 20px;
    }
    
    .business-grid h2 {
        font-size: 1.4rem;
    }
    
    .overlay-content h2 {
        font-size: 1.5rem;
        margin-top: 15px;
    }
    
    .business-desc {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }
    
    .business-btn {
        padding: 12px 0;
        font-size: 0.9rem;
    }
}

@media (max-width: 400px) {
    .services-banner {
        height: 40vh;
        min-height: 300px;
    }
    
    .services-banner h1 {
        font-size: 1.8rem;
    }
    
    .services-banner p {
        font-size: 1rem;
    }
    
    .services-features {
        margin-top: -130px;
    }
    
    .business-item {
        height: 250px;
    }
    
    .business-grid h2 {
        font-size: 1.3rem;
    }
    
    .overlay-content h2 {
        font-size: 1.4rem;
    }
}