/*
Theme Name: thuvienanh
*/

/* ==========================================================================
   Custom Prose Styles (Nội dung bài viết) - Tối ưu toàn diện chuẩn Typography
   ========================================================================== */
.prose {
  color: #334155; /* text-slate-700 */
  line-height: 1.8;
  font-size: 1.05rem;
  word-wrap: break-word;
}

/* Các thẻ Heading (tiêu đề) trong bài */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: #0f172a; /* text-slate-900 */
  font-weight: 800;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
}
.prose h1 {
  font-size: 2.25rem;
}
.prose h2 {
  font-size: 1.75rem;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 0.5rem;
}
.prose h3 {
  font-size: 1.5rem;
}
.prose h4 {
  font-size: 1.25rem;
}

/* Đoạn văn & Định dạng chữ */
.prose p {
  margin-bottom: 1.5em;
  margin-top: 0;
}
.prose strong,
.prose b {
  color: #0f172a;
  font-weight: 700;
}
.prose em,
.prose i {
  color: #475569;
}

/* Danh sách */
.prose ul,
.prose ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
  margin-top: 0;
}
.prose ul {
  list-style-type: disc;
}
.prose ol {
  list-style-type: decimal;
}
.prose li {
  margin-bottom: 0.5em;
}
.prose li > ul,
.prose li > ol {
  margin-top: 0.5em;
  margin-bottom: 0;
}

/* Thẻ trích dẫn */
.prose blockquote {
  border-left: 4px solid #a855f7; /* viền tím */
  font-style: italic;
  color: #475569;
  margin: 1.5em 0;
  background: #faf5ff; /* Nền tím nhạt */
  padding: 1.25rem 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
}
.prose blockquote p:last-child {
  margin-bottom: 0;
}

/* Hình ảnh & Caption (Chuẩn WP) */
.prose img {
  border-radius: 0.75rem;
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin: 1.5em auto;
  display: block;
}
.prose figure {
  margin: 2em 0;
}
.prose figcaption,
.wp-caption-text {
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.75em;
  font-style: italic;
}

/* Video & Iframe */
.prose iframe,
.prose video {
  width: 100%;
  border-radius: 0.75rem;
  margin: 2em 0;
}

/* Table */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.95rem;
}
.prose thead th {
  background-color: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e2e8f0;
}
.prose tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}
.prose tbody tr:last-child td {
  border-bottom: none;
}

/* Code */
.prose code {
  color: #c026d3; /* fuchsia-600 */
  background-color: #fdf4ff;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.prose pre {
  background-color: #1e293b; /* slate-800 */
  color: #f8fafc;
  padding: 1.25rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5em 0;
}
.prose pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
}

/* Đường kẻ (HR) */
.prose hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 2.5em 0;
}

/* Link (Thẻ a) */
.prose a {
  color: #9333ea; /* purple-600 */
  text-decoration: underline;
  text-decoration-color: #d8b4fe; /* purple-300 */
  text-underline-offset: 4px;
  font-weight: 600;
  transition: all 0.2s;
}
.prose a:hover {
  color: #7e22ce; /* purple-700 */
  text-decoration-color: #7e22ce;
}

/* WordPress Alignment Classes (Dùng khi chèn ảnh căn trái/phải/giữa) */
.prose .alignleft {
  float: left;
  margin-right: 1.5em;
  margin-bottom: 1.5em;
}
.prose .alignright {
  float: right;
  margin-left: 1.5em;
  margin-bottom: 1.5em;
}
.prose .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5em;
}

/* ==========================================================================
   WordPress Pagination & Navigation (Phân trang & Điều hướng)
   ========================================================================== */

/* Ẩn text mặc định dành cho Screen Reader của WordPress */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

/* Styling chung cho cục phân trang (vd: Danh mục, Tag, Tác giả) */
.pagination {
  margin: 2rem 0;
  text-align: center;
  width: 100%;
}

.pagination .nav-links {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 9999px; /* Tròn xoe */
  font-weight: 600;
  font-size: 0.875rem;
  color: #475569; /* slate-600 */
  background-color: #fff;
  border: 1px solid #e2e8f0; /* slate-200 */
  transition: all 0.2s;
  text-decoration: none;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.pagination a.page-numbers:hover {
  background-color: #f8fafc; /* slate-50 */
  color: #a855f7; /* purple-500 */
  border-color: #d8b4fe; /* purple-300 */
  transform: translateY(-1px);
}

/* Nút phân trang đang chọn (Active/Current) */
.pagination .page-numbers.current {
  background: linear-gradient(to right, #a855f7, #ec4899); /* Tím sang hồng */
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 10px -2px rgba(168, 85, 247, 0.4);
}

/* Dấu ba chấm (...) */
.pagination .page-numbers.dots {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #94a3b8; /* slate-400 */
  pointer-events: none;
}

/* Điều hướng Mũi tên icon */
.pagination .page-numbers .material-symbols-outlined {
  font-size: 1.15rem;
  vertical-align: text-bottom;
}

/* Comment Navigation (Điều hướng bình luận Cũ/Mới) */
.comment-navigation {
  margin: 2rem 0;
}
.comment-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.comment-navigation a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  background-color: #fff;
  color: #64748b; /* slate-500 */
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
  text-decoration: none;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.comment-navigation a:hover {
  background-color: #f8fafc;
  color: #a855f7;
  border-color: #d8b4fe;
}
.comment-navigation a .material-symbols-outlined {
  font-size: 1.15rem;
}
