/**
 * My Custom News Articles - Front-end styles
 * Color scheme: #002D42 (primary), #fff background. Responsive grid.
 */

/* Archive heading */
.hg-news-archive-heading {
  font-size: 2rem;
  font-weight: 600;
  color: #002D42;
}

/* Category blocks (Economic News homepage & shortcode) */
.hg-news-category-block {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.hg-news-category-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hg-news-category-block-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hg-news-category-block-image {
  width: 100%;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.hg-news-category-block-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.hg-news-category-block-placeholder {
  width: 100%;
  height: 180px;
  background: #e9ecef;
}

.hg-news-category-block-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hg-news-category-block-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hg-news-category-block-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #666;
  margin-bottom: 20px;
  flex: 1;
}

.hg-news-category-block-button {
  margin-top: auto;
  text-align: center;
}

.hg-news-category-block-button span {
  display: inline-block;
  padding: 10px 24px;
  border: 2px solid #002D42;
  color: #002D42;
  background: #fff;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.hg-news-category-block:hover .hg-news-category-block-button span {
  background: #002D42;
  color: #fff;
}

/* Grid items (archive & shortcode lists) */
.hg-news-grid-item {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.hg-news-grid-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.hg-news-grid-thumb {
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 16/9;
  background-color: #f5f5f5;
}

.hg-news-grid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hg-news-grid-thumb-placeholder {
  min-height: 180px;
}

.hg-news-grid-item:hover .hg-news-grid-thumb img {
  transform: scale(1.05);
}

.hg-news-grid-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hg-news-grid-title {
  font-size: 1.25rem;
  line-height: 1.4;
  font-weight: 600;
  margin-bottom: 8px;
}

.hg-news-grid-title a:hover {
  text-decoration: underline !important;
}

.hg-news-grid-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 12px;
}

.hg-news-grid-excerpt {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.5;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  display: -webkit-box;
  flex: 1 1 auto;
}

.hg-news-grid-read {
  padding-top: 16px;
}

/* Buttons */
.hg-news-btn-read {
  display: inline-block;
  padding: 10px 24px;
  background-color: #002D42;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.hg-news-btn-read:hover {
  background-color: #004d6b;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 45, 66, 0.2);
}

.hg-news-btn-outline {
  display: inline-block;
  margin: 0 8px 8px 0;
  padding: 8px 16px;
  border: 2px solid #002D42;
  color: #002D42;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
}

.hg-news-btn-outline:hover {
  background: #002D42;
  color: #fff;
}

/* Pagination */
.hg-news-pagination .page-numbers {
  display: inline-block;
  padding: 8px 16px;
  margin: 0 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
  color: #333;
  background: #fff;
}

.hg-news-pagination .page-numbers:hover {
  background: #f0f0f0;
  border-color: #002D42;
}

.hg-news-pagination .page-numbers.current {
  background: #002D42;
  color: #fff;
  border-color: #002D42;
}

/* Single post */
.hg-news-single-category {
  font-size: 1rem;
  font-weight: 600;
  color: #002D42;
  text-transform: uppercase;
}

.hg-news-single-meta {
  font-size: 0.95rem;
  color: #666;
}

.hg-news-single-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: #002D42;
}

.hg-news-single-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
}

/* Responsive */
@media (max-width: 991px) {
  .hg-news-category-block-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 767px) {
  .hg-news-category-block-content {
    padding: 20px;
  }
  .hg-news-category-block-title {
    font-size: 1.15rem;
  }
  .hg-news-single-title {
    font-size: 1.75rem;
  }
}
