/* ==========================================================================
   ExamON - 3D Carousel & Coverflow Slider for Exam Schedule (Jadwal Ujian)
   Preserves full compatibility with Filter Jenjang, Search, and Mobile Layout.
   ========================================================================== */

/* 1. Main 3D Wrapper (Registered with class .exam-group for Filter Jenjang) */
.examon-3d-wrapper {
  position: relative;
  width: 100%;
  margin: 10px 0 32px 0;
  padding-bottom: 30px;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .examon-3d-wrapper {
    /* Clearance padding agar tidak tabrakan dengan fixed bottom navigation */
    padding-bottom: 85px !important;
    margin-bottom: 20px !important;
  }
}

/* 2. Top Toolbar (Counter, Autoplay Toggle, Dots Indicator) */
.examon-3d-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 2px 8px -1px rgba(15, 23, 42, 0.05);
  margin-bottom: 12px;
}

.examon-3d-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.examon-3d-badge-counter {
  font-size: 11.5px;
  font-weight: 800;
  color: #4338ca;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 4px 12px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.05);
}

.examon-3d-btn-autoplay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.examon-3d-btn-autoplay.active {
  background: #f0fdf4;
  border-color: #86efac;
  color: #15803d;
}

.examon-3d-btn-autoplay:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.examon-autoplay-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: examon-pulse-ring 1.8s infinite;
}

@keyframes examon-pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Dots Indicator Bar (Styled like video 1.mp4) */
.examon-3d-dots-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 2px 0;
}

.examon-3d-dot {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background: #cbd5e1;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.examon-3d-dot:hover {
  background: #818cf8;
  transform: scale(1.3);
}

.examon-3d-dot.active {
  width: 28px;
  height: 9px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.45);
}

/* 3. 3D Stage Container */
.examon-3d-stage {
  position: relative !important;
  width: 100% !important;
  min-height: 460px !important;
  height: 460px !important;
  perspective: 1200px !important;
  -webkit-perspective: 1200px !important;
  perspective-origin: 50% 50% !important;
  transform-style: preserve-3d !important;
  -webkit-transform-style: preserve-3d !important;
  overflow: hidden !important; /* Mencegah horizontal scrollbar dan card meluber */
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 4px 0 12px 0 !important;
  touch-action: pan-y !important;
}

/* Ambient Center Aura */
.examon-3d-stage::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 480px;
  max-width: 90%;
  height: 240px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.15) 0%, rgba(59, 130, 246, 0.05) 50%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(28px);
}

/* 4. Exam Cards Inside 3D Stage */
.examon-3d-stage .exam-card {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 335px !important;
  max-width: 86vw !important;
  margin-left: -167.5px !important;
  margin-top: -210px !important;
  height: auto !important;
  min-height: 385px !important;
  box-sizing: border-box !important;
  transform-style: preserve-3d !important;
  -webkit-transform-style: preserve-3d !important;
  backface-visibility: hidden !important;
  -webkit-backface-visibility: hidden !important;
  will-change: transform, opacity, box-shadow, filter !important;
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.42s ease,
              filter 0.42s ease,
              box-shadow 0.42s ease,
              border-color 0.42s ease !important;
  cursor: pointer !important;
  border-radius: 20px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04) !important;
  padding: 14px !important;
}

/* Active Center Card */
.examon-3d-stage .exam-card.is-active-card {
  cursor: default !important;
  border-color: #6366f1 !important;
  box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.38),
              0 0 0 2px rgba(99, 102, 241, 0.45),
              0 4px 12px rgba(15, 23, 42, 0.08) !important;
}

/* Side Cards Hover Preview */
.examon-3d-stage .exam-card:not(.is-active-card):hover {
  filter: brightness(1.04) saturate(1.1) !important;
  border-color: #cbd5e1 !important;
}

/* 5. Floating Navigation Arrows */
.examon-3d-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(226, 232, 240, 0.95);
  color: #334155;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.15), 0 2px 5px rgba(15, 23, 42, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 15px;
  outline: none;
}

.examon-3d-nav-btn:hover {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
  transform: translateY(-50%) scale(1.12);
  box-shadow: 0 12px 28px -4px rgba(79, 70, 229, 0.45);
}

.examon-3d-nav-btn:active {
  transform: translateY(-50%) scale(0.92);
}

.examon-3d-nav-btn.nav-prev {
  left: 12px;
}

.examon-3d-nav-btn.nav-next {
  right: 12px;
}

/* 6. Responsive Tuning */
@media (max-width: 768px) {
  .examon-3d-stage {
    min-height: 430px !important;
    height: 430px !important;
    perspective: 850px !important;
    -webkit-perspective: 850px !important;
  }

  .examon-3d-stage .exam-card {
    width: 295px !important;
    max-width: 84vw !important;
    margin-left: -147.5px !important;
    margin-top: -195px !important;
    min-height: 365px !important;
    padding: 12px !important;
  }

  .examon-3d-nav-btn {
    width: 38px;
    height: 38px;
    font-size: 13px;
  }

  .examon-3d-nav-btn.nav-prev { left: 4px; }
  .examon-3d-nav-btn.nav-next { right: 4px; }
}

@media (max-width: 480px) {
  .examon-3d-toolbar {
    padding: 8px 12px;
  }
  .examon-3d-stage .exam-card {
    width: 280px !important;
    margin-left: -140px !important;
  }
}
