:root {
  --primary: #198754;
  --primary-hover: #157347;
  --primary-dark: #146c43;
  --light-green: #e8f5e9;
  --border: #c8e6c9;
  --shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --text: #1f2937;
  --muted: #64748b;
}

html {
  scroll-behavior: smooth;
}

body.news-page {
  background: #f7fbf8;
  color: var(--text);
}

.news-section {
  padding: 3rem 0 4rem;
}

.section-title h2 {
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.section-title p {
  color: var(--muted);
  max-width: 720px;
  margin: 0 auto;
}

.news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 35px rgba(20, 108, 67, 0.14);
}

.news-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--light-green);
}

.news-card-media img,
.news-card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.news-card:hover .news-card-media img,
.news-card:hover .news-card-media video {
  transform: scale(1.05);
}

.news-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.16) 100%);
  pointer-events: none;
}

.news-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.badge-breaking { background: #dc3545; }
.badge-latest { background: var(--primary); }
.badge-featured { background: #20c997; }
.badge-video { background: #0d6efd; }

.news-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 25px rgba(25, 135, 84, 0.24);
  transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
  z-index: 2;
}

.news-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.06);
  background: var(--primary-hover);
  box-shadow: 0 15px 28px rgba(25, 135, 84, 0.28);
}

.news-card-body {
  padding: 1.15rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.news-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.news-card-title {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--primary-dark);
  margin: 0;
}

.news-card-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.news-card-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.btn-news-read,
.pagination .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.btn-news-read:hover,
.pagination .page-link:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(25, 135, 84, 0.16);
}

.news-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--light-green);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.news-sidebar {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-widget {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-title i {
  color: var(--primary);
}

.news-search {
  position: relative;
  display: block;
}

.news-search input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.7rem;
  border: 1px solid var(--border);
  background: var(--light-green);
  border-radius: 999px;
  color: var(--text);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.news-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.15);
}

.news-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
}

.recent-post-item,
.video-item,
.latest-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.7rem 0.25rem;
  border-radius: 0.7rem;
  transition: transform 0.25s ease, background-color 0.25s ease;
  text-decoration: none;
}

.recent-post-item:hover,
.video-item:hover,
.latest-item:hover {
  transform: translateX(3px);
  background: var(--light-green);
}

.recent-post-thumb,
.video-thumb {
  width: 68px;
  height: 68px;
  border-radius: 0.7rem;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.recent-post-thumb img,
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recent-post-title,
.video-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0 0 0.25rem;
}

.recent-post-date,
.video-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.video-item {
  align-items: center;
  cursor: pointer;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
}

.video-duration {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  padding: 0.2rem 0.4rem;
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.7);
  font-size: 0.68rem;
}

.latest-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.latest-item {
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid #eef7ef;
}

.latest-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.latest-item a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

.latest-item span {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.category-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border-radius: 0.7rem;
  background: var(--light-green);
  color: var(--primary-dark);
  font-weight: 600;
}

.category-list .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.tag-list a {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: var(--light-green);
  color: var(--primary-dark);
  font-size: 0.8rem;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.tag-list a:hover {
  background: var(--primary);
  color: #fff;
}

.pagination .page-link {
  border-radius: 999px;
  margin: 0 0.2rem;
  min-width: 2.4rem;
  height: 2.4rem;
  border: 0;
}

.pagination .page-item.active .page-link,
.pagination .page-link:hover {
  background: var(--primary-hover);
  color: #fff;
}

.news-card.is-hidden {
  display: none;
}

.news-empty {
  display: none;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--light-green);
  color: var(--primary-dark);
  text-align: center;
  font-weight: 600;
}

.news-empty.is-visible {
  display: block;
}

.video-modal .modal-content {
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.video-modal .modal-body {
  padding: 0;
  background: #000;
}

.video-modal iframe,
.video-modal video,
.video-modal img {
  width: 100%;
  min-height: 320px;
  border: 0;
  display: block;
  object-fit: cover;
}

.video-modal iframe {
  min-height: 420px;
}

.news-card.is-hovered .news-card-media img,
.news-card.is-hovered .news-card-media video {
  transform: scale(1.05);
}

@media (max-width: 991.98px) {
  .news-sidebar {
    position: static;
    margin-top: 1rem;
  }
}

@media (max-width: 767.98px) {
  .news-section {
    padding: 2rem 0 3rem;
  }

  .news-card-body {
    padding: 1rem;
  }

  .news-card-title {
    font-size: 1rem;
  }

  .news-card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-news-read {
    width: 100%;
  }
}
