/* ====================================================================
   Main Service Section
==================================================================== */
.hactora-service.main-service-one-section {
  position: relative;
  display: block;
  padding: 0 0 70px;
  margin-top: -145px;
  z-index: 2;
}

.hactora-service.main-service-one-section .thm-section-title {
  margin-top: -10px;
  margin-bottom: 50px;
}

.hactora-service.main-service-one-section .thm-section-title h2 {
  font-size: 42px;
  font-weight: 800;
  line-height: 50px;
  margin-bottom: 16px;
}

.hactora-service.main-service-one-section .section_title-subheading {
  font-size: 14px;
  color: var(--color-primary);
  font-weight: 700;
  line-height: 30px;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.hactora-service.main-service-one-section .sub-title-shape-left:before {
  position: relative;
  content: "";
  left: 0;
  bottom: 0;
  height: 2px;
  width: 30px;
  background: var(--color-primary);
  display: inline-block;
  margin-right: 12px;
}

/* 卡片主体 */
.hactora-service .main-service-one-sec-single {
  position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100% - 30px);
  margin-bottom: 30px;
}

.hactora-service .main-service-one-sec-img {
  position: relative;
  display: block;
  overflow: hidden;
}

.hactora-service .main-service-one-sec-img img {
  width: 100%;
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;
  transition: 0.5s;
}

.hactora-service .main-service-one-sec-single:hover .main-service-one-sec-img img {
  transform: scale(1.1);
}

.hactora-service .main-service-one-sec-content {
  flex: 1;
  position: relative;
  display: block;
  padding: 35px 30px;
  background-color: rgb(255, 255, 255);
  box-shadow: 0px 50px 90px 0px rgba(26, 46, 85, 0.1);
}

/* 核心修复：数字编号 (支持 LTR / RTL 适配及重叠处理) */
.hactora-service .main-service-one-count {
  position: absolute;
  top: 15px;
  /* 使用 logical property 自动感知 LTR(右侧) 与 RTL(左侧) */
  inset-inline-end: 20px; 
  -webkit-text-stroke-width: 1px;
  -webkit-text-stroke-color: rgba(0, 0, 0, 0.15);
  color: transparent;
  z-index: 1; /* 降低 z-index，避免盖住文字 */
  font-family: var(--font-family);
  font-size: 36px;
  font-weight: 800;
  pointer-events: none; /* 防止遮挡点击 */
  user-select: none;
}

/* 核心修复：给标题右侧/左侧留出数字的空间，防止重叠 */
.hactora-service .main-service-one-sec-content h3 {
  position: relative;
  z-index: 2; /* 确保标题处于数字上方 */
  font-size: 20px;
  font-weight: 800;
  line-height: 32px;
  margin-top: 5px;
  margin-bottom: 8px;
  padding-inline-end: 45px; /* LTR下空出右侧，RTL下空出左侧 */
}

.hactora-service .main-service-one-sec-content p {
  position: relative;
  z-index: 2;
  margin: 0;
}

.hactora-service .main-service-one-btn {
  margin-top: 30px;
}

.hactora-service .main-service-one-btn .theme-btn {
  padding: 10px 30px;
  background-color: #222;
}

.hactora-service .main-service-one-btn .theme-btn:hover {
  background-color: var(--color-primary);
}

.hactora-service .main-service-one-icon {
  color: var(--color-primary);
  line-height: 70px;
}

.hactora-service .main-service-one-icon img {
  width: 70px;
  display: none;
}

/* ====================================================================
   Main Service Two Section
==================================================================== */
.hactora-service.main-service-one-section.two {
  padding: 100px 0 100px;
  margin-top: 0;
}

.hactora-service.main-service-one-section.two .thm-section-title {
  margin-top: -10px;
  margin-bottom: 50px;
}

.hactora-service.main-service-one-section.two .thm-section-title h2 {
  margin-top: 10px;
  font-size: 36px;
  font-weight: 800;
  line-height: 50px;
  margin-bottom: 16px;
}

/* ==========================================
   标题响应式字号适配 (PC / iPad / 移动端)
   ========================================== */

/* 1. 电脑端 (PC): > 991px */
.hactora-service.main-service-one-section .thm-section-title h2,
.hactora-service.main-service-one-section.two .thm-section-title h2 {
  font-size: 36px;
  line-height: 1.3;
  margin-bottom: 16px;
}

/* 2. iPad / 平板端: 768px ~ 991px */
@media (max-width: 991px) {
  .hactora-service.main-service-one-section .thm-section-title h2,
  .hactora-service.main-service-one-section.two .thm-section-title h2 {
    font-size: 30px;
    line-height: 1.3;
  }
}

/* 3. 移动端: < 768px */
@media (max-width: 767px) {
  .hactora-service.main-service-one-section .thm-section-title h2,
  .hactora-service.main-service-one-section.two .thm-section-title h2 {
    font-size: 24px;
    line-height: 1.3;
  }
}

/* ==========================================
   阿拉伯语 (RTL) 专项适配
   ========================================== */
[dir="rtl"] .hactora-service .main-service-one-sec-content {
  text-align: right; /* RTL模式下文本统一右对齐 */
}