/* Tin Tức Page - Layout dạng grid card (theo ảnh mẫu) */

.news-main {
  background-image: url("/tintuc/assets/bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 60vh;
  padding: 48px 24px 64px;
}

.news-section {
  max-width: 1200px;
  margin: 0 auto;
}

/* Tiêu đề TIN TỨC - căn giữa, in hoa */
.news-heading {
  font-size: 42px;
  font-weight: 800;
  color: #1a1a1a;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 48px 0;
}

/* Grid 2 cột - card cùng chiều cao */
.news-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  align-items: stretch;
}

/* Card - kích thước cố định, cân bằng */
.news-card {
  margin: 0;
  padding: 0;
  display: flex;
  min-height: 0;
}

.news-card-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 420px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.news-card-link:hover {
  box-shadow: 0 8px 28px rgba(178, 28, 36, 0.12);
  transform: translateY(-4px);
}

/* Ảnh trên cùng - chiều cao cố định */
.news-card-image {
  position: relative;
  width: 100%;
  height: 220px;
  flex-shrink: 0;
  overflow: hidden;
  background: #f0f0f0;
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Badge góc trái trên ảnh (99KIM) */
.news-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffd591;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

/* Ngày đăng - hộp đỏ góc trái trên ảnh */
.news-card-date {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: #b21c24;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
}

/* Nội dung dưới ảnh - cố định, text dài cắt ... */
.news-card-body {
  padding: 24px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.news-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.35;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-card-link:hover .news-card-title {
  color: #b21c24;
}

.news-card-excerpt {
  font-size: 15px;
  color: #666;
  line-height: 1.55;
  margin: 0 0 16px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Thanh tag ở dưới cùng - không co */
.news-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

.news-card-tags span {
  font-size: 11px;
  color: #888;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Pagination */
.news-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  flex-wrap: wrap;
}

.news-pagination-btn {
  padding: 10px 18px;
  background: #fff;
  color: #b21c24;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: inherit;
}

.news-pagination-btn:hover:not(:disabled) {
  background: #b21c24;
  color: #fff;
  border-color: #b21c24;
}

.news-pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.news-pagination-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.news-pagination-num {
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  background: #fff;
  color: #333;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  font-family: inherit;
}

.news-pagination-num:hover {
  background: #ffd591;
  border-color: #ffd591;
  color: #333;
}

.news-pagination-num.active {
  background: #b21c24;
  color: #fff;
  border-color: #b21c24;
  cursor: default;
}

/* Responsive */
@media (max-width: 768px) {
  .news-main {
    padding: 32px 16px 48px;
  }

  .news-heading {
    font-size: 32px;
    margin-bottom: 32px;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .news-card-body {
    padding: 20px;
  }

  .news-card-title {
    font-size: 18px;
  }

  .news-card-excerpt {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .news-heading {
    font-size: 26px;
    letter-spacing: 1px;
  }

  .news-card-image {
    aspect-ratio: 4 / 3;
  }
}

/* ----- Trang chi tiết bài viết (dùng container như các trang khác) ----- */
.article-detail-main.container {
  padding: 32px 120px 64px;
}

.article-detail {
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.article-header {
  padding: 28px 28px 24px;
}

.article-title {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.35;
  margin: 0 0 8px 0;
}

.article-meta {
  font-size: 14px;
  color: #888;
  margin: 0;
}

.article-header .article-back {
  display: inline-block;
  margin-top: 16px;
}

.article-hero {
  margin: 0;
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  background: #f0f0f0;
}

.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Video YouTube embed - tỷ lệ 16:9, responsive */
.article-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
}

.article-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.article-body {
  padding: 28px 28px 32px;
  font-size: 17px;
  line-height: 1.7;
  color: #333;
}

.article-body p {
  margin: 0 0 20px 0;
}

.article-body p:last-child {
  margin-bottom: 0;
}

.article-body h2 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 32px 0 14px 0;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body em {
  font-style: italic;
  color: #444;
}

.article-body strong {
  font-weight: 700;
}

.article-body ul {
  margin: 0 0 20px 0;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Ảnh xen kẽ trong bài viết - kiểu tin tức */
.article-body .article-fig {
  margin: 28px 0;
}

.article-body .article-fig img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #f5f5f5;
}

.article-body .article-fig figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  text-align: center;
  font-style: italic;
}

/* Ảnh full width */
.article-body .article-fig--full img {
  max-width: 100%;
}

/* Ảnh lưới 2 cột */
.article-body .article-fig--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.article-body .article-fig--grid img {
  width: 100%;
}

.article-body .article-fig--grid figcaption {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .article-body .article-fig {
    margin: 20px 0;
  }

  .article-body .article-fig--grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .article-body .article-fig figcaption {
    font-size: 13px;
  }
}

.article-footer {
  padding: 0 28px 20px 28px;
}

.article-back {
  display: inline-block;
  font-size: 15px;
  font-weight: 600;
  color: #b21c24;
  text-decoration: none;
}

.article-back:hover {
  text-decoration: underline;
}

@media (max-width: 1440px) {
  .article-detail-main.container {
    padding: 32px 40px 64px;
  }
}

@media (max-width: 1137px) {
  .article-detail-main.container {
    padding: 32px 30px 64px;
  }
}

@media (max-width: 1024px) {
  .article-detail-main.container {
    padding: 32px 25px 64px;
  }
}

@media (max-width: 768px) {
  .article-detail-main.container {
    padding: 24px 20px 48px;
  }

  .article-header,
  .article-body {
    padding-left: 20px;
    padding-right: 20px;
  }

  .article-title {
    font-size: 22px;
  }

  .article-body {
    font-size: 16px;
    padding: 20px 20px 24px;
  }

  .article-body h2 {
    font-size: 18px;
    margin-top: 28px;
  }

  .article-footer {
    padding: 0 20px 20px;
  }
}
