/* Tech Kita V2.8 — 3D Glowing Niche Carousel */

.niche-section {
  margin-bottom: 32px;
  margin-top: 0;
}

.niche-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 0 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 24px;
  perspective: 1000px;
}

.niche-carousel::-webkit-scrollbar {
  display: none;
}

.niche-card {
  flex: 0 0 75%;
  max-width: 320px;
  position: relative;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  scroll-snap-align: start;
  transform-style: preserve-3d;
  transform: rotateY(0deg) translateZ(0);
}

.niche-card:hover {
  transform: rotateY(-5deg) translateZ(20px) scale(1.02);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 93, 250, 0.3),
    0 0 80px rgba(0, 93, 250, 0.1);
}

/* 3D Glow Effect */
.niche-card::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(
    135deg,
    rgba(0, 93, 250, 0.5) 0%,
    rgba(99, 102, 241, 0.3) 50%,
    rgba(0, 93, 250, 0.5) 100%
  );
  border-radius: 18px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
  filter: blur(8px);
}

.niche-card:hover::before {
  opacity: 1;
}

/* Depth Shadow */
.niche-card::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 10%;
  right: 10%;
  height: 30px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  transition: all 0.5s ease;
  transform: translateZ(-30px);
}

.niche-card:hover::after {
  opacity: 1;
  bottom: -25px;
  filter: blur(8px);
}

.niche-bg {
  position: absolute;
  inset: 0;
}

.niche-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.niche-card:hover .niche-bg img {
  transform: scale(1.08);
}

.niche-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(5, 5, 8, 0.1) 0%, 
    rgba(5, 5, 8, 0.6) 50%, 
    rgba(5, 5, 8, 0.85) 100%);
}

.niche-card:hover .niche-overlay {
  background: linear-gradient(180deg, 
    rgba(0, 93, 250, 0.05) 0%, 
    rgba(5, 5, 8, 0.5) 50%, 
    rgba(5, 5, 8, 0.8) 100%);
}

.niche-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 18px;
  z-index: 2;
}

.niche-label {
  display: inline-block;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.niche-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 6px;
  line-height: 1.4;
}

.niche-cta {
  font-size: 12px;
  font-weight: 600;
  color: #01a0fb;
  transition: all 0.2s ease;
}

.niche-card:hover .niche-cta {
  color: #fff;
  letter-spacing: 0.5px;
}

/* Peek Card — 3D Stack Effect */
.niche-peek {
  flex: 0 0 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  text-align: center;
  padding: 12px;
  transform: rotateY(-8deg) translateZ(-20px);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.niche-carousel:hover .niche-peek {
  opacity: 0.8;
}

/* Mobile */
@media (max-width: 768px) {
  .niche-carousel {
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    gap: 12px;
  }
  
  .niche-card {
    flex: 0 0 75%;
    max-width: 280px;
    height: 170px;
    border-radius: 12px;
  }
  
  .niche-card:hover {
    transform: rotateY(-3deg) translateZ(10px) scale(1.01);
  }
  
  .niche-content {
    padding: 14px;
  }
  
  .niche-label {
    font-size: 20px;
  }
  
  .niche-desc {
    font-size: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .niche-peek {
    flex: 0 0 60px;
    font-size: 10px;
    transform: rotateY(-5deg) translateZ(-10px);
  }
}

/* Desktop */
@media (min-width: 769px) {
  .niche-card {
    flex: 0 0 30%;
    max-width: 350px;
  }
}

/* Default 3D State — Always Visible */
.niche-card {
  transform: perspective(1000px) rotateY(-2deg) translateZ(10px);
}

/* Idle shadow removed — box-shadow at rest caused a dark band around the
   AI card's outer edge (translateZ +10px scales the shadow toward viewer).
   Shadow now appears on hover only. */
.niche-card:hover {
  transform: rotateY(-5deg) translateZ(20px) scale(1.02);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(0, 93, 250, 0.15),
    0 25px 50px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 93, 250, 0.3),
    0 0 80px rgba(0, 93, 250, 0.1);
}

.niche-card:nth-child(2) {
  transform: perspective(1000px) rotateY(-4deg) translateZ(5px);
}

.niche-card:nth-child(3) {
  transform: perspective(1000px) rotateY(-6deg) translateZ(0px);
}

.niche-card:nth-child(4) {
  transform: perspective(1000px) rotateY(-8deg) translateZ(-5px);
}

/* Niche Hint — Below Carousel */
.niche-hint {
  text-align: center;
  margin-top: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.3);
  animation: swipeHint 2s ease-in-out infinite;
}

@keyframes swipeHint {
  0%, 100% { opacity: 0.3; transform: translateX(0); }
  50% { opacity: 0.6; transform: translateX(-5px); }
}

/* P0 (6 Okt 2026): kad Game/Anime bukan pautan lagi — domain belum hidup */
.niche-card--soon {
  cursor: default;
}

.niche-card--soon:hover {
  transform: none;
  box-shadow: none;
  border-color: rgba(255, 255, 255, 0.1);
}

.niche-card--soon:hover::before,
.niche-card--soon:hover::after {
  opacity: 0.3;
}

.niche-card--soon:hover .niche-bg img {
  transform: none;
}

.niche-card--soon:hover .niche-cta {
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0;
}

.niche-card--soon .niche-cta {
  color: rgba(255, 255, 255, 0.75);
}
