/* ==========================================================================
   LearnHub V2 Centralized Design System
   ========================================================================== */

:root {
  /* V2 Master Color Palette */
  --v2-primary-50: #f0fdfa;
  --v2-primary-100: #ccfbf1;
  --v2-primary-500: #14b8a6; /* Primary Light */
  --v2-primary-600: #0d9488;
  --v2-primary-700: #0f766e; /* Primary Brand */
  --v2-primary-800: #115e59; /* Primary Dark */
  --v2-primary-900: #134e4a;

  --v2-gold-400: #facc15;
  --v2-gold-500: #d4a72c; /* Premium Accent */
  --v2-gold-600: #b88d22;

  --v2-bg-surface: #ffffff;
  --v2-bg-subtle: #f8fafc;
  --v2-border: #e2e8f0;
  --v2-text-main: #0f172a;
  --v2-text-muted: #64748b;
  
  --v2-radius-sm: 0.5rem;
  --v2-radius-md: 0.875rem;
  --v2-radius-lg: 1.25rem;
  --v2-radius-xl: 1.75rem;
  
  --v2-shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06);
  --v2-shadow-hover: 0 20px 30px -4px rgba(15, 118, 110, 0.12);
}

.dark {
  --v2-bg-surface: #1e293b;
  --v2-bg-subtle: #0f172a;
  --v2-border: #334155;
  --v2-text-main: #f8fafc;
  --v2-text-muted: #94a3b8;
  --v2-shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --v2-shadow-hover: 0 20px 30px -4px rgba(20, 184, 166, 0.25);
}

/* Sepia Reading Theme */
.sepia-theme {
  --v2-bg-surface: #fbf0d9;
  --v2-bg-subtle: #f4e4c1;
  --v2-border: #e3cca2;
  --v2-text-main: #433422;
  --v2-text-muted: #735e45;
  background-color: var(--v2-bg-subtle) !important;
  color: var(--v2-text-main) !important;
}

.sepia-theme body {
  background-color: var(--v2-bg-subtle) !important;
  color: var(--v2-text-main) !important;
}

/* Reusable V2 Component Styles */
.v2-card {
  background: var(--v2-bg-surface);
  border: 1px solid var(--v2-border);
  border-radius: var(--v2-radius-lg);
  box-shadow: var(--v2-shadow-card);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.v2-card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--v2-shadow-hover);
  border-color: var(--v2-primary-500);
}

.v2-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding-block: 0.25rem;
  padding-inline: 0.625rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1;
}

.v2-badge-gold {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.v2-badge-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.v2-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding-block: 0.625rem;
  padding-inline: 1.25rem;
  border-radius: var(--v2-radius-md);
  font-weight: 800;
  font-size: 0.8125rem;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.v2-btn-primary:hover {
  background: linear-gradient(135deg, #10b981, #059669);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
}

.v2-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding-block: 0.625rem;
  padding-inline: 1.25rem;
  border-radius: var(--v2-radius-md);
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--v2-text-main);
  background: var(--v2-bg-subtle);
  border: 1px solid var(--v2-border);
  transition: all 0.2s ease;
  cursor: pointer;
}

.v2-btn-secondary:hover {
  background: var(--v2-bg-surface);
  border-color: var(--v2-primary-500);
}

/* Smooth Circular Progress Ring */
.v2-progress-ring {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* Luxury Islamic & Modern EdTech Design Classes */
.glass-card-royal {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  border-radius: 1.25rem;
}

.dark .glass-card-royal {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(30, 41, 59, 0.8);
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
}

.gold-glow {
  box-shadow: 0 0 25px -5px rgba(245, 158, 11, 0.35);
}

.emerald-glow {
  box-shadow: 0 0 25px -5px rgba(16, 185, 129, 0.35);
}

.font-urdu-clean {
  font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Gulzar', system-ui, sans-serif;
  line-height: 2.3;
}

/* ==========================================================================
   SUPERIOR ANIMATION & MICRO-INTERACTION SUITE
   ========================================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translate3d(0, -20px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translate3d(-24px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate3d(24px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes shakeSoft {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale3d(0.94, 0.94, 1);
  }
  to {
    opacity: 1;
    transform: scale3d(1, 1, 1);
  }
}

@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
  }
  50% {
    box-shadow: 0 0 35px rgba(16, 185, 129, 0.6);
  }
}

@keyframes pulseGoldGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
  }
  50% {
    box-shadow: 0 0 35px rgba(245, 158, 11, 0.65);
  }
}

@keyframes shimmerEffect {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Animation Utility Classes */
.animate-fade-in-up {
  animation: fadeInUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-fade-in-down {
  animation: fadeInDown 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-fade-in-right {
  animation: fadeInRight 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-scale-in {
  animation: scaleIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-float {
  animation: floatGentle 4s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 3s ease-in-out infinite;
}

.animate-pulse-gold {
  animation: pulseGoldGlow 3s ease-in-out infinite;
}

/* Animation Stagger Delays */
.delay-75 { animation-delay: 75ms; }
.delay-100 { animation-delay: 100ms; }
.delay-150 { animation-delay: 150ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* Interactive Hover & Press Micro-Interactions */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 35px -8px rgba(0, 0, 0, 0.12);
}

.dark .hover-lift:hover {
  box-shadow: 0 20px 35px -8px rgba(0, 0, 0, 0.6);
}

.hover-scale {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.active-press {
  transition: transform 0.12s ease;
}

.active-press:active {
  transform: scale(0.96);
}

/* Scroll-Triggered Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Mobile App Native Feel */
@media (max-width: 768px) {
  body {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
  }
  
  .touch-pan {
    touch-action: pan-y;
  }
}

/* Navigation Mega Dropdown Animation */
.nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s;
  pointer-events: none;
}

.group:hover .nav-dropdown,
.nav-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Nav Item Link Hover Glider */
.nav-link-pill {
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link-pill::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #10b981, #f59e0b);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(-50%);
  border-radius: 9999px;
}

.nav-link-pill:hover::after,
.nav-link-pill.active::after {
  width: 80%;
}
