/* News page styles */
.news-section {
  padding-top: 48px;
}

.news-toolbar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
}

.news-search {
  position: relative;
  max-width: 420px;
}

.news-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.news-search input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px 12px 44px;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.news-search input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(92, 225, 230, 0.12);
}

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

.news-filters button {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 8px 18px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.news-filters button:hover,
.news-filters button.active {
  border-color: var(--accent-cyan);
  color: var(--text);
  background: rgba(92, 225, 230, 0.08);
}

.news-results {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 0 24px;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-color: rgba(92, 225, 230, 0.25);
}

.news-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bg-code);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.news-thumb img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.news-card .news-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 0;
  margin-bottom: 12px;
}

.news-category {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 50px;
  border: 1px solid;
}

.news-category.release {
  color: #43b14b;
  border-color: rgba(67, 177, 75, 0.35);
  background: rgba(67, 177, 75, 0.08);
}

.news-category.update {
  color: #5ce1e6;
  border-color: rgba(92, 225, 230, 0.35);
  background: rgba(92, 225, 230, 0.08);
}

.news-category.launch {
  color: #a78bfa;
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.08);
}

.news-category.industry {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}

.news-card time {
  color: var(--text-light);
  font-size: 0.8rem;
}

.news-title {
  padding: 0 20px;
  font-size: 1.1rem;
  line-height: 1.35;
  margin-bottom: 10px;
}

.news-title a {
  color: var(--text);
  text-decoration: none;
}

.news-title a:hover {
  color: var(--accent-cyan);
}

.news-summary {
  padding: 0 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 16px;
}

.news-card .link-arrow {
  margin-left: 20px;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination-btn:hover:not(:disabled),
.pagination-btn.active {
  border-color: var(--accent-cyan);
  color: var(--text);
  background: rgba(92, 225, 230, 0.08);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.article-modal {
  position: fixed;
  inset: 0;
  width: min(760px, 92vw);
  max-height: 90vh;
  margin: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.article-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.article-modal-content {
  padding: 32px;
  max-height: 90vh;
  overflow-y: auto;
}

.article-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--text-light);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.article-modal-close:hover {
  color: var(--text);
}

.article-modal .news-category {
  margin-bottom: 12px;
}

.article-modal time {
  display: block;
  color: var(--text-light);
  margin-bottom: 16px;
}

.article-modal h2 {
  font-size: 1.6rem;
  line-height: 1.25;
  margin-bottom: 20px;
}

.article-modal-image {
  width: 100%;
  max-width: 160px;
  height: auto;
  margin-bottom: 24px;
  border-radius: var(--radius-sm);
}

.article-modal-body {
  color: var(--text-muted);
  line-height: 1.7;
}

.article-modal-body h3 {
  color: var(--text);
  font-size: 1.15rem;
  margin: 24px 0 12px;
}

.article-modal-body p {
  margin-bottom: 14px;
}

.article-modal-body ul {
  margin: 0 0 16px 20px;
}

.article-modal-body li {
  margin-bottom: 8px;
}

.article-modal-body a {
  color: var(--accent-cyan);
}

.article-modal-body code {
  background: var(--bg-code);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.9em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .article-modal-content {
    padding: 24px;
  }
}
