/* News page — home design system. Classes used by js/news.js preserved. */

.news-page {
  display: flex;
  flex-direction: column;
  min-height: 60vh;
  background: var(--ro-paper, #f6f8fe);
}

.news-hero .news-stats-strip {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 36px;
}

.news-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 180px;
  padding: 16px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.12);
  transition: transform 0.32s var(--ro-ease, cubic-bezier(0.16, 1, 0.3, 1)), background 0.32s ease;
}
.news-stat-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.11);
}
.news-stat-card.blue .nsc-icon { color: #8db9ff; }

.nsc-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #8db9ff;
}
.nsc-content { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.nsc-value {
  font-family: var(--ro-display, "Plus Jakarta Sans", sans-serif);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}
.nsc-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(222, 235, 255, 0.55);
}

.news-filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: min(1200px, calc(100% - 40px));
  margin: -28px auto 0;
  padding: 0 0 28px;
  position: relative;
  z-index: 2;
}

.filter-tag {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 100px;
  border: 1px solid var(--ro-line, rgba(10, 34, 83, 0.14));
  background: #fff;
  color: var(--ro-copy, #4d5b73);
  font-family: var(--ro-ui, "Plus Jakarta Sans", sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(12, 42, 101, 0.05);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.filter-tag:hover {
  transform: translateY(-2px);
  border-color: rgba(18, 97, 255, 0.28);
  color: var(--ro-ink, #0a1531);
}
.filter-tag.active {
  color: #fff;
  border-color: rgba(163, 195, 255, 0.42);
  background: linear-gradient(145deg, #2974ff, #0b4ee7 65%, #073bbf);
  box-shadow: 0 12px 28px rgba(0, 55, 190, 0.28);
}

.news-content-section {
  position: relative;
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 96px;
  z-index: 2;
}

.news-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 28px;
  border-radius: 22px;
  border: 1px solid var(--ro-line, rgba(10, 34, 83, 0.12));
  background: #fff;
  box-shadow: 0 18px 48px rgba(12, 42, 101, 0.06), inset 0 1px 0 #fff;
  transition: transform 0.32s var(--ro-ease, cubic-bezier(0.16, 1, 0.3, 1)), box-shadow 0.32s ease, border-color 0.32s ease;
  overflow: hidden;
}
.news-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--ro-blue, #1261ff), #72a8ff);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.news-card:hover {
  transform: translateY(-3px);
  border-color: rgba(18, 97, 255, 0.22);
  box-shadow: 0 24px 56px rgba(12, 42, 101, 0.1);
}
.news-card:hover::before { opacity: 1; }
.news-card-featured {
  border-color: rgba(18, 97, 255, 0.22);
  box-shadow: 0 22px 56px rgba(12, 42, 101, 0.1), 0 0 0 1px rgba(18, 97, 255, 0.08);
}
.news-card-featured::before { opacity: 1; }

.news-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}
.news-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.news-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(18, 97, 255, 0.08);
  border: 1px solid rgba(18, 97, 255, 0.16);
  color: var(--ro-blue, #1261ff);
}
.news-badge.new {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.28);
  color: #059669;
}
.news-badge.update {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.22);
  color: #2563eb;
}
.news-badge.announcement {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.28);
  color: #d97706;
}
.news-badge.maintenance {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.22);
  color: #dc2626;
}
.news-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ro-copy, #4d5b73);
  white-space: nowrap;
}

.news-title {
  margin: 0;
  font-family: var(--ro-display, "Plus Jakarta Sans", sans-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--ro-ink, #0a1531);
}
.news-content {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ro-copy, #4d5b73);
  white-space: pre-wrap;
}

.news-card-image {
  margin-top: 4px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--ro-line, rgba(10, 34, 83, 0.1));
}
.news-card-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  max-height: 360px;
}

.news-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--ro-line, rgba(10, 34, 83, 0.1));
}
.news-actions { display: flex; gap: 10px; align-items: center; }
.news-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 100px;
  border: 1px solid var(--ro-line, rgba(10, 34, 83, 0.14));
  background: var(--ro-paper, #f6f8fe);
  color: var(--ro-copy, #4d5b73);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.news-like-btn svg { width: 16px; height: 16px; }
.news-like-btn:hover {
  border-color: rgba(239, 68, 68, 0.3);
  color: #dc2626;
  transform: translateY(-1px);
}
.news-like-btn.liked {
  color: #dc2626;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}
.news-read-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: #059669;
}

.empty-state {
  text-align: center;
  padding: 64px 28px;
  border-radius: 24px;
  border: 1px solid var(--ro-line, rgba(10, 34, 83, 0.12));
  background: #fff;
  box-shadow: 0 18px 48px rgba(12, 42, 101, 0.05);
}
.empty-state h3 {
  margin: 0 0 8px;
  font-family: var(--ro-display, "Plus Jakarta Sans", sans-serif);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ro-ink, #0a1531);
}
.empty-state p {
  margin: 0;
  color: var(--ro-copy, #4d5b73);
  font-size: 0.95rem;
}

/* Modal (same pattern as reviews) */
.custom-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: rgba(7, 17, 42, 0.7);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.custom-modal-overlay.active { display: flex; }
.custom-modal {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, #fff, #f3f7ff);
  box-shadow: 0 28px 64px rgba(0, 20, 80, 0.25);
}
.custom-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.custom-modal-header h3 {
  margin: 0;
  font-family: var(--ro-display, "Plus Jakarta Sans", sans-serif);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ro-ink, #0a1531);
}
.custom-modal-close {
  background: none;
  border: none;
  color: var(--ro-copy, #4d5b73);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.custom-modal-close:hover { color: var(--ro-ink, #0a1531); }
.custom-modal-body {
  font-size: 0.92rem;
  color: var(--ro-copy, #4d5b73);
  line-height: 1.6;
}
.custom-modal-body p { margin: 0; }
.custom-modal-footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}
.custom-modal-btn {
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  border: none;
  color: #fff;
  font-weight: 700;
  font-family: var(--ro-ui, "Plus Jakarta Sans", sans-serif);
  background: linear-gradient(145deg, #2974ff, #0b4ee7);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 55, 190, 0.25);
}

@media (max-width: 640px) {
  .news-stats-strip { flex-direction: column; align-items: stretch; }
  .news-stat-card { width: 100%; }
  .news-content-section,
  .news-filters-bar { width: min(100% - 28px, 680px); }
  .news-card { padding: 22px 18px; }
  .news-filters-bar { margin-top: -12px; }
}
