/* Blog (tin tức) - bố cục tham khảo blockifyapp.com/blog, chuyển sang tông sáng
   và bảng màu xanh nước của Natural. */

.nv-blog { padding: 40px 0 60px; }

.nv-blog-head { text-align: center; margin-bottom: 40px; }
.nv-blog-head h1 { font-size: 42px; font-weight: 700; color: #22303c; margin: 0; line-height: 1.25; }
.nv-blog-head .nv-blog-sub { color: #6b7c88; margin-top: 12px; font-size: 16px; }

/* Lưới thẻ bài viết */
.nv-blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 991px) { .nv-blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .nv-blog-grid { grid-template-columns: 1fr; } }

.nv-post-card {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid #e4eaee; border-radius: 10px; overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
.nv-post-card:hover {
  border-color: var(--nv-primary);
  box-shadow: 0 12px 30px rgba(var(--nv-primary-rgb), .16);
  transform: translateY(-3px);
}

.nv-post-card__media { display: block; aspect-ratio: 16 / 10; background: #eef3f6; overflow: hidden; }
.nv-post-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease;
}
/* Phóng nhẹ ảnh khi rê chuột; khung ảnh có overflow:hidden nên phần thừa bị cắt gọn. */
.nv-post-card:hover .nv-post-card__media img { transform: scale(1.08); }

/* Người dùng bật chế độ giảm chuyển động thì bỏ hiệu ứng. */
@media (prefers-reduced-motion: reduce) {
  .nv-post-card,
  .nv-post-card__media img { transition: none; }
  .nv-post-card:hover { transform: none; }
  .nv-post-card:hover .nv-post-card__media img { transform: none; }
}

.nv-post-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.nv-post-card__cat {
  font-size: 13px; color: var(--nv-primary); font-weight: 600; text-transform: uppercase;
  letter-spacing: .3px; margin-bottom: 8px; line-height: 20px;
}
.nv-post-card__cat a { color: inherit; }
.nv-post-card__title { font-size: 18px; line-height: 26px; margin: 0 0 10px; font-weight: 700; }
.nv-post-card__title a { color: #22303c; }
.nv-post-card__title a:hover { color: var(--nv-primary); text-decoration: none; }
.nv-post-card__excerpt { color: #5c6b76; font-size: 14px; line-height: 23px; margin: 0 0 16px; }
.nv-post-card__meta {
  margin-top: auto; padding-top: 12px; border-top: 1px solid #eef2f4;
  color: #8496a2; font-size: 13px; display: flex; gap: 14px; align-items: center; line-height: 20px;
}

/* Khối theo danh mục ở cuối trang blog */
.nv-cat-block { margin-top: 56px; }
.nv-cat-block__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.nv-cat-block__head h2 { font-size: 26px; font-weight: 700; color: #22303c; margin: 0; }
.nv-cat-block__head a { color: var(--nv-primary); font-weight: 600; font-size: 15px; }

/* Trang bài viết */
.nv-article { padding: 32px 0 60px; }
.nv-article__cat { color: var(--nv-primary); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: .3px; }
.nv-article__title { font-size: 38px; line-height: 1.28; font-weight: 700; color: #22303c; margin: 10px 0 22px; }
.nv-article__meta {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  padding-bottom: 20px; border-bottom: 1px solid #e4eaee;
}
.nv-article__author { display: flex; align-items: center; gap: 12px; }
.nv-article__author img { border-radius: 50%; }
.nv-article__author-name { font-weight: 600; color: #22303c; line-height: 20px; }
.nv-article__author-date { color: #8496a2; font-size: 13px; line-height: 20px; }
.nv-share { display: flex; gap: 10px; }
.nv-share a {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid #dbe4e9;
  display: inline-flex; align-items: center; justify-content: center; color: #5c6b76; font-size: 14px;
}
.nv-share a:hover { background: var(--nv-primary); border-color: var(--nv-primary); color: #fff; text-decoration: none; }

.nv-article__cover { margin: 26px 0; border-radius: 10px; overflow: hidden; }
.nv-article__cover img { width: 100%; height: auto; display: block; }

.nv-article__body { font-size: 16px; line-height: 30px; color: #33424e; }
.nv-article__body h2 { font-size: 27px; font-weight: 700; margin: 34px 0 14px; color: #22303c; line-height: 1.3; }
.nv-article__body h3 { font-size: 21px; font-weight: 700; margin: 28px 0 12px; color: #22303c; line-height: 1.35; }
.nv-article__body p { margin: 0 0 18px; }
.nv-article__body ul, .nv-article__body ol { margin: 0 0 18px; padding-left: 22px; }
.nv-article__body li { margin-bottom: 8px; }
.nv-article__body img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0; }
.nv-article__body figure { margin: 20px 0; }
.nv-article__body figcaption { color: #8496a2; font-size: 13px; text-align: center; margin-top: 8px; }
.nv-article__body blockquote {
  margin: 22px 0; padding: 14px 20px; border-left: 4px solid var(--nv-primary);
  background: #f2f7fa; color: #33424e;
}
.nv-article__body a { color: var(--nv-primary); text-decoration: underline; }
.nv-article__body table { width: 100%; margin-bottom: 18px; border-collapse: collapse; }
.nv-article__body th, .nv-article__body td { border: 1px solid #e4eaee; padding: 10px 12px; }
.nv-article__body th { background: #f2f7fa; }

/* Sidebar */
.nv-side-card { background: #f7fafb; border: 1px solid #e4eaee; border-radius: 10px; padding: 20px 22px; margin-bottom: 24px; }
.nv-side-card h2 { font-size: 18px; font-weight: 700; color: #22303c; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid #e1e9ed; line-height: 26px; }
.nv-side-card ul { list-style: none; margin: 0; padding: 0; }
.nv-side-card li { margin-bottom: 12px; line-height: 22px; }
.nv-side-card li:last-child { margin-bottom: 0; }
.nv-side-card a { color: #33424e; font-size: 15px; }
.nv-side-card a:hover { color: var(--nv-primary); text-decoration: none; }
.nv-side-card .nv-count { color: #8496a2; font-size: 13px; }
.nv-side-card .nv-dot { color: var(--nv-primary); margin-right: 8px; }
.nv-side-sticky { position: sticky; top: 20px; }

/* Bài liên quan */
.nv-related { margin-top: 56px; padding-top: 36px; border-top: 1px solid #e4eaee; }
.nv-related h2 { font-size: 26px; font-weight: 700; color: #22303c; margin: 0 0 24px; }

/* Phân trang */
.nv-blog-pagination { margin-top: 40px; text-align: center; }
.nv-blog-pagination .page-numbers {
  display: inline-block; min-width: 38px; padding: 7px 12px; margin: 0 3px;
  border: 1px solid #dbe4e9; border-radius: 6px; color: #33424e; line-height: 22px;
}
.nv-blog-pagination .page-numbers.current { background: var(--nv-primary); border-color: var(--nv-primary); color: #fff; }
.nv-blog-pagination .page-numbers:hover { text-decoration: none; border-color: var(--nv-primary); color: var(--nv-primary); }
.nv-blog-pagination .page-numbers.current:hover { color: #fff; }

/* Bộ lọc danh mục trên trang danh sách */
.nv-cat-filter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 36px; }
.nv-cat-filter a {
  padding: 8px 18px; border: 1px solid #dbe4e9; border-radius: 999px;
  color: #33424e; font-size: 14px; line-height: 22px; background: #fff;
}
.nv-cat-filter a:hover { border-color: var(--nv-primary); color: var(--nv-primary); text-decoration: none; }
.nv-cat-filter a.is-active { background: var(--nv-primary); border-color: var(--nv-primary); color: #fff; }

@media (max-width: 767px) {
  .nv-blog-head h1 { font-size: 30px; }
  .nv-article__title { font-size: 27px; }
}

/* Lưới trong cột nội dung hẹp hơn nên thẻ nhỏ lại cho cân đối. */
.nv-related .nv-post-card__title { font-size: 16px; line-height: 24px; }
.nv-related .nv-post-card__excerpt { display: none; }
.nv-related .nv-post-card__body { padding: 14px 16px 16px; }

/* Bộ lọc dự án: mỗi trục một hàng, có nhãn bên trái. */
.nv-filters { margin-bottom: 34px; }
.nv-filter-row {
  display: flex; align-items: flex-start; gap: 14px;
  flex-wrap: wrap; justify-content: center; margin-bottom: 12px;
}
.nv-filter-label {
  font-weight: 600; color: #22303c; font-size: 14px; line-height: 38px;
  min-width: 92px; text-align: right;
}
.nv-filter-row .nv-cat-filter { margin-bottom: 0; justify-content: flex-start; flex: 1; }
.nv-filter-reset { text-align: center; margin-top: 6px; }
.nv-filter-reset a { color: #8496a2; font-size: 14px; }
.nv-filter-reset a:hover { color: var(--nv-primary); text-decoration: none; }
.nv-result-count { text-align: center; color: #8496a2; font-size: 14px; margin-bottom: 22px; }

@media (max-width: 767px) {
  .nv-filter-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .nv-filter-label { text-align: left; line-height: 24px; }
  .nv-filter-row .nv-cat-filter { justify-content: flex-start; }
}

/* menu.css của website gốc có luật toàn cục `ul, li { list-style: none; padding: 0 }`.
   Dấu đầu dòng nằm trên `li`, nên phải đặt lại ở chính `li` - chỉ khai báo ở `ul`
   sẽ không thắng được luật đó dù selector cụ thể hơn. */
.nv-article__body ul { list-style: disc; padding-left: 24px; }
.nv-article__body ol { list-style: decimal; padding-left: 24px; }
.nv-article__body ul ul { list-style: circle; }
.nv-article__body li { display: list-item; list-style: inherit; padding: 0; }

/* Khối Gutenberg trong khung nội dung */
.nv-article__body .wp-block-image { margin: 22px 0; }
.nv-article__body .wp-block-image img { border-radius: 8px; }
.nv-article__body .wp-block-columns { gap: 24px; }
.nv-article__body .wp-block-quote { border-left: 4px solid var(--nv-primary); padding: 14px 20px; background: #f2f7fa; margin: 22px 0; }
.nv-article__body .wp-block-quote p:last-child { margin-bottom: 0; }
.nv-article__body .wp-block-embed { margin: 22px 0; }
.nv-article__body .wp-block-table td, .nv-article__body .wp-block-table th { border: 1px solid #e4eaee; padding: 10px 12px; }

/* Bảng thông số trong mô tả sản phẩm và bài viết */
.nv-article__body table { width: 100%; margin: 0 0 18px; border-collapse: collapse; }
.nv-article__body figure.wp-block-table { margin: 20px 0; overflow-x: auto; }
.nv-article__body th, .nv-article__body td { border: 1px solid #dfe6ea; padding: 10px 14px; text-align: left; }
.nv-article__body thead th { background: #f2f7fa; font-weight: 600; color: #22303c; }
.nv-article__body tbody tr:nth-child(even) { background: #fafcfd; }

/* Slider ảnh sản phẩm và dự án */
.slide-product { position: relative; }
.slide-product .swiper-slide {
  display: flex; align-items: center; justify-content: center;
  /* Ảnh sản phẩm có tỉ lệ khác nhau; cố định chiều cao khung để slider
     không cao bằng ảnh dọc nhất, tránh khoảng trống dưới ảnh ngang. */
  height: 420px;
}
.slide-product .swiper-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.slide-product .swiper-button-next,
.slide-product .swiper-button-prev {
  width: 34px; height: 34px; border-radius: 50%; background-color: rgba(var(--nv-primary-rgb), .75);
  background-size: 12px 20px; margin-top: -17px;
}
.slide-product .swiper-pagination { position: static; margin-top: 10px; }
.slide-product .swiper-pagination-bullet { background-color: #cdd9e0; border: 0; opacity: 1; }
.slide-product .swiper-pagination-bullet-active { background-color: var(--nv-primary); }

/* Bảng thông số kỹ thuật dựng từ các dòng nhập trong admin */
.nv-spec-table { width: 100%; border-collapse: collapse; }
.nv-spec-table th, .nv-spec-table td { border: 1px solid #dfe6ea; padding: 11px 14px; text-align: left; }
.nv-spec-table th { width: 38%; background: #f2f7fa; font-weight: 600; color: #22303c; }
.nv-spec-table tr:nth-child(even) td { background: #fafcfd; }
@media (max-width: 575px) {
  .nv-spec-table th { width: 45%; }
}

/* Dòng thông tin bài viết khi không có tác giả và nút chia sẻ:
   không cần dồn hai đầu nữa, cho về sát trái. */
.nv-article__meta--plain { justify-content: flex-start; }
.nv-article__meta--plain .nv-article__author-date { font-size: 14px; }

/* Popup video giới thiệu */
.nv-intro-modal .modal-content {
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--nv-primary);
}
.nv-intro-modal .modal-header { border-bottom: 1px solid rgba(255, 255, 255, .18); padding: 14px 20px; }
.nv-intro-modal .modal-title { font-size: 18px; font-weight: 700; color: #fff; }
.nv-intro-modal .close { color: #fff; text-shadow: none; opacity: .8; }
.nv-intro-modal .close:hover { color: #fff; opacity: 1; }
.nv-intro-modal .modal-body { padding: 14px 20px 20px; background: var(--nv-primary); }

/* Giữ khung 16:9 cho cả iframe lẫn thẻ video */
.nv-intro-ratio { position: relative; width: 100%; padding-top: 56.25%; }
.nv-intro-ratio .nv-intro-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
