/* ---------------------- VIDEOS SECTION ---------------------- */
#videosSection {
  padding: 1rem 0;
}

#videosSection h2 {
  margin-bottom: 1rem;
  font-weight: 600;
  color: #333;
}

/* ---------------------- VIDEO CARD GRID ---------------------- */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem; /* space between cards */
}

/* ---------------------- VIDEO CARD ---------------------- */
.video-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  background-color: #fff;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* ---------------------- THUMBNAIL WRAPPER ---------------------- */
.video-thumb-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.video-thumb-wrapper img.video-thumb {
  width: 100%;
  display: block;
  cursor: pointer;
  margin: 0; /* remove extra top/bottom space */
}

/* Duration overlay bottom-right above description */
.video-duration {
  position: absolute;
  bottom: 45px; /* above description */
  right: 6px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Description overlay bottom, max 2 lines */
.video-description {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: #fff;
  font-size: 0.85rem;
  padding: 4px 6px;
  line-height: 1.2em;
  max-height: 2.8em; /* 2 lines */
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

/* ---------------------- VIDEO DETAILS ---------------------- */
.video-info {
  padding: 0.5rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.btn-success {
  background-color: #0d6efd;
  color: #fff;
}

.btn-warning {
  background-color: #6c757d;
  color: #fff;
}

/* ---------------------- PAGINATION ---------------------- */
.video-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
  gap: 0.25rem;
}

.video-pagination button {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #ced4da;
  background-color: #fff;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.video-pagination button:hover {
  background-color: #0d6efd;
  color: #fff;
}

.video-pagination button.active {
  background-color: #0d6efd;
  color: #fff;
  font-weight: 600;
}

/* ---------------------- RESPONSIVE ---------------------- */
@media (max-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 videos per row */
    gap: 0.5rem;
  }
  .video-duration {
    font-size: 0.65rem;
    padding: 1px 4px;
  }
  .video-description {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 videos per row */
    gap: 0.4rem;
  }
  .video-info {
    padding: 0.25rem 0.5rem;
  }
}
