/* ===== NEWS PAGE SHARED ===== */
.news-hero {
  position: relative;
  height: 100px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.news-hero-bg { display: none; }
.news-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0;
  text-align: center;
}
.news-hero h1 { font-size: 26px; font-weight: 600; color: #fff; margin: 0; }
.news-hero p { display: none; }

/* ===== FILTER BAR ===== */
.news-filter-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 60px;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.news-filter-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.news-filter-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: #f8f9fb;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-th);
  cursor: pointer;
  color: var(--gray);
  transition: all 0.15s;
  white-space: nowrap;
}
.news-filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.news-filter-btn:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* ===== LISTING PAGE ===== */
.news-main { padding: 44px 0 70px; }

/* Featured (pinned) card */
.news-featured {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  margin-bottom: 44px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}
.news-featured:hover {
  box-shadow: 0 12px 40px rgba(26,58,107,0.15);
  transform: translateY(-2px);
}
.news-featured-img {
  position: relative;
  min-height: 340px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  overflow: hidden;
}
.news-featured-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
  transition: transform 0.4s;
}
.news-featured:hover .news-featured-img img { transform: scale(1.04); }
.news-featured-img-ph {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  color: rgba(255,255,255,0.3);
  position: absolute; inset: 0;
}
.news-featured-body {
  padding: 36px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.news-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  width: fit-content;
}
.news-pinned-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  margin-left: 8px;
}
.news-featured-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.35;
  margin-bottom: 14px;
}
.news-featured-summary {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 22px;
  flex: 1;
}
.news-featured-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--gray);
}
.news-featured-meta i { color: var(--primary); }
.news-read-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-th);
  padding: 11px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
  margin-top: 18px;
  align-self: flex-start;
}
.news-read-more:hover { background: var(--primary-dark); color: #fff; }

/* Section heading */
.news-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}
.news-section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.news-section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-left: 8px;
}

/* News grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.news-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(26,58,107,0.13);
  transform: translateY(-3px);
}
.news-card-img {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  overflow: hidden;
  flex-shrink: 0;
}
.news-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-img-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: rgba(255,255,255,0.25);
}
.news-card-body { padding: 18px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.news-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.news-card-date { font-size: 12px; color: var(--gray); display: flex; align-items: center; gap: 4px; }
.news-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-summary {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--light-gray);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  gap: 5px;
}

/* Empty */
.news-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray);
  grid-column: 1/-1;
}
.news-empty i { font-size: 56px; color: var(--border); display: block; margin-bottom: 16px; }

/* ===== DETAIL PAGE ===== */
.news-detail-main { padding: 0 0 70px; }

.news-detail-cover {
  position: relative;
  height: 420px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  overflow: hidden;
}
.news-detail-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.news-detail-cover-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 100px; color: rgba(255,255,255,0.15);
}
.news-detail-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 60%);
}
.news-detail-cover-meta {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 0 28px;
}
.news-detail-cover-meta .container { max-width: 860px; }

.news-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-th);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  margin-bottom: 16px;
}
.news-detail-back:hover { background: rgba(255,255,255,0.25); color: #fff; }

.news-detail-cover-title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-top: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.news-detail-cover-info {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.news-detail-cover-info span { color: rgba(255,255,255,0.8); font-size: 14px; display: flex; align-items: center; gap: 5px; }
.news-detail-cover-info i { font-size: 12px; }

/* Article body */
.news-article-wrap { max-width: 860px; margin: 0 auto; padding: 40px 0; }

.news-article-body {
  font-size: 17px;
  line-height: 1.9;
  color: var(--dark);
  white-space: pre-wrap;
  margin-bottom: 40px;
}

/* Gallery section */
.news-gallery-section { margin-top: 8px; }
.news-gallery-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}
.news-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.news-gallery-item {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.news-gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.25s;
  display: block;
}
.news-gallery-item:hover img { transform: scale(1.07); }
.news-gallery-item-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
  color: #fff; font-size: 22px;
}
.news-gallery-item:hover .news-gallery-item-overlay { opacity: 1; }

/* Related news */
.news-related { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--border); }
.news-related-title {
  font-size: 18px; font-weight: 800; color: var(--primary);
  margin-bottom: 20px;
}

/* ===== LIGHTBOX (shared with activities) ===== */
.lb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.lb-overlay.open { display: flex; }
.lb-box-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-box-img img {
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  display: block;
  border-radius: 10px;
}
.lb-close-btn {
  position: fixed;
  top: 16px; right: 20px;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  z-index: 10000;
}
.lb-close-btn:hover { background: rgba(255,255,255,0.3); }
.lb-nav-btn {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  z-index: 10000;
}
.lb-nav-btn:hover { background: rgba(255,255,255,0.3); }
.lb-nav-btn.prev { left: 16px; }
.lb-nav-btn.next { right: 16px; }
.lb-counter {
  position: fixed;
  bottom: 20px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  z-index: 10000;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
  .news-featured { grid-template-columns: 1fr; }
  .news-featured-img { min-height: 240px; }
  .news-featured-body { padding: 24px 24px 28px; }
  .news-featured-title { font-size: 22px; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .news-hero h1 { font-size: 24px; }
  .news-grid { grid-template-columns: 1fr; gap: 16px; }
  .news-detail-cover { height: 280px; }
  .news-detail-cover-title { font-size: 20px; }
  .news-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .news-article-body { font-size: 15px; }
}
