/* ========================================
   NEWS / ANNOUNCEMENT DETAIL REDESIGN
   File: css/components/news-detail.css
======================================== */

/* Layout 2 cột cho trang chi tiết có sidebar */
.path-node .main-wrap.has-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

/* Khung bài viết chính */
.kt-news-detail {
  width: 100%;
  max-width: 100%;
  margin: 32px 0 56px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.kt-news-detail-inner {
  background: #ffffff;
  border: 1px solid #eadde0;
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(127, 13, 29, 0.08);
  overflow: hidden;
}

/* Header bài viết */
.kt-news-detail-header {
  position: relative;
  margin: 0;
  padding: 30px 34px 24px;
  background: linear-gradient(135deg, #fff8f1 0%, #ffffff 70%);
  border-bottom: 1px solid #eadde0;
  overflow: hidden;
}

.kt-news-detail-header::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 190px;
  height: 190px;
  background: rgba(246, 184, 0, 0.16);
  border-radius: 50%;
}

.kt-news-detail-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.kt-news-detail-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
}

.kt-news-detail-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: #f6b800;
  color: #7f0d1d;
  font-size: 12px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}
.kt-news-detail-views {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #eadde0;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
}

.kt-news-detail-title {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 900px;
  color: #1f2937;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.35;
}

/* Action buttons */
.kt-news-detail-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.kt-news-detail-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  background: #ffffff;
  color: #9d1024 !important;
  border: 1px solid #eadde0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.kt-news-detail-actions a:hover {
  background: #9d1024;
  color: #ffffff !important;
  border-color: #9d1024;
}

/* Featured image */
.kt-news-detail-image {
  margin: 0;
  padding: 28px 34px 0;
  background: #ffffff;
  border-radius: 0;
  overflow: visible;
}

.kt-news-detail-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.10);
}

/* Body */
.kt-news-detail-body {
  padding: 30px 34px 10px;
  color: #374151;
  font-size: 16px;
  line-height: 1.85;
}

.kt-news-detail-body p {
  margin: 0 0 18px;
  text-align: justify;
}

.kt-news-detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}

.kt-news-detail-body a {
  color: #9d1024;
  font-weight: 700;
  text-decoration: underline;
}

.kt-news-detail-body h2,
.kt-news-detail-body h3,
.kt-news-detail-body h4 {
  margin: 30px 0 14px;
  color: #7f0d1d;
  line-height: 1.4;
  font-weight: 800;
}

.kt-news-detail-body ul,
.kt-news-detail-body ol {
  margin: 0 0 18px 22px;
  padding: 0;
}

.kt-news-detail-body li {
  margin-bottom: 8px;
}

/* Footer meta */
.kt-news-detail-footer {
  margin: 20px 34px 0;
  padding: 18px 20px;
  background: #fff8f1;
  border: 1px solid #eadde0;
  border-radius: 14px;
}

.kt-news-detail-source {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-bottom: 14px;
  color: #4b5563;
  font-size: 14px;
}

.kt-news-detail-source .source-label {
  color: #7f0d1d;
  font-weight: 800;
}

.kt-news-detail-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.kt-news-detail-tags span {
  color: #7f0d1d;
  font-size: 14px;
  font-weight: 800;
}

.kt-news-detail-tags a {
  display: inline-flex;
  padding: 5px 10px;
  background: #ffffff;
  color: #9d1024 !important;
  border: 1px solid #eadde0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
}

.kt-news-detail-tags a:hover {
  background: #9d1024;
  color: #ffffff !important;
}

/* Bottom navigation */
.kt-news-detail-nav {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 34px 34px;
}

.kt-news-back-btn,
.kt-news-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.kt-news-back-btn {
  background: #ffffff;
  color: #9d1024 !important;
  border: 1.5px solid #9d1024;
}

.kt-news-more-btn {
  background: #9d1024;
  color: #ffffff !important;
  border: 1.5px solid #9d1024;
  box-shadow: 0 8px 20px rgba(157, 16, 36, 0.20);
}

.kt-news-back-btn:hover,
.kt-news-more-btn:hover {
  transform: translateY(-2px);
}

/* Sidebar */
.sidebar {
  margin-top: 32px;
}

.sidebar .block {
  margin-bottom: 18px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #eadde0;
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(127, 13, 29, 0.07);
}

.sidebar .block h2 {
  position: relative;
  margin: 0 0 16px;
  padding-bottom: 12px;
  color: #7f0d1d;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
}

.sidebar .block h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 54px;
  height: 3px;
  background: linear-gradient(90deg, #9d1024, #f6b800);
  border-radius: 999px;
}

/* Sidebar view list */
.sidebar .views-row {
  padding: 0 0 13px;
  margin: 0 0 13px;
  border-bottom: 1px solid #eadde0;
}

.sidebar .views-row:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.sidebar a {
  color: #1f2937;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.45;
}

.sidebar a:hover {
  color: #9d1024;
}

/* Sidebar category custom block */
.kt-sidebar-box {
  margin: 0;
}

.kt-sidebar-title {
  position: relative;
  margin: 0 0 16px;
  padding-bottom: 12px;
  color: #7f0d1d;
  font-size: 18px;
  font-weight: 800;
}

.kt-sidebar-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 54px;
  height: 3px;
  background: linear-gradient(90deg, #9d1024, #f6b800);
  border-radius: 999px;
}

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

.kt-category-list li {
  margin-bottom: 8px;
}

.kt-category-list li:last-child {
  margin-bottom: 0;
}

.kt-category-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: #fff8f1;
  color: #1f2937 !important;
  border: 1px solid #eadde0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
}

.kt-category-list a::after {
  content: "›";
  color: #9d1024;
  font-size: 18px;
  font-weight: 800;
}

.kt-category-list a:hover,
.kt-category-list a.active {
  background: #9d1024;
  color: #ffffff !important;
  border-color: #9d1024;
}

.kt-category-list a:hover::after,
.kt-category-list a.active::after {
  color: #f6b800;
}

/* Mobile */
@media (max-width: 992px) {
  .path-node .main-wrap.has-sidebar {
    display: block;
  }

  .sidebar {
    margin-top: 24px;
  }
}

@media (max-width: 768px) {
  .kt-news-detail {
    margin: 20px 0 40px;
  }

  .kt-news-detail-header {
    padding: 24px 20px 20px;
  }

  .kt-news-detail-title {
    font-size: 24px;
  }

  .kt-news-detail-image {
    padding: 20px 20px 0;
  }

  .kt-news-detail-image img {
    max-height: 360px;
  }

  .kt-news-detail-body {
    padding: 24px 20px 8px;
    font-size: 15px;
    line-height: 1.75;
  }

  .kt-news-detail-footer {
    margin: 18px 20px 0;
  }

  .kt-news-detail-nav {
    flex-direction: column;
    padding: 22px 20px 26px;
  }

  .kt-news-back-btn,
  .kt-news-more-btn {
    width: 100%;
  }
}
/* ========================================
   SIDEBAR BLOCKS - CLEAN NEWS LIST
   ======================================== */

/* Ẩn title hệ thống nếu còn bị lặp ở custom block danh mục */
.sidebar .block h2:empty {
  display: none;
}

/* Làm sidebar gọn hơn */
.sidebar .block {
  overflow: hidden;
}

/* Mỗi dòng tin trong View */
.sidebar .views-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 0 0 14px;
  margin: 0 0 14px;
  border-bottom: 1px solid #eadde0;
}

.sidebar .views-row:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Ảnh trong sidebar */
.sidebar .views-field-field-image,
.sidebar .views-field-field-anh,
.sidebar .views-field-field-anh-dai-dien,
.sidebar .views-field-field-anh-hoat-dong {
  grid-row: 1 / span 2;
}

.sidebar .views-field-field-image img,
.sidebar .views-field-field-anh img,
.sidebar .views-field-field-anh-dai-dien img,
.sidebar .views-field-field-anh-hoat-dong img {
  width: 86px;
  height: 62px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  background: #fff8f1;
  border: 1px solid #eadde0;
}

/* Tiêu đề trong sidebar */
.sidebar .views-field-title {
  min-width: 0;
}

.sidebar .views-field-title a {
  display: block;
  color: #1f2937 !important;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 800;
  text-decoration: none !important;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar .views-field-title a:hover {
  color: #9d1024 !important;
}

/* Ngày đăng */
.sidebar .views-field-created,
.sidebar .views-field-created-1 {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
}

.sidebar .views-field-created::before,
.sidebar .views-field-created-1::before {
  content: "▦ ";
  color: #9d1024;
}

/* Nếu block không có ảnh thì tự chuyển thành 1 cột */
.sidebar .views-row:not(:has(img)) {
  display: block;
}

.sidebar .views-row:not(:has(img)) .views-field-title {
  margin-bottom: 5px;
}

/* Block thông báo liên quan dạng text list */
.sidebar .block .item-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar .block .item-list li {
  position: relative;
  margin: 0 0 11px;
  padding: 0 0 11px 18px;
  border-bottom: 1px solid #eadde0;
}

.sidebar .block .item-list li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.sidebar .block .item-list li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: #9d1024;
  font-weight: 900;
}

/* Danh mục sidebar đẹp hơn */
.kt-sidebar-category {
  margin: 0;
}

.kt-category-list a {
  min-height: 44px;
} /* ========================================
   CHỈ BỎ NỀN TRẮNG Ở TIÊU ĐỀ VIEW SIDEBAR
   Tin mới / Thông báo liên quan
======================================== */

.path-node .sidebar .view-header,
.path-node .sidebar .view-header > *,
.path-node .sidebar .view-header .kt-sidebar-title {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

.path-node .sidebar .view-header {
  padding: 0 !important;
  margin: 0 0 14px !important;
}

.path-node .sidebar .view-header .kt-sidebar-title {
  display: inline-block !important;
  width: auto !important;
  max-width: max-content !important;
  margin: 0 !important;
  padding: 0 0 12px !important;
  color: #9d1024 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
  position: relative !important;
}

.path-node .sidebar .view-header .kt-sidebar-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 54px;
  height: 3px;
  background: linear-gradient(90deg, #9d1024, #f6b800);
  border-radius: 999px;
}