/* ==========================================================================
   STEM Tuition – Pokhara
   Refactored Engineering & Physics Visual Theme System
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. THEME TOKENS & NATIVE COMPOSITOR SCROLL REVEALS
   -------------------------------------------------------------------------- */
:root {
  --stem-physics: #1a6fff;
  --stem-chemistry: #00e8a2;
  --stem-math: #00d4ff;
  --stem-tech: #a855f7;
  --stem-bio: #ff5e7e;
  --stem-gold: #ffd700;
  --stem-card-bg: rgba(17, 23, 64, 0.7);
  --stem-glass-border: rgba(0, 212, 255, 0.15);
  --stem-glow: 0 0 25px rgba(0, 212, 255, 0.25);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@supports (animation-timeline: view()) {
  .reveal-on-scroll {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 30%;
  }
}

.stem-section {
  position: relative;
  padding: 6rem 6%;
}

.stem-glow-bg {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  opacity: 0.18;
  z-index: 0;
}

.stem-glow-1 {
  width: 450px;
  height: 450px;
  background: var(--cyan);
  top: 10%;
  left: -100px;
}

.stem-glow-2 {
  width: 400px;
  height: 400px;
  background: var(--blue);
  bottom: 10%;
  right: -100px;
}

/* --------------------------------------------------------------------------
   2. DYNAMIC 6-HOVER ANIMATION ENGINE (RULES.md Section 2.3)
   -------------------------------------------------------------------------- */

/* Uniform Border Radius Rule Enforcement */
.card, .class-card, .why-card, .timing-card, .contact-card, .step, .resource-card,
.video-card, .review-card, .quiz-container, .faq-item, .stem-pioneers-widget,
.stem-didyouknow-floating, .info-panel, .form-container, .social-panel,
.grade-selector-card, .subject-card, .curriculum-card, .resource-item, .stat,
.detail-block, .class-resources, .hero-banner-card, .section-header-card,
.soft-card, .calc-card {
  background: linear-gradient(145deg, rgba(18, 28, 65, 0.92), rgba(8, 14, 38, 0.96)) !important;
  border: 1.5px solid rgba(0, 212, 255, 0.35) !important;
  border-radius: 20px !important;
  position: relative !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.15) !important;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease !important;
}

/* Style 1: Neon HSL Glow (.hover-effect-glow) */
@keyframes neonGlowCycle {
  0% { border-color: #00d4ff !important; box-shadow: 0 0 25px rgba(0, 212, 255, 0.65), inset 0 0 15px rgba(0, 212, 255, 0.2) !important; }
  33% { border-color: #ff007f !important; box-shadow: 0 0 30px rgba(255, 0, 127, 0.7), inset 0 0 18px rgba(255, 0, 127, 0.25) !important; }
  66% { border-color: #ffaa00 !important; box-shadow: 0 0 28px rgba(255, 170, 0, 0.65), inset 0 0 15px rgba(255, 170, 0, 0.2) !important; }
  100% { border-color: #00ffaa !important; box-shadow: 0 0 25px rgba(0, 255, 170, 0.65), inset 0 0 15px rgba(0, 255, 170, 0.2) !important; }
}

[class*="hover-effect-glow"]:hover {
  animation: neonGlowCycle 2.4s linear infinite !important;
  transform: translateY(-6px) scale(1.018) !important;
}

/* Style 2: Accent Border Tint (.hover-effect-tint) */
@keyframes quizFlash {
  0%, 100% { border-color: #ffaa00 !important; background: linear-gradient(145deg, rgba(24, 28, 65, 0.96), rgba(12, 14, 38, 0.98)) !important; box-shadow: 0 0 25px rgba(255, 170, 0, 0.5), inset 0 0 20px rgba(255, 170, 0, 0.2) !important; }
  50% { border-color: #00d4ff !important; background: linear-gradient(145deg, rgba(12, 32, 70, 0.96), rgba(6, 16, 42, 0.98)) !important; box-shadow: 0 0 30px rgba(0, 212, 255, 0.55), inset 0 0 20px rgba(0, 212, 255, 0.22) !important; }
}

[class*="hover-effect-tint"]:hover {
  animation: quizFlash 1.8s ease-in-out infinite !important;
  transform: translateY(-5px) scale(1.02) !important;
}

/* Style 3: SVG Displacement Electric Shock (.hover-effect-electric) */
@keyframes electricJitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-1.5px, 1px); }
  50% { transform: translate(1px, -1.5px); }
  75% { transform: translate(-1px, -1px); }
  100% { transform: translate(1px, 1px); }
}

[class*="hover-effect-electric"] { position: relative !important; }
[class*="hover-effect-electric"]::before {
  content: '';
  position: absolute;
  inset: 0px;
  border-radius: 20px;
  border: 2px dashed #00ffff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

[class*="hover-effect-electric"]:hover {
  transform: translateY(-6px) scale(1.018) !important;
  border-color: #00ffff !important;
  box-shadow: 0 0 25px rgba(0, 255, 255, 0.6), inset 0 0 15px rgba(0, 255, 255, 0.2) !important;
}

[class*="hover-effect-electric"]:hover::before {
  opacity: 1;
  filter: url(#lightningDistort) !important;
  border-color: #ff00ff !important;
  box-shadow: 0 0 30px #00ffff, 0 0 55px #ff00ff !important;
  animation: electricJitter 0.12s infinite linear !important;
}

/* Style 4: Outline Dissolution (.hover-effect-borderless) */
[class*="hover-effect-borderless"]:hover {
  border-color: transparent !important;
  background: rgba(14, 22, 58, 0.95) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 212, 255, 0.25) !important;
  transform: translateY(-6px) scale(1.02) !important;
}

/* Style 5: Chromatic Warp Split (.hover-effect-warp) */
@keyframes quantumPulse {
  0%, 100% { border-color: #a855f7 !important; box-shadow: 0 0 28px rgba(168, 85, 247, 0.85), 0 0 55px rgba(0, 240, 255, 0.55) !important; }
  50% { border-color: #00f0ff !important; box-shadow: 0 0 35px rgba(0, 240, 255, 0.9), 0 0 65px rgba(168, 85, 247, 0.6) !important; }
}

[class*="hover-effect-warp"]:hover {
  animation: quantumPulse 1.4s ease-in-out infinite !important;
  transform: translateY(-6px) scale(1.02) !important;
}

/* Style 6: Conic Solar Plasma (.hover-effect-plasma) */
@keyframes plasmaGlow {
  0%, 100% {
    border-color: #ff5500 !important;
    background: radial-gradient(circle, rgba(255, 85, 0, 0.15), transparent 70%) !important;
    box-shadow: 0 0 30px rgba(255, 85, 0, 0.85), 0 0 60px rgba(255, 170, 0, 0.55) !important;
  }
  50% {
    border-color: #00d4ff !important;
    background: conic-gradient(from 0deg, rgba(0, 212, 255, 0.18), rgba(255, 85, 0, 0.18), rgba(0, 212, 255, 0.18)) !important;
    box-shadow: 0 0 35px rgba(0, 212, 255, 0.9), 0 0 65px rgba(255, 85, 0, 0.6) !important;
  }
}

[class*="hover-effect-plasma"]:hover {
  animation: plasmaGlow 1.5s linear infinite !important;
  transform: translateY(-6px) scale(1.02) !important;
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  [class*="hover-effect-"]:hover {
    animation: none !important;
    filter: none !important;
    transform: translateY(-2px) !important;
  }
}

/* --------------------------------------------------------------------------
   3. INTERACTIVE STEM QUIZ HUB
   -------------------------------------------------------------------------- */
.quiz-container {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 2.5rem auto 0;
  padding: 2.5rem;
}

.quiz-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.quiz-subject-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.quiz-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.quiz-tab-btn:hover {
  background: rgba(0, 212, 255, 0.1);
  color: var(--white);
}

.quiz-tab-btn.active {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: var(--navy);
  border-color: transparent;
}

.quiz-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.8rem;
}

.quiz-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--green));
  border-radius: 10px;
  transition: width 0.4s ease;
}

.quiz-question-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.4rem;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
}

@media (min-width: 640px) {
  .quiz-options { grid-template-columns: 1fr 1fr; }
}

.quiz-option-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border);
  color: var(--white);
  padding: 1rem 1.2rem;
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.quiz-option-btn.correct {
  background: rgba(0, 232, 162, 0.15) !important;
  border-color: var(--green) !important;
  color: #a3ffd6 !important;
}

.quiz-option-btn.incorrect {
  background: rgba(255, 94, 126, 0.15) !important;
  border-color: var(--stem-bio) !important;
  color: #ffb3c1 !important;
}

/* --------------------------------------------------------------------------
   4. STEM PIONEERS WALL & SPOTLIGHT WIDGET
   -------------------------------------------------------------------------- */
.pioneers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
  margin-top: 3rem;
}

.pioneer-card {
  padding: 1.8rem;
  min-height: 290px;
  height: auto !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  word-wrap: break-word;
  overflow: visible !important;
}

.pioneer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--green));
}

.pioneer-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pioneer-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border-radius: 16px;
  background: rgba(0, 212, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.pioneer-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.35;
}

.pioneer-era {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 0.2rem;
}

.pioneer-field-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  background: rgba(0, 212, 255, 0.15);
  color: var(--cyan);
  border: 1px solid rgba(0, 212, 255, 0.3);
  margin-bottom: 0.65rem;
  align-self: flex-start;
}

.pioneer-famous-for {
  font-size: 0.92rem;
  color: #e2e8f0;
  line-height: 1.55;
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
}

.pioneer-quote {
  font-style: italic;
  font-size: 0.88rem;
  color: #c4d0ec;
  border-left: 3px solid var(--cyan);
  padding-left: 0.85rem;
  margin-top: 0.8rem;
  line-height: 1.5;
}.stem-didyouknow-floating {
  position: fixed !important;
  bottom: 24px !important;
  left: 24px !important;
  z-index: 99999 !important;
  width: 380px !important;
  max-width: calc(100vw - 48px) !important;
  background: linear-gradient(135deg, rgba(14, 25, 58, 0.95), rgba(8, 14, 38, 0.98)) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border: 1.5px solid rgba(0, 212, 255, 0.4) !important;
  padding: 1.25rem 1.4rem !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6) !important;
  transition: all 0.3s ease !important;
  overflow: visible !important;
}

.stem-dyk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  cursor: pointer;
}

.stem-dyk-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stem-dyk-pioneer {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.stem-dyk-avatar {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
  background: rgba(0, 212, 255, 0.12);
  padding: 0.5rem;
  border-radius: 14px;
}

.stem-dyk-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 0.2rem;
}

.stem-dyk-field {
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 0.4rem;
}

.stem-dyk-fact {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.stem-dyk-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.stem-dyk-random-btn {
  background: rgba(0, 212, 255, 0.15);
  border: 1px solid rgba(0, 212, 255, 0.35);
  color: var(--cyan);
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.stem-dyk-random-btn:hover {
  background: rgba(0, 212, 255, 0.3);
  color: #ffffff;
}

.stem-didyouknow-floating.minimized {
  padding: 0.75rem 1.2rem !important;
  width: auto !important;
}

.stem-didyouknow-floating.minimized .stem-dyk-pioneer,
.stem-didyouknow-floating.minimized .stem-dyk-footer {
  display: none !important;
}

/* --------------------------------------------------------------------------
   5. UNIFIED CORNER VISUAL CONTROLS WIDGET (DEDUPLICATED & HIGH Z-INDEX)
   -------------------------------------------------------------------------- */
.stem-corner-widget {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  z-index: 999999 !important;
}

body.cosmic-view-active .stem-corner-widget {
  z-index: 999999 !important;
}

.stem-corner-trigger {
  background: linear-gradient(135deg, rgba(14, 25, 58, 0.95), rgba(8, 14, 38, 0.98));
  backdrop-filter: blur(16px);
  border: 1.5px solid rgba(0, 212, 255, 0.6);
  color: #ffffff;
  padding: 0.7rem 1.35rem;
  border-radius: 50px;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.45), 0 0 45px rgba(255, 0, 127, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.25s, box-shadow 0.25s;
  animation: widgetPulse 4s ease-in-out infinite;
}

@keyframes widgetPulse {
  0%, 100% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.45), 0 0 45px rgba(255, 0, 127, 0.3); }
  50% { box-shadow: 0 0 35px rgba(0, 212, 255, 0.7), 0 0 55px rgba(255, 0, 127, 0.5); }
}

.stem-corner-trigger:hover {
  transform: scale(1.08);
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.8), 0 0 60px rgba(255, 0, 127, 0.5);
}

.stem-corner-popover {
  position: absolute;
  bottom: 50px;
  right: 0;
  background: rgba(8, 14, 38, 0.95);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(0, 212, 255, 0.35);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 212, 255, 0.2);
  border-radius: 18px;
  padding: 1.1rem;
  width: 260px;
  display: none;
  flex-direction: column;
  gap: 0.75rem;
  animation: popoverFade 0.25s ease-out forwards;
}

.stem-corner-popover.active {
  display: flex !important;
}

@keyframes popoverFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.stem-popover-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: #00d4ff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stem-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.9);
}

.stem-control-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.25rem 0.65rem;
  border-radius: 30px;
  font-size: 0.75rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.stem-control-btn.active {
  background: rgba(0, 212, 255, 0.25);
  border-color: #00d4ff;
  color: #00d4ff;
}

.stem-bg-toast {
  position: fixed;
  bottom: 85px;
  right: 25px;
  background: linear-gradient(135deg, rgba(15, 23, 50, 0.95), rgba(7, 10, 25, 0.98));
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 20px !important;
  padding: 0.75rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 999999;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
  color: #f8fafc;
  font-size: 0.85rem;
}

.stem-bg-toast.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* --------------------------------------------------------------------------
   6. HORIZONTAL CAROUSELS & SCROLLBAR OVERRIDES (NO VISIBLE SCROLLBAR, SCROLL WORKING)
   -------------------------------------------------------------------------- */
.h-scroll-wrapper { padding-top: 12px !important; }
.h-scroll-container {
  display: flex;
  overflow-x: auto;
  gap: 1.75rem;
  scroll-behavior: smooth;
  padding-top: 16px !important;
  padding-bottom: 20px !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.h-scroll-container::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.h-scroll-item {
  min-width: 310px !important;
  flex: 0 0 auto !important;
}
