/* ========================================================
   Microsoft Global Learning Community — Custom Styles
   style.css
======================================================== */

/* ---------- Base & Typography ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background-color: #030b1a;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Performance Optimizations ---------- */
/* Force GPU acceleration for animated elements */
.animate-float, .animate-float-delay, .animate-blob, .animate-blob2, 
.animate-pulse-glow, .floating-icon, .glass-card, .course-card {
  will-change: transform;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Reduce animations on mobile for better performance */
@media (max-width: 768px) {
  .animate-blob, .animate-blob2, .animate-float, .animate-float-delay {
    animation: none !important;
  }
  
  .glass-card, .glass-card-subtle, .glass-icon {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  
  #particles {
    display: none !important;
  }
  
  .blob-1, .blob-2, .blob-3 {
    animation: none !important;
    opacity: 0.3;
  }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #030b1a; }
::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.5); }

/* ---------- Navbar ---------- */
#navbar {
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}
#navbar.scrolled {
  background: rgba(3, 11, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0, 212, 255, 0.08);
}

/* ---------- Section Label ---------- */
.section-label {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 212, 255, 0.25);
  background: rgba(0, 212, 255, 0.08);
  color: #67e8f9;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Section Divider ---------- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,212,255,0.15), transparent);
  margin: 0 auto;
  max-width: 1200px;
}

/* ---------- Hero Grid Background ---------- */
.hero-grid {
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ---------- Glass Cards ---------- */
.glass-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 20px 60px rgba(0,0,0,0.4),
    0 0 80px rgba(0,120,212,0.1);
  transform: translateZ(0);
}

.glass-card-subtle {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.07);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  transform: translateZ(0);
}
.glass-card-subtle:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(0,212,255,0.2);
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3), 0 0 24px rgba(0,120,212,0.08);
}

.glass-icon {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transform: translateZ(0);
}

/* ---------- About Cards ---------- */
.about-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.about-card:hover {
  transform: translateY(-3px);
}

/* ---------- Pill Tags ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(14,165,233,0.08);
  border: 1px solid rgba(14,165,233,0.2);
  color: #7dd3fc;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.pill:hover {
  background: rgba(14,165,233,0.15);
  border-color: rgba(14,165,233,0.4);
  color: #bae6fd;
}

/* ---------- Icon Boxes ---------- */
.icon-box {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.4rem;
}

/* ---------- Feature Cards ---------- */
.feature-card {
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), box-shadow 0.3s ease, border-color 0.3s ease;
  transform: translateZ(0);
}
.feature-card:hover {
  transform: translateY(-6px) scale(1.02) translateZ(0);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 30px rgba(0,120,212,0.1);
  border-color: rgba(0,212,255,0.25) !important;
}

@media (max-width: 768px) {
  .feature-card:hover {
    transform: translateZ(0);
  }
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Course Cards ---------- */
.course-card {
  position: relative;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
  transform: translateZ(0);
}
.course-card:hover {
  transform: translateY(-8px) translateZ(0);
  z-index: 2;
}

@media (max-width: 768px) {
  .course-card:hover {
    transform: translateZ(0);
  }
}

.course-card-inner {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.course-card:hover .course-card-inner {
  background: rgba(255,255,255,0.06);
  border-color: rgba(0,212,255,0.25);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 40px rgba(0,120,212,0.12);
}

.featured-course .course-card-inner {
  background: rgba(0,120,212,0.06);
}

.course-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.badge-level {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-duration {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: #94a3b8;
  font-size: 0.65rem;
  font-weight: 600;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.course-card:hover .tech-tag {
  background: rgba(0,212,255,0.07);
  border-color: rgba(0,212,255,0.15);
  color: #7dd3fc;
}

.course-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}
.course-btn:hover {
  transform: scale(1.02);
}

/* ---------- Certificate Cards ---------- */
.cert-card {
  position: relative;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.cert-card:hover {
  transform: translateY(-6px);
}

.cert-inner {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.cert-card:hover .cert-inner {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,215,0,0.2);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 30px rgba(255,215,0,0.05);
}

.cert-badge {
  transition: transform 0.3s ease;
  display: inline-block;
}
.cert-card:hover .cert-badge {
  transform: scale(1.15) rotate(5deg);
}

/* ---------- Timeline ---------- */
.timeline-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.timeline-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3), 0 0 20px rgba(0,120,212,0.1);
}

.timeline-dot {
  font-family: 'Syne', sans-serif;
  color: white;
  position: relative;
  z-index: 2;
}

/* ---------- Pricing Card ---------- */
.pricing-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,212,255,0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 30px 80px rgba(0,0,0,0.5),
    0 0 100px rgba(0,120,212,0.15);
}

.pricing-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pricing-feature:last-child {
  border-bottom: none;
}

/* ---------- Reveal Animations ---------- */
.reveal-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Counter Cards ---------- */
.counter-card {
  cursor: default;
}

/* ---------- Floating Icon Positions ---------- */
.floating-icon {
  position: absolute;
  will-change: transform;
}

/* ---------- Custom Pulse Glow Keyframes (supplement Tailwind) ---------- */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0,212,255,0.3), 0 0 60px rgba(0,120,212,0.2);
  }
  50% {
    box-shadow: 0 0 40px rgba(0,212,255,0.6), 0 0 100px rgba(0,120,212,0.4);
  }
}

/* ---------- Particles Canvas ---------- */
#particles {
  opacity: 0.4;
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 768px) {
  .timeline-step {
    padding-left: 0;
  }
  .floating-icon {
    display: none;
  }
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(0, 212, 255, 0.25);
  color: #fff;
}
