/* =====================================================
   NEWS PAGE STYLES - Premium Design
   ===================================================== */

/* Fix for Bootstrap row negative margins */
#content .row {
  margin-left: 0;
  margin-right: 0;
}

/* Ensure khung1200 centers properly */
#content .khung1200 {
  padding-left: 15px;
  padding-right: 15px;
}

/* Utilities */
.width_100 {
  width: 100%;
  float: left;
}

.content_trong {
  width: 100%;
  float: left;
  padding-bottom: 50px;
}

/* Breadcrumbs */
.duongdan {
  width: 100%;
  float: left;
  padding: 20px 0;
  margin-bottom: 30px;
  border-bottom: 2px solid #006b3f;
  font-size: 15px;
  color: #666;
  /* max-width: 1100px; */
  margin: auto;
  text-align: center;
}

.duongdan a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.duongdan a:hover {
  color: #006b3f;
}

.duongdan span.separator {
  margin: 0 10px;
  color: #006b3f;
  font-weight: bold;
}

.duongdan .active,
.duongdan span:last-child {
  color: #006b3f;
  font-weight: 700;
}

/* Section Container */
.noidungdv4 {
  width: 100% !important;
  float: left;
}

/* Article Grid */
.news-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 25px;
  margin-bottom: 40px;
  width: 100% !important;
}

/* Article Card */
.news-item {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 107, 63, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border: 1px solid #e8f5e9;
}

.news-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 107, 63, 0.15);
  border-color: #006b3f;
}

/* Image Container */
.news-thumb {
  position: relative;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  overflow: hidden;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.news-thumb a {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.news-item:hover .news-thumb img {
  transform: scale(1.1);
}

/* Content Area */
.news-info {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.news-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.5;
  color: #1a1a1a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 51px; /* 2 lines exact */
}

.news-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.news-title a:hover {
  color: #006b3f;
}

.news-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
  min-height: 71px; /* 3 lines */
}

.news-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #006b3f 0%, #00512f 100%);
  border-radius: 25px;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: all 0.3s;
  width: fit-content;
  box-shadow: 0 4px 12px rgba(0, 107, 63, 0.3);
}

.news-more:hover {
  background: linear-gradient(135deg, #00512f 0%, #003d22 100%);
  transform: translateX(3px);
  box-shadow: 0 6px 16px rgba(0, 107, 63, 0.4);
}

.news-more i {
  transition: transform 0.3s;
}

.news-more:hover i {
  transform: translateX(4px);
}

/* Pagination */
.pagination-container {
  text-align: center;
  margin: 50px 0 30px;
  clear: both;
  width: 100%;
  float: left;
}

.my-pagination {
  display: inline-flex;
  gap: 8px;
  background: #fff;
  padding: 10px 15px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.my-pagination a,
.my-pagination span {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: none;
  border-radius: 20px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s;
  background: #f5f5f5;
}

.my-pagination a:hover {
  background: #e8f5e9;
  color: #006b3f;
}

.my-pagination .active,
.my-pagination span.active {
  background: linear-gradient(135deg, #006b3f 0%, #00512f 100%) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 107, 63, 0.3);
}

/* Article Detail Page */
.article-detail {
  width: 100%;
  float: left;
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.title-page-dt h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 25px;
  color: #1a1a1a;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

.article-content {
  font-size: 17px;
  line-height: 1.9;
  color: #333;
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 30px 0;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.article-content h2 {
  font-size: 26px;
  margin-top: 40px;
  margin-bottom: 20px;
  color: #006b3f;
  font-weight: 700;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8f5e9;
}

.article-content h3 {
  font-size: 22px;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #333;
  font-weight: 600;
}

.article-content p {
  margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.article-content li {
  margin-bottom: 10px;
}

/* Related Posts Section */
.related-posts {
  width: 100%;
  float: left;
  margin-top: 50px;
  padding-top: 40px;
  border-top: 3px solid #e8f5e9;
}

.related-title {
  width: 100%;
  float: left;
  margin-bottom: 30px;
}

.related-title h2 {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a1a;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  padding-left: 20px;
}

.related-title h2:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, #006b3f 0%, #00a86b 100%);
  border-radius: 3px;
}

/* Responsive Design */
@media (max-width: 991px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .article-detail {
    padding: 20px;
  }

  .title-page-dt h1 {
    font-size: 26px;
  }
}

@media (max-width: 600px) {
  .news-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .news-thumb {
    padding-top: 60%;
  }

  .news-info {
    padding: 20px;
  }

  .news-title {
    font-size: 16px;
    min-height: auto;
  }

  .news-desc {
    min-height: auto;
  }

  .title-page-dt h1 {
    font-size: 22px;
  }

  .article-detail {
    padding: 15px;
    border-radius: 8px;
  }

  .duongdan {
    font-size: 13px;
    padding: 15px 0;
  }

  .duongdan span.separator {
    margin: 0 6px;
  }
}
