/* ================================================================================================

    Peringatan !!

===================================================================================================

    Kode yang ditampilkan di sini sepenuhnya milik Renaldi Adriansah / PT. Kiosweb Teknologi Indonesia.
    Dilarang keras untuk menyalin, mendistribusikan, atau menggunakan materi ini tanpa izin tertulis dari pemilik hak cipta.
    
    [!] Undang-Undang Nomor 28 Tahun 2014 tentang Hak Cipta
    [!] Nomor Pencacatan    : 000476159
    [?] Contact             : 085293026542

================================================================================================ */

.card-populer {
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: var(--white);
  border-radius: 10px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  position: relative;
  transition: all ease-in 0.1s;
}

.card-populer:hover {
  transition: all ease-in 0.1s;
  border: 2px solid var(--yellow-primary);
}

.card-populer::before {
  position: absolute;
  content: "";
  width: 60px;
  height: 1400%;
  background-color: transparent;
  animation: animatepop 4s linear infinite;
}
.card-populer:hover::before {
  background-color: var(--yellow-primary);
}

[data-theme="dark"] .card-populer:hover::before {
  background-color: var(--white);
}

.card-populer::after {
  position: absolute;
  content: "";
  width: 100%;
  height: 100%;
  background-color: #14192b;
  border-radius: 10px;
  overflow: hidden;
}

.card-populer:hover::after {
  width: calc(100% - 5px);
  height: calc(100% - 5px);
}

@keyframes animatepop {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

.card-populer-content {
  position: relative;
  z-index: 10;
  color: aliceblue;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background-position: top;
  background-position-y: 10%;
  background-size: cover;
  overflow: hidden;
  transition: all ease-out 0.1s;
}

.card-populer-content .mask {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #14192b;
  opacity: 0.5;
  transition: all ease-out 0.3s;
  top: 0;
  left: 0;
  z-index: 1;
}

.card-populer:hover .card-populer-content .mask {
  opacity: 0.5;
  transition: all ease-out 0.3s;
}

.card-populer-text {
  display: flex;
  justify-content: center;
  align-items: start;
  text-align: start;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 2;
  transition: all ease-out 0.3s;
  flex-grow: 1;
  padding-right: 4px;
}

.card-populer:hover .card-populer-text {
  display: flex;
  justify-content: center;
  align-items: start;
  text-align: start;
  transition: all ease-out 0.3s;
  padding-right: 4px;
}

.card-populer-img {
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0px 20px;
  position: relative;
  z-index: 20;
  transition: all ease-out 0.3s;
}

.card-populer-img img {
  border-radius: 10px;
  height: calc(100% - 30px);
  aspect-ratio: 1/1;
  /* border: 1px solid var(--white); */
  transition: all ease-out 0.3s;
}

.card-populer:hover .card-populer-img {
  /* padding: 0px 20px; */
  transition: all ease-out 0.3s;
}

.card-populer:hover .card-populer-img img {
  height: calc(100% - 30px);
  transition: all ease-out 0.3s;
}

.card-populer-content {
  display: flex;
  align-items: center;
}

.card-populer:hover .card-populer-content {
  width: calc(100% - 5px);
  height: calc(100% - 5px);
  transition: all ease-out 0.1s;
  position: relative;
}

.card-populer-content h1 {
  font-size: 14px;
  color: var(--white);
  font-weight: 600;
  text-shadow: 1px 1px 4px #14192b;
}

.card-populer:hover .card-populer-content h1 {
  font-size: 16px;
}

.card-populer-content span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 1px 1px 4px #14192b;
  text-align: start;
}

@media (max-width: 756px) {
  .card-populer-content h1 {
    font-size: 12px;
    /* text-align: start; */
  }

  .card-populer:hover .card-populer-content h1 {
    font-size: 14px;
    /* text-align: start; */
  }

  .card-populer-content span {
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  .card-populer-content h1 {
    font-size: 0.625rem;
    /* text-align: start; */
  }

  .card-populer:hover .card-populer-content h1 {
    font-size: 12px;
    text-align: start;
  }

  .card-populer-content span {
    font-size: 10px;
  }

  .card-populer {
    height: 80px;
  }

  .card-populer:hover .card-populer-img img {
    height: calc(100% - 30px);
  }

  .card-populer .card-populer-img {
    padding: 0px 10px;
  }

  .card-populer-img img {
    border-radius: 10px;
  }
}

.card-populer {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.1s ease;
}

.card-populer:hover {
  transform: translateY(-5px);
}

.card-populer-content {
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
}

.card-populer-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transform: skewX(-25deg);
  z-index: 3;
  pointer-events: none;
}

.card-populer:hover .card-populer-content::before {
  animation: shine 0.8s ease-in-out;
}

@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 150%;
  }
}

.card-populer-content::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at var(--mouse-x, 50%) var(--mouse-y, 0%),
    rgba(255, 255, 255, 0.15) 0%,
    transparent 60%
  );
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card-populer:hover .card-populer-content::after {
  opacity: 1;
}

.card-populer-img::after {
  content: "";
  position: absolute;
  top: 10%;
  right: 10%;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  opacity: 0;
  box-shadow: 
    0 0 10px rgba(255, 255, 255, 0.8),
    0 0 20px rgba(255, 255, 255, 0.6),
    0 0 30px rgba(255, 255, 255, 0.4);
  z-index: 25;
}

.card-populer:hover .card-populer-img::after {
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.card-populer:hover {
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 215, 0, 0.2);
}
