/* Hero Section */
.page-container {
  background-color: var(--accent-bg);
}

.main-content-container {
  padding: 1rem;
  width: 100%;
  /* padding-top: 1rem; */
  padding-bottom: 2rem;
}

.hero-section {
  padding: 2rem;
  padding-bottom: 1rem;
  position: relative;
  overflow: hidden;
  background: var(--background);
  border-radius: 1rem;
  text-align: center;
}

.hero-content {
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
  max-width: 900px;
}

/* Collection Sections */
.collection {
  margin-bottom: 3rem;
}

.collection h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  font-weight: 700;
  padding-left: 0.5rem;
  letter-spacing: -0.02em;
}

/* Video Grid */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Video Card */
.video-card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--box-shadow);
  outline: 1px solid var(--border);
  transition: all 0.3s ease;
  height: 100%;
}

.video-card:hover {
  box-shadow: 0 8px 24px hsla(202, 85%, 61%, 0.12);
  transform: translateY(-5px);
  outline-color: var(--primary-light);
}

.video-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  overflow: hidden;
  /* background: linear-gradient(
    135deg,
    var(--primary-light-1) 0%,
    hsl(207, 100%, 95%) 100%
  ); */
}

.card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* .video-card:hover .card-image {
  transform: scale(1.05);
} */

.card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
  margin-bottom: 1rem;
}

.video-card:hover .card-title {
  color: var(--primary-dark);
}

.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: auto;
}

.video-channel {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.video-time {
  background: var(--muted);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-secondary);
}

/* No Results & Search Results */
.no-results,
.search-results h2 {
  color: var(--text-secondary);
}

.no-results {
  text-align: center;
  padding: 3rem 1rem;
}

.search-results h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

/* Show All Card */
.show-all-card {
  border: 2px dashed var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.show-all-card:hover {
  border-color: var(--primary-dark);
}

.show-all-card-content {
  text-align: center;
  padding: 2rem;
}

.show-all-icon {
  font-size: 3rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.show-all-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.show-all-count {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.show-all-link {
  text-decoration: none;
}

/* Tag Filter Bar */
.vl-tag-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 0;
  margin-bottom: 0.5rem;
}

.vl-tag-chip {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--muted);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.vl-tag-chip:hover {
  background: var(--primary-light-1, hsl(207, 100%, 95%));
  color: var(--primary-dark);
  border-color: var(--primary-light, hsl(207, 80%, 70%));
}

.vl-tag-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Card Tags */
.vl-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.vl-card-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--muted);
  color: var(--text-tertiary);
}

.category-section {
  margin: 2rem 0;
}

.pagination {
  display: flex;
  justify-content: center;
}

/* ================================
   TABLET BREAKPOINT (768px - 1024px)
   ================================ */
@media (max-width: 1024px) {
  .collection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }

  .hero-section {
    padding: 1.5rem;
  }

  .collection-section-header {
    font-size: 2rem;
  }

  .subcategory-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  .vl-tag-filter-bar {
    gap: 0.4rem;
    padding: 0.75rem 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .vl-tag-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .vl-tag-chip {
    font-size: 0.8rem;
    padding: 0.35rem 0.85rem;
  }

  /* Change grid to single column */
  .collection-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Make cards horizontal: image left, content right */
  .video-card a {
    flex-direction: row;
  }

  .card-thumbnail {
    width: 40%;
    min-width: 140px;
    max-width: 180px;
    padding-top: 0;
    height: auto;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
  }

  .card-image {
    position: static;
    width: 100%;
    height: 100%;
  }

  .card-content {
    flex: 1;
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .card-title {
    font-size: 0.95rem;
    -webkit-line-clamp: 2;
    margin-bottom: 0.5rem;
  }

  .video-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
  }

  .video-channel {
    width: 100%;
  }

  .video-time {
    align-self: flex-start;
  }

  /* Adjust show all card for horizontal layout */
  .show-all-card {
    min-height: auto;
  }

  .show-all-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    text-align: left;
  }

  .show-all-icon {
    font-size: 2rem;
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .show-all-text {
    flex: 1;
  }

  .show-all-title {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
  }

  .show-all-count {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .show-all-link {
    flex-shrink: 0;
  }

  .show-all-link .btn-normal {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  /* Adjust section headers */
  .collection-section-header {
    font-size: 1.75rem;
    margin: 1.5rem 0 1.5rem;
  }

  .subcategory-title {
    font-size: 1.15rem;
  }

  .collection-section-title {
    font-size: 1.5rem;
  }

  .main-content-container {
    padding: 0.75rem;
  }

  .hero-section {
    padding: 1rem;
    border-radius: 0.75rem;
  }

  .hero-content {
    padding: 0 1rem;
  }
}

/* ================================
   MOBILE BREAKPOINT (< 480px)
   ================================ */
@media (max-width: 480px) {
  .card-thumbnail {
    width: 35%;
    min-width: 120px;
    max-width: 140px;
  }

  .card-content {
    padding: 0.5rem;
  }

  .card-title {
    font-size: 0.9rem;
    -webkit-line-clamp: 2;
  }

  .video-meta {
    font-size: 0.75rem;
  }

  .channel-icon {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }

  .video-time {
    padding: 3px 6px;
    font-size: 0.75rem;
  }

  .collection-section-header {
    font-size: 1.5rem;
    padding-left: 0.25rem;
  }

  .subcategory-title {
    font-size: 1rem;
    padding-left: 0.25rem;
  }

  .collection-section-title {
    font-size: 1.25rem;
    padding-left: 0.25rem;
  }

  .main-content-container {
    padding: 0.5rem;
  }

  .collection-grid {
    gap: 0.75rem;
  }

  .pagination {
    font-size: 0.9rem;
  }
}

/* @media (max-width: 921px) {
  .video-card a {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1rem;
    height: auto;
  }

  .card-thumbnail {
    grid-column: 1;
    grid-row: 1;
    padding-top: 0;
    border-radius: 8px;
    padding: 4px;
    aspect-ratio: 16/9;
    width: 100%;
    margin: 0 auto;
    height: 100%;
    background-color: var(--background);
  }

  .card-image {
    position: relative;
    object-fit: scale-down;
    width: 100%;
    height: auto;
    border-radius: 4px;
  }

  .card-content {
    grid-column: 2;
    grid-row: 1;
    padding: 0.5rem 0.5rem 0.5rem 0;
    gap: 0.5rem;
  }

  .card-title {
    font-size: 1rem;
    -webkit-line-clamp: 2;
  }

  .video-meta {
    font-size: 0.8rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .video-channel {
    width: 100%;
  }


}

@media (max-width: 480px) {
  .video-card a {
    grid-template-columns: 120px 1fr;
    gap: 0.75rem;
  }

  .card-thumbnail {
    width: 120px;
    height: 68px;
  }

  .card-title {
    font-size: 0.95rem;
  }

  .video-meta {
    font-size: 0.75rem;
  }
  .video-time {
    font-size: 0.75rem;
  }
} */
