/* ==============================================
   Hdev Process Steps – Custom Element Styles
   ============================================== */

.hdev-process-steps {
  position: relative;
  width: 100%;
}

.hdev-ps-items {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 2;
  gap: 20px;
}

/* Đường kẻ ngang kết nối */
.hdev-process-steps .hdev-ps-line {
  position: absolute;
  top: 55px; /* Giữa icon tròn (110px / 2) */
  left: 16%;
  right: 16%;
  height: 2px;
  background-color: #f8d8b6; /* Màu cam nhạt giống thiết kế - hoặc có thể dùng var(--ps-primary) thêm độ trong suốt nếu muốn */
  z-index: 1;
}

.hdev-ps-item {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Khung tròn chứa Icon */
.hdev-ps-icon-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  box-sizing: border-box;
  background-color: #ffffff;
  transition: all 0.3s ease;
}

/* Style: Outline */
.hdev-ps-icon-wrap.style-outline {
  border: 3px solid var(--ps-primary, #f38221);
  background-color: #ffffff;
}

/* Style: Solid */
.hdev-ps-icon-wrap.style-solid {
  background-color: var(--ps-primary, #f38221);
  border: 3px solid var(--ps-primary, #f38221);
}

.hdev-ps-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  z-index: 2;
}

/* Xử lý đổi màu icon (nếu dùng ảnh SVG hoặc mask - ở đây mặc định người dùng up sẵn ảnh màu trắng hoặc cam) 
   Nếu ảnh là PNG màu trắng sẵn cho bước 2 thì không cần xử lý thêm. */

/* Nhãn số (Badge 1, 2, 3) */
.hdev-ps-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background-color: var(--ps-badge, #fce08b);
  color: #000000;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Typography */
.hdev-ps-title {
  font-size: 18px;
  font-weight: 700;
  color: #222222;
  margin-bottom: 12px;
  line-height: 1.3;
}

.hdev-ps-desc {
  font-size: 14px;
  color: #555555;
  line-height: 1.5;
  margin: 0;
}

/* ==============================================
   Responsive (Mobile & Tablet)
   ============================================== */

@media (max-width: 849px) {
  .hdev-process-steps .hdev-ps-line {
    left: 10%;
    right: 10%;
  }

  .hdev-ps-icon-wrap {
    width: 90px;
    height: 90px;
  }
  .hdev-process-steps .hdev-ps-line {
    top: 45px;
  }
  .hdev-ps-icon {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 767px) {
  /* Chuyển thành dạng dọc, căn trái trên mobile/tablet */
  .hdev-ps-items {
    flex-direction: column;
    align-items: flex-start;
    gap: 35px;
  }

  /* Đường kẻ dọc thay vì ngang, đi qua tâm icon */
  .hdev-process-steps .hdev-ps-line {
    top: 0;
    bottom: 0;
    left: 45px; /* Giữa icon (icon 90px / 2) */
    width: 2px;
    height: auto;
    transform: none;
    right: auto;
  }

  /* Item nằm ngang (Icon trái - Chữ phải) */
  .hdev-ps-item {
    width: 100%;
    max-width: 100%;
    padding: 0;
    flex-direction: row; 
    align-items: center; /* Căn giữa theo chiều dọc giữa icon và text */
    text-align: left;
    gap: 25px; /* Khoảng cách giữa icon và text */
  }

  .hdev-ps-icon-wrap {
    margin-bottom: 0;
    flex-shrink: 0; /* Tránh icon bị ép nhỏ */
  }

  .hdev-ps-title {
    margin-bottom: 8px;
  }
}
