/* =====================================================
   GYANLELO — site-guards.css (shipped with v1.6.1)
   Integrity guards for course / blog / featured media.

   WHY THIS FILE EXISTS
   --------------------
   On some hosting stacks (optimizer modules, stale cache
   entries, merged or legacy stylesheets served alongside
   the app) course-card imagery has been observed rendering
   with an injected `filter: blur(...)` while the category
   badge drifts from its designed spot. Every rule below is
   a NO-OP on a clean install: it only re-asserts values
   that already exist in base.css, public.css and
   widgets.css. The file name is unique on purpose (it has
   never existed before), so no server or browser cache can
   serve a stale copy of it. It loads last, with
   !important and `html body` specificity, so foreign or
   stale rules can never win over it.
   ===================================================== */

/* -----------------------------------------------------
   1. Card / media imagery must always render SHARP.
      Covers the filter itself and every ancestor wrapper
      a blur could be attached to (a filter on ANY
      ancestor blurs the whole subtree).
   ----------------------------------------------------- */
html body .reveal,
html body .bps-widget,
html body .bps-course-grid,
html body .course-card,
html body .course-card-media,
html body .post-card,
html body .post-card-media,
html body .bps-featured,
html body .bps-featured-media,
html body .bps-gallery-item,
html body .bps-image-frame,
html body .bps-inst-card,
html body .bps-inst-avatar,
html body .bps-bg {
  filter: none !important;
  -webkit-filter: none !important;
}

html body .course-card-media img,
html body .post-card-media img,
html body .bps-featured-media img,
html body .bps-gallery-item img,
html body .bps-image-frame img,
html body .bps-inst-avatar img {
  filter: none !important;
  -webkit-filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Kill any backdrop-blur layered over card media. The only
   overlays the theme paints there are plain gradients
   (never backdrop filters), so this can only remove foreign
   blur — it cannot change the intended design. */
html body .course-card-media::after,
html body .post-card-media::after,
html body .bps-featured-media::after,
html body .bps-section .bps-overlay {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* -----------------------------------------------------
   2. Restore the designed badge placement and look.
      Context A — catalog / fallback pages (public.css):
      level badge top-left, category badge bottom-left.
      Context B — builder sections (widgets.css): level
      badge top-left, category badge top-right, gold text.
   ----------------------------------------------------- */
html body .course-level {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 2 !important;
  display: inline-flex !important;
  background: rgba(11, 11, 18, .55) !important;
  border-color: transparent !important;
  color: #E7E7F0 !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  transform: none !important;
}

html body .course-cat {
  position: absolute !important;
  bottom: 12px !important;
  left: 12px !important;
  top: auto !important;
  right: auto !important;
  z-index: 2 !important;
  display: inline-flex !important;
  background: rgba(124, 92, 255, .24) !important;
  border-color: transparent !important;
  color: #CFC4FF !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  transform: none !important;
}

/* Builder-section context wins where both apply. */
html body .bps-section .course-level {
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  bottom: auto !important;
  background: rgba(8, 8, 14, .55) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

html body .bps-section .course-cat {
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  bottom: auto !important;
  background: rgba(8, 8, 14, .55) !important;
  color: var(--accent, #F5C66B) !important;
  border-color: transparent !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}
