/* ================================================================
   Animvasion Design System
   Loaded after app.css (Bootstrap 4) — overrides selectively.
   ================================================================ */

/* ── 1. Design tokens ── */
:root {
  --av-bg:          #080e17;
  --av-surface:     #0d1a28;
  --av-surface-2:   #132334;
  --av-surface-3:   #1a2e42;
  --av-border:      rgba(255, 255, 255, 0.07);
  --av-border-md:   rgba(255, 255, 255, 0.13);

  --av-primary:     #42a2dc;
  --av-primary-h:   #5ab3e8;
  --av-accent:      #3d8ef8;

  --av-text:        #ddeaf5;
  --av-muted:       #6b8ea8;
  --av-faint:       #2d4558;

  --av-radius:      10px;
  --av-radius-lg:   18px;
  --av-radius-pill: 9999px;

  --av-shadow:      0 4px 24px rgba(0, 0, 0, 0.45);
  --av-shadow-lg:   0 12px 48px rgba(0, 0, 0, 0.55);
  --av-ease:        cubic-bezier(0.4, 0, 0.2, 1);

  --av-font: 'Inter', 'Open Sans', system-ui, -apple-system, sans-serif;
  --av-nav-h: 70px;
}

/* ── 2. Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--av-bg);
  color: var(--av-text);
  font-family: var(--av-font);
  -webkit-font-smoothing: antialiased;
}

/* ── 3. Navbar ── */
.av-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--av-nav-h);
  transition:
    background 0.35s var(--av-ease),
    backdrop-filter 0.35s var(--av-ease),
    box-shadow 0.35s var(--av-ease);
}

.av-nav .container {
  height: 100%;
  display: flex;
  align-items: center;
}

.av-nav.scrolled {
  background: rgba(8, 14, 23, 0.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 var(--av-border), var(--av-shadow);
}

.av-nav .navbar-brand {
  padding: 0;
  display: flex;
  align-items: center;
}

.av-nav .navbar-brand img {
  height: 34px;
  width: auto;
}

.av-nav .nav-link {
  color: rgba(255, 255, 255, 0.75) !important;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem !important;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.av-nav .nav-link:hover,
.av-nav .nav-link.active { color: #fff !important; }

/* nav buttons */
.av-btn-ghost {
  display: inline-flex; align-items: center;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem; font-weight: 500;
  padding: 0.42rem 1.05rem;
  border-radius: var(--av-radius-pill);
  transition: all 0.2s var(--av-ease);
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
}
.av-btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  color: #fff; text-decoration: none;
}

.av-btn-cta {
  display: inline-flex; align-items: center;
  background: var(--av-primary);
  color: #fff;
  font-size: 0.82rem; font-weight: 700;
  padding: 0.42rem 1.15rem;
  border-radius: var(--av-radius-pill);
  border: none; cursor: pointer;
  transition: all 0.2s var(--av-ease);
  text-decoration: none; white-space: nowrap;
}
.av-btn-cta:hover {
  background: var(--av-primary-h);
  color: #fff; text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(66, 162, 220, 0.42);
}

/* mobile nav drawer */
@media (max-width: 991px) {
  .av-nav { background: rgba(8, 14, 23, 0.97) !important; backdrop-filter: blur(20px); }

  #navbarContent {
    background: #0a1829 !important;
    border: 1px solid var(--av-border-md);
    border-radius: var(--av-radius-lg);
    padding: 1.25rem 1rem;
    margin-top: 0.5rem;
    position: absolute;
    top: var(--av-nav-h);
    right: 1rem; left: 1rem;
  }

  .av-nav .nav-link::after { display: none; }
  .av-nav .nav-link { padding: 0.7rem 0.5rem !important; border-bottom: 1px solid var(--av-border); }
  .av-nav .nav-link:last-of-type { border-bottom: none; }
  .nav-btn-group { padding-top: 0.75rem; display: flex; gap: 0.5rem; }
}

/* ── 4. Hero ── */
.av-hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background-image: url('/frontend/storage/assets/images/mascot-bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Dark overlay + colour tint on top of the image */
.av-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(66, 162, 220, 0.12) 0%, transparent 60%),
    linear-gradient(to bottom, rgba(8, 14, 23, 0.72) 0%, rgba(8, 14, 23, 0.60) 50%, rgba(8, 14, 23, 0.85) 100%);
  z-index: 0;
}

/* Subtle grid overlay */
.av-hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

.av-hero-content {
  position: relative; z-index: 2;
  max-width: 780px;
  padding: calc(var(--av-nav-h) + 2rem) 1.5rem 4rem;
}

.av-hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(66, 162, 220, 0.12);
  border: 1px solid rgba(66, 162, 220, 0.28);
  color: #90c8ed;
  font-size: 0.72rem; font-weight: 700;
  padding: 0.32rem 0.85rem;
  border-radius: var(--av-radius-pill);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.av-hero-badge span.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--av-primary);
  animation: dotBlink 1.8s ease-in-out infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; } 50% { opacity: 0.25; }
}

.av-hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.8rem);
  font-weight: 800; line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  background: linear-gradient(140deg, #ffffff 30%, #8fb8d8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.av-hero p {
  font-size: 1.05rem; line-height: 1.75;
  color: var(--av-muted);
  max-width: 520px; margin: 0 auto 2.5rem;
}

.av-hero-cta {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--av-primary);
  color: #fff; font-size: 1rem; font-weight: 700;
  padding: 0.9rem 2.2rem;
  border-radius: var(--av-radius-pill);
  text-decoration: none; letter-spacing: 0.02em;
  transition: all 0.25s var(--av-ease);
  box-shadow: 0 0 0 0 rgba(66, 162, 220, 0.4);
}

.av-hero-cta:hover {
  background: var(--av-primary-h);
  color: #fff; text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(66, 162, 220, 0.48);
}

.av-hero-cta i { transition: transform 0.25s var(--av-ease); }
.av-hero-cta:hover i { transform: translateX(4px); }

/* Scroll cue */
.av-scroll-cue {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  color: var(--av-faint); font-size: 0.72rem; letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: scrollCueBob 2.2s ease-in-out infinite;
}

@keyframes scrollCueBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}

/* ── 5. Scroll reveal ── */
.av-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s var(--av-ease), transform 0.6s var(--av-ease);
}
.av-reveal.av-in {
  opacity: 1;
  transform: none;
}

/* Stagger delays for grid children */
.av-features-grid .av-feat-card:nth-child(1) { transition-delay: 0s; }
.av-features-grid .av-feat-card:nth-child(2) { transition-delay: 0.08s; }
.av-features-grid .av-feat-card:nth-child(3) { transition-delay: 0.16s; }
.av-features-grid .av-feat-card:nth-child(4) { transition-delay: 0.24s; }

.av-faq-list .av-faq-item:nth-child(1) { transition-delay: 0s; }
.av-faq-list .av-faq-item:nth-child(2) { transition-delay: 0.06s; }
.av-faq-list .av-faq-item:nth-child(3) { transition-delay: 0.12s; }
.av-faq-list .av-faq-item:nth-child(4) { transition-delay: 0.18s; }
.av-faq-list .av-faq-item:nth-child(5) { transition-delay: 0.24s; }
.av-faq-list .av-faq-item:nth-child(6) { transition-delay: 0.30s; }
.av-faq-list .av-faq-item:nth-child(7) { transition-delay: 0.36s; }

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .av-reveal { opacity: 1; transform: none; transition: none; }
}

/* ── 6. Section commons ── */
.av-section { padding: 5rem 0; }

.av-section-eyebrow {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--av-primary); margin-bottom: 0.6rem;
}

.av-section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 800; letter-spacing: -0.02em;
  color: #fff; margin-bottom: 0.75rem;
  line-height: 1.15;
}

.av-section-sub {
  color: var(--av-muted); font-size: 0.95rem;
  line-height: 1.65; max-width: 480px;
}

/* ── 7. Course carousel ── */
.av-carousel-section {
  padding: 4.5rem 0;
  background: linear-gradient(180deg, var(--av-bg) 0%, var(--av-surface) 100%);
  overflow: hidden;
}

.av-carousel-outer {
  position: relative; margin-top: 2.5rem;
}

.av-carousel-track {
  display: flex; gap: 1.1rem;
  padding: 0.5rem 1.5rem 1.5rem;
  transition: transform 0.5s var(--av-ease);
  will-change: transform;
}

/* Carousel card */
.av-cc {
  min-width: 215px;
  border-radius: var(--av-radius-lg);
  overflow: hidden;
  background: var(--av-surface-2);
  border: 1px solid var(--av-border);
  cursor: pointer;
  transition: transform 0.3s var(--av-ease), box-shadow 0.3s var(--av-ease), border-color 0.3s var(--av-ease);
  text-decoration: none; display: block; flex-shrink: 0;
}

.av-cc:hover {
  transform: translateY(-9px) scale(1.02);
  box-shadow: 0 28px 56px rgba(0,0,0,0.5), 0 0 0 1px rgba(66, 162, 220, 0.28);
  border-color: rgba(66, 162, 220, 0.25);
  text-decoration: none;
}

.av-cc-thumb {
  height: 210px;
  background: linear-gradient(135deg, #1a2e42 0%, #0d1a28 100%);
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

.av-cc-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(transparent 45%, rgba(0,0,0,0.72) 100%);
}

.av-cc-thumb lottie-player {
  width: 100% !important; height: 100% !important;
  opacity: 0.65;
}

.av-cc-level {
  position: absolute; top: 0.7rem; left: 0.7rem; z-index: 2;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.22rem 0.6rem;
  border-radius: var(--av-radius-pill);
  background: rgba(66, 162, 220, 0.88); color: #fff;
}

.av-cc-body { padding: 0.9rem 1rem; }

.av-cc-title {
  font-size: 0.88rem; font-weight: 600; color: #fff;
  margin-bottom: 0.4rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.av-cc-meta {
  font-size: 0.76rem; color: var(--av-muted);
  display: flex; align-items: center; gap: 0.4rem;
}

.av-cc-avatar {
  width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--av-primary), var(--av-accent));
  flex-shrink: 0;
}

/* Carousel button */
.av-c-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--av-border-md);
  background: rgba(8, 14, 23, 0.8); backdrop-filter: blur(10px);
  color: #fff; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
  transition: all 0.2s var(--av-ease);
}
.av-c-btn:hover {
  background: var(--av-primary); border-color: var(--av-primary);
  transform: translateY(-50%) scale(1.1);
}
.av-c-btn.prev { left: 0.75rem; }
.av-c-btn.next { right: 0.75rem; }

/* empty state */
.av-cc-empty {
  min-width: 240px;
  background: var(--av-surface-2);
  border: 1px dashed var(--av-border-md);
  border-radius: var(--av-radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center; color: var(--av-muted);
  font-size: 0.88rem;
}

/* ── 7. Feature cards (Why Join) ── */
.av-features {
  padding: 5.5rem 0;
  background: var(--av-surface);
}

.av-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

@media (max-width: 1024px) { .av-features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .av-features-grid { grid-template-columns: 1fr; } }

.av-feat-card {
  padding: 1.75rem;
  border-radius: var(--av-radius-lg);
  background: var(--av-surface-2);
  border: 1px solid var(--av-border);
  transition: all 0.3s var(--av-ease);
  position: relative; overflow: hidden;
}

.av-feat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--av-primary), var(--av-accent));
  opacity: 0; transition: opacity 0.3s;
}

.av-feat-card:hover {
  transform: translateY(-5px);
  border-color: var(--av-border-md);
  box-shadow: var(--av-shadow-lg);
}

.av-feat-card:hover::before { opacity: 1; }

.av-feat-icon {
  width: 46px; height: 46px;
  border-radius: var(--av-radius);
  background: rgba(66, 162, 220, 0.10);
  border: 1px solid rgba(66, 162, 220, 0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--av-primary);
  margin-bottom: 1.2rem;
}

.av-feat-title {
  font-size: 1rem; font-weight: 700; color: #fff;
  margin-bottom: 0.65rem; line-height: 1.3;
}

.av-feat-desc {
  font-size: 0.875rem; line-height: 1.65;
  color: var(--av-muted); margin: 0;
}

/* ── 8. FAQ ── */
.av-faq { padding: 5.5rem 0; background: var(--av-bg); }

.av-faq-list { margin-top: 3rem; }

.av-faq-item {
  border-radius: var(--av-radius);
  border: 1px solid var(--av-border);
  background: var(--av-surface);
  margin-bottom: 0.5rem; overflow: hidden;
  transition: border-color 0.25s;
}
.av-faq-item.open { border-color: var(--av-border-md); }

.av-faq-q {
  width: 100%; background: none; border: none;
  padding: 1.35rem 1.5rem; color: #fff;
  font-family: var(--av-font); font-size: 0.97rem; font-weight: 500;
  text-align: left; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  transition: background 0.2s;
}
.av-faq-q:hover { background: rgba(255,255,255,0.025); }
.av-faq-q:focus { outline: none; }

.av-faq-icon {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--av-border-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1.1rem; font-weight: 300;
  color: var(--av-muted); transition: all 0.25s var(--av-ease);
}
.av-faq-item.open .av-faq-icon {
  border-color: var(--av-primary); color: var(--av-primary); transform: rotate(45deg);
}

.av-faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--av-ease); }
.av-faq-a.open { max-height: 500px; }

.av-faq-a-inner {
  padding: 0 1.5rem 1.4rem;
  font-size: 0.9rem; line-height: 1.72; color: var(--av-muted);
}

/* ── 9. CTA / Community ── */
.av-cta {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--av-surface) 0%, var(--av-bg) 100%);
  position: relative; overflow: hidden;
}
.av-cta::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% -10%, rgba(66, 162, 220, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.av-cta-inner {
  max-width: 620px; margin: 0 auto; text-align: center;
  position: relative; z-index: 1;
}

.av-cta-inner h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 800; letter-spacing: -0.02em; color: #fff; margin-bottom: 1rem;
}

.av-cta-inner > p {
  color: var(--av-muted); font-size: 0.98rem; line-height: 1.72; margin-bottom: 2.5rem;
}

.av-nl-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--av-border-md);
  border-radius: var(--av-radius-lg);
  padding: 2rem 1.75rem;
  backdrop-filter: blur(10px);
}

.av-nl-card h3 {
  font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: 1.25rem;
}

.av-nl-form { display: flex; gap: 0.7rem; }

.av-nl-input {
  flex: 1; background: rgba(255,255,255,0.055);
  border: 1px solid var(--av-border-md); border-radius: var(--av-radius-pill);
  padding: 0.68rem 1.2rem; color: #fff;
  font-family: var(--av-font); font-size: 0.88rem; outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.av-nl-input::placeholder { color: var(--av-muted); }
.av-nl-input:focus { border-color: var(--av-primary); background: rgba(255,255,255,0.08); }

.av-nl-submit {
  background: var(--av-primary); color: #fff; border: none;
  border-radius: var(--av-radius-pill); padding: 0.68rem 1.4rem;
  font-family: var(--av-font); font-size: 0.85rem; font-weight: 700;
  cursor: pointer; white-space: nowrap; transition: all 0.2s var(--av-ease);
}
.av-nl-submit:hover {
  background: var(--av-primary-h); transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(66, 162, 220, 0.42);
}

@media (max-width: 540px) { .av-nl-form { flex-direction: column; } }

/* ── 10. Footer ── */
.av-footer {
  background: #050a10;
  border-top: 1px solid var(--av-border);
  padding: 4rem 0 2rem;
}

.av-footer-logo { height: 30px; width: auto; margin-bottom: 0.9rem; }

.av-footer-tagline {
  font-size: 0.85rem; color: var(--av-muted); line-height: 1.65;
  max-width: 210px; margin-bottom: 1.5rem;
}

.av-socials { display: flex; gap: 0.6rem; margin-bottom: 1rem; }

.av-social {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--av-border-md);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--av-ease);
}
.av-social:hover { border-color: var(--av-primary); background: rgba(66,162,220,0.08); }

.av-social img {
  width: 16px; height: 16px;
  filter: brightness(0) saturate(100%) invert(55%) sepia(10%) saturate(350%) hue-rotate(180deg);
  transition: filter 0.2s;
}
.av-social:hover img {
  filter: brightness(0) saturate(100%) invert(42%) sepia(90%) saturate(500%) hue-rotate(8deg);
}

.av-footer-col h6 {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #42a2dc;
  margin-bottom: 1rem;
}

.av-flinks { list-style: none; padding: 0; margin: 0; }
.av-flinks li { margin-bottom: 0.55rem; }
.av-flinks a { font-size: 0.875rem; color: var(--av-muted); text-decoration: none; transition: color 0.2s; }
.av-flinks a:hover { color: #fff; text-decoration: none; }

.av-footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid var(--av-border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem;
}
.av-footer-bottom p { font-size: 0.78rem; color: var(--av-faint); margin: 0; }

/* ── 11. Courses listing page ── */
.av-page-hero {
  padding: calc(var(--av-nav-h) + 3.5rem) 0 3rem;
  background: linear-gradient(180deg, var(--av-bg) 0%, var(--av-surface) 100%);
  text-align: center;
}

.av-page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800; letter-spacing: -0.02em; color: #fff; margin-bottom: 1rem;
}

.av-page-hero p { font-size: 0.98rem; color: var(--av-muted); max-width: 480px; margin: 0 auto; }

.av-filter-bar {
  background: var(--av-surface);
  border-bottom: 1px solid var(--av-border);
  padding: 1.1rem 0;
  position: sticky; top: var(--av-nav-h); z-index: 100;
}

.av-filter-input,
.av-filter-select {
  background: var(--av-surface-2) !important;
  border: 1px solid var(--av-border-md) !important;
  border-radius: var(--av-radius-pill) !important;
  padding: 0.55rem 1.1rem !important;
  color: var(--av-text) !important;
  font-family: var(--av-font); font-size: 0.875rem; outline: none;
  transition: border-color 0.2s, background 0.2s;
  width: 100%; appearance: none; height: auto;
}
.av-filter-input::placeholder { color: var(--av-muted); }
.av-filter-input:focus, .av-filter-select:focus {
  border-color: var(--av-primary) !important;
  background: var(--av-surface-3) !important;
  box-shadow: none !important;
}

.av-filter-select option { background: var(--av-surface-2); color: var(--av-text); }

/* Grid course cards */
.av-grid-card {
  background: var(--av-surface);
  border: 1px solid var(--av-border);
  border-radius: var(--av-radius-lg);
  overflow: hidden;
  transition: all 0.3s var(--av-ease);
  text-decoration: none; display: block; height: 100%;
}
.av-grid-card:hover {
  border-color: rgba(66, 162, 220, 0.3);
  transform: translateY(-5px);
  box-shadow: var(--av-shadow-lg);
  text-decoration: none;
}

.av-grid-thumb {
  height: 185px;
  background: linear-gradient(135deg, var(--av-surface-3), var(--av-surface));
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.av-grid-thumb lottie-player { width: 100% !important; height: 100% !important; opacity: 0.6; }

.av-grid-level {
  position: absolute; top: 0.7rem; left: 0.7rem; z-index: 2;
  font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 0.22rem 0.6rem; border-radius: var(--av-radius-pill);
  background: rgba(66, 162, 220, 0.88); color: #fff;
}

.av-grid-body { padding: 1.1rem; }

.av-grid-title {
  font-size: 0.95rem; font-weight: 600; color: #fff;
  margin-bottom: 0.45rem; line-height: 1.35;
}

.av-grid-meta {
  font-size: 0.78rem; color: var(--av-muted);
  display: flex; align-items: center; gap: 0.4rem;
}

.av-grid-avatar {
  width: 16px; height: 16px; border-radius: 50%;
  background: linear-gradient(135deg, var(--av-primary), var(--av-accent));
  flex-shrink: 0;
}

/* Spinner override */
.av-spinner {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid var(--av-border-md);
  border-top-color: var(--av-primary);
  animation: spin 0.7s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 12. Pagination ── */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  padding: 0; margin: 0;
  justify-content: center;
}

.page-item .page-link,
.page-item span.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 0.65rem;
  border-radius: var(--av-radius);
  background: var(--av-surface);
  border: 1px solid var(--av-border);
  color: var(--av-muted);
  font-size: 0.84rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  line-height: 1;
}

.page-item .page-link:hover {
  background: var(--av-surface-2);
  border-color: var(--av-border-md);
  color: #fff;
}

.page-item.active .page-link,
.page-item.active span.page-link {
  background: var(--av-primary);
  border-color: var(--av-primary);
  color: #fff;
  font-weight: 700;
}

.page-item.disabled .page-link,
.page-item.disabled span.page-link {
  background: var(--av-surface);
  border-color: var(--av-border);
  color: var(--av-faint);
  pointer-events: none;
  opacity: 0.5;
}

/* ── 13. Global form & button overrides (Bootstrap 4 compat) ── */

/* -- Inputs & selects -- */
.form-control,
input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]).form-control,
textarea.form-control,
select.form-control {
  background: var(--av-surface-2) !important;
  border: 1px solid var(--av-border-md) !important;
  border-radius: var(--av-radius) !important;
  color: var(--av-text) !important;
  font-family: var(--av-font);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control::placeholder { color: var(--av-faint) !important; }
.form-control:focus {
  background: var(--av-surface-2) !important;
  border-color: var(--av-primary) !important;
  color: var(--av-text) !important;
  box-shadow: 0 0 0 3px rgba(66,162,220,0.15) !important;
  outline: none;
}
select.form-control option { background: var(--av-surface-2); color: var(--av-text); }

/* -- Buttons -- */
.btn-primary {
  background: var(--av-primary) !important;
  border-color: var(--av-primary) !important;
  color: #fff !important;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--av-primary-h) !important;
  border-color: var(--av-primary-h) !important;
  box-shadow: 0 6px 20px rgba(66,162,220,0.35) !important;
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--av-surface-2) !important;
  border-color: var(--av-border-md) !important;
  color: var(--av-text) !important;
  font-weight: 600;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: var(--av-surface-3) !important;
  border-color: var(--av-border-md) !important;
  color: #fff !important;
  box-shadow: none !important;
}
.btn-light {
  background: var(--av-surface-2) !important;
  border-color: var(--av-border-md) !important;
  color: var(--av-text) !important;
}
.btn-light:hover {
  background: var(--av-surface-3) !important;
  color: #fff !important;
  border-color: var(--av-border-md) !important;
}
.btn-link {
  color: var(--av-primary) !important;
  text-decoration: none;
}
.btn-link:hover { color: var(--av-primary-h) !important; text-decoration: underline; }

/* focus ring on all buttons */
.btn:focus { box-shadow: 0 0 0 3px rgba(66,162,220,0.2) !important; }

/* -- Alert overrides -- */
.alert-danger  { background: rgba(239,68,68,0.12)  !important; border-color: rgba(239,68,68,0.25)  !important; color: #fca5a5 !important; }
.alert-success { background: rgba(16,185,129,0.12) !important; border-color: rgba(16,185,129,0.25) !important; color: #6ee7b7 !important; }
.alert-warning { background: rgba(251,191,36,0.12) !important; border-color: rgba(251,191,36,0.25) !important; color: #fde68a !important; }

/* -- Cards -- */
.card {
  background: var(--av-surface) !important;
  border: 1px solid var(--av-border) !important;
  border-radius: var(--av-radius-lg) !important;
  color: var(--av-text);
}
.card-header {
  background: var(--av-surface-2) !important;
  border-bottom: 1px solid var(--av-border) !important;
  color: var(--av-text) !important;
}

/* ── 14. Auth system ── */
.av-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--av-nav-h) + 2rem) 1rem 3rem;
  background: var(--av-bg);
}

.av-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--av-surface);
  border: 1px solid var(--av-border);
  border-radius: var(--av-radius-lg);
  padding: 2.5rem 2.25rem;
  box-shadow: var(--av-shadow-lg);
}

.av-auth-logo { display: block; margin-bottom: 1.75rem; }
.av-auth-logo img { height: 32px; width: auto; }

.av-auth-title {
  font-size: 1.6rem; font-weight: 800;
  letter-spacing: -0.02em; color: #fff;
  margin: 0 0 0.35rem;
}
.av-auth-sub {
  font-size: 0.88rem; color: var(--av-muted);
  margin: 0 0 1.75rem;
}

/* Alerts */
.av-auth-alert {
  display: flex; align-items: flex-start; gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: var(--av-radius);
  font-size: 0.84rem; line-height: 1.5;
  margin-bottom: 1.25rem;
}
.av-auth-alert i { flex-shrink: 0; margin-top: 0.1rem; }
.av-auth-alert--error  { background: rgba(239,68,68,0.10);  border: 1px solid rgba(239,68,68,0.25);  color: #fca5a5; }
.av-auth-alert--success{ background: rgba(16,185,129,0.10); border: 1px solid rgba(16,185,129,0.25); color: #6ee7b7; }

/* Fields */
.av-auth-field { margin-bottom: 1.1rem; }
.av-auth-field > label,
.av-auth-field-header label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--av-text); margin-bottom: 0.45rem;
}
.av-auth-field-header {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 0.45rem;
}
.av-auth-field-header label { margin-bottom: 0; }

.av-field-hint  { font-size: 0.74rem; color: var(--av-faint); margin-top: 0.35rem; }
.av-field-error { font-size: 0.78rem; color: #fca5a5; margin-top: 0.35rem; min-height: 1rem; }

/* Input */
.av-auth-input-wrap { position: relative; }

.av-auth-input {
  width: 100%;
  background: var(--av-surface-2) !important;
  border: 1px solid var(--av-border-md) !important;
  border-radius: var(--av-radius) !important;
  color: var(--av-text) !important;
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  font-family: var(--av-font);
  display: block;
}
.av-auth-input::placeholder { color: var(--av-faint) !important; }
.av-auth-input:focus {
  border-color: var(--av-primary) !important;
  box-shadow: 0 0 0 3px rgba(66,162,220,0.15) !important;
}
.av-auth-input.is-invalid { border-color: rgba(239,68,68,0.6) !important; }
.av-auth-input.is-valid   { border-color: rgba(16,185,129,0.5) !important; }
.av-auth-input-wrap .av-auth-input { padding-right: 2.6rem; }

/* Eye toggle */
.av-auth-eye {
  position: absolute; right: 0.75rem; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  color: var(--av-faint); cursor: pointer; padding: 0;
  font-size: 0.85rem; transition: color 0.2s; line-height: 1;
}
.av-auth-eye:hover { color: var(--av-muted); }

/* Small link */
.av-auth-link-sm {
  font-size: 0.78rem; color: var(--av-muted);
  text-decoration: none; transition: color 0.2s;
}
.av-auth-link-sm:hover { color: var(--av-primary); }

/* Inline link */
.av-auth-inline-link { color: var(--av-primary); text-decoration: none; }
.av-auth-inline-link:hover { color: var(--av-primary-h); text-decoration: underline; }

/* Remember / checkbox */
.av-auth-remember { margin-bottom: 1.5rem; }
.av-auth-checkbox {
  display: flex; align-items: center; gap: 0.6rem;
  cursor: pointer; font-size: 0.83rem; color: var(--av-muted);
  user-select: none; -webkit-user-select: none;
}
.av-auth-checkbox input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.av-auth-checkmark {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--av-border-md);
  background: var(--av-surface-2);
  display: inline-flex; align-items: center;
  justify-content: center; flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}
.av-auth-checkbox input:checked ~ .av-auth-checkmark {
  background: var(--av-primary); border-color: var(--av-primary);
}
.av-auth-checkbox input:checked ~ .av-auth-checkmark::after {
  content: '';
  width: 4px; height: 7px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg) translateY(-1px); display: block;
}

/* Submit button */
.av-auth-submit {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--av-primary); color: #fff;
  border: none; border-radius: var(--av-radius);
  font-size: 0.95rem; font-weight: 700;
  padding: 0.75rem 1rem; cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  font-family: var(--av-font);
}
.av-auth-submit:hover {
  background: var(--av-primary-h);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(66,162,220,0.38);
}
.av-auth-submit:disabled {
  opacity: 0.65; cursor: not-allowed; transform: none; box-shadow: none;
}

/* Divider */
.av-auth-divider {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 1.5rem 0 1.1rem;
  color: var(--av-faint); font-size: 0.78rem;
}
.av-auth-divider::before,
.av-auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--av-border); }

/* Secondary / create account button */
.av-auth-alt-btn {
  display: block; width: 100%; text-align: center;
  padding: 0.7rem 1rem; border-radius: var(--av-radius);
  border: 1.5px solid var(--av-border-md); background: transparent;
  color: var(--av-text); font-size: 0.88rem; font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.av-auth-alt-btn:hover {
  border-color: var(--av-primary); color: var(--av-primary);
  background: rgba(66,162,220,0.06); text-decoration: none;
}

@media (max-width: 480px) { .av-auth-card { padding: 2rem 1.4rem; } }

/* ── 15. Theme toggle button ── */
.av-theme-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.22);
  background: transparent;
  color: rgba(255,255,255,0.75);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0; line-height: 1; flex-shrink: 0;
  font-size: 0.82rem;
  transition: border-color 0.2s var(--av-ease),
              color 0.2s var(--av-ease),
              background 0.2s var(--av-ease);
}
.av-theme-btn:hover {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* ── 16. Light mode ── */
html.light-mode {
  --av-bg:        #f3f5f8;
  --av-surface:   #ffffff;
  --av-surface-2: #edf0f6;
  --av-surface-3: #e2e8f0;
  --av-border:    rgba(0,0,0,0.07);
  --av-border-md: rgba(0,0,0,0.13);
  --av-text:      #1a2533;
  --av-muted:     #52697c;
  --av-faint:     #adc0ca;
  --av-shadow:    0 4px 24px rgba(0,0,0,0.07);
  --av-shadow-lg: 0 12px 48px rgba(0,0,0,0.13);
}

/* Navbar — unscrolled stays transparent (hero is always dark) */
html.light-mode .av-nav.scrolled {
  background: rgba(243,245,248,0.96) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.07), 0 4px 20px rgba(0,0,0,0.06);
}
html.light-mode .av-nav.scrolled .nav-link      { color: rgba(26,37,51,0.68) !important; }
html.light-mode .av-nav.scrolled .nav-link:hover,
html.light-mode .av-nav.scrolled .nav-link.active { color: #1a2533 !important; }
html.light-mode .av-nav.scrolled .av-btn-ghost  {
  border-color: rgba(26,37,51,0.2) !important;
  color: rgba(26,37,51,0.75) !important;
}
html.light-mode .av-nav.scrolled .av-btn-ghost:hover {
  border-color: rgba(26,37,51,0.38) !important;
  color: #1a2533 !important;
  background: rgba(0,0,0,0.04) !important;
}
html.light-mode .av-nav.scrolled .av-btn-cta { color: #fff !important; }
html.light-mode .av-nav.scrolled .av-theme-btn {
  border-color: rgba(26,37,51,0.18) !important;
  color: rgba(26,37,51,0.6) !important;
}
html.light-mode .av-nav.scrolled .av-theme-btn:hover {
  border-color: rgba(26,37,51,0.35) !important;
  color: #1a2533 !important;
  background: rgba(0,0,0,0.05) !important;
}

/* ── Headings that are hardcoded #fff ── */
html.light-mode .av-section-title,
html.light-mode .av-page-hero h1,
html.light-mode .av-feat-title,
html.light-mode .av-faq-q,
html.light-mode .av-cta-inner h2,
html.light-mode .av-nl-card h3,
html.light-mode .av-cc-title,
html.light-mode .av-cc-body .av-cc-title,
html.light-mode .av-grid-title,
html.light-mode .av-auth-title,
html.light-mode .av-fz-cat-title,
html.light-mode .av-fz-card-title,
html.light-mode .av-fz-upgrade-inner h2,
html.light-mode .av-job-title,
html.light-mode .av-job-empty h4,
html.light-mode .av-vac-body h4,
html.light-mode .av-plan-name,
html.light-mode .av-signup-section-title,
html.light-mode .av-vac-detail { color: var(--av-text) !important; }

/* FAQ hover in light mode */
html.light-mode .av-faq-q:hover { background: rgba(0,0,0,0.03) !important; }

/* Carousel thumb stays dark (video area) */
/* Carousel nav buttons */
html.light-mode .av-c-btn {
  background: rgba(243,245,248,0.92) !important;
  color: var(--av-text) !important;
  border-color: var(--av-border-md);
}
html.light-mode .av-c-btn:hover {
  background: var(--av-primary) !important;
  color: #fff !important;
}

/* Newsletter card */
html.light-mode .av-nl-card {
  background: var(--av-surface-2) !important;
  border-color: var(--av-border-md) !important;
}
html.light-mode .av-nl-input {
  background: var(--av-surface) !important;
  border-color: var(--av-border-md) !important;
  color: var(--av-text) !important;
}
html.light-mode .av-nl-input::placeholder { color: var(--av-faint) !important; }
html.light-mode .av-nl-input:focus {
  background: var(--av-surface) !important;
  border-color: var(--av-primary) !important;
}

/* CTA radial glow — tone down in light mode */
html.light-mode .av-cta::before {
  background: radial-gradient(ellipse 60% 70% at 50% -10%, rgba(66,162,220,0.05) 0%, transparent 70%);
}

/* Hero keeps dark overlay regardless of mode (mascot bg image) */
/* .av-hero stays as-is */

/* Free zone upgrade section */
html.light-mode .av-fz-upgrade {
  background: linear-gradient(180deg, var(--av-bg) 0%, var(--av-surface) 100%) !important;
}
html.light-mode .av-fz-upgrade::before {
  background: radial-gradient(ellipse 55% 65% at 50% 0%, rgba(66,162,220,0.06) 0%, transparent 70%);
}

/* Auth forms */
html.light-mode .av-auth-card { border-color: var(--av-border-md) !important; }

/* Pagination */
html.light-mode .page-item .page-link,
html.light-mode .page-item span.page-link {
  background: var(--av-surface) !important;
  color: var(--av-muted) !important;
  border-color: var(--av-border-md) !important;
}
html.light-mode .page-item .page-link:hover {
  background: var(--av-surface-2) !important;
  color: var(--av-text) !important;
}

/* Footer always stays dark — brand anchor */

/* ── 18. Utilities ── */
.av-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.main-heading-banner { background: transparent !important; padding: 0; }
.card.course-card {
  background: var(--av-surface);
  border: 1px solid var(--av-border);
  border-radius: var(--av-radius-lg);
}
