/* ===== MODERN LEARN SECTION ===== */
.learn-section {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #dbeafe 100%);
  padding: 6rem 1rem;
  font-family: Arial, sans-serif;
  position: relative;
  overflow: hidden;
}

html[data-theme='dark'] .learn-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

/* Decorative background elements */
.learn-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.learn-section::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.learn-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ===== SECTION HEADER ===== */
.learn-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
  animation: tagFloat 3s ease-in-out infinite;
}

html[data-theme='dark'] .section-tag {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
}

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

.section-title {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

html[data-theme='dark'] .section-title {
  background: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #64748b;
  max-width: 700px;
  margin: 0 auto;
  font-weight: 500;
}

html[data-theme='dark'] .section-subtitle {
  color: #94a3b8;
}

/* ===== LEARNING CARDS GRID ===== */
.learning-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.learning-card {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  border: 2px solid rgba(99, 102, 241, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

html[data-theme='dark'] .learning-card {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border: 2px solid rgba(139, 92, 246, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Gradient border animation on hover */
.learning-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1.5rem;
  padding: 2px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.learning-card:hover::before {
  opacity: 1;
}

.learning-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.3);
}

html[data-theme='dark'] .learning-card:hover {
  box-shadow: 0 20px 50px rgba(139, 92, 246, 0.3);
}

/* Icon Wrapper with Glow */
.card-icon-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
}

.card-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

html[data-theme='dark'] .card-icon {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
}

.card-icon svg {
  color: white;
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-radius: 20px;
  filter: blur(20px);
  opacity: 0.5;
  z-index: 1;
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.learning-card:hover .card-icon {
  transform: rotate(360deg) scale(1.1);
}

/* Card Content */
.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 1rem;
}

html[data-theme='dark'] .card-title {
  color: #f1f5f9;
}

.card-description {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

html[data-theme='dark'] .card-description {
  color: #94a3b8;
}

.card-badge {
  display: inline-block;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

html[data-theme='dark'] .card-badge {
  background: linear-gradient(135deg, #312e81, #3730a3);
  color: #c7d2fe;
}

/* ===== LEARNING PATH SECTION ===== */
.learning-path {
  background: white;
  border-radius: 2rem;
  padding: 3rem 2rem;
  margin-top: 3rem;
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.1);
  border: 2px solid rgba(99, 102, 241, 0.1);
}

html[data-theme='dark'] .learning-path {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.path-header {
  text-align: center;
  margin-bottom: 3rem;
}

.path-header h3 {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
}

html[data-theme='dark'] .path-header h3 {
  background: linear-gradient(135deg, #818cf8, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.path-header p {
  font-size: 1.1rem;
  color: var(--muted);
}

.path-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 1100px;
  margin: 0 auto;
}

.path-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  padding: 1.5rem 1rem;
}

.step-number {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
}

html[data-theme='dark'] .step-number {
  background: linear-gradient(135deg, #6366f1, #7c3aed);
}

.path-step:hover .step-number {
  transform: scale(1.15) rotate(360deg);
}

.step-connector {
  position: absolute;
  top: calc(1.5rem + 30px);
  left: 50%;
  width: calc(100% - 60px);
  height: 3px;
  margin-left: 30px;
  z-index: 1;
  overflow: hidden;
  border-radius: 999px;
}

/* Static subtle line as base */
.step-connector::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(203, 213, 225, 0.4);
  border-radius: 999px;
}

html[data-theme='dark'] .step-connector::before {
  background: rgba(71, 85, 105, 0.4);
}

/* Animated progressive connection */
.step-connector::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 0%;
  height: 5px;
  background: linear-gradient(90deg, 
    #4f46e5 0%, 
    #6366f1 30%,
    #8b5cf6 60%,
    #a78bfa 100%
  );
  border-radius: 999px;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.8), 0 0 30px rgba(139, 92, 246, 0.4);
  animation: progressiveConnect 8s ease-in-out infinite;
}

html[data-theme='dark'] .step-connector::after {
  background: linear-gradient(90deg, 
    #6366f1 0%, 
    #8b5cf6 30%,
    #a78bfa 60%,
    #c084fc 100%
  );
  box-shadow: 0 0 20px rgba(139, 92, 246, 1), 0 0 40px rgba(167, 139, 250, 0.5);
}

/* Stagger animation for each connector - sequential flow */
.path-step:nth-child(1) .step-connector::after {
  animation-delay: 0s;
}

.path-step:nth-child(2) .step-connector::after {
  animation-delay: 1.5s;
}

.path-step:nth-child(3) .step-connector::after {
  animation-delay: 3s;
}

@keyframes progressiveConnect {
  0% { 
    width: 0%; 
    opacity: 0;
  }
  15% { 
    width: 0%; 
    opacity: 1;
  }
  35% { 
    width: 100%; 
    opacity: 1;
  }
  85% { 
    width: 100%; 
    opacity: 1;
  }
  100% { 
    width: 100%; 
    opacity: 0;
  }
}

.path-step:last-child .step-connector {
  display: none;
}

.step-content h4 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.step-content p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 768px) {
  .section-title {
    font-size: 2.5rem;
  }
  
  .learning-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .path-steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .step-connector {
    display: none;
  }
  
  .path-header h3 {
    font-size: 1.8rem;
  }
}

@media screen and (max-width: 480px) {
  .section-title {
    font-size: 2rem;
  }
  
  .learn-section {
    padding: 4rem 1rem;
  }
  
  .learning-card {
    padding: 2rem;
  }
  
  .path-header h3 {
    font-size: 1.5rem;
  }
  
  .path-header p {
    font-size: 1rem;
  }
  
  .step-number {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .step-content h4 {
    font-size: 1.1rem;
  }
  
  .step-content p {
    font-size: 0.9rem;
  }
}

/* ===== REVEAL ANIMATIONS ===== */
[data-reveal="pop"] {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal="pop"].is-visible {
  opacity: 1;
  transform: scale(1);
}

[data-reveal="fade"] {
  opacity: 0;
  transition: opacity 0.8s ease;
}

[data-reveal="fade"].is-visible {
  opacity: 1;
}

/* Stagger delays for cards */
[data-delay="100"].is-visible { transition-delay: 0.1s; }
[data-delay="200"].is-visible { transition-delay: 0.2s; }
[data-delay="300"].is-visible { transition-delay: 0.3s; }
[data-delay="400"].is-visible { transition-delay: 0.4s; }
[data-delay="500"].is-visible { transition-delay: 0.5s; }
[data-delay="600"].is-visible { transition-delay: 0.6s; }
[data-delay="700"].is-visible { transition-delay: 0.7s; }
[data-delay="800"].is-visible { transition-delay: 0.8s; }