/* Simple 3-column video grid + modal styles */

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

@media (max-width: 980px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.video-card video {
  width: 100%;
  height: auto;
  object-fit: cover;
  background: #000;
  border-radius: 6px;
  display: block;
}

.video-card figcaption {
  font-size: 0.95rem;
  color: var(--muted-color, #666);
  line-height: 1.2;
}

/* small expand button */
.video-expand {
  position: absolute;
  right: 8px;
  top: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}
.video-expand:hover,
.video-expand:focus {
  background: rgba(0, 0, 0, 0.75);
  outline: 2px solid rgba(255, 255, 255, 0.12);
  outline-offset: 2px;
}

/* Modal */
.video-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  padding: 2rem;
}
.video-modal.open {
  display: flex;
}
.video-modal-inner {
  width: min(1200px, 95%);
  max-height: 95%;
  position: relative;
  display: block;
}
.video-modal video {
  width: 100%;
  height: auto;
  max-height: calc(95vh - 40px);
  display: block;
  border-radius: 6px;
  background: #000;
}
.modal-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

/* Accessibility and small niceties */
.video-card .video-expand {
  /* Simple 3-column video grid + modal styles */
  .video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
    margin-top: 1rem;
  }
}
@media (max-width: 980px) {
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.video-card video {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #000;
  border-radius: 6px;
  display: block;
}

.video-card figcaption {
  font-size: 0.95rem;
  color: var(--muted-color, #666);
  line-height: 1.2;
}

/* small expand button */
.video-expand {
  position: absolute;
  right: 8px;
  top: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}
.video-expand:hover,
.video-expand:focus {
  background: rgba(0, 0, 0, 0.75);
  outline: 2px solid rgba(255, 255, 255, 0.12);
  outline-offset: 2px;
}

/* Modal */
.video-modal {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  padding: 2rem;
}
.video-modal.open {
  display: flex;
}
.video-modal-inner {
  width: min(1200px, 95%);
  max-height: 95%;
  position: relative;
  display: block;
}
.video-modal video {
  width: 100%;
  height: auto;
  max-height: calc(95vh - 40px);
  display: block;
  border-radius: 6px;
  background: #000;
}
.modal-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: transparent;
  color: #fff;
  border: none;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

/* Accessibility and small niceties */
.video-card .video-expand,
.modal-close {
  transition: background 120ms ease, transform 120ms ease;
}
@media (prefers-reduced-motion: reduce) {
  .video-card .video-expand,
  .modal-close {
    transition: none;
  }
}
