/* =====================================================================
   Badge "Hot News" (like tinggi) & "For You News" (dilihat tinggi) pada
   kartu dan halaman detail Berita. Memakai variabel tema (--gold dkk)
   supaya menyatu dengan gaya elegan-formal situs.
   ===================================================================== */

/* ---- Hot News: hati berkilau ---- */
.badge-hot {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #ff5d7a, #ff4d6d 55%, #e8375a);
  box-shadow: 0 2px 10px rgba(232, 55, 90, 0.35);
  overflow: hidden;
  white-space: nowrap;
}
.badge-hot .badge-hot__icon {
  position: relative;
  display: inline-flex;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}
.badge-hot .badge-hot__icon svg {
  width: 100%;
  height: 100%;
  fill: #fff;
  animation: badgeHotBeat 1.15s ease-in-out infinite;
  transform-origin: center;
}
/* Kilau yang menyapu dari kiri ke kanan berulang */
.badge-hot::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.75) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  animation: badgeHotShine 2.6s ease-in-out infinite;
}
/* Percikan kecil berkilau di sekitar ikon hati */
.badge-hot__sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px 1px rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
}
.badge-hot__sparkle:nth-child(1) { top: -2px; left: 1px; animation: badgeHotSparkle 1.8s ease-in-out infinite; animation-delay: 0s; }
.badge-hot__sparkle:nth-child(2) { top: 8px; left: -1px; animation: badgeHotSparkle 1.8s ease-in-out infinite; animation-delay: 0.5s; }
.badge-hot__sparkle:nth-child(3) { top: 2px; left: 11px; animation: badgeHotSparkle 1.8s ease-in-out infinite; animation-delay: 1s; }

@keyframes badgeHotBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.22); }
  40% { transform: scale(0.95); }
  55% { transform: scale(1.1); }
}
@keyframes badgeHotShine {
  0% { left: -60%; }
  55%, 100% { left: 130%; }
}
@keyframes badgeHotSparkle {
  0%, 100% { opacity: 0; transform: scale(0.4); }
  50% { opacity: 1; transform: scale(1); }
}

/* ---- For You News: api bergerak ---- */
.badge-foryou {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #3a2305;
  background: linear-gradient(135deg, var(--gold-soft, #f0ddb0), var(--gold, #d4a94c) 60%, var(--gold-deep, #ad8330));
  box-shadow: 0 2px 10px rgba(173, 131, 48, 0.4);
  overflow: hidden;
  white-space: nowrap;
}
.badge-foryou .badge-foryou__icon {
  position: relative;
  display: inline-flex;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}
.badge-foryou .badge-foryou__icon svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.badge-foryou .flame-core,
.badge-foryou .flame-inner {
  transform-origin: 50% 90%;
  animation: badgeFlameFlicker 900ms ease-in-out infinite;
}
.badge-foryou .flame-inner {
  animation-duration: 760ms;
  animation-direction: alternate;
}

@keyframes badgeFlameFlicker {
  0%   { transform: scale(1, 1) translateY(0) skewX(0deg); }
  20%  { transform: scale(0.94, 1.05) translateY(-0.3px) skewX(-2deg); }
  40%  { transform: scale(1.06, 0.92) translateY(0.2px) skewX(2deg); }
  60%  { transform: scale(0.97, 1.04) translateY(-0.2px) skewX(-1deg); }
  80%  { transform: scale(1.04, 0.96) translateY(0.1px) skewX(1.5deg); }
  100% { transform: scale(1, 1) translateY(0) skewX(0deg); }
}

/* Penempatan di kartu & detail berita */
.news-card .badge-hot,
.news-card .badge-foryou,
.bc-media .badge-hot,
.bc-media .badge-foryou {
  position: absolute;
  top: 10px;
  z-index: 2;
}
.news-card .badge-hot,
.bc-media .badge-hot { left: 10px; }
.news-card .badge-foryou,
.bc-media .badge-foryou { left: 10px; }
.news-card .badge-hot + .badge-foryou,
.news-card .badge-foryou + .badge-hot,
.bc-media .badge-hot + .badge-foryou,
.bc-media .badge-foryou + .badge-hot { top: 40px; }
.news-card .thumb { position: relative; }

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 10px;
}

@media (prefers-reduced-motion: reduce) {
  .badge-hot .badge-hot__icon svg,
  .badge-hot::after,
  .badge-hot__sparkle,
  .badge-foryou .flame-core,
  .badge-foryou .flame-inner {
    animation: none !important;
  }
}
