/* ==================== VIDEOS SECTION ==================== */

.videos-section {
  margin-bottom: 3rem;
}

.videos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #f0f0f0;
}

.videos-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #20232a;
}

.video-count {
  color: #999;
  font-size: 0.95rem;
  margin: 0;
}

/* ==================== VIDEO GRID ==================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 4px;
}

.video-card {
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}



/* ==================== VIDEO THUMBNAIL ==================== */

.video-thumbnail-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.video-thumbnail {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.video-card:hover .video-overlay {
  background: rgba(0, 0, 0, 0.4);
}

.play-button {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
  opacity: 0;
}

.video-card:hover .play-button {
  opacity: 1;
  transform: scale(1.1);
}

.play-icon {
  color: #667eea;
  font-size: 1.5rem;
  margin-left: 4px;
}

/* ==================== VIDEO BADGES ==================== */

.duration-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 0.3rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.views-badge {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.video-category-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: #667eea;
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ==================== VIDEO DETAILS ==================== */

.video-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.video-details h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  color: #20232a;
  line-height: 1.4;
}



.video-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  color: #888;
  flex-wrap: wrap;
}

.meta-item {
  padding: 0.3rem 0.6rem;
  background: #f5f5f5;
  border-radius: 0.25rem;
}

.watch-link {
  display: inline-block;
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.watch-link:hover {
  color: #764ba2;
  margin-right: -4px;
}

/* ==================== PAGINATION ==================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 3rem 0 1rem 0;
  flex-wrap: wrap;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: white;
  color: #667eea;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.pagination-btn:hover {
  background: #667eea;
  color: white;
  border-color: #667eea;
  transform: scale(1.05);
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  background: white;
  color: #333;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.pagination-num:hover {
  background: #e8f0ff;
  color: #667eea;
  border-color: #667eea;
}

.pagination-num.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
}

.pagination-dots {
  color: #999;
  padding: 0 0.3rem;
  font-size: 1rem;
}

.pagination-icon {
  font-size: 1.2rem;
}

.pagination-info {
  text-align: center;
  margin-top: 1.5rem;
  color: #666;
  font-size: 0.95rem;
}

.pagination-info p {
  margin: 0;
}

/* ==================== EMPTY STATE ==================== */

.empty-results {
  text-align: center;
  padding: 4rem 2rem;
  color: #999;
}

.empty-results a {
  display: inline-block;
  color: #667eea;
  text-decoration: none;
  margin-top: 1rem;
  font-weight: 600;
}

/* ==================== RESPONSIVE - LARGE SCREENS ==================== */

@media screen and (min-width: 2200px) {
  .content-wrapper {
    width: 1200px !important;
  }

  .grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.75rem;
  }

  .videos-header h2 {
    font-size: 1.8rem;
  }
}

@media screen and (min-width: 1400px) and (max-width: 2199px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .videos-header h2 {
    font-size: 1.6rem;
  }
}

@media screen and (min-width: 1200px) and (max-width: 1399px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .videos-header h2 {
    font-size: 1.6rem;
  }
}

@media screen and (min-width: 992px) and (max-width: 1199px) {
  
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .videos-section {
    margin-bottom: 2.5rem;
  }

  .videos-header {
    margin-bottom: 1.5rem;
  }

  .videos-header h2 {
    font-size: 1.4rem;
  }
}

/* ==================== RESPONSIVE - TABLET ==================== */

@media screen and (min-width: 768px) and (max-width: 991px) {
  .content-wrapper {
    width: min(98%, 100%) !important;
  }

  .grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
  }

  .videos-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 0.5rem;
  }

  .videos-header h2 {
    font-size: 1.3rem;
  }

  .pagination {
    gap: 0.5rem;
  }

  .pagination-num {
    min-width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .pagination-btn {
    width: 32px;
    height: 32px;
  }
}

/* ==================== RESPONSIVE - MOBILE LANDSCAPE ==================== */

@media screen and (min-width: 480px) and (max-width: 767px) {
  .content-wrapper {
    width: 100% !important;
    padding: 0 1rem;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .video-card {
    border-radius: 0.5rem;
  }

  .video-details {
    padding: 0.75rem;
  }

  .video-details h3 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }

  .video-description {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .video-meta {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.7rem;
  }

  .meta-item {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
  }

  .watch-link {
    font-size: 0.8rem;
  }

  .videos-header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .videos-header h2 {
    font-size: 1.1rem;
  }

  .video-count {
    font-size: 0.85rem;
  }

  .duration-badge {
    bottom: 0.5rem;
    right: 0.5rem;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }

  .views-badge {
    bottom: 0.5rem;
    left: 0.5rem;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }

  .video-category-badge {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
  }

  .pagination {
    margin: 2rem 0 1rem 0;
  }

  .pagination-btn {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
  }

  .pagination-num {
    min-width: 30px;
    height: 30px;
    font-size: 0.7rem;
  }

  .pagination-info {
    font-size: 0.85rem;
  }

  .play-button {
    width: 45px;
    height: 45px;
  }

  .play-icon {
    font-size: 1.1rem;
  }
}

/* ==================== RESPONSIVE - MOBILE ==================== */

@media screen and (max-width: 479px) {
  .content-wrapper {
    width: 100% !important;
    padding: 0 0.75rem;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .video-card {
    border-radius: 0.5rem;
  }

  .video-card:hover {
    transform: translateY(-2px);
  }

  .video-details {
    padding: 0.75rem;
  }

  .video-details h3 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }

  .video-description {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .video-meta {
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    font-size: 0.65rem;
  }

  .meta-item {
    padding: 0.2rem 0.3rem;
    font-size: 0.65rem;
  }

  .watch-link {
    font-size: 0.75rem;
  }

  .watch-link:hover {
    margin-right: -2px;
  }

  .videos-section {
    margin-bottom: 2rem;
  }

  .videos-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .videos-header h2 {
    font-size: 1rem;
  }

  .video-count {
    font-size: 0.8rem;
  }

  .duration-badge {
    bottom: 0.4rem;
    right: 0.4rem;
    font-size: 0.6rem;
    padding: 0.15rem 0.3rem;
  }

  .views-badge {
    bottom: 0.4rem;
    left: 0.4rem;
    font-size: 0.6rem;
    padding: 0.15rem 0.3rem;
  }

  .video-category-badge {
    top: 0.4rem;
    right: 0.4rem;
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
  }

  .play-button {
    width: 40px;
    height: 40px;
    opacity: 0.3;
  }

  .video-card:active .play-button {
    opacity: 1;
  }

  .play-icon {
    font-size: 1rem;
    margin-left: 2px;
  }

  .pagination {
    gap: 0.4rem;
    margin: 1.5rem 0 1rem 0;
  }

  .pagination-btn {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }

  .pagination-num {
    min-width: 28px;
    height: 28px;
    font-size: 0.65rem;
  }

  .pagination-dots {
    padding: 0 0.2rem;
    font-size: 0.9rem;
  }

  .pagination-icon {
    font-size: 1rem;
  }

  .pagination-info {
    margin-top: 1rem;
    font-size: 0.8rem;
  }

  .pagination-info p {
    line-height: 1.3;
  }

  .error-box {
    padding: 0.5rem;
  }

  .empty-results {
    padding: 2rem 1rem;
    font-size: 0.9rem;
  }
}

/* ==================== RESPONSIVE - ULTRA SMALL ==================== */

@media screen and (max-width: 359px) {
  .grid {
    gap: 0.75rem;
  }

  .video-details {
    padding: 0.5rem;
  }

  .video-details h3 {
    font-size: 0.8rem;
  }

  .video-description {
    font-size: 0.7rem;
  }

  .videos-header h2 {
    font-size: 0.9rem;
  }

  .pagination-num {
    min-width: 24px;
    height: 24px;
    font-size: 0.6rem;
  }

  .pagination-btn {
    width: 24px;
    height: 24px;
  }
}

/* ==================== LANDSCAPE PHONE OPTIMIZATION ==================== */

@media screen and (max-height: 500px) and (min-width: 480px) {
  .video-thumbnail-wrapper {
    padding-top: 50%;
  }

  .videos-header {
    margin-bottom: 1rem;
  }

  .pagination {
    margin: 1.5rem 0 0.5rem 0;
  }
}

/* ==================== PRINT STYLES ==================== */

@media print {
  .pagination,
  .pagination-info,
  .play-button,
  .watch-link {
    display: none;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
