.video-gallery {
  max-width: 1000px;
  margin: 80px auto 0;
  padding: 0 32px;
}

.video-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px 32px;
  align-items: start;
}

.video-card {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--charcoal);
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.video-card-media {
  position: relative;
  display: block;
}

.video-card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(74, 70, 64, .18);
  border-radius: 50%;
  background: var(--cream);
  color: var(--charcoal);
  pointer-events: none;
}

.video-card-play::before {
  content: '';
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid currentColor;
}

.video-card-poster {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 2px;
  background: var(--paper);
}

.video-card-caption {
  display: block;
  padding: 15px 0 0;
  overflow-wrap: anywhere;
}

.video-card-name,
.video-card-location,
.video-card-duration {
  display: block;
}

.video-card-name {
  color: var(--stone-dark);
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
}

.video-card-location {
  margin-top: 5px;
  color: var(--charcoal);
  font-family: 'Cormorant Garamond', serif;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.35;
}

.video-card-duration {
  margin-top: 8px;
  color: var(--stone-dark);
  font-size: 15px;
  line-height: 1.4;
}

.video-card:hover .video-card-location,
.video-dialog-close:hover {
  color: var(--gold);
}

.video-card:focus-visible,
.video-dialog-close:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 6px;
}

.video-dialog {
  width: min(1000px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 24px;
  overflow: auto;
  border: 0;
  border-radius: 2px;
  background: var(--paper);
  color: var(--charcoal);
}

.video-dialog::backdrop {
  background: rgba(42, 40, 36, 0.72);
}

.video-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.video-dialog-header h2 {
  min-width: 0;
  margin: 0;
  color: var(--charcoal);
  font-family: 'Cormorant Garamond', serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.video-dialog-close {
  flex: 0 0 auto;
  min-height: 36px;
  margin: 0;
  padding: 5px 0 5px 8px;
  border: 0;
  background: transparent;
  color: var(--stone-dark);
  font: inherit;
  font-size: 17px;
  line-height: 1.4;
  cursor: pointer;
}

.video-dialog-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  background: #181816;
}

#video-dialog-player {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: var(--video-player-max-height, calc(100vh - 190px));
  max-height: var(--video-player-max-height, calc(100dvh - 190px));
  margin: 0 auto;
  object-fit: contain;
  background: #181816;
}

.video-dialog-error {
  margin: 16px 0 0;
  color: var(--charcoal);
  font-size: 17px;
  line-height: 1.5;
}

.video-dialog-error[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .video-gallery {
    margin-top: 64px;
  }

  .video-gallery-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .video-card-location {
    font-size: 22px;
  }

  .video-dialog {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 16px;
  }

  .video-dialog-header {
    gap: 16px;
    margin-bottom: 16px;
  }

  .video-dialog-header h2 {
    font-size: 22px;
  }

  .video-dialog-close {
    font-size: 16px;
  }
}
