.thumbnail {
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.video-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0.6rem 0 0.4rem 0;  /* increased bottom margin */
  color: inherit;

  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  width: 100%;
  max-width: 100%;
  min-width: 0;
}


.video-info {
  min-width: 0; /* ✅ absolutely needed inside grid */
}

.video-info-grid {
  gap: 8px;
  margin-top: 8px;
  display: grid;
  grid-template-columns: 50px 1fr;
  min-width: 0; /* ✅ fix truncation in child */
}


.profile-picture {
  width: 36px;
  border-radius: 50px;
}

.thumbnail-row {
  width: 100%;
  height: 170px;
  overflow: hidden;
  position: relative; /* ✅ allows .video-time to position absolutely inside */
}


.thumbnail-row video.thumbnail {
  height: auto;
  display: block;
}



.video-author,
.video-stats {
  font-size: 12px;
  color: rgb(96, 96, 96);
    margin-bottom: 6px;

}

.video-author {
  margin-bottom: 6px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  padding-bottom: 48px;
  justify-items: center; /* center cards horizontally */
}


.video-preview {
  width: 100%;
    height: 250px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: block;  
  flex-direction: column;
  justify-content: space-between;
}




.media-wrapper {
  position: relative;
}

.media-wrapper img.static-thumb,
.media-wrapper video.hover-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-title, 
.video-title a {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* @media (max-width: 750px) {
  .video-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 751px) and (max-width: 999px) {
  .video-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (min-width: 1000px) {
  .video-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
} */



@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .video-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (min-width: 1280px) {
  .video-grid {
    grid-template-columns: 1fr 1fr 1fr 1fr;
  }
}

/* .video-preview {
  width: 100%;
  display: block;
} */
.thumbnail-wrapper {
  position: relative;
  display: block;
}

.video-time {
  font-size: 12px;
  font-weight: 500;
  padding: 4px;
  border-radius: 2px;
  background-color: black;
  color: white;
  position: absolute;
  bottom: 8px;
  right: 5px;
}



/* Override default link styles for video cards */
.video-preview a {
  color: skyblue !important;
  text-decoration: none !important;
}

.video-preview a:visited {
  color: skyblue !important;
  font-weight: 600;
}

.video-preview a:hover {
  text-decoration: underline;
  color: #93c5fd; /* optional light blue on hover */
}
