/* ===================================================================
   edu-ai-hero.css — Hero section styles for AI marketplace course
   Color palette: cyan #06b6d4 · blue #3390ec · indigo #6366f1
   =================================================================== */

/* ---------- Reduced-motion guard ---------- */
@media (prefers-reduced-motion: reduce) {
  .ai-hero *,
  .ai-blob,
  .ai-particle,
  .ai-grid-line,
  .ai-badge-pulse,
  .ai-stat-card,
  .ai-cta-glow::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Hero wrapper ---------- */
.ai-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-top: 7rem;
  padding-bottom: 5rem;
}

/* ---------- Neural-net grid background ---------- */
.ai-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(6,182,212,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6,182,212,.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 80%);
  animation: aiGridPulse 8s ease-in-out infinite;
}

@keyframes aiGridPulse {
  0%, 100% { opacity: .5; }
  50%       { opacity: 1; }
}

/* ---------- Animated blobs ---------- */
.ai-blob {
  position: absolute;
  border-radius: 9999px;
  pointer-events: none;
  z-index: -1;
  filter: blur(72px);
  will-change: transform;
}

.ai-blob-1 {
  width: 32rem; height: 32rem;
  top: -8rem; left: -10rem;
  background: radial-gradient(circle at 35% 35%,
    rgba(99,102,241,.55),
    rgba(6,182,212,.3) 50%,
    transparent 70%);
  animation: aiBlobA 20s ease-in-out infinite;
}

.ai-blob-2 {
  width: 26rem; height: 26rem;
  top: 5%; right: -8rem;
  background: radial-gradient(circle at 60% 40%,
    rgba(6,182,212,.5),
    rgba(51,144,236,.3) 50%,
    transparent 70%);
  animation: aiBlobB 24s ease-in-out infinite;
}

.ai-blob-3 {
  width: 22rem; height: 22rem;
  bottom: -8rem; left: 40%;
  background: radial-gradient(circle at 40% 60%,
    rgba(51,144,236,.45),
    rgba(99,102,241,.25) 50%,
    transparent 68%);
  animation: aiBlobC 28s ease-in-out infinite;
}

@keyframes aiBlobA {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(28px,-30px) scale(1.07); }
  66%     { transform: translate(-18px, 22px) scale(0.95); }
}
@keyframes aiBlobB {
  0%,100% { transform: translate(0,0) rotate(0.001deg); }
  50%     { transform: translate(-30px, 26px) rotate(9deg); }
}
@keyframes aiBlobC {
  0%,100% { transform: translate(0,0) rotate(0.001deg); }
  50%     { transform: translate(32px,-20px) rotate(-7deg); }
}

/* ---------- Floating particles ---------- */
.ai-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ai-particle {
  position: absolute;
  border-radius: 9999px;
  background: rgba(6,182,212,.65);
  box-shadow: 0 0 6px 2px rgba(6,182,212,.4);
}

.ai-particle:nth-child(1)  { width:4px; height:4px; top:12%; left:8%;  animation: aiFloat1 9s  ease-in-out infinite; }
.ai-particle:nth-child(2)  { width:3px; height:3px; top:28%; left:18%; animation: aiFloat2 13s ease-in-out infinite; background:rgba(99,102,241,.7); box-shadow:0 0 6px 2px rgba(99,102,241,.4); }
.ai-particle:nth-child(3)  { width:5px; height:5px; top:55%; left:5%;  animation: aiFloat3 11s ease-in-out infinite; }
.ai-particle:nth-child(4)  { width:3px; height:3px; top:70%; left:22%; animation: aiFloat1 15s ease-in-out infinite; background:rgba(51,144,236,.7); box-shadow:0 0 6px 2px rgba(51,144,236,.4); }
.ai-particle:nth-child(5)  { width:4px; height:4px; top:18%; left:78%; animation: aiFloat2 10s ease-in-out infinite; }
.ai-particle:nth-child(6)  { width:3px; height:3px; top:40%; left:88%; animation: aiFloat3 17s ease-in-out infinite; background:rgba(99,102,241,.7); box-shadow:0 0 6px 2px rgba(99,102,241,.4); }
.ai-particle:nth-child(7)  { width:6px; height:6px; top:75%; left:72%; animation: aiFloat1 12s ease-in-out infinite; background:rgba(51,144,236,.6); box-shadow:0 0 8px 2px rgba(51,144,236,.35); }
.ai-particle:nth-child(8)  { width:3px; height:3px; top:85%; left:45%; animation: aiFloat2 8s  ease-in-out infinite; }
.ai-particle:nth-child(9)  { width:4px; height:4px; top:32%; left:55%; animation: aiFloat3 14s ease-in-out infinite; background:rgba(99,102,241,.65); box-shadow:0 0 6px 2px rgba(99,102,241,.35); }
.ai-particle:nth-child(10) { width:3px; height:3px; top:60%; left:63%; animation: aiFloat1 19s ease-in-out infinite; }

@keyframes aiFloat1 {
  0%,100% { transform: translate(0,0); opacity:.7; }
  25%     { transform: translate(8px,-12px); opacity:1; }
  75%     { transform: translate(-6px, 10px); opacity:.55; }
}
@keyframes aiFloat2 {
  0%,100% { transform: translate(0,0); opacity:.6; }
  40%     { transform: translate(-10px,-8px); opacity:1; }
  80%     { transform: translate(12px, 6px); opacity:.5; }
}
@keyframes aiFloat3 {
  0%,100% { transform: translateY(0); opacity:.65; }
  50%     { transform: translateY(-16px); opacity:1; }
}

/* ---------- Badge ---------- */
.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(6,182,212,.35);
  background: rgba(6,182,212,.08);
  backdrop-filter: blur(8px);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #06b6d4;
  margin-bottom: 1.5rem;
}

.dark .ai-badge {
  border-color: rgba(6,182,212,.4);
  background: rgba(6,182,212,.1);
  color: #22d3ee;
}

.ai-badge-dot {
  width: 8px; height: 8px;
  border-radius: 9999px;
  background: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6,182,212,.3);
  animation: aiPulseDot 2.2s ease-in-out infinite;
}

@keyframes aiPulseDot {
  0%,100% { box-shadow: 0 0 0 3px rgba(6,182,212,.3); }
  50%     { box-shadow: 0 0 0 6px rgba(6,182,212,.15); }
}

/* ---------- Gradient headline ---------- */
.ai-headline-gradient {
  background: linear-gradient(135deg, #06b6d4 0%, #3390ec 45%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- CTA buttons ---------- */
.ai-btn-primary {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .875rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #3390ec 50%, #6366f1);
  border: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 8px 30px -8px rgba(51,144,236,.55);
}

.ai-btn-primary::after {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: -1;
  border-radius: 9999px;
  background: linear-gradient(135deg, #06b6d4, #3390ec, #6366f1);
  filter: blur(12px);
  opacity: 0;
  transition: opacity .3s ease;
}

.ai-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px rgba(51,144,236,.65); }
.ai-btn-primary:hover::after { opacity: .6; }
.ai-btn-primary:active { transform: translateY(0); }

.ai-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .875rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: .95rem;
  color: #3390ec;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(51,144,236,.25);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.dark .ai-btn-secondary {
  background: rgba(255,255,255,.08);
  color: #67e8f9;
  border-color: rgba(6,182,212,.3);
}

.ai-btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -10px rgba(51,144,236,.3);
  background: rgba(255,255,255,.95);
  color: #2563eb;
}

.dark .ai-btn-secondary:hover {
  background: rgba(6,182,212,.15);
  color: #a5f3fc;
}

/* ---------- Glassmorphism stat cards ---------- */
.ai-stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 3rem;
}

.ai-stat-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1.25rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(6,182,212,.2);
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px -6px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.8);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: aiCardIn .6s ease both;
}

.dark .ai-stat-card {
  background: rgba(15,23,42,.55);
  border-color: rgba(6,182,212,.18);
  box-shadow: 0 4px 20px -6px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.07);
}

.ai-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px -10px rgba(51,144,236,.25);
  border-color: rgba(6,182,212,.45);
}

.dark .ai-stat-card:hover {
  box-shadow: 0 14px 36px -10px rgba(51,144,236,.35);
}

.ai-stat-card:nth-child(1) { animation-delay: .1s; }
.ai-stat-card:nth-child(2) { animation-delay: .2s; }
.ai-stat-card:nth-child(3) { animation-delay: .3s; }
.ai-stat-card:nth-child(4) { animation-delay: .4s; }

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

.ai-stat-icon {
  width: 2.5rem; height: 2.5rem;
  border-radius: .875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.15rem;
}

.ai-stat-icon-1 { background: linear-gradient(135deg, rgba(6,182,212,.2), rgba(99,102,241,.2)); color: #06b6d4; }
.ai-stat-icon-2 { background: linear-gradient(135deg, rgba(51,144,236,.2), rgba(6,182,212,.2)); color: #3390ec; }
.ai-stat-icon-3 { background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(51,144,236,.2)); color: #6366f1; }
.ai-stat-icon-4 { background: linear-gradient(135deg, rgba(6,182,212,.15), rgba(99,102,241,.15)); color: #22d3ee; }

.dark .ai-stat-icon-1 { background: rgba(6,182,212,.15); }
.dark .ai-stat-icon-2 { background: rgba(51,144,236,.15); }
.dark .ai-stat-icon-3 { background: rgba(99,102,241,.15); }
.dark .ai-stat-icon-4 { background: rgba(6,182,212,.12); }

.ai-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.dark .ai-stat-value { color: #f1f5f9; }

.ai-stat-label {
  font-size: .78rem;
  color: #64748b;
  margin-top: .1rem;
}

.dark .ai-stat-label { color: #94a3b8; }

/* ---------- Neural SVG connector nodes ---------- */
.ai-nodes {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.ai-node-circle {
  position: absolute;
  border-radius: 9999px;
  border: 1px solid rgba(6,182,212,.3);
}

.ai-node-circle::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 9999px;
  background: rgba(6,182,212,.18);
}

.ai-node-circle:nth-child(1) { width:14px; height:14px; top:22%; left:12%; animation: aiNodePulse 4s  ease-in-out infinite; }
.ai-node-circle:nth-child(2) { width:10px; height:10px; top:48%; left:7%;  animation: aiNodePulse 5.5s ease-in-out infinite .8s; border-color:rgba(99,102,241,.35); }
.ai-node-circle:nth-child(3) { width:12px; height:12px; top:15%; left:82%; animation: aiNodePulse 3.8s ease-in-out infinite 1.2s; }
.ai-node-circle:nth-child(4) { width:8px;  height:8px;  top:68%; left:90%; animation: aiNodePulse 6s  ease-in-out infinite .4s; border-color:rgba(51,144,236,.3); }
.ai-node-circle:nth-child(5) { width:10px; height:10px; top:82%; left:30%; animation: aiNodePulse 4.5s ease-in-out infinite 2s; }

@keyframes aiNodePulse {
  0%,100% { transform: scale(1); opacity: .6; }
  50%     { transform: scale(1.5); opacity: 1; }
}

/* ---------- Headline reveal ---------- */
.ai-headline { animation: aiHeadIn .8s ease .05s both; }
.ai-lead     { animation: aiHeadIn .8s ease .15s both; }
.ai-cta-row  { animation: aiHeadIn .8s ease .25s both; }

@keyframes aiHeadIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Floating trust badge ---------- */
.ai-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-top: 2rem;
  padding: .6rem 1.25rem;
  border-radius: 9999px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(6,182,212,.2);
  box-shadow: 0 4px 20px -6px rgba(0,0,0,.1);
  font-size: .85rem;
  font-weight: 500;
  color: #334155;
  animation: aiTrustFloat 7s ease-in-out infinite;
}

.dark .ai-trust-badge {
  background: rgba(15,23,42,.6);
  border-color: rgba(6,182,212,.25);
  color: #cbd5e1;
}

.ai-trust-badge-icon {
  width: 2rem; height: 2rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, #06b6d4, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .85rem;
  flex-shrink: 0;
}

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

/* ---------- Responsive tweaks ---------- */
@media (max-width: 640px) {
  .ai-blob-1 { width: 20rem; height: 20rem; }
  .ai-blob-2 { width: 16rem; height: 16rem; }
  .ai-blob-3 { width: 14rem; height: 14rem; }
  .ai-stat-card { flex: 1 1 calc(50% - .5rem); }
}
