/* ═══════════════════════════════════════
   Archive / Category page
═══════════════════════════════════════ */

/* ── Page wrapper: sidebar left + main right ── */
.tvtt-archive-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  align-items: start;
}

/* ════════════════════════
   SIDEBAR
════════════════════════ */
.tvtt-archive-sidebar {
  position: sticky;
  top: 90px;
}
.tvtt-sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Heading */
.tvtt-sidebar-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #7b3fc4;
  margin-bottom: 6px;
}
.tvtt-sidebar-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
  margin: 0 0 6px;
}
.tvtt-sidebar-desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.6;
}
.tvtt-sidebar-count {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 4px;
}

/* Widget */
.tvtt-cat-list {
  list-style: disc;
  padding-left: 18px;
  margin: 0;
}
.tvtt-cat-list li { margin-bottom: 6px; }
.tvtt-cat-list a { color: #374151; font-size: 14px; text-decoration: none; }
.tvtt-cat-list a:hover { color: #7b3fc4; }
.tvtt-cat-list .count { color: #9ca3af; font-size: 12px; margin-left: 4px; }

.tvtt-sidebar-widget-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #374151;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #7b3fc4;
  display: inline-block;
}

/* Category list */
.tvtt-sidebar-cats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tvtt-sidebar-cats li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background .15s;
}
.tvtt-sidebar-cats li:hover,
.tvtt-sidebar-cats li.active {
  background: rgba(123,63,196,.08);
}
.tvtt-sidebar-cats li.active a { color: #7b3fc4; font-weight: 600; }
.tvtt-sidebar-cats a {
  text-decoration: none;
  font-size: 14px;
  color: #374151;
}
.tvtt-sidebar-cats a:hover { color: #7b3fc4; }
.tvtt-cat-count {
  font-size: 11px;
  color: #9ca3af;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 1px 7px;
}

/* Recent posts */
.tvtt-sidebar-recent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}
.tvtt-sidebar-recent:last-child { border-bottom: none; }
.tvtt-sidebar-recent-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  overflow: hidden;
  display: block;
}
.tvtt-sidebar-recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tvtt-sidebar-recent-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tvtt-sidebar-recent-info a {
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
  line-height: 1.4;
}
.tvtt-sidebar-recent-info a:hover { color: #7b3fc4; }
.tvtt-sidebar-recent-info span {
  font-size: 11px;
  color: #9ca3af;
}

/* ════════════════════════
   MAIN POST LIST
════════════════════════ */
.tvtt-post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Individual post row */
.tvtt-post-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  padding: 32px 0;
  border-bottom: 1px solid #e8e8e8;
  align-items: flex-start;
  transition: background .15s;
}
.tvtt-post-row:first-child { padding-top: 0; }
.tvtt-post-row:last-child  { border-bottom: none; }

/* Thumbnail */
.tvtt-post-thumb {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #f3f4f6;
  flex-shrink: 0;
}
.tvtt-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.tvtt-post-row:hover .tvtt-post-thumb img { transform: scale(1.03); }
.tvtt-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f3e8ff, #ede9fe);
  color: #7b3fc4;
  font-size: 32px;
  aspect-ratio: 4/3;
  border-radius: 8px;
}

/* Category tag */
.tvtt-post-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.tvtt-post-cat-tag {
  display: none;  /* hidden to match reference: no category tag above title */
}
.tvtt-post-cat-tag:hover { text-decoration: underline; }

/* Title */
.tvtt-post-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 10px;
  letter-spacing: -.01em;
}
.tvtt-post-title a {
  text-decoration: none;
  color: #111827;
  transition: color .15s;
}
.tvtt-post-title a:hover { color: #7b3fc4; }

/* Meta */
.tvtt-post-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}
.tvtt-meta-sep { opacity: .3; font-weight: 400; }
.tvtt-post-meta time { font-weight: 400; color: #6b7280; }
.tvtt-post-author { font-size: 12.5px; font-weight: 700; color: #111827; }

/* Excerpt */
.tvtt-post-excerpt {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.72;
  max-width: 640px;
}
.tvtt-post-excerpt a { color: #7b3fc4; }

/* ── Pagination ── */
.tvtt-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}
.tvtt-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: #374151;
  border: 1px solid #e5e7eb;
  transition: all .15s;
}
.tvtt-pagination .page-numbers:hover { border-color: #7b3fc4; color: #7b3fc4; }
.tvtt-pagination .page-numbers.current { background: #7b3fc4; color: #fff; border-color: #7b3fc4; }
.tvtt-pagination .prev, .tvtt-pagination .next { width: auto; padding: 0 14px; }

/* ── Empty state ── */
.tvtt-no-posts { padding: 60px 0; text-align: center; color: #6b7280; }
.tvtt-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 20px;
  background: #7b3fc4;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
}

/* ════════════════════════
   RESPONSIVE
════════════════════════ */
@media (max-width: 900px) {
  .tvtt-archive-page { grid-template-columns: 1fr; gap: 32px; }
  .tvtt-archive-sidebar { position: static; }
}
@media (max-width: 600px) {
  .tvtt-archive-page { padding: 24px 16px 60px; }
  .tvtt-post-row { grid-template-columns: 1fr; gap: 12px; }
  .tvtt-post-thumb { aspect-ratio: 16/9; }
  .tvtt-post-title { font-size: 17px; }
}

/* ════════════════════════
   WordPress Native Widgets in sidebar-archive
════════════════════════ */
.tvtt-archive-sidebar .widget {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #f0f0f0;
}
.tvtt-archive-sidebar .widget:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.tvtt-archive-sidebar .widget-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7b3fc4;
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid #ede9fe;
}
/* Widget: Category list */
.tvtt-archive-sidebar .widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tvtt-archive-sidebar .widget ul li {
  padding: 6px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tvtt-archive-sidebar .widget ul li:last-child { border-bottom: none; }
.tvtt-archive-sidebar .widget ul li a {
  color: #374151;
  text-decoration: none;
  transition: color .15s;
  flex: 1;
}
.tvtt-archive-sidebar .widget ul li a:hover { color: #7b3fc4; }
.tvtt-archive-sidebar .widget ul li .post-count,
.tvtt-archive-sidebar .widget ul li .count {
  font-size: 11px;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 1px 7px;
  border-radius: 10px;
  margin-left: 6px;
}
/* Widget: Recent Posts */
.tvtt-archive-sidebar .widget_recent_entries ul li a {
  font-weight: 500;
  line-height: 1.4;
  display: block;
  margin-bottom: 4px;
}
.tvtt-archive-sidebar .widget_recent_entries .post-date {
  font-size: 11px;
  color: #9ca3af;
  display: block;
}
/* Widget: Search */
.tvtt-archive-sidebar .widget_search .search-form {
  display: flex;
  gap: 6px;
}
.tvtt-archive-sidebar .widget_search .search-field {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.tvtt-archive-sidebar .widget_search .search-field:focus { border-color: #7b3fc4; }
.tvtt-archive-sidebar .widget_search .search-submit {
  background: #7b3fc4;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
}
/* Widget: Text/HTML */
.tvtt-archive-sidebar .widget_text p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.65;
  margin: 0 0 10px;
}
.tvtt-archive-sidebar .widget_text a { color: #7b3fc4; }
