/* =========================================
 *  BMC SERVICE TABS
 * =======================================*/

/* WRAPPER */
.bmc-service-tabs {
  margin: 40px 0;
  position: relative; /* để quản lý z-index nav/panels */
}

/* NAV (THANH TAB) */
.bmc-service-tab-nav {
  display: inline-flex;
  flex-wrap: wrap;
  background: transparent;
  border-radius: 26px 26px 0 0;
  padding-left: 24px;
  position: relative;
  z-index: 3; /* nằm trên panels để tooltip không bị che */
}

.bmc-service-tab-link {
  position: relative; /* anchor cho tooltip */
  border: none;
  background: transparent;
  padding: 14px 22px;
  border-radius: 26px 26px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: #197f3f;
  cursor: pointer;
  opacity: .7;
  transition: background .2s ease, color .2s ease, opacity .2s ease;
}

.bmc-service-tab-link.is-active {
  background: #e5f7ef;
  opacity: 1;
}

/* PANELS WRAP */
.bmc-service-tab-panels {
  position: relative;
  z-index: 1;
  background: #e5f7ef;
  border-radius: 26px;
  padding: 32px 32px 28px;
  margin-top: -10px; /* ăn lên dưới nav */
}

/* PANEL */
.bmc-service-tab-panel {
  display: none;
}

.bmc-service-tab-panel.is-active {
  display: block;
}

/* LAYOUT: text + image */
.bmc-service-panel-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

/* TEXT SIDE */
.bmc-service-panel-title {
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 700;
  color: #197f3f;
}

.bmc-service-panel-desc ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
}

.bmc-service-panel-desc li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 10px;
}

.bmc-service-panel-desc li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #27a449;
}

/* IMAGE + BUTTON */
.bmc-service-panel-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.bmc-service-panel-img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 32px;
  object-fit: cover;
}

.bmc-service-panel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 10px 28px;
  border-radius: 999px;
  border: 1px solid #197f3f;
  font-size: 14px;
  font-weight: 500;
  color: #197f3f;
  text-decoration: none;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 118, 63, .18);
  transition:
    background .2s ease,
    color .2s ease,
    box-shadow .2s ease,
    transform .15s ease;
}

.bmc-service-panel-btn:hover {
  background: #197f3f;
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 118, 63, .25);
  transform: translateY(-1px);
}

/* =========================
 * 1 HÀNG TAB Ở DESKTOP
 * =======================*/
@media (min-width: 992px) {
  .bmc-service-tab-nav {
    flex-wrap: nowrap;       /* không cho xuống dòng */
    overflow-x: visible;     /* để tooltip không bị cắt */
  }

  .bmc-service-tab-link {
    white-space: nowrap;     /* text trong 1 dòng */
    max-width: 230px;        /* giới hạn chiều rộng tab */
    overflow: hidden;
    text-overflow: ellipsis; /* nếu dài quá thì hiện ... */
  }
}

/* =========================
 * TOOLTIP FULL TITLE KHI HOVER
 * =======================*/

/* bubble */
.bmc-service-tab-link:hover::after {
  content: attr(data-full-title);
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 8px;
  background: #111827;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  max-width: 260px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
  z-index: 50;
}

/* mũi tên nhỏ */
.bmc-service-tab-link:hover::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #111827 transparent transparent transparent;
}

/* =========================
 * RESPONSIVE
 * =======================*/
@media (max-width: 992px) {
  .bmc-service-panel-inner {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

@media (max-width: 768px) {
  .bmc-service-tab-nav {
    padding-left: 0;
    flex-wrap: wrap;  /* mobile cho phép xuống dòng lại */
  }

  .bmc-service-panel-inner {
    grid-template-columns: 1fr;
  }

  .bmc-service-panel-media {
    align-items: flex-start;
  }

  /* tắt tooltip custom trên mobile cho đỡ chật */
  .bmc-service-tab-link:hover::after,
  .bmc-service-tab-link:hover::before {
    display: none;
  }
}
