
.stc-services-v22,
.stc-services-v22 * {
    box-sizing: border-box;
}

.stc-services-v22 {
    position: relative;
    margin-top: 100px;
    padding: 0 0 22px;
    background: #fff;
    border: 0;
}

.stc-services-v22-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    /* Đặt khoảng cách ở grid để không bị margin-collapse với main/header. */
    margin-top: 18px;
}

.stc-service-v22-card {
    position: relative;
    min-width: 0;
    min-height: 202px;
    padding: 22px 48px 20px 22px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    border: 1px solid #d8e2ef;
    border-radius: 22px;
    background: #fff;
    color: #111827 !important;
    text-decoration: none !important;
    box-shadow: none;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.stc-service-v22-card::after {
    content: "";
    position: absolute;
    right: -54px;
    top: -56px;
    width: 145px;
    height: 145px;
    border-radius: 999px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(22,119,255,.10), rgba(22,119,255,0) 69%);
    opacity: 0;
    transition: opacity .22s ease;
}

.stc-service-v22-card:hover {
    transform: translateY(-3px);
    border-color: #b7d3fa;
    box-shadow: 0 12px 28px rgba(30,64,175,.075);
}

.stc-service-v22-card:hover::after {
    opacity: 1;
}

.stc-service-v22-icon {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    margin: 0 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 56px;
}

.stc-service-v22-icon img {
    display: block;
    width: 56px !important;
    height: 56px !important;
    max-width: none;
    object-fit: contain !important;
    object-position: center !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    image-rendering: auto !important;
    filter: none !important;
    transform: none !important;
    opacity: 1 !important;
    will-change: auto !important;
}

.stc-service-v22-body {
    position: relative;
    z-index: 1;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stc-service-v22-body strong {
    display: block;
    margin: 0;
    color: #101828;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -.01em;
    transition: color .18s ease;
}

.stc-service-v22-body > span {
    display: block;
    margin: 7px 0 0;
    color: #66758a;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.55;
}

.stc-service-v22-card:hover .stc-service-v22-body strong {
    color: #1677ff;
}

.stc-service-v22-arrow {
    position: absolute;
    z-index: 2;
    right: 16px;
    top: 50%;
    width: 28px;
    height: 28px;
    margin-top: -14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #b4c0ce;
    background: transparent;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.stc-service-v22-arrow svg {
    display: block;
    width: 15px;
    height: 15px;
}

.stc-service-v22-card:hover .stc-service-v22-arrow {
    color: #1677ff;
    border-color: #d7e8ff;
    background: #f2f7ff;
    transform: translateX(2px);
}

/* Marketplace giữ khoảng cách desktop hiện tại. */
.stc-services-v22 + #market13Featured.market13-section {
    padding-top: 22px !important;
}

@media (max-width: 1199.98px) and (min-width: 768px) {
    .stc-services-v22-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        margin-top: 16px;
    }

    .stc-service-v22-card {
        min-height: 182px;
    }
}

/* Mobile: giữ nguyên đúng spacing V2.9 mà người dùng đã duyệt. */
@media (max-width: 767.98px) {
    .stc-services-v22 {
        margin-top: 10px;
        padding: 0 0 12px;
    }

    .stc-services-v22 .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .stc-services-v22-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 0;
    }

    .stc-service-v22-card {
        min-height: 64px;
        padding: 7px 25px 7px 8px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        border-radius: 15px;
        overflow: hidden;
    }

    .stc-service-v22-card:hover {
        transform: none;
        box-shadow: 0 7px 18px rgba(30,64,175,.055);
    }

    .stc-service-v22-card::after {
        display: none;
    }

    .stc-service-v22-icon,
    .stc-service-v22-icon img {
        width: 38px !important;
        height: 38px !important;
    }

    .stc-service-v22-icon {
        margin: 0;
        flex: 0 0 38px;
    }

    .stc-service-v22-body {
        min-width: 0;
        flex: 1 1 auto;
        justify-content: center;
    }

    .stc-service-v22-body strong {
        width: 100%;
        font-size: 11.5px;
        font-weight: 800;
        line-height: 1.18;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stc-service-v22-body > span {
        width: 100%;
        margin-top: 2px;
        font-size: 9px;
        font-weight: 500;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stc-service-v22-arrow {
        right: 4px;
        width: 20px;
        height: 24px;
        margin-top: -12px;
        border: 0 !important;
        background: transparent !important;
        color: #c3ccd7;
    }

    .stc-service-v22-arrow svg {
        width: 12px;
        height: 12px;
    }

    /* Tách Marketplace xuống rõ hơn để tiêu đề không dính sát hàng dịch vụ. */
    .stc-services-v22 + #market13Featured.market13-section {
        padding-top: 30px !important;
    }
}

@media (max-width: 380px) {
    .stc-services-v22 {
        margin-top: 8px;
        padding-bottom: 11px;
    }

    .stc-services-v22 .container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .stc-services-v22-grid {
        gap: 7px;
        margin-top: 0;
    }

    .stc-service-v22-card {
        min-height: 60px;
        padding: 6px 22px 6px 7px;
        gap: 7px;
        border-radius: 14px;
    }

    .stc-service-v22-icon,
    .stc-service-v22-icon img {
        width: 34px !important;
        height: 34px !important;
    }

    .stc-service-v22-icon {
        flex-basis: 34px;
    }

    .stc-service-v22-body strong {
        font-size: 11px;
    }

    .stc-service-v22-body > span {
        font-size: 8.7px;
    }

    .stc-services-v22 + #market13Featured.market13-section {
        padding-top: 28px !important;
    }
}
