.ncv-gallery {
  --ncv-primary: #0e6b4e;
  --ncv-primary-dark: #0b533d;
  --ncv-muted: #5f6f68;
  --ncv-border: #d8e3dc;
  --ncv-bg-soft: #f3f7f4;
  --ncv-shadow: 0 14px 34px rgba(19, 41, 31, 0.08);
  color: #0b1f17;
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.ncv-toolbar {
  margin-bottom: 1.75rem;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--ncv-border);
  border-radius: 18px;
  box-shadow: var(--ncv-shadow);
}

.ncv-toolbar__top,
.ncv-toolbar__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.ncv-toolbar__top {
  margin-bottom: 1rem;
}

.ncv-toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.ncv-filter {
  appearance: none;
  border: 1px solid var(--ncv-border);
  background: var(--ncv-bg-soft);
  color: #123127;
  border-radius: 999px;
  padding: 0.7rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
}

.ncv-filter:hover,
.ncv-filter:focus,
.ncv-filter.is-active {
  background: var(--ncv-primary);
  color: #fff;
  border-color: var(--ncv-primary);
  outline: 0;
}

.ncv-search-wrap,
.ncv-select-wrap {
  flex: 1 1 280px;
}

.ncv-search,
.ncv-theme-filter {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--ncv-border);
  border-radius: 12px;
  background: #fff;
  padding: 0 1rem;
  font-size: 1rem;
  color: #10271d;
}

.ncv-search:focus,
.ncv-theme-filter:focus {
  border-color: var(--ncv-primary);
  outline: 2px solid rgba(14, 107, 78, 0.15);
  outline-offset: 0;
}

.ncv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.ncv-card {
  background: #fff;
  border: 1px solid var(--ncv-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--ncv-shadow);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: opacity 0.28s ease, transform 0.28s ease;
  opacity: 1;
  transform: translateY(0) scale(1);
  will-change: opacity, transform;
}

.ncv-card.is-entering,
.ncv-card.is-leaving {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
}

.ncv-card__trigger {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.ncv-card__thumb-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #dbe7e1;
}

.ncv-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.ncv-card:hover .ncv-card__thumb,
.ncv-card__trigger:focus .ncv-card__thumb {
  transform: scale(1.05);
}

.ncv-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 74px;
  height: 74px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(14, 107, 78, 0.88);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.ncv-card__play::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 23px;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent #fff;
}

.ncv-card__duration {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(11, 31, 23, 0.78);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.ncv-card__content {
  padding: 1.15rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.ncv-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ncv-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  background: var(--ncv-bg-soft);
  color: var(--ncv-primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.ncv-card__title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.35;
}

.ncv-card__speaker {
  margin: 0;
  color: var(--ncv-primary-dark);
  font-weight: 700;
}

.ncv-card__excerpt,
.ncv-card__themes {
  margin: 0;
  color: var(--ncv-muted);
  line-height: 1.55;
}

.ncv-card__themes {
  font-size: 0.92rem;
  padding-top: 0.1rem;
}

.ncv-empty-message {
  margin-top: 1rem;
  padding: 1rem 1.2rem;
  border: 1px dashed var(--ncv-border);
  border-radius: 16px;
  background: var(--ncv-bg-soft);
}

.ncv-lightbox[hidden],
.ncv-card[hidden] {
  display: none !important;
}

.ncv-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.ncv-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 17, 14, 0.78);
}

.ncv-lightbox__dialog {
  position: relative;
  z-index: 2;
  width: min(1100px, calc(100vw - 2rem));
  margin: 3vh auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.ncv-lightbox__inner {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.ncv-lightbox__inner iframe,
.ncv-lightbox__inner video {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.ncv-lightbox__close {
  position: absolute;
  right: 0.7rem;
  top: 0.7rem;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 27, 22, 0.78);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

body.ncv-lightbox-open {
  overflow: hidden;
}

.ncv-lightbox__error {
  color: #fff;
  padding: 2rem;
}

@media (max-width: 767px) {
  .ncv-gallery {
    width: min(100%, calc(100% - 1rem));
  }

  .ncv-toolbar {
    padding: 1rem;
  }

  .ncv-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ncv-lightbox__dialog {
    width: calc(100vw - 1rem);
    margin: 1.2rem auto;
  }

  .ncv-card__play {
    width: 60px;
    height: 60px;
  }

  .ncv-card__play::before {
    left: 25px;
    top: 18px;
    border-width: 12px 0 12px 18px;
  }
}
