/* esteem template - sticky header, #main offset, esteem-posts-wrap grids */

[class~="header"],
[id="masthead"][class~="header"],
[class~="site-header"][class~="header"] {
  position: sticky !important;
  top: 0 !important;
  z-index: 1000;
}

[class~="site-description"],
[id="site-description"] {
  display: none !important;
}

[class~="header-text"] [id="site-title"] {
  display: none !important;
}

[id="main"],
[id="main"][class~="site-main"],
[class~="site-main"] {
  padding-top: 24px !important;
  padding-bottom: 48px !important;
}

[class~="site-branding"] {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

[class~="hgroup-wrap"] {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px 16px !important;
}

[class~="main-navigation"] {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  justify-content: flex-end !important;
}

[class~="main-navigation"] [class~="nav-menu"] ul,
[class~="main-navigation"] [class~="menu"] {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

[class~="user-nav-actions"] {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-left: auto !important;
}

[class~="genre-nav"] {
  background: #0a0a12 !important;
  border-bottom: 1px solid #1a1a2e !important;
  padding: 0 !important;
}

[class~="genre-nav"] > div {
  max-width: 1200px !important;
  margin: 0 auto !important;
  display: flex !important;
  overflow-x: auto !important;
}

[class~="genre-nav"] a {
  padding: 10px 18px !important;
  color: #999 !important;
  text-decoration: none !important;
  font-size: 13px !important;
  white-space: nowrap !important;
  border-right: 1px solid #1a1a2e !important;
}

[class~="genre-nav"] a:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

[class~="esteem-posts-wrap"],
[class~="video-grid"],
[class~="movie-grid"] {
  display: block !important;
  width: 100% !important;
  grid-template-columns: unset !important;
}

[class~="esteem-posts-wrap"] > [class~="pg-grid"],
[class~="esteem-posts-wrap"] > [class~="pg-list"],
[class~="esteem-posts-wrap"] > [class~="mo-row"],
[class~="esteem-posts-wrap"] > [class~="tr-row"],
[class~="esteem-posts-wrap"] > [class~="tb-list"],
[class~="esteem-posts-wrap"] > [class~="fs-reel"],
[class~="video-grid"] > [class~="pg-grid"],
[class~="video-grid"] > [class~="pg-list"],
[class~="video-grid"] > [class~="mo-row"],
[class~="video-grid"] > [class~="tr-row"],
[class~="video-grid"] > [class~="tb-list"],
[class~="video-grid"] > [class~="fs-reel"],
[class~="movie-grid"] > [class~="pg-grid"],
[class~="movie-grid"] > [class~="mo-row"],
[class~="movie-grid"] > [class~="tr-row"],
[class~="movie-grid"] > [class~="fs-reel"] {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  max-width: none !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-wrap: unset !important;
}

[class~="pg-item"],
[class~="mo-entry"],
[class~="tr-card"],
[class~="tb-film"],
[class~="fs-item"] {
  width: 100% !important;
  max-width: none !important;
  flex: none !important;
  margin: 0 !important;
}

[class~="pg-item"] a,
[class~="mo-entry"] a,
[class~="tr-card"] a,
[class~="tb-film"] a,
[class~="fs-item"] a {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 8px !important;
  text-decoration: none !important;
  color: inherit !important;
  height: 100%;
}

[class~="pg-cover"],
[class~="mo-pic"],
[class~="tr-thumb"],
[class~="tb-poster"],
[class~="fs-poster"] {
  width: 100% !important;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-card, #161b22);
}

[class~="pg-cover"] img,
[class~="mo-pic"] img,
[class~="tr-thumb"] img,
[class~="tb-poster"] img,
[class~="fs-poster"] img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

[class~="pg-detail"],
[class~="mo-body"],
[class~="tr-text"],
[class~="tb-info"],
[class~="fs-meta"] {
  text-align: center;
  min-width: 0;
}

[class~="pg-detail"] strong,
[class~="mo-body"] strong,
[class~="tr-text"] strong,
[class~="tb-title"],
[class~="fs-meta"] strong {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
}

[class~="pg-detail"] em,
[class~="mo-body"] em,
[class~="tr-text"] em,
[class~="tb-note"],
[class~="fs-meta"] em {
  display: block !important;
  font-size: 0.75rem !important;
  color: var(--primary, #0891b2) !important;
  font-style: normal !important;
}

[class~="pg-detail"] small,
[class~="mo-body"] small,
[class~="tr-text"] small,
[class~="tb-tag"],
[class~="fs-meta"] small {
  display: none !important;
}

[class~="esteem-category-section"] {
  margin-bottom: 32px;
}

[class~="esteem-category-section"] [class~="section-head"],
[class~="esteem-category-section"] [class~="page-header"] {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

[class~="esteem-category-section"] [class~="section-title"],
[class~="esteem-category-section"] [class~="page-title"] {
  margin: 0;
  font-size: 1.25rem;
}

[class~="esteem-category-section"] [class~="section-more"] {
  font-size: 0.9rem;
  text-decoration: none;
  opacity: 0.8;
}

[class~="hot-search-tags"] {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

[class~="hot-search-tags"] a {
  display: inline-block !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(128, 128, 128, 0.2) !important;
  font-size: 12px !important;
  text-decoration: none !important;
}

[class~="news-grid"] {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
}

[class~="vgo-hot-search"] {
  display: none !important;
}

body.archive [class~="esteem-posts-wrap"] > [class~="pg-grid"],
body.category [class~="esteem-posts-wrap"] > [class~="pg-grid"],
body.archive [class~="pg-grid"],
body.category [class~="pg-grid"] {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
}

@media (max-width: 1024px) {
  [class~="esteem-posts-wrap"] > [class~="pg-grid"],
  [class~="esteem-posts-wrap"] > [class~="fs-reel"],
  [class~="esteem-posts-wrap"] > [class~="mo-row"],
  [class~="video-grid"] > [class~="pg-grid"],
  [class~="video-grid"] > [class~="fs-reel"],
  [class~="movie-grid"] > [class~="pg-grid"],
  body.archive [class~="pg-grid"],
  body.category [class~="pg-grid"] {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  [class~="news-grid"] {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  [class~="esteem-posts-wrap"] > [class~="pg-grid"],
  [class~="esteem-posts-wrap"] > [class~="fs-reel"],
  [class~="esteem-posts-wrap"] > [class~="mo-row"],
  [class~="video-grid"] > [class~="pg-grid"],
  [class~="video-grid"] > [class~="fs-reel"],
  [class~="movie-grid"] > [class~="pg-grid"],
  body.archive [class~="pg-grid"],
  body.category [class~="pg-grid"] {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  [class~="news-grid"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  [class~="esteem-posts-wrap"] > [class~="pg-grid"],
  [class~="esteem-posts-wrap"] > [class~="fs-reel"],
  [class~="esteem-posts-wrap"] > [class~="mo-row"],
  [class~="video-grid"] > [class~="pg-grid"],
  [class~="video-grid"] > [class~="fs-reel"],
  [class~="movie-grid"] > [class~="pg-grid"],
  body.archive [class~="pg-grid"],
  body.category [class~="pg-grid"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}