/* ── HERO BANNER TRANG CHỦ (.uh-hero-section) ──
   Ảnh slide chứa sẵn nội dung (marketing cung cấp); thanh tiền điện cố định đè lên mọi slide.
   Topbar + header + hero + trust bar = đúng 1 màn hình. --uh-hero-offset do uhome-hero-slider.js đo lại theo chiều cao thật. */
.uh-hero-section {
  --uh-hero-offset: 112px;
  --uh-hero-dock: 0px; /* thanh điều hướng cố định dưới đáy (mobile/tablet) */
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: max(600px, calc(100vh - var(--uh-hero-offset) - var(--uh-hero-dock)));
  min-height: max(600px, calc(100svh - var(--uh-hero-offset) - var(--uh-hero-dock)));
  background: #ffffff;
  overflow: hidden;
}

.uh-hero-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Slide ── */
.uh-hero-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--uh-color-navy, #14202e);
}

.uh-hero-viewport > .uh-hero-swiper {
  position: absolute;
  inset: 0;
  --swiper-theme-color: var(--uh-color-primary, #e4181f);
}

.uh-hero-slide {
  display: block;
  overflow: hidden;
  background: var(--uh-color-navy, #14202e);
}

.uh-hero-slide picture,
.uh-hero-slide-img {
  display: block;
  width: 100%;
  height: 100%;
}

.uh-hero-slide-img {
  object-fit: cover;
  object-position: center;
}

.uh-hero-swiper > .uh-hero-pagination.swiper-pagination {
  bottom: 126px;
}

.uh-hero-pagination .swiper-pagination-bullet {
  width: 9px;
  height: 9px;
  background: #ffffff;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.uh-hero-pagination .swiper-pagination-bullet-active {
  width: 30px;
  border-radius: 999px;
  background: var(--uh-color-amber, #ffa724);
  opacity: 1;
}

/* ── Thanh tiền điện cố định (đè mọi slide) ── */
.uh-hero-bill-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 156px;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: 0 24px;
  pointer-events: none;
}

.uh-hero-bill-card {
  position: relative;
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 940px;
  box-sizing: border-box;
  padding: 18px 20px 18px 30px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 22px;
  box-shadow:
    0 24px 64px rgba(14, 24, 38, 0.45),
    0 0 0 6px rgba(255, 255, 255, 0.14),
    0 0 48px var(--uh-color-primary-glow, rgba(228, 24, 31, 0.28));
}

.uh-hero-bill-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 170px;
}

.uh-hero-bill-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--uh-color-text-muted, #4a5a6b);
}

.uh-hero-bill-value {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--uh-color-primary, #e4181f);
}

.uh-hero-range-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.uh-hero-range {
  --uh-fill: 40%;
  width: 100%;
  height: 8px;
  margin: 8px 0 0;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, var(--uh-color-primary, #e4181f) var(--uh-fill), #e2e8f0 var(--uh-fill));
}

.uh-hero-range::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 4px solid var(--uh-color-primary, #e4181f);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 24, 38, 0.3);
  -webkit-appearance: none;
  appearance: none;
  transition: transform 0.15s ease;
}

.uh-hero-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 4px solid var(--uh-color-primary, #e4181f);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 24, 38, 0.3);
}

.uh-hero-range:hover::-webkit-slider-thumb,
.uh-hero-range:focus-visible::-webkit-slider-thumb {
  transform: scale(1.12);
}

.uh-hero-range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--uh-color-text-subtle, #7a8895);
}

.uh-hero-bill-btn {
  height: 56px;
  gap: 10px;
  padding: 0 28px;
  font-size: 16px;
  white-space: nowrap;
  border-radius: 16px;
}

/* ── Trust bar 5 ô: liquid glass nổi trên ảnh (không có nền riêng → không trùng màu section bên dưới) ── */
.uh-hero-trust-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  z-index: 6;
  padding: 0 24px;
  pointer-events: none;
}

.uh-hero-trust-container {
  position: relative;
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  box-sizing: border-box;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px;
  list-style: none;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.08) 38%, rgba(255, 255, 255, 0.04) 62%, rgba(255, 255, 255, 0.22) 100%),
    rgba(14, 24, 38, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 28px;
  backdrop-filter: blur(22px) saturate(1.8) brightness(1.05);
  -webkit-backdrop-filter: blur(22px) saturate(1.8) brightness(1.05);
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.75),
    inset 0 -1.5px 1px rgba(255, 255, 255, 0.18),
    inset 0 0 22px rgba(255, 255, 255, 0.1),
    0 22px 50px rgba(14, 24, 38, 0.35);
}

/* Vệt sáng chạy ngang như mặt kính */
.uh-hero-trust-container::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 30%;
  background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, 0.28) 50%, transparent 100%);
  transform: skewX(-18deg);
  animation: uh-hero-sheen 7s ease-in-out infinite;
  pointer-events: none;
}

@keyframes uh-hero-sheen {
  0%, 55% { left: -40%; }
  100% { left: 130%; }
}

.uh-hero-trust-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 10px;
  border-radius: 20px;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.uh-hero-trust-item + .uh-hero-trust-item::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.uh-hero-trust-item:hover {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5);
}

.uh-hero-trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 46px;
  height: 46px;
  color: var(--uh-color-primary, #e4181f);
  background: linear-gradient(160deg, #ffffff 0%, rgba(255, 255, 255, 0.78) 100%);
  border-radius: 50%;
  box-shadow: inset 0 -2px 4px rgba(228, 24, 31, 0.12), 0 8px 18px rgba(14, 24, 38, 0.28);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.uh-hero-trust-item:hover .uh-hero-trust-icon {
  transform: translateY(-3px) scale(1.06);
  box-shadow: inset 0 -2px 4px rgba(228, 24, 31, 0.12), 0 12px 24px rgba(14, 24, 38, 0.35), 0 0 0 5px rgba(255, 255, 255, 0.22);
}

.uh-hero-trust-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.25;
  white-space: nowrap;
  color: #ffffff;
  text-shadow: 0 2px 10px rgba(14, 24, 38, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .uh-hero-trust-container::before {
    animation: none;
    display: none;
  }
}

@media (max-width: 1100px) {
  .uh-hero-trust-item {
    flex-direction: column;
    gap: 8px;
    padding: 12px 6px;
  }
  .uh-hero-trust-title {
    font-size: 13px;
    letter-spacing: 0.05em;
  }
}

@media (max-width: 992px) {
  .uh-hero-section {
    --uh-hero-dock: 64px;
  }
  .uh-hero-bill-wrap {
    bottom: 146px;
  }
  .uh-hero-bill-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 20px;
    padding: 18px 20px 20px;
  }
  .uh-hero-range-box {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .uh-hero-bill-btn {
    grid-row: 1;
    grid-column: 2;
  }
}

/* Mobile (iPhone 16 ≈ 393px): ảnh chiếm phần lớn màn hình, dải 5 ô là kính liquid glass ở đáy ảnh,
   thanh tiền điện là thẻ nằm ngay dưới ảnh → ảnh không bị che. Tổng hero vừa 1 màn hình. */
@media (max-width: 640px) {
  .uh-hero-section {
    --uh-hero-dock: 64px;
    --uh-hero-card: 156px;
    min-height: 0;
    background: var(--uh-color-navy, #14202e);
  }

  .uh-hero-viewport {
    display: flex;
    flex-direction: column;
    flex: none;
    background: transparent;
  }

  .uh-hero-viewport > .uh-hero-swiper {
    position: relative;
    inset: auto;
    width: 100%;
    height: max(360px, calc(100svh - var(--uh-hero-offset) - var(--uh-hero-dock) - var(--uh-hero-card)));
  }

  /* Chấm chuyển slide: nhỏ hơn, sát mép trên ảnh */
  .uh-hero-swiper > .uh-hero-pagination.swiper-pagination {
    top: 4px;
    bottom: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 6px;
    line-height: 0;
    font-size: 0;
  }

  .uh-hero-pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    margin: 0 3px;
  }

  .uh-hero-pagination .swiper-pagination-bullet-active {
    width: 20px;
  }

  /* Dải 5 ô: kính, 1 hàng, chữ nhỏ */
  .uh-hero-trust-bar {
    bottom: 10px;
    padding: 0 10px;
  }

  .uh-hero-trust-container {
    grid-template-columns: repeat(5, 1fr);
    padding: 5px 2px;
    border-radius: 20px;
  }

  .uh-hero-trust-item,
  .uh-hero-trust-item:nth-child(n + 4) {
    flex-direction: column;
    justify-content: flex-start;
    gap: 5px;
    padding: 7px 1px 5px;
    text-align: center;
    border-radius: 15px;
  }

  .uh-hero-trust-icon {
    width: 32px;
    height: 32px;
  }

  .uh-hero-trust-icon svg {
    width: 17px;
    height: 17px;
  }

  .uh-hero-trust-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
  }

  /* Thẻ tiền điện: dưới ảnh, gọn */
  .uh-hero-bill-wrap {
    position: relative;
    bottom: auto;
    padding: 10px 12px 12px;
    margin-top: 0;
  }

  .uh-hero-bill-card {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px 14px 14px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
  }

  .uh-hero-bill-info {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    min-width: 0;
  }

  .uh-hero-bill-label {
    font-size: 11px;
  }

  .uh-hero-bill-value {
    font-size: 20px;
  }

  .uh-hero-range-box,
  .uh-hero-bill-btn {
    grid-column: auto;
    grid-row: auto;
  }

  /* Núm kéo cao 24px tràn ra ngoài thanh 6px → chừa chỗ để không chạm nút bên dưới */
  .uh-hero-range-box {
    padding: 12px 0 10px;
  }

  .uh-hero-range {
    height: 6px;
    margin: 0;
  }

  .uh-hero-range::-webkit-slider-thumb {
    width: 24px;
    height: 24px;
    border-width: 3px;
  }

  .uh-hero-range-scale {
    display: none;
  }

  .uh-hero-bill-btn {
    width: 100%;
    height: 40px;
    padding: 0 18px;
    font-size: 14px;
    border-radius: 14px;
  }
}

/* Ẩn trust bar: hạ thẻ tiền điện xuống sát đáy slide (chỉ desktop/tablet; mobile thẻ nằm dưới ảnh) */
@media (min-width: 641px) {
  .uh-hero-section--no-trust .uh-hero-bill-wrap {
    bottom: 28px;
  }
}

/* PC: thẻ tiền điện cách đáy slide 16px */
@media (min-width: 993px) {
  .uh-hero-section--no-trust .uh-hero-bill-wrap {
    bottom: 16px;
  }
}
