/* ===============================
   News listing pages
   Paths: /tin-tuc, /thong-bao
   File: css/components/news-page.css
   =============================== */


/* =====================================================
   1. FORCE FULL WIDTH FOR NEWS PAGES
   Theme layout đang dùng .main-wrap chia sidebar phải
   ===================================================== */

body.path-tin-tuc .main-wrap,
body.path-thong-bao .main-wrap {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: 1480px !important;
  width: 100% !important;
  margin: 32px auto !important;
  padding: 0 36px !important;
  gap: 0 !important;
}

body.path-tin-tuc .main-wrap > main,
body.path-thong-bao .main-wrap > main,
body.path-tin-tuc main,
body.path-thong-bao main {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  grid-column: 1 / -1 !important;
}

body.path-tin-tuc .main-wrap > .sidebar,
body.path-thong-bao .main-wrap > .sidebar,
body.path-tin-tuc .sidebar,
body.path-thong-bao .sidebar,
body.path-tin-tuc aside.sidebar,
body.path-thong-bao aside.sidebar,
body.path-tin-tuc .region-sidebar-right,
body.path-thong-bao .region-sidebar-right,
body.path-tin-tuc .region-sidebar-second,
body.path-thong-bao .region-sidebar-second,
body.path-tin-tuc .region-sidebar-phai,
body.path-thong-bao .region-sidebar-phai {
  display: none !important;
}


/* =====================================================
   2. PAGE WRAPPER
   ===================================================== */

.kt-news-page {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 0 56px;
}


/* =====================================================
   3. HERO
   ===================================================== */

.kt-news-page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 34px 36px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #fff8ed 0%, #ffffff 68%);
  border: 1px solid #eedcc4;
  box-shadow: 0 14px 34px rgba(120, 74, 34, 0.08);
}

.kt-news-page-hero::before {
  content: "";
  position: absolute;
  top: -68px;
  right: -64px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(167, 25, 32, 0.08);
}

.kt-news-page-hero::after {
  content: "";
  position: absolute;
  right: 130px;
  bottom: -78px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(198, 154, 43, 0.11);
}

.kt-news-page-kicker {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #a71920;
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 12px;
}

.kt-news-page-kicker::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #c69a2b, #a71920);
}

.kt-news-page-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 38px;
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.kt-news-page-hero p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 720px;
  color: #475569;
  font-size: 16px;
  line-height: 1.75;
}


/* =====================================================
   4. TABS
   ===================================================== */

.kt-news-page-tabs {
  display: flex;
  gap: 34px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 28px;
}

.kt-news-page .kt-news-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 13px 0;
  color: #1f2937;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 2px solid transparent;
}

.kt-news-page .kt-news-tab:hover,
.kt-news-page .kt-news-tab.active {
  color: #a71920;
}

.kt-news-page .kt-news-tab.active {
  border-bottom-color: #a71920;
}

.kt-news-page .tab-star {
  color: #c69a2b;
  font-size: 13px;
}


/* =====================================================
   5. NEWS GRID
   ===================================================== */

.kt-news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.kt-news-card {
  min-width: 0;
}


/* =====================================================
   6. CARD FROM views-view-fields--tin-tuc.html.twig
   ===================================================== */

.kt-news-article {
  height: 100%;
  background: #ffffff;
  border: 1px solid #eee3d7;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  display: flex;
  flex-direction: column;
}

.kt-news-article:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 25, 32, 0.2);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.12);
}


/* Image */
.kt-news-thumb {
  position: relative;
  display: block;
  height: 195px;
  overflow: hidden;
  background: #f7efe3;
  text-decoration: none;
}

.kt-news-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.kt-news-article:hover .kt-news-thumb img {
  transform: scale(1.05);
}

.kt-news-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff7ed, #f3e1c7);
}

.kt-news-thumb-placeholder span {
  font-size: 42px;
}


/* Badge */
/* Badge chuyên mục nằm trên ảnh, không che ngày tháng */
.kt-news-article .kt-news-thumb {
  position: relative;
}

.kt-news-article .kt-news-thumb .kt-news-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 5;

  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 6px 10px;
  border-radius: 7px;

  background: #c69a2b;
  color: #7a1117;
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.025em;

  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
}

/* Phòng trường hợp còn badge cũ nằm trong meta thì không cho đè ngày */
.kt-news-article .kt-news-meta .kt-news-badge {
  position: static;
  box-shadow: none;
}

/* Body */
.kt-news-body {
  flex: 1;
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
}

.kt-news-meta {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12.5px;
  line-height: 1.4;
  font-weight: 650;
}

.kt-news-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


/* Title */
.kt-news-title {
  margin: 0 0 9px;
  font-size: 17.5px;
  line-height: 1.42;
  font-weight: 850;
  letter-spacing: -0.018em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kt-news-title a {
  color: #0f172a;
  text-decoration: none;
}

.kt-news-title a:hover {
  color: #a71920;
}


/* Summary */
.kt-news-summary {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.68;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


/* Read more */
.kt-news-readmore {
  margin-top: auto;
  padding-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a71920;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}

.kt-news-readmore span {
  transition: transform 0.2s ease;
}

.kt-news-readmore:hover span {
  transform: translateX(3px);
}


/* =====================================================
   7. PAGER
   ===================================================== */

.kt-news-pager {
  margin-top: 36px;
  text-align: center;
}

.kt-news-pager .pager__items {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.kt-news-pager .pager__item {
  list-style: none;
}

.kt-news-pager .pager__item a,
.kt-news-pager .pager__item.is-active a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
}

.kt-news-pager .pager__item a:hover,
.kt-news-pager .pager__item.is-active a {
  border-color: #a71920;
  background: #a71920;
  color: #ffffff;
}


/* =====================================================
   8. EMPTY STATE
   ===================================================== */

.kt-news-empty {
  background: #ffffff;
  border: 1px dashed #d1d5db;
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  color: #6b7280;
}


/* =====================================================
   9. RESPONSIVE
   ===================================================== */

@media (max-width: 992px) {
  .kt-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kt-news-thumb {
    height: 200px;
  }
}

@media (max-width: 640px) {
  body.path-tin-tuc .main-wrap,
  body.path-thong-bao .main-wrap {
    margin: 24px auto !important;
    padding: 0 12px !important;
  }

  .kt-news-page {
    padding: 24px 0 42px;
  }

  .kt-news-page-hero {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .kt-news-page-hero h1 {
    font-size: 28px;
  }

  .kt-news-page-tabs {
    gap: 22px;
    overflow-x: auto;
  }

  .kt-news-grid {
    grid-template-columns: 1fr;
  }

  .kt-news-thumb {
    height: 210px;
  }

  .kt-news-body {
    padding: 16px 17px 18px;
  }

  .kt-news-title {
    font-size: 17px;
  }
}
/* Fix badge Tin tức không che ngày tháng */
.kt-news-article .kt-news-thumb {
  position: relative;
}

.kt-news-article .kt-news-thumb > .kt-news-badge {
  position: absolute !important;
  left: 14px;
  top: 14px;
  bottom: auto !important;
  right: auto !important;
  z-index: 5;
}

.kt-news-article .kt-news-meta .kt-news-badge {
  display: none !important;
}