/* 最新消息 — 列表與內文樣式（版面共用 qna.css） */

.news-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.news-item {
  display: block;
  padding: 14px 16px;
  border: 1px solid #e8ecef;
  border-radius: 8px;
  background: #fff;
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.news-item:hover {
  border-color: #dce9df;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.news-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.news-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e7e34;
  background: #eaf7ec;
  border-radius: 999px;
  line-height: 1.5;
}

.news-badge--alt {
  color: #0c5460;
  background: #e8f6f8;
}

.news-unit {
  font-size: 0.8125rem;
  color: #666;
}

.news-date {
  font-size: 0.8125rem;
  color: #888;
}

.news-title {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #222;
  line-height: 1.55;
  word-break: break-word;
}

.news-item:hover .news-title {
  color: #1e7e34;
}

.news-empty {
  padding: 40px 20px;
  text-align: center;
  color: #999;
  background: #fafafa;
  border: 1px dashed #ddd;
  border-radius: 8px;
}

/* 活動資訊搜尋（分類 15） */
.news-search {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: #f8fcf9;
  border: 1px solid #e3efe6;
  border-radius: 8px;
}

.news-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.news-search-form select,
.news-search-form input[type="text"] {
  font-size: 0.875rem;
  border-color: #dcefe0;
  border-radius: 6px;
}

.news-search-form select:focus,
.news-search-form input[type="text"]:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 0.15rem rgba(40, 167, 69, 0.15);
}

.news-search-form .btn-search {
  font-size: 0.875rem;
  padding: 0.375rem 0.875rem;
  color: #fff;
  background: #28a745;
  border-color: #28a745;
}

.news-search-form .btn-search:hover {
  background: #218838;
  border-color: #1e7e34;
}

.news-search-form .btn-reset {
  font-size: 0.875rem;
  padding: 0.375rem 0.875rem;
  color: #444;
  background: #fff;
  border-color: #dcefe0;
}

.news-search-form .btn-reset:hover {
  background: #f5faf6;
  border-color: #c8e6c9;
  color: #1e7e34;
}

.news-pagination {
  margin-top: 24px;
}

.news-pagination .pagination {
  margin-bottom: 0;
}

.news-pagination .page-link {
  color: #28a745;
  border-color: #dcefe0;
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
}

.news-pagination .page-item.active .page-link {
  background-color: #28a745;
  border-color: #28a745;
}

.news-pagination .page-link:hover {
  color: #1e7e34;
  background-color: #f5faf6;
  border-color: #c8e6c9;
}

.news-pagination .page-item.disabled .page-link {
  color: #aaa;
}

/* 消息內文頁 */
.news-detail-header {
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
}

.news-detail-title {
  margin: 10px 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #222;
  line-height: 1.5;
  word-break: break-word;
}

.news-detail-body {
  font-size: 1rem;
  line-height: 1.75;
  color: #333;
}

.news-detail-body img {
  max-width: 100% !important;
  height: auto !important;
}

.news-detail-body table {
  max-width: 100%;
}

.news-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  padding: 0.45rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #444;
  background: #fff;
  border: 1px solid #dcefe0;
  border-radius: 6px;
  text-decoration: none !important;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.news-back:hover {
  color: #1e7e34;
  background: #f5faf6;
  border-color: #c8e6c9;
}

@media (max-width: 768px) {
  .news-search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .news-search-form select,
  .news-search-form input[type="text"],
  .news-search-form .btn-search,
  .news-search-form .btn-reset {
    width: 100%;
  }
}
