/* =========================
   IndoBridge - News page
========================= */

.news-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.news-summary {
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
}

.news-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid #dbe4ee;
  background: white;
  color: #475569;
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s;
}

.filter-btn:hover {
  background: #ecfeff;
  color: #0f766e;
  transform: translateY(-1px);
}

.filter-btn.active {
  background: #0f766e;
  border-color: #0f766e;
  color: white;
}

.news-list {
  display: grid;
  gap: 18px;
}

.news-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.04);
}

.news-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
}

.news-card h3 {
  font-size: 22px;
  margin-bottom: 10px;
}

.news-card p {
  color: #64748b;
  margin-bottom: 14px;
}

.news-card a {
  color: #0f766e;
  font-weight: 800;
}

.news-title-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.news-title-link:hover h3 {
  text-decoration: underline;
}

.news-source-link {
  display: inline-block;
  margin-top: 14px;
}

.news-title-link {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.news-title-link h3 {
  margin-bottom: 10px;
}

.news-title-link:hover h3 {
  text-decoration: underline;
}

.news-source-link {
  display: inline-block;
  margin-top: 14px;
}
/* Article Modal */
.article-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.article-modal.active {
  display: block;
}

.article-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
}

.article-modal-content {
  position: relative;
  width: min(960px, calc(100% - 32px));
  max-height: calc(100vh - 56px);
  overflow-y: auto;
  margin: 28px auto;
  padding: 0;
  background: #ffffff;
  border-radius: 26px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.35);
}

.article-modal-content::before {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(90deg, #0f172a, #2563eb, #38bdf8);
}

.modal-close {
  position: sticky;
  top: 18px;
  float: right;
  margin: 18px 22px 0 0;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.modal-close:hover {
  background: #e2e8f0;
}

.modal-meta {
  padding: 42px 42px 0;
  color: #2563eb;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#modal-title {
  padding: 0 42px;
  margin: 12px 52px 16px 0;
  font-size: 34px;
  line-height: 1.32;
  color: #0f172a;
}

.modal-summary {
  margin: 0 42px 34px;
  padding: 18px 20px;
  border-left: 5px solid #2563eb;
  border-radius: 14px;
  background: #eff6ff;
  color: #334155;
  line-height: 1.75;
}

.modal-section {
  margin: 0 42px 30px;
}

.modal-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 19px;
  color: #0f172a;
}

.modal-section h3::before {
  content: "";
  width: 8px;
  height: 22px;
  border-radius: 999px;
  background: #2563eb;
}

.modal-box {
  padding: 24px 26px;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #f8fafc;
  color: #334155;
  line-height: 1.9;
  white-space: pre-line;
}

#modal-brief {
  background: #fff7ed;
  border-color: #fed7aa;
}

.modal-actions {
  margin: 36px 42px 42px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

.modal-actions a {
  display: inline-flex;
  align-items: center;
  padding: 13px 20px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.modal-actions a:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .article-modal-content {
    width: calc(100% - 18px);
    max-height: calc(100vh - 18px);
    margin: 9px auto;
    border-radius: 22px;
  }

  .modal-meta {
    padding: 34px 22px 0;
  }

  #modal-title {
    padding: 0 22px;
    margin-right: 44px;
    font-size: 25px;
  }

  .modal-summary,
  .modal-section,
  .modal-actions {
    margin-left: 22px;
    margin-right: 22px;
  }

  .modal-box {
    padding: 20px;
  }
}