.learn-page { margin-top: 5rem; }

.learn-hero {
  position: relative;
  overflow: hidden;
  padding-top: 5.5rem;
  padding-bottom: 4rem;
  background: linear-gradient(135deg, #faf5ff, #fdf2f8 52%, #fff7ed);
}
.learn-hero .section-title { margin: 1rem 0 1.1rem; }
.learn-hero p:not(.badge):not(.pill) { max-width: 43rem; font-size: 1.08rem; }

.nav-links .is-active { color: #db2777; font-weight: 800; }

.yt-pill {
  background: #fee2e2;
  border-color: #fecaca;
  color: #dc2626;
}

.hero-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.learn-stats {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.learn-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  text-align: center;
}
.learn-stats-grid h2 { font-size: clamp(1.95rem, 4vw, 3rem); margin-bottom: 0.2rem; }
.learn-stats-grid article:nth-child(1) h2 { color: #dc2626; }
.learn-stats-grid article:nth-child(2) h2 { color: #7c3aed; }
.learn-stats-grid article:nth-child(3) h2 { color: #ec4899; }
.learn-stats-grid article:nth-child(4) h2 { color: #f97316; }
.learn-stats-grid p {
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.75rem;
  font-weight: 800;
}

.learn-filter-wrap {
  position: sticky;
  top: 5rem;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.learn-filters {
  padding: 0.8rem 0;
  display: flex;
  gap: 0.5rem;
  overflow: auto;
}
.learn-filter-btn {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  background: #f3f4f6;
  color: #4b5563;
}
.learn-filter-btn.active {
  color: #fff;
  background: var(--gradient-brand);
  box-shadow: var(--shadow-sm);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 1.6rem;
  row-gap: 1.2rem;
}
.video-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.video-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.video-bg {
  position: absolute;
  inset: 0;
  opacity: 0.92;
}
.video-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3.8rem;
  height: 3.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  color: #1f2937;
  font-size: 1.2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.video-card:hover .video-play {
  transform: translate(-50%, -50%) scale(1.12);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.video-duration {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 0.72rem;
  border-radius: 0.4rem;
  padding: 0.18rem 0.44rem;
}

.video-content { padding: 1rem; }
.video-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  margin-bottom: 0.7rem;
}
.tag-purple { background: #f3e8ff; color: #6d28d9; }
.tag-pink { background: #fce7f3; color: #be185d; }
.tag-orange { background: #ffedd5; color: #c2410c; }
.tag-teal { background: #ccfbf1; color: #0f766e; }
.tag-green { background: #dcfce7; color: #166534; }
.tag-sky { background: #e0f2fe; color: #0369a1; }
.tag-indigo { background: #e0e7ff; color: #4338ca; }

.video-content h3 { font-size: 1.02rem; line-height: 1.38; margin-bottom: 0.5rem; }
.video-content p { font-size: 0.9rem; line-height: 1.65; margin-bottom: 0.8rem; }
.video-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.6rem;
}
.video-link {
  color: #dc2626;
  font-size: 0.86rem;
  font-weight: 800;
}
.video-link:hover { color: #b91c1c; }

.videos-cta-wrap {
  margin-top: 2rem;
  text-align: center;
}

.learn-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(125deg, #7c3aed, #ec4899 52%, #fb923c);
}
.learn-cta-inner { text-align: center; position: relative; z-index: 2; }
.learn-cta .section-title,
.learn-cta p { color: #fff; }
.learn-cta p {
  max-width: 42rem;
  margin: 1rem auto;
  color: rgba(255, 255, 255, 0.85);
}
.learn-cta .hero-actions {
  justify-content: center;
  align-items: center;
}
.learn-cta .hero-actions .btn {
  min-width: 12.5rem;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.orb-a { width: 240px; height: 240px; top: 40px; left: -50px; background: rgba(196, 181, 253, 0.65); }
.orb-b { width: 240px; height: 240px; right: -50px; bottom: 10px; background: rgba(254, 202, 202, 0.6); }
.orb-c { width: 280px; height: 280px; left: -110px; top: -100px; background: rgba(255, 255, 255, 0.17); }
.orb-d { width: 280px; height: 280px; right: -110px; bottom: -120px; background: rgba(255, 255, 255, 0.17); }

@media (max-width: 980px) {
  .videos-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
  .videos-grid { grid-template-columns: 1fr; }
  .learn-stats-grid { grid-template-columns: repeat(2, 1fr); }

  .learn-stats-grid article {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    padding: 0.9rem;
  }

  .hero-actions .btn { width: 100%; }
}

/* ── Video play button (now a <button> not <div>) ─────────────────────────── */
.video-play {
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
}
.video-play:focus-visible {
  outline: 3px solid #dc2626;
  outline-offset: 3px;
}

/* ── Watch Now (button replacing <a>) ────────────────────────────────────── */
.video-link {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

/* ── Video Modal Overlay ─────────────────────────────────────────────────── */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
  animation: modalFadeIn 0.2s ease;
}
.video-modal-overlay[hidden] {
  display: none;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.video-modal-inner {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: #0f0f0f;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
  animation: modalSlideUp 0.25s ease;
}

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

.video-modal-body {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}
.video-modal-body > iframe,
.video-modal-body > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  display: block;
}

.video-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease;
}
.video-modal-close:hover  { background: rgba(255, 255, 255, 0.28); }
.video-modal-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

@media (max-width: 600px) {
  .video-modal-overlay { padding: 0; align-items: flex-end; }
  .video-modal-inner   { border-radius: 1rem 1rem 0 0; max-width: 100%; }
}
