.asp-video-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.asp-video-gallery__card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: var(--border-width-1) solid rgba(0, 53, 126, 0.16);
  border-radius: var(--border-radius-16);
  overflow: hidden;
  background: var(--white);
  /*box-shadow: 0 1px 3px rgba(0, 0, 0, .08);*/
  transition: transform .15s ease, box-shadow .15s ease;
}

.asp-video-gallery__card:hover,
.asp-video-gallery__card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 .5rem 1rem var(--black-200-alpha);
}

.asp-video-gallery__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--black);
  overflow: hidden;
}

.asp-video-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.asp-video-gallery__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(0, 0, 0, .15);
}

.asp-video-gallery__title {
  margin: 0;
  padding: .75rem 1rem;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text-primary);
}

.asp-video-gallery__empty {
  color: var(--color-text-secondary);
}

.asp-video-gallery__footer {
  margin-top: 32px;
  text-align: right;
}

.asp-video-gallery__view-all {
  color: var(--color-brand-primary);
  text-decoration: none;
  font-weight: 600;
}

.asp-video-gallery__view-all:hover {
  text-decoration: underline;
}

/* #display: short — grid of portrait 9:16 cards, evenly filling the row width */
.asp-video-shelf {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .9rem;
}

.asp-video-shelf__item {
  display: block;
  text-decoration: none;
  color: inherit;
}

.asp-video-shelf__thumb {
  aspect-ratio: 9 / 16;
  border-radius: .75rem;
  overflow: hidden;
  background: var(--black);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
  transition: transform .15s ease;
}

.asp-video-shelf__item:hover .asp-video-shelf__thumb,
.asp-video-shelf__item:focus-visible .asp-video-shelf__thumb {
  transform: translateY(-4px);
}

.asp-video-shelf__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.asp-video-shelf__title {
  margin: .5rem 0 0;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Modal — /prezentare/ player in an iframe */
.asp-video-gallery-modal__dialog {
  --asp-video-modal-max-height: min(90vh, 820px);
  width: min(96vw, 1100px);
  max-width: 1100px;
  margin: .75rem auto;
}

.asp-video-gallery-modal__content {
  background: var(--black);
  border: 0;
  overflow: hidden;
}

.asp-video-gallery-modal__header {
  gap: .75rem;
  padding: .65rem 1rem;
  background: var(--color-bg-inverse);
  border-bottom: 1px solid var(--white-200-alpha);
  color: var(--white);
}

.asp-video-gallery-modal__header .modal-title {
  color: var(--white);
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.asp-video-gallery-modal__header .btn-close {
  filter: invert(1);
  opacity: .85;
}

.asp-video-gallery-modal__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.asp-video-gallery-modal__actions .btn {
  white-space: nowrap;
  color: var(--white);
  border-color: rgba(255, 255, 255, .45);
}

.asp-video-gallery-modal__actions .btn:hover,
.asp-video-gallery-modal__actions .btn:focus-visible {
  color: var(--color-text-primary);
  background: var(--white);
  border-color: var(--white);
}

.asp-video-gallery-modal__body {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: var(--asp-video-modal-max-height);
  background: var(--black);
}

.asp-video-gallery-modal__body iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--black);
}

@media (max-width: 575.98px) {
  .asp-video-gallery-modal__dialog {
    --asp-video-modal-max-height: min(70vh, 420px);
    width: calc(100% - 1.5rem);
    max-width: none;
    margin: .75rem auto;
    min-height: 0;
  }

  .asp-video-gallery-modal__dialog .modal-content {
    min-height: 0;
    border-radius: var(--border-radius-16, .75rem);
  }

  .asp-video-gallery-modal__header {
    flex-wrap: wrap;
  }

  .asp-video-gallery-modal__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .asp-video-gallery-modal__body {
    aspect-ratio: 16 / 9;
    flex: none;
    min-height: 0;
    max-height: var(--asp-video-modal-max-height);
  }
}
