/* WeLearn Academy - Dynamic & Modern Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary-navy: #001f54;
  --dark-navy: #0a1128;
  --deep-blue: #034078;
  --electric-azure: #1282a2;
  --vibrant-orange: #f95738;
  --orange-hover: #e04829;
  --gold-accent: #fca311;
  --gold-light: #ffb703;
  --whatsapp-green: #25d366;
  --whatsapp-dark: #128c7e;
  
  --bg-light: #f8fafc;
  --surface-white: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.85);
  --border-light: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 31, 84, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(0, 31, 84, 0.08), 0 4px 8px -2px rgba(0, 31, 84, 0.03);
  --shadow-lg: 0 16px 36px -6px rgba(0, 31, 84, 0.12), 0 8px 16px -4px rgba(0, 31, 84, 0.04);
  --shadow-glow: 0 0 30px rgba(249, 87, 56, 0.35);
  --shadow-gold: 0 0 25px rgba(252, 163, 17, 0.3);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background-color: var(--bg-light);
}

body {
  line-height: 1.6;
}

/* Ensure sections and media do not cause horizontal layout blowout */
section, header, footer, nav, main {
  max-width: 100%;
  overflow-x: clip;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

/* Prevent AOS translation from creating horizontal overflow on mobile viewports */
@media (max-width: 768px) {
  [data-aos="fade-left"],
  [data-aos="fade-right"],
  [data-aos="slide-left"],
  [data-aos="slide-right"],
  [data-aos="flip-left"],
  [data-aos="flip-right"] {
    transform: translateY(20px) !important;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #0a1128;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f95738 0%, #034078 100%);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff7a59 0%, #1282a2 100%);
}

/* Hide scrollbar for carousel / horizontal slider */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Global Top Scroll Progress Bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3.5px;
  width: 0%;
  background: linear-gradient(90deg, #f95738 0%, #fca311 50%, #1282a2 100%);
  z-index: 10001;
  transition: width 0.1s cubic-bezier(0.1, 0.9, 0.2, 1);
  box-shadow: 0 0 12px rgba(249, 87, 56, 0.8);
}

/* Container */
.container-custom {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* Glassmorphism Classes */
.glass-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.dark-glass-card {
  background: rgba(10, 17, 40, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Texts */
.text-gradient-orange {
  background: linear-gradient(135deg, #f95738 0%, #ff8c42 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #fca311 0%, #ffd166 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-blue {
  background: linear-gradient(135deg, #034078 0%, #1282a2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Buttons & Shimmer Effects */
.btn-primary {
  position: relative;
  background: linear-gradient(135deg, #f95738 0%, #ea3e1b 100%);
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(249, 87, 56, 0.35);
  border: none;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-25deg);
  transition: none;
  z-index: -1;
}

.btn-primary:hover::after {
  animation: shimmer-light 0.85s ease-in-out;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(249, 87, 56, 0.55);
  background: linear-gradient(135deg, #ff6b4e 0%, #f95738 100%);
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.99);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-navy);
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 31, 84, 0.15);
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  background: #ffffff;
  color: var(--vibrant-orange);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--vibrant-orange);
}

.btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-whatsapp:hover {
  background: #20ba5a;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5);
}

/* Keyframe Animations */
@keyframes shimmer-light {
  0% { left: -120%; }
  100% { left: 160%; }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(249, 87, 56, 0.4);
  }
  50% {
    box-shadow: 0 0 35px rgba(249, 87, 56, 0.85);
  }
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes float-slow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(-1.5deg);
  }
}

@keyframes float-reverse {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(10px) rotate(-1deg);
  }
}

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

.animate-float-slow {
  animation: float-slow 6s infinite ease-in-out;
}

.animate-float-reverse {
  animation: float-reverse 5s infinite ease-in-out;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin-slow {
  animation: spin-slow 20s linear infinite;
}

/* Shimmer Background Beam */
@keyframes background-pan {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.animate-gradient-pan {
  background-size: 200% 200%;
  animation: background-pan 8s ease infinite;
}

/* Typewriter Caret Cursor */
.typewriter-cursor {
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: linear-gradient(180deg, #ff5a1f, #ff2a7a);
  margin-left: 4px;
  vertical-align: middle;
  border-radius: 2px;
  animation: blink-caret 0.9s infinite;
}

@keyframes blink-caret {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Category Filter Tabs */
.tab-btn {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  background: #ffffff;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.tab-btn:hover {
  color: var(--primary-navy);
  border-color: var(--primary-navy);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 31, 84, 0.08);
}

.tab-btn.active {
  background: linear-gradient(135deg, #001f54 0%, #034078 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(0, 31, 84, 0.25);
  transform: translateY(-2px);
}

/* Course Card Hover & 3D Tilt */
.course-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-light);
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  will-change: transform, box-shadow;
}

.course-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 24px 48px -12px rgba(0, 31, 84, 0.18), 0 0 20px rgba(249, 87, 56, 0.15);
  border-color: rgba(249, 87, 56, 0.4);
}

.course-card .card-media {
  overflow: hidden;
  position: relative;
}

.course-card .card-media img {
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1), filter 0.5s ease;
}

.course-card:hover .card-media img {
  transform: scale(1.08);
  filter: brightness(1.05);
}

/* Card Glow Effect on Dark Sections */
.glow-card-cyber {
  position: relative;
  transition: all 0.4s ease;
}

.glow-card-cyber::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(249, 87, 56, 0.4), transparent, rgba(18, 130, 162, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.glow-card-cyber:hover::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(249, 87, 56, 0.9), rgba(252, 163, 17, 0.8), rgba(18, 130, 162, 0.9));
}

.glow-card-cyber:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 25px rgba(249, 87, 56, 0.3);
}

/* Interactive AI Platform Tool Badges */
.ai-tool-pill {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  user-select: none;
}

.ai-tool-pill:hover {
  transform: translateY(-4px) scale(1.1);
  background: linear-gradient(135deg, rgba(249, 87, 56, 0.3), rgba(252, 163, 17, 0.3)) !important;
  border-color: rgba(249, 87, 56, 0.8) !important;
  box-shadow: 0 8px 20px rgba(249, 87, 56, 0.4);
  color: #ffffff !important;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 17, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.45);
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.modal-backdrop.active .modal-container {
  transform: scale(1) translateY(0);
}

/* Live Social Proof Activity Ticker (Bottom-Left) */
#live-activity-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 360px;
}

.live-activity-card {
  pointer-events: auto;
  background: rgba(10, 17, 40, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 15px rgba(249, 87, 56, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 4px solid var(--vibrant-orange);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: live-toast-in 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.35s ease;
}

.live-activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 25px rgba(249, 87, 56, 0.35);
}

@keyframes live-toast-in {
  from {
    transform: translateY(100%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* Toast Notifications Container (Top / Bottom-Right) */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: var(--dark-navy);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  animation: slide-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--vibrant-orange);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Smooth Tab Content Grid Transition */
.tab-content-enter {
  animation: tabFadeScale 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Interactive Roadmap Step & Winding Highway Styling */
.roadmap-pin-group {
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.roadmap-pin-group:hover {
  transform: translateY(-8px) scale(1.12);
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.25));
}

.roadmap-card-callout {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.roadmap-card-callout:hover {
  transform: translateX(4px) scale(1.05);
}

@keyframes roadDashAnim {
  0% {
    stroke-dashoffset: 160;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.road-dash-moving {
  animation: roadDashAnim 6s linear infinite;
}

@keyframes radarPing {
  0% {
    r: 10;
    opacity: 0.8;
  }
  70% {
    r: 32;
    opacity: 0.1;
  }
  100% {
    r: 36;
    opacity: 0;
  }
}

.animate-radar-ping {
  animation: radarPing 2.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

@keyframes flagWave {
  0%, 100% {
    transform: rotate(0deg) skewY(0deg);
  }
  50% {
    transform: rotate(-3deg) skewY(-2deg);
  }
}

.animate-flag-wave {
  transform-origin: 1010px 110px;
  animation: flagWave 3s ease-in-out infinite;
}

@keyframes pulseGlowSoft {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(249, 87, 56, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(249, 87, 56, 0.9));
  }
}

.animate-glow-soft {
  animation: pulseGlowSoft 3s ease-in-out infinite;
}

/* Floating Back To Top Button with Circular Progress */
#back-to-top {
  position: fixed;
  bottom: 88px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0a1128;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 39;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.8);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

@media (min-width: 640px) {
  #back-to-top {
    bottom: 92px;
    right: 24px;
    width: 48px;
    height: 48px;
  }
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

#back-to-top:hover {
  background: var(--vibrant-orange);
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 12px 28px rgba(249, 87, 56, 0.45);
}

#back-to-top svg.progress-ring {
  position: absolute;
  top: -2px;
  left: -2px;
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
  pointer-events: none;
}

#back-to-top circle.progress-ring__circle {
  stroke: #f95738;
  stroke-width: 2.5;
  fill: transparent;
  stroke-dasharray: 157;
  stroke-dashoffset: 157;
  transition: stroke-dashoffset 0.1s;
}

/* Background Interactive Particle Canvas */
.particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Stats Counter Highlight Glow */
.stat-counter-box {
  transition: all 0.35s ease;
}
.stat-counter-box:hover {
  transform: translateY(-4px);
}
.stat-counter-box:hover .stat-number {
  transform: scale(1.08);
}
.stat-number {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-block;
}
