.logo-img { height: 46px; width: auto; display: block; }
  @media (max-width: 600px) { .logo-img { height: 40px; } }

/* ============================================================
   Dark navbar + larger nav text (shared across all pages).
   Loaded after each page's own CSS, so these win.
   ============================================================ */
#nav {
  background: rgba(8, 6, 20, 0.72) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  height: 66px !important;
}
#nav.sc {
  background: rgba(6, 4, 16, 0.9) !important;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.45) !important;
}

/* brand text a touch bigger + light */
#nav .logo-name {
  font-size: 1.12rem !important;
  color: #fff !important;
}
#nav .logo-name em {
  color: #c7b8ff !important;
}

/* nav links — bigger, light on the dark bar */
#nav .nl a {
  font-size: 0.98rem !important;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82) !important;
  padding: 8px 14px !important;
}
#nav .nl a:hover,
#nav .nl a.on {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

/* phone / CTA in the right cluster */
#nav .n-ph {
  color: rgba(255, 255, 255, 0.82) !important;
}
#nav .n-ph:hover {
  color: #fff !important;
}

/* hamburger bars → light so they show on the dark bar */
#nav .hbg span {
  background: #fff !important;
}

/* dark logo isn't visible on the dark bar → give it a light chip */
#nav .logo-img {
  background: #fff;
  padding: 5px 9px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

@media (max-width: 600px) {
  #nav .logo-name { font-size: 1.02rem !important; }
}

/* ============================================================
   Mobile scroll performance — blur backdrops are the #1 cause of
   jittery scrolling on phones. Disable them and use solid fills.
   ============================================================ */
@media (max-width: 768px) {
  *, *::before, *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  #nav { background: rgba(6, 4, 16, 0.94) !important; }
  /* the injected star layers stay put (no parallax on touch) */
  .parallax, .star-field { translate: none !important; }
}

/* ============================================================
   Mobile menu → dark drawer sliding in from the right (site-wide)
   ============================================================ */
@media (max-width: 980px) {
  .mm {
    top: 66px; right: 0; left: auto; bottom: auto;
    width: min(80vw, 300px);
    height: calc(100vh - 66px); height: calc(100dvh - 66px);
    background: #0a0820 !important;
    padding: 22px 18px 28px;
    flex-direction: column;
    gap: 4px;
    transform: translateX(105%) !important;
    box-shadow: -14px 0 44px rgba(0, 0, 0, 0.55);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1) !important;
  }
  .mm.op { transform: translateX(0) !important; }
  .mm a {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 13px 15px; border-radius: 10px; font-size: 1rem;
  }
  .mm a:hover, .mm a:active { background: rgba(255, 255, 255, 0.08) !important; color: #fff !important; }
}

/* ============================================================
   Highlight text → animated glowing gold gradient (site-wide).
   Applies to every .grad / .hl / .out highlight span.
   ============================================================ */
.grad,
.hl,
.out {
  background: linear-gradient(100deg, #f7b500 0%, #ffd257 20%, #fff6d0 35%, #ffe08a 50%, #ffd257 65%, #f7b500 85%, #ffa41b 100%) !important;
  background-size: 200% auto !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  animation: goldSheenAnim 4.5s ease-in-out infinite,
             goldGlowAnim 3s ease-in-out infinite !important;
}

@keyframes goldSheenAnim {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}
@keyframes goldGlowAnim {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(247, 181, 0, 0.35))
            drop-shadow(0 0 14px rgba(255, 164, 27, 0.15));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(255, 210, 87, 0.7))
            drop-shadow(0 0 26px rgba(247, 181, 0, 0.4));
  }
}

/* ============================================================
   3D flip course cards (shared, index + courses pages)
   ============================================================ */
.flip-card {
  perspective: 1200px;
  overflow: visible !important;
}
.flip-inner {
  position: relative;
  width: 100%;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-style: preserve-3d;
}
.flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}
.flip-front,
.flip-back {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: inherit;
  overflow: hidden;
}
.flip-front {
  display: flex;
  flex-direction: column;
}
.flip-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 28px;
  background:
    radial-gradient(circle at 80% 15%, rgba(139, 92, 246, 0.4), transparent 55%),
    linear-gradient(150deg, #160a38 0%, #241a6e 55%, #2f57a8 100%);
}
.flip-back h3 {
  color: #fff !important;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}
.flip-back .flip-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 100px;
  background: #fff;
  color: #14275c;
  font-weight: 700;
  font-size: 0.85rem;
}
.flip-back .flip-cta svg { stroke: #14275c; }
