/* ==========================================================================
   REACT BITS: DRIFTWALL COMPONENT CSS
   3D Infinite Drifting Wall of Credentials with Perspective & Parallax
   ========================================================================== */

.drift-wall-showcase-wrapper {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-bottom: 2rem;
  background: transparent;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: hidden;
}

[data-theme="light"] .drift-wall-showcase-wrapper {
  background: transparent;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   SECTION-WISE MINI NAVBAR FOR VERIFIED CREDENTIALS SHOWCASE
   ========================================================================== */

.certs-nav-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  position: relative;
  z-index: 25;
  width: 100%;
}

.certs-category-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border-radius: 0;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.certs-category-nav::-webkit-scrollbar {
  display: none;
}

[data-theme="light"] .certs-category-nav {
  background: transparent !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.certs-nav-btn {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), 0 2px 8px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.certs-nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.35), 0 6px 16px rgba(0, 0, 0, 0.25);
}

.certs-nav-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.28) 0%, rgba(59, 130, 246, 0.18) 100%);
  border-color: rgba(165, 180, 252, 0.45);
  box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.4), 0 4px 14px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .certs-nav-btn {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #475569;
  box-shadow: inset 0 1px 1px #ffffff, 0 2px 8px rgba(70, 90, 130, 0.08);
}

[data-theme="light"] .certs-nav-btn:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.16);
  color: #0f172a;
  box-shadow: inset 0 1px 1px #ffffff, 0 6px 16px rgba(70, 90, 130, 0.12);
}

[data-theme="light"] .certs-nav-btn.active {
  color: #312e81;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: inset 0 1px 1px #ffffff, 0 3px 10px rgba(70, 90, 130, 0.12);
}

.certs-nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.certs-nav-icon {
  font-size: 0.82rem;
  color: #a855f7;
}

.certs-nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 7px;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  transition: all 0.25s ease;
}

[data-theme="light"] .certs-nav-count {
  background: rgba(0, 0, 0, 0.06);
  color: #64748b;
}

.certs-nav-btn.active .certs-nav-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

[data-theme="light"] .certs-nav-btn.active .certs-nav-count {
  background: rgba(79, 70, 229, 0.18);
  color: #4338ca;
}

/* Secondary gliding indicator removed per design specs */
.certs-nav-indicator {
  display: none !important;
}

@media (max-width: 768px) {
  .certs-nav-wrapper {
    width: 100%;
    overflow: hidden;
  }
  .certs-category-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    justify-content: flex-start;
    padding: 4px;
    border-radius: 14px;
    scrollbar-width: none;
  }
  .certs-category-nav::-webkit-scrollbar {
    display: none;
  }
  .certs-nav-btn {
    padding: 6px 11px;
    font-size: 0.72rem;
    flex-shrink: 0;
  }
}

/* Hide / remove HUD bar */
.drift-wall-hud-bar {
  display: none !important;
}

.drift-wall-hud-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drift-wall-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 12px #10b981;
  animation: pulseLiveDot 2s infinite ease-in-out;
}

@keyframes pulseLiveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.drift-wall-hud-title {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  font-family: var(--font-sans);
}

.drift-wall-hud-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 600;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .drift-wall-hud-tag {
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  border-color: rgba(79, 70, 229, 0.2);
}

.drift-wall-hud-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.drift-wall-hud-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.drift-wall-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all 0.25s ease;
}

.drift-wall-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

[data-theme="light"] .drift-wall-toggle-btn {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .drift-wall-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.18);
}

/* Active Tile Inspection Toast / Badge */
.drift-wall-active-pill {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 20;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}

[data-theme="light"] .drift-wall-active-pill {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 10px 30px rgba(70, 90, 130, 0.2);
  color: #0f172a;
}

/* ==========================================================================
   REACT BITS DRIFTWALL CORE ENGINE STYLES
   ========================================================================== */

.drift-wall {
  position: relative;
  width: 100%;
  height: 640px;
  overflow: hidden;
  perspective: var(--dw-perspective, 1200px);
  perspective-origin: 50% 50%;
  --dw-tile-w: 200px;
  --dw-tile-h: 132px;
  --dw-gap: 18px;
  --dw-radius: 14px;
  --dw-lift: 64px;
  --dw-dim: 0.94;
  --dw-gray: 0;
  --dw-overlay: transparent;
  --dw-edge: 85%;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 5%, #000 95%, transparent 100%);
  user-select: none;
  touch-action: pan-y;
}

[data-theme="light"] .drift-wall {
  --dw-overlay: transparent;
  --dw-dim: 0.98;
}

.drift-wall__plane {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: row;
  transform-style: preserve-3d;
  cursor: pointer;
  transform-origin: 50% 50%;
  transform: translate(calc(-50% - 75px), -50%);
  will-change: transform;
}

.drift-wall__col {
  position: relative;
  width: calc(var(--dw-tile-w) + var(--dw-gap));
  transform-style: preserve-3d;
}

.drift-wall__track {
  display: flex;
  flex-direction: column;
  will-change: transform;
  transform-style: preserve-3d;
}

.drift-wall__plane,
.drift-wall__col,
.drift-wall__track,
.drift-wall__tile,
.drift-wall__inner {
  backface-visibility: visible !important;
  -webkit-backface-visibility: visible !important;
}

.drift-wall__tile {
  position: relative;
  display: block;
  width: 100%;
  height: calc(var(--dw-tile-h) + var(--dw-gap));
  flex: 0 0 auto;
  outline: none;
  transform-style: preserve-3d;
  text-decoration: none;
  cursor: pointer;
}

.drift-wall__inner {
  position: absolute;
  inset: calc(var(--dw-gap) / 2);
  display: block;
  border-radius: var(--dw-radius);
  overflow: hidden;
  background: #0f172a;
  opacity: var(--dw-dim);
  transform: translateZ(0);
  cursor: pointer;
  pointer-events: auto;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 34px -6px rgba(0, 0, 0, 0.75), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .drift-wall__inner {
  background: #ffffff !important;
  border: 1.5px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 12px 30px -4px rgba(70, 90, 130, 0.16), inset 0 1px 1px #ffffff !important;
}

.drift-wall__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(var(--dw-gray)) saturate(1.05);
  transition: filter 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  -webkit-user-drag: none;
}

.drift-wall__overlay {
  position: absolute;
  inset: 0;
  background: var(--dw-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] .drift-wall__overlay {
  opacity: 0;
}

.drift-wall__tile:hover .drift-wall__inner,
.drift-wall__tile.is-active .drift-wall__inner,
.drift-wall__tile:focus-visible .drift-wall__inner {
  opacity: 1 !important;
  transform: translateZ(var(--dw-lift, 72px)) scale(1.05);
  box-shadow:
    0 32px 75px -12px rgba(0, 0, 0, 0.88),
    0 0 0 2px rgba(99, 102, 241, 0.9),
    0 0 35px rgba(99, 102, 241, 0.45) !important;
  z-index: 50;
}

[data-theme="light"] .drift-wall__tile:hover .drift-wall__inner,
[data-theme="light"] .drift-wall__tile.is-active .drift-wall__inner,
[data-theme="light"] .drift-wall__tile:focus-visible .drift-wall__inner {
  box-shadow:
    0 30px 65px -12px rgba(40, 60, 100, 0.4),
    0 0 0 2px rgba(59, 130, 246, 0.85),
    0 0 30px rgba(59, 130, 246, 0.3) !important;
}

.drift-wall__tile:hover img,
.drift-wall__tile.is-active img,
.drift-wall__tile:focus-visible img {
  filter: grayscale(0) saturate(1.12);
}

.drift-wall__tile:hover .drift-wall__overlay,
.drift-wall__tile.is-active .drift-wall__overlay,
.drift-wall__tile:focus-visible .drift-wall__overlay {
  opacity: 0;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .drift-wall__plane,
  .drift-wall__track {
    will-change: auto;
  }
}

/* Responsive tile scaling */
@media (max-width: 1024px) {
  .drift-wall {
    height: 580px;
    --dw-tile-w: 230px;
    --dw-tile-h: 152px;
    --dw-gap: 16px;
    --dw-lift: 52px;
  }
}

@media (max-width: 680px) {
  .drift-wall {
    height: 480px;
    --dw-tile-w: 175px;
    --dw-tile-h: 115px;
    --dw-gap: 13px;
    --dw-lift: 36px;
  }
  .drift-wall-active-pill {
    max-width: 92vw;
    padding: 6px 14px;
    font-size: 0.74rem;
    bottom: 16px;
  }
}

@media (max-width: 420px) {
  .drift-wall {
    height: 420px;
    --dw-tile-w: 115px;
    --dw-tile-h: 76px;
    --dw-gap: 8px;
    --dw-lift: 24px;
  }
}

/* ==========================================================================
   DEDICATED SECTION-WISE CATEGORY DECK (SINGLE-INSTANCE, ZERO DUPLICATES)
   ========================================================================== */

.certs-category-deck {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  animation: deckFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes deckFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cert-deck-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  border-radius: var(--radius-lg, 16px);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  text-decoration: none;
}

.cert-deck-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, var(--color-primary, #6366f1));
  opacity: 0.85;
  transition: opacity 0.3s ease, height 0.3s ease;
}

.cert-deck-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 20px 40px -10px rgba(0, 0, 0, 0.6),
    0 0 25px rgba(99, 102, 241, 0.2);
}

.cert-deck-card:hover::before {
  height: 4px;
  opacity: 1;
}

[data-theme="light"] .cert-deck-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 25px -8px rgba(70, 90, 130, 0.12);
}

[data-theme="light"] .cert-deck-card:hover {
  box-shadow:
    0 18px 35px -8px rgba(70, 90, 130, 0.2),
    0 0 25px rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
}

.cert-deck-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 0.75rem;
}

.cert-deck-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: rgba(99, 102, 241, 0.15);
  color: var(--card-accent, #818cf8);
  border: 1px solid var(--card-accent, rgba(99, 102, 241, 0.4));
}

.cert-deck-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.cert-deck-title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-primary, #f8fafc);
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cert-deck-issuer {
  font-family: var(--font-mono, monospace);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--card-accent, #a5b4fc);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cert-deck-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
  gap: 0.5rem;
}

[data-theme="light"] .cert-deck-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.cert-deck-seal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  color: #10b981;
}

.cert-deck-seal svg {
  width: 14px;
  height: 14px;
}

.cert-deck-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cert-deck-card:hover .cert-deck-action {
  background: var(--card-accent, #6366f1);
  border-color: var(--card-accent, #6366f1);
  color: #ffffff;
  transform: translateX(2px);
}

[data-theme="light"] .cert-deck-action {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #0f172a;
}

@media (max-width: 640px) {
  .certs-category-deck {
    grid-template-columns: 1fr;
    padding: 0.5rem 1rem 2rem;
    gap: 1rem;
  }
  .cert-deck-card {
    padding: 1.15rem;
  }
  .cert-deck-title {
    font-size: 0.98rem;
  }
}

