/* Minh Tâm Bảo — Tin tức & Tri thức */
body.mtb-news-page {
  background: #f7f5ef;
  color: #17392f;
}

.mtb-news-hero {
  width: min(calc(100% - 32px), 1760px);
  margin: 26px auto 10px;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5eee1 0%, #fffdf8 52%, #e8efe9 100%);
  border: 1px solid rgba(23,57,47,.12);
  box-shadow: 0 22px 64px rgba(20,52,43,.10);
}

.mtb-news-hero__inner {
  min-height: 340px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
  align-items: stretch;
}

.mtb-news-hero__copy {
  padding: clamp(42px, 5vw, 84px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.mtb-news-hero__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.mtb-news-hero__brand img {
  width: auto;
  height: 54px;
  object-fit: contain;
}

.mtb-news-hero__brand span {
  color: #a9823f;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.mtb-news-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #17392f;
  font-family: 'Noto Serif', Georgia, serif;
  font-size: clamp(2.4rem, 4.2vw, 5rem);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.045em;
}

.mtb-news-hero p {
  max-width: 690px;
  margin: 22px 0 0;
  color: #4d655d;
  font-size: clamp(.98rem, 1.15vw, 1.14rem);
  line-height: 1.75;
}

.mtb-news-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.mtb-news-hero__tags span {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(23,57,47,.11);
  color: #486158;
  font-size: .76rem;
  font-weight: 700;
}

.mtb-news-hero__visual {
  min-height: 340px;
  position: relative;
  overflow: hidden;
}

.mtb-news-hero__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f7f1e6 0%, rgba(247,241,230,.32) 20%, rgba(247,241,230,0) 48%);
  pointer-events: none;
}

.mtb-news-hero__visual img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Topic navigation */
.mtb-news-page .news-categories {
  padding-top: 26px !important;
  padding-bottom: 16px !important;
  background: transparent;
}

.mtb-news-page .news-categories .container::before {
  content: 'Khám phá theo chủ đề';
  display: block;
  margin-bottom: 14px;
  text-align: center;
  color: #9b7a3e;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.mtb-news-page #news-topics-container {
  gap: 8px;
}

.mtb-news-page #news-topics-container .topic-btn {
  margin: 0 !important;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(23,57,47,.16);
  background: #fffdf9;
  color: #294b40;
  font-size: .8rem;
  font-weight: 700;
  box-shadow: none;
  transition: .2s ease;
}

.mtb-news-page #news-topics-container .topic-btn:hover,
.mtb-news-page #news-topics-container .topic-btn.active {
  background: #17392f;
  border-color: #17392f;
  color: #fff;
  transform: translateY(-1px);
}

/* Search */
.mtb-news-page .news-search {
  padding: 10px 0 26px !important;
  background: transparent !important;
}

.mtb-news-page .news-search .input-group {
  padding: 6px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(23,57,47,.12);
  box-shadow: 0 10px 28px rgba(23,57,47,.07);
}

.mtb-news-page .news-search .form-control {
  min-height: 46px;
  border: 0;
  box-shadow: none !important;
  background: transparent;
  padding-left: 15px;
  color: #17392f;
}

.mtb-news-page .news-search .form-control::placeholder { color: #8b9b95; }

.mtb-news-page .news-search .btn-primary {
  width: 48px;
  border: 0;
  border-radius: 13px !important;
  background: #17392f;
  color: #fff;
}

.mtb-news-page .news-search .btn-primary:hover { background: #a9823f; }

/* Main content */
.mtb-news-page .news-content {
  padding-top: 22px !important;
  background: transparent;
}

.mtb-news-page .news-content > .container {
  max-width: 1500px;
}

.mtb-news-page .news-category-section {
  --section-featured-height: 410px;
  margin-bottom: 52px !important;
}

.mtb-news-page .news-category-section > .d-flex:first-child {
  margin-bottom: 16px !important;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(23,57,47,.11);
}

.mtb-news-page .news-category-section h4 {
  color: #17392f;
  font-family: 'Noto Serif', Georgia, serif;
  font-size: clamp(1.35rem, 1.9vw, 2rem);
  font-weight: 600;
  letter-spacing: -.025em;
}

.mtb-news-page .section-all-btn {
  color: #9b7a3e !important;
  text-decoration: none !important;
  font-weight: 800;
}

.mtb-news-page .section-all-btn:hover { color: #17392f !important; }

.mtb-news-page .featured-card {
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 38px rgba(20,52,43,.08);
}

.mtb-news-page .featured-card .featured-image {
  height: 238px;
  transition: transform .45s ease;
}

.mtb-news-page .featured-card:hover .featured-image { transform: scale(1.025); }

.mtb-news-page .featured-card .card-body { padding: 20px 22px 22px; }

.mtb-news-page .featured-card .card-title { margin-bottom: 8px; }

.mtb-news-page .featured-card .card-title a {
  color: #17392f !important;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.45;
  text-decoration: none;
}

.mtb-news-page .featured-card .card-title a:hover { color: #9b7a3e !important; }

.mtb-news-page .featured-card .text-muted,
.mtb-news-page .related-item .text-muted { color: #7e8c87 !important; }

.mtb-news-page .related-item {
  padding: 10px;
  border-radius: 17px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(23,57,47,.08);
  transition: .2s ease;
}

.mtb-news-page .related-item:hover {
  background: #fff;
  transform: translateX(3px);
  box-shadow: 0 10px 24px rgba(20,52,43,.07);
}

.mtb-news-page .related-item img {
  width: 126px;
  height: 82px;
  border-radius: 12px;
}

.mtb-news-page .related-item a {
  color: #294b40 !important;
  text-decoration: none;
  line-height: 1.42;
}

.mtb-news-page .related-item a:hover { color: #9b7a3e !important; }

/* Generic cards used by search/topic results */
.mtb-news-page .news-card,
.mtb-news-page #news-container > [class*='col-'] > .card {
  border: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20,52,43,.07);
}

/* Sidebar */
.mtb-news-page .news-sidebar {
  position: sticky;
  top: 92px;
  padding: 24px;
  border-radius: 26px;
  background: #17392f;
  color: #fff;
  box-shadow: 0 20px 46px rgba(20,52,43,.15);
}

.mtb-news-page .news-sidebar .sidebar-section {
  padding-bottom: 20px;
  margin-bottom: 22px !important;
  border-bottom: 1px solid rgba(255,255,255,.11);
}

.mtb-news-page .news-sidebar .sidebar-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0 !important;
  border-bottom: 0;
}

.mtb-news-page .news-sidebar h5 {
  margin-bottom: 14px !important;
  color: #e4c78e;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .13em;
}

.mtb-news-page #sidebar-carousel-inner img { height: 182px !important; border-radius: 14px !important; }

.mtb-news-page #sidebar-latest a { color: #fff !important; text-decoration: none; }
.mtb-news-page #sidebar-latest a:hover { color: #e4c78e !important; }
.mtb-news-page #sidebar-latest img { border-radius: 9px !important; }

.mtb-news-page #sidebar-subscribe-form .form-control {
  min-height: 44px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: #fff;
}

.mtb-news-page #sidebar-subscribe-form .form-control::placeholder { color: rgba(255,255,255,.58); }

.mtb-news-page #sidebar-subscribe-form .btn {
  min-height: 43px;
  border: 0;
  border-radius: 12px;
  background: #e4c78e;
  color: #17392f;
  font-weight: 800;
}

/* Pagination */
.mtb-news-page .pagination .page-link {
  border: 0;
  border-radius: 10px !important;
  margin: 0 3px;
  color: #17392f;
  background: #fff;
}

.mtb-news-page .pagination .active .page-link,
.mtb-news-page .pagination .page-link:hover {
  background: #17392f;
  color: #fff;
}

@media (max-width: 1199.98px) {
  .mtb-news-hero__inner { grid-template-columns: 1.1fr .9fr; }
  .mtb-news-page .news-sidebar { padding: 20px; }
}

@media (max-width: 991.98px) {
  .mtb-news-hero {
    width: calc(100% - 24px);
    border-radius: 24px;
    margin-top: 18px;
  }

  .mtb-news-hero__inner {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .mtb-news-hero__copy { padding: 40px 30px 34px; }
  .mtb-news-hero__visual { min-height: 260px; }
  .mtb-news-hero__visual img { min-height: 260px; max-height: 340px; }
  .mtb-news-hero__visual::after { background: linear-gradient(180deg, #f7f1e6 0%, rgba(247,241,230,0) 35%); }

  .mtb-news-page .news-category-section { --section-featured-height: auto; margin-bottom: 38px !important; }
  .mtb-news-page .featured-card .featured-image { height: 230px; }

  /* Trên tablet/mobile đưa sidebar xuống cuối thay vì ẩn hoàn toàn. */
  .mtb-news-page .news-content .col-lg-4.d-none.d-lg-block {
    display: block !important;
    width: 100%;
    margin-top: 28px;
  }

  .mtb-news-page .news-sidebar { position: static; }
}

@media (max-width: 767.98px) {
  .mtb-news-hero {
    width: calc(100% - 14px);
    border-radius: 18px;
    margin-top: 10px;
  }

  .mtb-news-hero__copy { padding: 30px 22px 28px; }
  .mtb-news-hero__brand { margin-bottom: 15px; }
  .mtb-news-hero__brand img { height: 44px; }
  .mtb-news-hero h1 { font-size: clamp(2.15rem, 11vw, 3.5rem); }
  .mtb-news-hero p { margin-top: 15px; font-size: .93rem; }
  .mtb-news-hero__tags { margin-top: 19px; gap: 6px; }
  .mtb-news-hero__tags span { padding: 7px 10px; font-size: .69rem; }
  .mtb-news-hero__visual { min-height: 210px; }
  .mtb-news-hero__visual img { min-height: 210px; max-height: 260px; }

  .mtb-news-page .news-categories .container {
    overflow: hidden;
  }

  .mtb-news-page #news-topics-container {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: none;
  }

  .mtb-news-page #news-topics-container::-webkit-scrollbar { display: none; }
  .mtb-news-page #news-topics-container .topic-btn { flex: 0 0 auto; white-space: nowrap; }

  .mtb-news-page .news-search .container { padding-left: 18px; padding-right: 18px; }
  .mtb-news-page .news-content { padding-top: 10px !important; }

  .mtb-news-page .featured-card { border-radius: 18px; }
  .mtb-news-page .featured-card .featured-image { height: 210px; }
  .mtb-news-page .featured-card .card-body { padding: 17px; }
  .mtb-news-page .related-item { padding: 8px; border-radius: 14px; }
  .mtb-news-page .related-item img { width: 104px; height: 72px; }
  .mtb-news-page .news-sidebar { padding: 20px 17px; border-radius: 20px; }
}
