/* ==========================================================================
   EASYNAUKRI4U: 3D CARD SHOWCASE & CAROUSEL ENGINE
   Modern, Ultra-Premium EdTech Showcase Design:
   - Elevated ambient glass stage with dynamic colored backdrop aura
   - Centered active spotlight card with 3D perspective depth and micro-tilt
   - Elegant flanking preview cards (smoothly angled, scaled & clickable)
   - Frosted glass floating controls with luminous hover states
   - Smooth animated pill pagination dots
   - Modern pill filter tabs for exam streams
   - Fully touch-swipe responsive across mobile, tablet, and desktop
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Showcase Stage Container
   -------------------------------------------------------------------------- */
.coverflow-group {
  display: block !important;
  position: relative !important;
  width: 100% !important;
  max-width: 1140px;
  margin: 0 auto 36px !important;
  padding: 0 !important;
  height: var(--flow-height, 520px) !important;
  min-height: 460px;
  border-radius: 28px !important;
  background: radial-gradient(ellipse at 50% 30%, #ffffff 0%, #f8fafc 85%, #f1f5f9 100%) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 20px 48px -12px rgba(18, 42, 99, 0.08),
              0 4px 16px rgba(18, 42, 99, 0.03) !important;
  overflow: hidden !important;
  perspective: 1400px !important;
  perspective-origin: center 45%;
  transform-style: preserve-3d !important;
  isolation: isolate;
  user-select: none;
  touch-action: pan-y;
  --aura-color: rgba(37, 99, 235, 0.16);
  --tilt-x: 0deg;
  --tilt-y: 0deg;
}

/* Ambient Backing Aura that Dynamically Morphs Color */
.coverflow-aura {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 520px;
  height: 400px;
  transform: translate3d(-50%, -50%, -100px);
  border-radius: 50%;
  background: radial-gradient(circle, var(--aura-color) 0%, transparent 70%);
  filter: blur(55px);
  pointer-events: none;
  z-index: 1;
  transition: background 0.6s ease, transform 0.4s ease;
  animation: coverflowAuraBreathe 6s ease-in-out infinite alternate;
}

@keyframes coverflowAuraBreathe {
  0% { opacity: 0.7; transform: translate3d(-50%, -50%, -100px) scale(0.95); }
  100% { opacity: 1; transform: translate3d(-50%, -50%, -100px) scale(1.08); }
}

/* Subtle Stage Grid Texture */
.coverflow-group::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(18, 42, 99, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(18, 42, 99, 0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at 50% 50%, black 50%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 50%, transparent 85%);
}

/* --------------------------------------------------------------------------
   2. Individual Showcase Cards (3D Coverflow Positioned)
   -------------------------------------------------------------------------- */
.coverflow-group > .coverflow-card {
  position: absolute !important;
  top: 40px !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: var(--card-width, 360px) !important;
  max-width: calc(100% - 48px) !important;
  min-width: 0 !important;
  min-height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  transform-origin: center center !important;
  transform-style: preserve-3d !important;
  transform: translateX(calc(-50% + var(--flow-x, 0px)))
             translateY(var(--flow-y, 0px))
             translateZ(var(--flow-z-space, 0px))
             rotateY(var(--flow-turn, 0deg))
             scale(var(--flow-scale, 1)) !important;
  opacity: var(--flow-opacity, 1) !important;
  filter: var(--flow-filter, none) !important;
  z-index: var(--flow-z, 10) !important;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 550ms cubic-bezier(0.22, 1, 0.36, 1),
              filter 550ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 550ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 300ms ease !important;
  box-sizing: border-box !important;
  backface-visibility: hidden;
  cursor: pointer;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 28px -4px rgba(18, 42, 99, 0.08),
              0 3px 10px -2px rgba(18, 42, 99, 0.04) !important;
  overflow: hidden !important;
  will-change: transform, opacity, filter;
}

/* Active Center Card (Spotlight) */
.coverflow-group > .coverflow-card.coverflow-active {
  cursor: default !important;
  border-color: rgba(37, 99, 235, 0.35) !important;
  box-shadow: 0 24px 54px -12px rgba(18, 42, 99, 0.18),
              0 8px 24px -4px rgba(18, 42, 99, 0.08),
              0 0 0 1.5px rgba(37, 99, 235, 0.2) !important;
  transform: translateX(calc(-50% + var(--flow-x, 0px)))
             translateY(var(--flow-y, 0px))
             translateZ(var(--flow-z-space, 40px))
             rotateY(var(--flow-turn, 0deg))
             scale(var(--flow-scale, 1)) !important;
}

/* High-specificity overrides for target showcase sections to lock centering and smooth transitions */
#exam-categories .exam-grid.coverflow-group > .coverflow-card,
#why-easynaukri4u .why-grid.coverflow-group > .coverflow-card,
#pyq-vault .pyq-vault-grid.coverflow-group > .coverflow-card {
  position: absolute !important;
  top: 40px !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  transform-origin: center center !important;
  transform-style: preserve-3d !important;
  transform: translateX(calc(-50% + var(--flow-x, 0px)))
             translateY(var(--flow-y, 0px))
             translateZ(var(--flow-z-space, 0px))
             rotateY(var(--flow-turn, 0deg))
             scale(var(--flow-scale, 1)) !important;
  opacity: var(--flow-opacity, 1) !important;
  filter: var(--flow-filter, none) !important;
  z-index: var(--flow-z, 10) !important;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 550ms cubic-bezier(0.22, 1, 0.36, 1),
              filter 550ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 550ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 300ms ease !important;
}

#exam-categories .exam-grid.coverflow-group > .coverflow-card.coverflow-active,
#why-easynaukri4u .why-grid.coverflow-group > .coverflow-card.coverflow-active,
#pyq-vault .pyq-vault-grid.coverflow-group > .coverflow-card.coverflow-active {
  transform: translateX(calc(-50% + var(--flow-x, 0px)))
             translateY(var(--flow-y, 0px))
             translateZ(var(--flow-z-space, 40px))
             rotateY(var(--flow-turn, 0deg))
             scale(var(--flow-scale, 1)) !important;
  opacity: 1 !important;
  filter: none !important;
  z-index: 50 !important;
}

/* Ensure links/buttons inside inactive cards do not hijack click-to-center */
.coverflow-group > .coverflow-card:not(.coverflow-active) a,
.coverflow-group > .coverflow-card:not(.coverflow-active) button {
  pointer-events: none !important;
}

/* Card Top Gradient Accent Bar */
.coverflow-group > .coverflow-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #38bdf8);
  border-radius: 20px 20px 0 0;
  z-index: 5;
}

/* Specific Accent Bar Colors based on Category / Type */
#exam-categories .coverflow-card[data-category="ssc"]::before { background: linear-gradient(90deg, #1d4ed8, #3b82f6) !important; }
#exam-categories .coverflow-card[data-category="banking"]::before { background: linear-gradient(90deg, #0f766e, #14b8a6) !important; }
#exam-categories .coverflow-card[data-category="railways"]::before { background: linear-gradient(90deg, #ea580c, #f97316) !important; }
#exam-categories .coverflow-card[data-category="civil-services"]::before { background: linear-gradient(90deg, #7c3aed, #a855f7) !important; }
#exam-categories .coverflow-card[data-category="defence"]::before { background: linear-gradient(90deg, #047857, #10b981) !important; }
#exam-categories .coverflow-card[data-category="teaching"]::before { background: linear-gradient(90deg, #e11d48, #f43f5e) !important; }

.why-card--teal::before { background: linear-gradient(90deg, #0f766e, #14b8a6) !important; }
.why-card--blue::before { background: linear-gradient(90deg, #1d4ed8, #3b82f6) !important; }
.why-card--warm::before { background: linear-gradient(90deg, #ea580c, #f97316) !important; }
.why-card--purple::before { background: linear-gradient(90deg, #7c3aed, #a855f7) !important; }

/* Inactive Flanking Cards Hover Lift */
.coverflow-group > .coverflow-card:not(.coverflow-active):hover {
  opacity: 0.9 !important;
  box-shadow: 0 16px 36px -6px rgba(18, 42, 99, 0.14) !important;
}

/* --------------------------------------------------------------------------
   3. Card Internal Layout Refinements
   -------------------------------------------------------------------------- */
.coverflow-card {
  padding: 26px 24px 22px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}

.coverflow-card h3,
.coverflow-card .exam-card__title,
.coverflow-card .why-card__title,
.coverflow-card .pyq-vault-card__title {
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif !important;
  font-size: 1.22rem !important;
  font-weight: 800 !important;
  color: var(--c-primary-950, #0c1b3d) !important;
  letter-spacing: -0.015em !important;
  line-height: 1.3 !important;
  margin: 12px 0 8px !important;
  text-transform: none !important;
}

.coverflow-card p,
.coverflow-card .exam-card__desc,
.coverflow-card .why-card__desc,
.coverflow-card .pyq-vault-card__desc {
  font-size: 0.92rem !important;
  color: #475569 !important;
  line-height: 1.5 !important;
  margin-bottom: 16px !important;
}

/* Meta Stats Boxes */
.coverflow-card .exam-card__meta,
.coverflow-card .pyq-vault-card__meta {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  padding: 10px 12px !important;
  background: #f8fafc !important;
  border: 1px solid #f1f5f9 !important;
  border-radius: 12px !important;
  margin-bottom: 16px !important;
  text-align: center;
}

.coverflow-card .exam-card__meta-item,
.coverflow-card .pyq-vault-card__meta-item {
  font-size: 0.78rem !important;
  color: #64748b !important;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coverflow-card .exam-card__meta-item strong,
.coverflow-card .pyq-vault-card__meta-item strong {
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: #0c1b3d !important;
}

/* CTA Buttons inside Active Card */
.coverflow-card .btn {
  font-weight: 700 !important;
  border-radius: 10px !important;
  padding: 11px 18px !important;
  font-size: 0.92rem !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 12px -2px rgba(37, 99, 235, 0.25) !important;
}

.coverflow-card .btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px -2px rgba(37, 99, 235, 0.35) !important;
}

/* --------------------------------------------------------------------------
   4. Floating Glass Controls (Prev / Next & Dots)
   -------------------------------------------------------------------------- */
.coverflow-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}

.coverflow-prev,
.coverflow-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 8px 20px -4px rgba(18, 42, 99, 0.12),
              0 2px 6px rgba(18, 42, 99, 0.04) !important;
  color: #0c1b3d !important;
  cursor: pointer;
  pointer-events: auto;
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
  outline: none;
}

.coverflow-prev svg,
.coverflow-next svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
  transition: transform 0.2s ease;
}

.coverflow-prev { left: 20px; }
.coverflow-next { right: 20px; }

.coverflow-prev:hover,
.coverflow-next:hover {
  background: #ffffff !important;
  color: #2563eb !important;
  border-color: #bfdbfe !important;
  transform: translateY(-50%) scale(1.1) !important;
  box-shadow: 0 12px 28px -4px rgba(37, 99, 235, 0.25) !important;
}

.coverflow-prev:active { transform: translateY(-50%) scale(0.96) !important; }
.coverflow-next:active { transform: translateY(-50%) scale(0.96) !important; }

.coverflow-prev:hover svg { transform: translateX(-2px); }
.coverflow-next:hover svg { transform: translateX(2px); }

/* Animated Pill Pagination Dots */
.coverflow-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 85%;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 45;
  pointer-events: auto;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.7);
  box-shadow: 0 4px 14px -2px rgba(18, 42, 99, 0.05);
}

.coverflow-dots button {
  width: 8px;
  height: 8px;
  min-width: 8px;
  padding: 0 !important;
  border-radius: 999px !important;
  background: #cbd5e1 !important;
  border: none !important;
  cursor: pointer;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.3s ease,
              box-shadow 0.3s ease !important;
}

.coverflow-dots button:hover {
  background: #94a3b8 !important;
}

.coverflow-dots button.is-active {
  width: 24px !important;
  background: #2563eb !important;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.45) !important;
}

/* --------------------------------------------------------------------------
   5. Modern Filter Tabs for #exam-categories
   -------------------------------------------------------------------------- */
.exam-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.exam-filter-btn {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 999px !important;
  padding: 8px 18px !important;
  font-family: 'Plus Jakarta Sans', var(--font-sans), sans-serif !important;
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: #475569 !important;
  box-shadow: 0 2px 6px rgba(18, 42, 99, 0.04) !important;
  cursor: pointer;
  transition: all 0.22s ease !important;
}

.exam-filter-btn:hover {
  border-color: #94a3b8 !important;
  color: #0c1b3d !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 10px rgba(18, 42, 99, 0.08) !important;
}

.exam-filter-btn.is-active {
  background: var(--c-primary-900, #122a63) !important;
  border-color: var(--c-primary-900, #122a63) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(18, 42, 99, 0.28) !important;
  transform: translateY(-1px) !important;
}

/* --------------------------------------------------------------------------
   6. Mobile & Tablet Responsiveness
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .coverflow-group {
    height: var(--flow-height, 500px) !important;
    border-radius: 22px !important;
  }
  .coverflow-prev { left: 10px; }
  .coverflow-next { right: 10px; }
}

@media (max-width: 680px) {
  .coverflow-group {
    height: var(--flow-height, 480px) !important;
    border-radius: 20px !important;
    padding: 0 !important;
  }

  .coverflow-group > .coverflow-card {
    top: 24px !important;
    width: min(340px, calc(100vw - 44px)) !important;
    max-width: calc(100vw - 44px) !important;
    padding: 20px 18px 16px !important;
  }

  .coverflow-card h3,
  .coverflow-card .exam-card__title,
  .coverflow-card .why-card__title,
  .coverflow-card .pyq-vault-card__title {
    font-size: 1.1rem !important;
    margin: 8px 0 6px !important;
  }

  .coverflow-card p,
  .coverflow-card .exam-card__desc,
  .coverflow-card .why-card__desc,
  .coverflow-card .pyq-vault-card__desc {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    margin-bottom: 12px !important;
  }

  .coverflow-prev,
  .coverflow-next {
    width: 38px;
    height: 38px;
    top: auto;
    bottom: 14px;
    transform: none;
    z-index: 50;
  }

  .coverflow-prev { left: 16px; }
  .coverflow-next { right: 16px; }

  .coverflow-prev:hover,
  .coverflow-next:hover {
    transform: scale(1.06) !important;
  }

  .coverflow-dots {
    bottom: 20px;
    padding: 4px 10px;
    max-width: 55%;
  }

  .coverflow-dots button {
    width: 7px;
    height: 7px;
    min-width: 7px;
  }

  .coverflow-dots button.is-active {
    width: 18px !important;
  }

  .exam-filters {
    gap: 6px;
    margin-bottom: 20px;
  }

  .exam-filter-btn {
    padding: 6px 12px !important;
    font-size: 0.78rem !important;
  }
}

/* Reduced Motion Fallback */
@media (prefers-reduced-motion: reduce) {
  .coverflow-group > .coverflow-card {
    transition: none !important;
  }
  .coverflow-aura {
    animation: none !important;
  }
}


