/* ============================================
   News Page AJAX System - Styles
   ============================================ */

/* Loading state for posts container */
#news-posts-container.loading,
.tg_content_news_features_general_bg_detailds.loading {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
  min-height: 400px;
  transition: opacity 0.3s ease;
}

#news-posts-container.loading::before,
.tg_content_news_features_general_bg_detailds.loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  margin: -25px 0 0 -25px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #48A9F4;
  border-radius: 50%;
  animation: newsSpinner 1s linear infinite;
  z-index: 999;
}

@keyframes newsSpinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Smooth fade transitions */
.tg_content_news_defauilt,
.tg_content_news_features_general_bg_detailds {
  transition: opacity 0.3s ease;
}

/* Empty state styles */
.no-posts-found,
.no-featured-posts {
  text-align: center;
  padding: 80px 20px;
  color: #999;
}

.no-posts-found {
  grid-column: 1 / -1;
}

.no-posts-found svg,
.no-featured-posts svg {
  margin-bottom: 30px;
  opacity: 0.3;
}

/* Error loading styles */
.error-loading {
  text-align: center;
  padding: 80px 20px;
  color: #e74c3c;
  font-weight: 500;
  grid-column: 1 / -1;
}

/* Pagination loading state */
#news-pagination.ajax-loading {
  opacity: 0.6;
  pointer-events: none;
}

.no-posts-found p {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

/* Category filter active state enhancement */
#news-category-filter li.tg_active a {
  transition: all 0.3s ease;
}

/* Pagination smooth hover */
#news-pagination a {
  transition: all 0.3s ease;
}

#news-pagination li:hover a {
  transform: translateY(-2px);
}

/* Single post styles */
.tg_single_post .post-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.tg_single_post .post-meta {
  flex-direction: column;
  gap: 10px;
}



.tg_single_post .post-date {
  color: #666;
  font-size: 14px;
}

.tg_single_post .post-category .category-tag {
  background: #48A9F4;
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  text-decoration: none;
  margin-right: 8px;
}

.tg_single_post .post-content {
  margin-bottom: 40px;
  line-height: 1.8;
}

.tg_single_post .post-content img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
}

.tg_single_post .post-tags {
  margin-bottom: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.tg_single_post .post-tags h4 {
  margin-bottom: 15px;
  font-size: 16px;
}

.tg_single_post .tags-list .tag-link {
  display: inline-block;
  background: #f8f9fa;
  color: #333;
  padding: 6px 15px;
  border-radius: 20px;
  text-decoration: none;
  margin: 0 8px 8px 0;
  font-size: 14px;
  transition: all 0.3s ease;
}

.tg_single_post .tags-list .tag-link:hover {
  background: #48A9F4;
  color: white;
}

.tg_single_post .post-navigation {
  margin-bottom: 60px;
  padding: 30px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.tg_single_post .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.tg_single_post .nav-previous,
.tg_single_post .nav-next {
  flex: 1;
  max-width: 48%;
}

.tg_single_post .nav-previous a,
.tg_single_post .nav-next a {
  display: block;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
}

.tg_single_post .nav-previous a:hover,
.tg_single_post .nav-next a:hover {
  background: #48A9F4;
  color: white;
}

.tg_single_post .nav-label {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

.tg_single_post .nav-title {
  display: block;
  font-weight: 600;
  line-height: 1.4;
}

.tg_single_post .nav-next {
  text-align: right;
}

/* Related posts */
.tg_content_related_posts {
  background: #f8f9fa;
}

/* Search results specific styles */
.no-posts {
  text-align: center;
  padding: 60px 20px;
}

.no-posts h3 {
  margin-bottom: 20px;
  color: #333;
}

.search-form-wrapper {
  max-width: 400px;
  margin: 30px auto 0;
}

.search-form-wrapper .list_group {
  display: flex;
  gap: 10px;
}

.search-form-wrapper input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.search-form-wrapper button {
  padding: 12px 20px;
  background: #48A9F4;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.search-form-wrapper button:hover {
  background: #357abd;
}

/* Responsive styles */
@media (max-width: 768px) {
  .tg_single_post .nav-links {
    flex-direction: column;
  }
  
  .tg_single_post .nav-previous,
  .tg_single_post .nav-next {
    max-width: 100%;
  }
  
  .tg_single_post .nav-next {
    text-align: left;
  }
  
  .tg_single_post .post-meta {
    flex-direction: column;
    gap: 10px;
  }
}

/* Fix text formatting - Giải pháp đơn giản */
.tg_content_news_de_bg_left_inner em,
.tg_content_news_de_bg_left_inner i,
.tg_content em, .tg_content i {
  font-style: italic !important;
}

.tg_content_news_de_bg_left_inner strong,
.tg_content_news_de_bg_left_inner b,
.tg_content strong, .tg_content b {
  font-weight: bold !important;
}


