.cg-vg-hero {
  background: linear-gradient(135deg, #055078 0%, #0b2240 100%);
  color: #fff;
}

.cg-vg-card {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  border-color: #e2e8f0 !important;
}

.cg-vg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08) !important;
}

.cg-vg-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: block;
  cursor: pointer;
}

.cg-vg-card__thumb {
  object-fit: cover;
  transition: transform 0.35s ease;
}

.cg-vg-card:hover .cg-vg-card__thumb {
  transform: scale(1.04);
}

.cg-vg-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(5, 80, 120, 0.92);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  padding-left: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.cg-vg-card__media:hover .cg-vg-card__play {
  transform: translate(-50%, -50%) scale(1.08);
  background: #2e7d32;
}

.cg-vg-card__duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.cg-vg-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #055078;
  border: 1px solid #dbeafe;
}

.cg-vg-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cg-vg-modal-tabs .nav-link {
  font-weight: 600;
  font-size: 14px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 8px;
  margin: 0 3px;
}

.cg-vg-modal-tabs .nav-link.active {
  background: #055078;
  color: #fff;
}

.cg-vg-timeline-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cg-vg-timeline-item:hover,
.cg-vg-timeline-item.active {
  background: #f0f9ff;
  border-color: #0284c7;
}

.cg-vg-timeline-time {
  flex-shrink: 0;
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  color: #055078;
  background: #e0f2fe;
  padding: 3px 8px;
  border-radius: 6px;
}

.cg-vg-cat-pill.active {
  background-color: #055078 !important;
  border-color: #055078 !important;
  color: #fff !important;
}

/* Animated Synchronized Closed Caption Overlay */
.cg-vg-player-stage {
  position: relative;
}

.cg-vg-caption-overlay {
  position: absolute;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%);
  z-index: 12;
  max-width: min(88%, 680px);
  padding: 8px 16px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  display: none;
}

.cg-vg-caption-overlay.is-visible {
  display: block;
  opacity: 1;
}

.cg-vg-caption-overlay.anim-fade-up.is-visible {
  animation: cgCapFadeUp 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.cg-vg-caption-overlay.anim-slide-left.is-visible {
  animation: cgCapSlideLeft 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.cg-vg-caption-overlay.anim-zoom-pop.is-visible {
  animation: cgCapZoomPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.cg-vg-caption-overlay.anim-blur-reveal.is-visible {
  animation: cgCapBlurReveal 0.36s ease-out forwards;
}

.cg-vg-cc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto !important;
  height: auto !important;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.cg-vg-cc-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cg-vg-player-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 12px;
}

.cg-vg-cc-toggle.is-off {
  opacity: 0.55;
  text-decoration: line-through;
}

@keyframes cgCapFadeUp {
  from {
    opacity: 0;
    transform: translate(-50%, 14px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes cgCapSlideLeft {
  from {
    opacity: 0;
    transform: translate(calc(-50% + 26px), 0);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes cgCapZoomPop {
  from {
    opacity: 0;
    transform: translate(-50%, 6px) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes cgCapBlurReveal {
  from {
    opacity: 0;
    filter: blur(6px);
    transform: translate(-50%, 4px);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translate(-50%, 0);
  }
}

.cg-vg-article-content img,
#cgModalAboutBody img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 12px 0;
}

/* ==========================================================================
   /resources/ Editorial Library Layout
   ========================================================================== */
.cg-res-hero::before,
.cg-res-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.cg-res-hero::before {
  width: 460px;
  height: 460px;
  top: -180px;
  right: -110px;
  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.22) 0%,
    rgba(56, 189, 248, 0) 70%
  );
}

.cg-res-hero::after {
  width: 360px;
  height: 360px;
  bottom: -160px;
  left: -90px;
  background: radial-gradient(
    circle,
    rgba(46, 125, 50, 0.24) 0%,
    rgba(46, 125, 50, 0) 70%
  );
}

.cg-res-eyebrow {
  font-size: 13px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  backdrop-filter: blur(6px);
}

.cg-res-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.cg-res-stat-pill i {
  color: #7dd3fc;
}

.cg-res-search-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 45px rgba(2, 12, 27, 0.22);
}

.cg-res-quick-topic {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}

.cg-res-quick-topic:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.cg-res-library {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 220px, #f8fafc 100%);
  min-height: 58vh;
}

/* Featured Spotlight */
.cg-res-spotlight {
  border: 1px solid #e2e8f0 !important;
  transition:
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.cg-res-spotlight:hover {
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08) !important;
}

.cg-res-spotlight__media {
  min-height: 290px;
  overflow: hidden;
  display: block;
  cursor: pointer;
}

.cg-res-spotlight__img {
  object-fit: cover;
  transition: transform 0.45s ease;
}

.cg-res-spotlight:hover .cg-res-spotlight__img {
  transform: scale(1.03);
}

.cg-res-spotlight__ribbon {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(5, 80, 120, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}

.cg-res-spotlight__play {
  width: 70px;
  height: 70px;
  font-size: 22px;
}

.cg-res-type-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.cg-res-type-tag.is-video {
  background: #e0f2fe;
  color: #0369a1;
}

.cg-res-type-tag.is-article {
  background: #dcfce7;
  color: #166534;
}

.cg-res-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cg-res-chapter-chip {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 10px;
}

.cg-res-primary-btn {
  background-color: #055078 !important;
  border-color: #055078 !important;
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.cg-res-primary-btn:hover {
  background-color: #2e7d32 !important;
  border-color: #2e7d32 !important;
  transform: translateY(-1px);
}

/* Filter Toolbar */
.cg-res-toolbar {
  border-color: #e2e8f0 !important;
}

.cg-res-type-tabs {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

.cg-res-type-pill {
  font-size: 13px;
  color: #475569;
  border: 0 !important;
  background: transparent;
  transition: all 0.18s ease;
}

.cg-res-type-pill:hover {
  color: #055078;
}

.cg-res-type-pill.active {
  background: #055078 !important;
  color: #fff !important;
  box-shadow: 0 3px 10px rgba(5, 80, 120, 0.25);
}

.cg-res-type-count {
  display: inline-block;
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.08);
}

.cg-res-type-pill.active .cg-res-type-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* Card Enhancements */
.cg-vg-card__typebadge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.cg-vg-card__cta {
  color: #055078 !important;
  font-size: 14px;
}

.cg-vg-card__cta:hover {
  color: #2e7d32 !important;
}

.cg-vg-card__arrow {
  transition: transform 0.18s ease;
}

.cg-vg-card:hover .cg-vg-card__arrow {
  transform: translateX(3px);
}

/* Empty State */
.cg-res-empty__icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #eff6ff;
  color: #055078;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.cg-res-loadmore-btn {
  border-color: #055078 !important;
  color: #055078 !important;
  background: #fff;
  transition: all 0.2s ease;
}

.cg-res-loadmore-btn:hover:not(:disabled) {
  background: #055078 !important;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(5, 80, 120, 0.22);
}

@media (min-width: 992px) {
  .cg-res-spotlight__media {
    min-height: 360px;
  }
}

/* ==========================================================================
   Homepage Video Showcase Banner
   ========================================================================== */
.cg-home-showcase {
  background: linear-gradient(135deg, #eef6fc 0%, #f6faff 52%, #e6f0fa 100%);
  border: 1px solid #dbeafe;
  box-shadow: 0 16px 40px rgba(5, 80, 120, 0.08);
}

.cg-home-showcase::before,
.cg-home-showcase::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
}

.cg-home-showcase::before {
  width: 420px;
  height: 420px;
  top: -190px;
  right: -120px;
  background: radial-gradient(
    circle,
    rgba(59, 130, 246, 0.14) 0%,
    rgba(59, 130, 246, 0) 70%
  );
}

.cg-home-showcase::after {
  width: 340px;
  height: 340px;
  bottom: -170px;
  left: -90px;
  background: radial-gradient(
    circle,
    rgba(14, 165, 233, 0.12) 0%,
    rgba(14, 165, 233, 0) 70%
  );
}

.cg-home-showcase__logo {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.cg-home-showcase__title {
  color: #0f2b4c;
  font-size: clamp(24px, 2.5vw, 46px);
  line-height: 1.22;
  letter-spacing: -0.015em;
}

.cg-home-showcase__sub {
  color: #475569;
  font-size: 16px;
  line-height: 1.55;
  max-width: 500px;
}

.cg-home-showcase__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  color: #1d63b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 6px 16px rgba(15, 43, 76, 0.08);
  border: 1px solid #e2e8f0;
}

.cg-home-showcase__feat-label {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  color: #0f2b4c;
}

.cg-home-showcase__frame {
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.cg-home-showcase__media {
  aspect-ratio: 16 / 9;
  display: block;
  cursor: pointer;
}

.cg-home-showcase__thumb {
  object-fit: cover;
  transition: transform 0.38s ease;
}

.cg-home-showcase__media:hover .cg-home-showcase__thumb {
  transform: scale(1.03);
}

.cg-home-showcase__play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.58);
  border: 2px solid rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  padding-left: 4px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
}

.cg-home-showcase__media:hover .cg-home-showcase__play {
  transform: translate(-50%, -50%) scale(1.08);
  background: #055078;
}

/* ==========================================================================
   Dashboard Learning Center
   ========================================================================== */
.cg-lc-page .cg-res-toolbar {
  border-color: #e2e8f0 !important;
}

.cg-lc-search-wrap {
  flex: 1 1 280px;
  max-width: 400px;
}

.cg-lc-search-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.cg-lc-search-box:focus-within {
  background: #ffffff;
  border-color: #055078;
  box-shadow: 0 0 0 3px rgba(5, 80, 120, 0.12);
}

.cg-lc-search-box .form-control {
  min-height: 40px;
  color: #0f172a;
}

.cg-lc-search-box .form-control::placeholder {
  color: #94a3b8;
}

.cg-lc-results-bar {
  min-height: 24px;
}

.cg-lc-page .cg-vg-card__media {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.cg-lc-page .cg-vg-card h3 {
  line-height: 1.35;
}

@media (max-width: 767.98px) {
  .cg-lc-search-wrap {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

.cg-lc-hero::before,
.cg-lc-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.cg-lc-hero::before {
  width: 380px;
  height: 380px;
  top: -160px;
  right: -100px;
  background: radial-gradient(
    circle,
    rgba(56, 189, 248, 0.22) 0%,
    rgba(56, 189, 248, 0) 70%
  );
}

.cg-lc-hero::after {
  width: 300px;
  height: 300px;
  bottom: -140px;
  left: -80px;
  background: radial-gradient(
    circle,
    rgba(46, 125, 50, 0.24) 0%,
    rgba(46, 125, 50, 0) 70%
  );
}

/* Video Player Modal Max-Height & Auto Video Sizing */
#cgResourceVideoModal .modal-dialog {
  max-height: 100vh;
}

#cgResourceVideoModal .modal-content {
  max-height: 100vh;
}

.cg-vg-player-stage-box {
  position: relative;
  width: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cg-vg-player-stage-box video {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 160px);
  display: block;
}

.cg-vg-player-stage-box iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 160px);
  border: 0;
  display: block;
}

/* Mobile Full-Height Video Player Modal */
@media (max-width: 767.98px) {
  #cgResourceVideoModal .modal-dialog {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    margin: 0;
  }

  #cgResourceVideoModal .modal-content {
    height: 100%;
    max-height: 100vh;
    border: 0;
    border-radius: 0 !important;
  }

  #cgResourceVideoModal .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px !important;
  }

  .cg-vg-player-stage-box video,
  .cg-vg-player-stage-box iframe {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 120px);
  }

  #cgResourceVideoModal #cgModalTabsCol .tab-content {
    max-height: none !important;
    overflow: visible !important;
  }
}
