/* News Layout */
.news-layout {
  display: grid;
  grid-template-columns: minmax(470px, 1fr) minmax(450px, 1.15fr);
  gap: 20px;
  max-width: 1480px;
  margin: 0 auto;
  padding: 22px 24px 32px;
  align-items: start;
}

.news-browser {
  position: sticky;
  top: 18px;
}

.news-search {
  margin-bottom: 14px;
  padding: 18px;
}

.news-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 250px);
  overflow: auto;
  padding-right: 4px;
}

/* News Card */
.news-card {
  width: 100%;
  padding: 20px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.news-card:hover, .news-card.active {
  border-color: rgba(0, 111, 201, 0.4);
  background: #f5faff;
  box-shadow: 0 8px 24px rgba(18, 79, 128, 0.08);
}

.news-card .card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.news-card strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 8px;
}

.news-card p {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .card-date {
  font-size: 12px;
  color: var(--muted);
}

/* Side Panel Side */
.news-panel-side {
  position: sticky;
  top: 18px;
  min-height: calc(100vh - 170px);
  padding: 27px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* Detail Viewer */
.news-detail-viewer {
  display: flex;
  flex-direction: column;
}

.news-detail-viewer .back-btn {
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}

.detail-cover {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 18px;
}

.detail-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.news-detail-viewer h2 {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -.03em;
  color: var(--ink);
}

.detail-date {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 20px;
}

.news-content-body {
  font-size: 15px;
  line-height: 1.65;
  color: #2c3e50;
  white-space: pre-wrap;
}

/* Rich Text elements inside news body */
.news-content-body p {
  margin: 0 0 14px;
}

.news-content-body h3 {
  font-size: 18px;
  margin: 24px 0 10px;
  letter-spacing: -.01em;
  color: var(--ink);
}

.news-content-body ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.news-content-body li {
  margin-bottom: 6px;
}

.news-content-body blockquote {
  margin: 18px 0;
  padding: 12px 18px;
  background: var(--soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #555;
}

@media (max-width: 1040px) {
  .news-layout {
    display: block;
    padding: 16px;
  }
  
  .news-grid {
    max-height: 50vh;
    margin-bottom: 16px;
  }
  
  .news-panel-side {
    position: static;
    min-height: auto;
  }
}

/* Importance Badges styling in news section */
.category-badge.importance-urgent-badge {
  background: #fff0f6;
  color: #eb2f96;
  border: 1px solid #ffadd2;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.category-badge.importance-important-badge {
  background: #fffbe6;
  color: #d46b08;
  border: 1px solid #ffe58f;
  font-weight: 700;
}
.category-badge.importance-normal-badge {
  background: #e6f7ff;
  color: #096dd9;
  border: 1px solid #91d5ff;
}

/* Pulse dot for card badges */
.category-badge .pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #ff4d4f;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.7);
  animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 77, 79, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(255, 77, 79, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 77, 79, 0);
  }
}

/* News Publish Modal */
.news-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(31, 51, 71, 0.45);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.news-modal-card {
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 20px 50px rgba(18, 38, 58, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  animation: modal-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-slide-in {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.news-modal-header {
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line, #e3edf3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.news-modal-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink, #1f3347);
  letter-spacing: -0.02em;
}
.news-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--muted, #647688);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}
.news-modal-close:hover {
  color: #ff4d4f;
}
.news-modal-form {
  padding: 24px 28px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.form-group span {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink, #1f3347);
}
.form-group .required {
  color: #ff4d4f;
}
.form-group input[type="text"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line, #e3edf3);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink, #1f3347);
  background: #f9fbfd;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent, #4a8fc7);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(74, 143, 199, 0.15);
}
.form-row {
  display: flex;
  gap: 16px;
}
.col-6 {
  flex: 1;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
}
.btn-secondary {
  background: #f1f5f9;
  color: var(--muted, #647688);
  border: 1px solid #e2e8f0;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}
.btn-secondary:hover {
  background: #e2e8f0;
  color: var(--ink, #1f3347);
}
.news-modal-form .btn-primary {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}


