/* =============================================
   HD Partners Slider - 2 hàng chạy ngược chiều
   JS requestAnimationFrame — mượt, không giật
   ============================================= */

/* === Section wrapper === */
.hd-partners-section {
  padding: 40px 0 50px;
  width: 100%;
  overflow: hidden;
}

/* === Mỗi hàng === */
.hd-marquee-row {
  overflow: hidden;
  width: 100%;
  margin-bottom: 12px;
  position: relative;
  /* Fade hai cạnh */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 6%,
    #000 94%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000 6%,
    #000 94%,
    transparent 100%
  );
}

.hd-marquee-row:last-child {
  margin-bottom: 0;
}

/* === Track — JS sẽ translate cái này === */
.hd-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
  /* KHÔNG có transition — JS lo hoàn toàn */
}

/* === Mỗi logo item === */
.hd-partner-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 8px 12px;    /* gap giữa các item */
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.22s ease,
              border-color 0.22s ease,
              transform 0.22s ease;
  cursor: default;
  text-decoration: none;
}

.hd-partner-item:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}

a.hd-partner-item { cursor: pointer; }

/* === Logo image === */
.hd-partner-item img {
  display: block;
  height: 50px;
  width: auto;
  max-width: none;
  object-fit: contain;
  filter: brightness(1.08);
  transition: filter 0.22s ease;
}

.hd-partner-item:hover img {
  filter: brightness(1.3);
}

@media (min-width: 768px) {
  .hd-partner-item img { height: 68px; }
}

/* === Theme sáng === */
.hd-partners-section.light .hd-partner-item {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.12);
}
.hd-partners-section.light .hd-partner-item:hover {
  background: rgba(0,0,0,0.09);
  border-color: rgba(0,0,0,0.26);
}
.hd-partners-section.light .hd-partner-item img {
  filter: none;
}

/* === Nền nút TRẮNG ĐẶC (cho logo không tách nền) === */
.hd-partners-section.item-white .hd-partner-item {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.hd-partners-section.item-white .hd-partner-item:hover {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
/* Logo trên nền trắng → giữ màu gốc, không làm sáng */
.hd-partners-section.item-white .hd-partner-item img,
.hd-partners-section.item-white .hd-partner-item:hover img {
  filter: none;
}

/* === Admin page === */
.hd-partners-admin-wrap .hd-admin-row-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.hd-partners-admin-wrap h3 {
  margin-top: 0;
  font-size: 16px;
  border-bottom: 2px solid #2271b1;
  padding-bottom: 8px;
  display: inline-block;
}
.hd-logo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  min-height: 60px;
  padding: 10px;
  background: #f9f9f9;
  border: 1px dashed #ccc;
  border-radius: 6px;
}
.hd-logo-item-admin {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: grab;
  user-select: none;
}
.hd-logo-item-admin img { height: 36px; width: auto; }
.hd-logo-item-admin .remove-logo {
  background: #d63638; color: #fff;
  border: none; border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 11px; cursor: pointer;
  line-height: 18px; text-align: center; padding: 0;
}
.hd-logo-item-admin .remove-logo:hover { background: #b32d2e; }
.hd-speed-field {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px; font-size: 13px;
}
.hd-speed-field input[type=range] { width: 180px; }
