/**
 * HDev Badge Image - Stylesheet
 * Giao diện ảnh tròn kèm huy hiệu Icon góc dưới bên phải
 */

.hdev-badge-image-wrap {
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0 0 16px 0;
  box-sizing: border-box;
}

.hdev-badge-image-wrap.align-center {
  justify-content: center;
}
.hdev-badge-image-wrap.align-right {
  justify-content: flex-end;
}

.hdev-badge-image-box {
  position: relative;
  display: inline-block;
  max-width: 100%;
}

/* Ảnh chính */
.hdev-badge-main-img-wrap {
  width: var(--hdev-img-size-px, 160px);
  height: var(--hdev-img-size-px, 160px);
  border-radius: var(--hdev-img-radius, 50%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8fafc;
  border: 1px solid #f1f5f9;
  transition: all 0.3s ease;
}

.hdev-badge-main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hdev-badge-image-box:hover .hdev-badge-main-img-wrap {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* Huy hiệu Icon đè lên góc dưới phải */
.hdev-badge-icon-wrap {
  position: absolute;
  bottom: var(--hdev-badge-bottom, 4px);
  right: var(--hdev-badge-right, 4px);
  width: var(--hdev-badge-size-px, 46px);
  height: var(--hdev-badge-size-px, 46px);
  border-radius: 50%;
  background-color: var(--hdev-badge-bg, #da251c);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(218, 37, 28, 0.3);
  z-index: 3;
  padding: 10px;
  transition: all 0.3s ease;
}

.hdev-badge-image-box:hover .hdev-badge-icon-wrap {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(218, 37, 28, 0.45);
}

.hdev-badge-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.hdev-badge-icon.no-invert {
  filter: none;
}

/* Placeholder khi chưa có ảnh */
.hdev-badge-main-placeholder {
  width: 100%;
  height: 100%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}
.hdev-col-img-badge h4 {
  font-size: 1em;
  margin-bottom: -10px !important;
}
.hdev-col-img-badge p {
  font-size: 0.9em;
  margin-bottom: 0 !important;
}

/* Khắc phục khoảng cách dọc cho Row khi col bị set padding: 0 */
.row-img-badge-box {
  row-gap: 30px !important;
}

.row-img-badge-box > .col {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* --- Responsive Mobile --- */
@media (max-width: 767px) {
  .hdev-badge-main-img-wrap {
    width: var(--hdev-img-size-mobile, 130px);
    height: var(--hdev-img-size-mobile, 130px);
  }

  .hdev-badge-icon-wrap {
    width: var(--hdev-badge-size-mobile, 38px);
    height: var(--hdev-badge-size-mobile, 38px);
    padding: 8px;
    bottom: var(--hdev-badge-bottom-mobile, 2px);
    right: var(--hdev-badge-right-mobile, 2px);
  }
}
