/* ==================================================
📁 entry.css – Style chung cho bài viết (single, archive, search)
Theme: NgTheVinh
================================================== */
/* ✅ Giảm khoảng cách header trên trang bài viết */
body.single-post, body.category {
  padding-top: 60px;
}

.column-primary h1.content-title {
  text-align: left;
  margin: 1.25rem 0 2rem 0;
}


/* ================================================
📌 Breadcrumb & Tiêu đề
================================================== */
.single-post-breadcrumb {
  font-size: 0.95rem;
  color: var(--text-color-3);
  margin-bottom: 1rem;
}

.single-post-breadcrumb a {
  color: var(--text-color-1);
}

.single-post-breadcrumb a:hover {
  color: var(--primary-color);
}

.content-title {
  margin-bottom: 2rem;
  text-align: center;
}

/* ================================================
📌 Ảnh đại diện bài viết (thumbnail)
================================================== */
.single-post-thumbnail {
  margin: 2rem 0;
}

.single-post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

/* 🎯 Thumbnail bài viết = chiều ngang sidebar */
.archive-post-thumbnail {
  flex: 0 0 calc(25% / 0.75); /*Tương đương 33.3333% nội dung khi container có sidebar chiếm 25% */
  max-width: calc(25% / 0.75);
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--border-radius-5);
  position: relative;
}

/* ✅ Hiệu ứng hover giống single-design */
.archive-post-thumbnail::before {
  content: '';
  position: absolute;
  top: 0.625rem;
  left: 0.625rem;
  right: 0.625rem;
  bottom: 0.625rem;
  border: 1px solid white;
  pointer-events: none;
  opacity: 0.7;
  transition: all 0.5s ease;
  z-index: 2;
}

.archive-post-thumbnail:hover::before {
  opacity: 0;
  transform: scale(1.05);
}

.archive-post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================================================
📌 Excerpt
================================================== */
.entry-excerpt {
  border: 1px solid var(--color-2);
  background-color: var(--color-1);
  border-radius: var(--border-radius-5);
  margin: 1.25rem 0;
  padding: 1.5rem 2rem;
}

.entry-excerpt p {
  margin-bottom: 0;
}


/* ================================================
📌 Nội dung bài viết
================================================== */

.archive-description {
  margin-top: 2rem;
}

.single-post-content {
  margin-bottom: 3rem;
}

.single-post-content p:last-child {
  margin-bottom: 0;
}


/* ================================================
📌 Metadata: Category & Tag
================================================== */
.single-post-meta {
  border-top: 1px dashed var(--color-2);
  border-bottom: 1px dashed var(--color-2);
  padding: 1rem 0;
  font-size: 1rem;
  color: var(--text-color-2);
  line-height: 1.6;
}

.single-post-meta .meta-category,
.single-post-meta .meta-tag {
  margin-bottom: 0.5rem;
  color: var(--text-color-2);
}

.single-post-meta .meta-tag a {
  margin-bottom: 0.5rem;
  color: var(--text-color-2);
}

.single-post-meta .meta-tag a:hover {
  color: var(--primary-color);
}

.single-post-meta i {
  margin-right: 5px;
  color: var(--text-color-3);
}


/* ================================================
📌 Bình luận – Custom Callback Style (ngtv-comment-*)
================================================== */
.comments-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-color-1);
}

.comment-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ngtv-comment-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--color-2);
}

.ngtv-comment-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.ngtv-comment-content {
  flex: 1;
}

.ngtv-comment-meta {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-color-3);
}

.ngtv-comment-author {
  font-weight: 600;
  color: var(--text-color-1);
  margin-right: 10px;
}

.ngtv-comment-reply-to {
  margin-left: 10px;
  font-size: 0.9rem;
  color: var(--text-color-3);
  font-weight: normal;
}

.ngtv-comment-date {
  font-style: normal;
  color: var(--text-color-3);
  font-size: 0.9rem;
}

.ngtv-comment-text {
  font-size: 1rem;
  color: var(--text-color-2);
  line-height: 1.6;
}

.ngtv-comment-reply {
  margin-top: 0.75rem;
}

.ngtv-comment-reply a {
  font-size: 0.9rem;
  color: var(--primary-color);
  text-decoration: none;
}

.ngtv-comment-reply a:hover {
  text-decoration: underline;
}


/* ================================================
📌 Bình luận lồng nhau (reply) – indent
================================================== */
.comment-list .children {
  margin-left: 2rem;
  margin-top: 1.5rem;
  padding-left: 1.25rem;
  border-left: 1px dashed var(--color-2);
}

.comment-list .children .ngtv-comment-avatar img {
  width: 40px;
  height: 40px;
  opacity: 0.85;
}


.comment-list .children .ngtv-comment-item {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: none;
}


/* ================================================
📌 Form bình luận
================================================== */
.comment-form {
  margin-top: 2rem;
}

.comment-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-color-1);
}

.comment-form .required {
  color: var(--primary-color);
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid var(--color-2);
  border-radius: var(--border-radius-3);
  font-size: 1.125rem;
  font-family: var(--font-body);
}

.comment-form input[type="submit"] {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  border-radius: var(--border-radius-3);
  font-size: 1.125rem;
}

.ngtv-comment-reply-to i,
.ngtv-comment-reply a i {
  margin-right: 5px;
  color: var(--primary-color);
}

/* ================================================
📌 Archive Layout – Category + Danh sách bài viết
================================================== */

/* 1. Ảnh đại diện & mô tả category */
.archive-term-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}

.archive-term-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.archive-divider {
  border-bottom: 1px dashed var(--color-2);
  margin: 2rem 0;
}

.column-primary.no-description .archive-divider {
  border-bottom: none;
}

/* 2. Danh sách bài viết */
.archive-post-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* 3. Mỗi bài viết */
.archive-post-row {
  padding-bottom: 2rem;
  border-bottom: 1px dashed var(--color-2);
}

.archive-post-row:last-child {
  border-bottom: none;
}

.archive-post-inner {
  display: flex;
  align-items: center; /* Căn giữa theo chiều cao */
  gap: 2rem;
}


/* ✅ Căn giữa nội dung bên phải */
.archive-post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.archive-post-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.375rem;
  color: var(--text-color-1);
}

.archive-post-title a {
  color: inherit;
  text-decoration: none;
}

.archive-post-title a:hover {
  color: var(--primary-color);
}

.archive-post-excerpt p {
      margin-bottom: 0;
}

/* 4. Phân trang */
.archive-pagination {
  margin-top: 2rem;
  text-align: center;
}

.archive-pagination .page-numbers {
  display: inline-block;
  padding: 0.5em 1em;
  margin: 0 0.25rem;
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius-3);
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers:focus {
  background-color: var(--primary-color);
  color: white;
}

.archive-pagination .page-numbers.current {
  background-color: var(--primary-color);
  color: white;
}

/* ================================================
📱 Responsive – Tablet (769px – 1024px)
================================================== */
@media (max-width: 1024px) and (min-width: 769px) {
  .archive-post-thumbnail {
    flex: 0 0 40%;
    max-width: 40%;
  }

  .archive-post-content {
    flex: 1;
  }
}

/* ================================================
📱 Responsive – Mobile (≤ 768px)
================================================== */
@media (max-width: 768px) {
  .archive-post-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .archive-post-thumbnail,
  .archive-post-content {
    flex: 0 0 100%;
    max-width: 100%;
    flex: none;
  }

  .archive-post-thumbnail {
    margin-bottom: 1rem;
  }
}
