/* News Page Styles */

/* Hidden i18n data container */
.news-i18n-data {
  display: none;
}

/* Trending and search header row */
.news-header-row {
  display: flex;
  width: 100%;
  align-items: center;
  margin-top: 32px;
  margin-bottom: 0;
  gap: 24px;
  position: relative;
  justify-content: space-between;
}

.news-trending-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.news-trending-title {
  font-size: 1.1em;
  color: #346eeb;
  font-weight: 700;
}

/* Search bar styles */
.news-search-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: 0;
  margin-right: 0;
}

#newsSearchInput {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 18px;
  border-radius: 24px 0 0 24px;
  border: 1.5px solid #346eeb;
  border-right: none;
  font-size: 1.13em;
  box-shadow: 0 2px 12px rgba(52, 110, 235, 0.09);
  transition: border-color 0.2s;
  outline: none;
  box-sizing: border-box;
  vertical-align: middle;
  width: 100%;
  max-width: 100%;
}

#newsSearchInput:focus {
  border-color: #e94e77;
}

#newsSearchBtn {
  height: 44px;
  padding: 0 20px;
  border-radius: 0 24px 24px 0;
  border: 1.5px solid #346eeb;
  border-left: none;
  background: #346eeb;
  color: #fff;
  font-size: 1.13em;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
  cursor: pointer;
  box-sizing: border-box;
  vertical-align: middle;
}

#newsSearchBtn:hover {
  background: #2855c1;
}

@media (max-width: 600px) {
  .news-search-bar {
    max-width: 100%;
  }
  #newsSearchInput {
    font-size: 1em;
  }
}

/* Trending sidebar styles */
#trendingSidebar {
  margin-bottom: 1.5rem;
}

#trending {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(74, 144, 226, 0.05);
  padding: 18px 12px;
  margin-top: 0;
}

.trending-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trending-card {
  background: #f8fbff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(52, 110, 235, 0.07);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: box-shadow 0.18s, transform 0.18s;
  cursor: pointer;
}

.trending-card:hover {
  box-shadow: 0 6px 18px rgba(52, 110, 235, 0.18);
  transform: translateY(-2px) scale(1.03);
  background: #e3eafc;
}

.trending-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e94e77 60%, #346eeb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2em;
  box-shadow: 0 2px 8px rgba(52, 110, 235, 0.09);
  flex-shrink: 0;
}

.trending-title {
  font-weight: 700;
  font-size: 1.08em;
  color: #346eeb;
  margin-bottom: 2px;
  text-decoration: none;
  transition: color 0.2s;
  flex: 1;
  line-height: 1.2;
}

.trending-card:hover .trending-title {
  color: #e94e77;
}

.trending-meta {
  font-size: 0.97em;
  color: #b0b8c9;
  margin-left: 4px;
}

/* News section styles */
#newsSection {
  padding: 8px 0 8px 0;
  border-bottom: 1px solid #e3eafc;
  background: linear-gradient(90deg, #f8fbff 60%, #e3eafc 100%);
}

/* Category and language selector styles */
.news-filters {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.news-filter-label {
  font-weight: 500;
  color: #346eeb;
}

.news-filter-select {
  min-width: 120px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #e3eafc;
  font-size: 1em;
  background: #fff;
  cursor: pointer;
}

#categorySelect {
  min-width: 140px;
}

.news-filter-label.ml-18 {
  margin-left: 18px;
}

/* News headlines container */
#newsHeadlines {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 32px;
  min-height: 180px;
  margin-top: 16px;
}

.news-loading {
  color: #b0b8c9;
  font-size: 1.15rem;
  text-align: center;
  padding: 32px 0;
  grid-column: 1 / -1;
}

/* News card styles */
.news-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(52, 110, 235, 0.1);
  padding: 22px 22px 16px 22px;
  transition: box-shadow 0.18s, transform 0.18s;
  margin-bottom: 0;
  border: none;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.news-card:hover {
  box-shadow: 0 10px 36px rgba(52, 110, 235, 0.22);
  transform: translateY(-3px) scale(1.025);
}

.news-card img {
  border-radius: 12px;
  margin: 12px 0;
  max-height: 160px;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(52, 110, 235, 0.09);
  width: 100%;
  background: #f8fbff;
}

.news-card .news-date {
  font-size: 0.97em;
  color: #eb3734;
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.news-card .news-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: #346eeb;
  margin-bottom: 8px;
  line-height: 1.25;
  text-decoration: none;
  transition: color 0.2s;
  display: block;
}

.news-card .news-title:hover {
  color: #eb3734;
}

.news-card .news-meta {
  font-size: 0.98rem;
  color: #b0b8c9;
  margin-bottom: 6px;
}

.news-card .news-desc {
  font-size: 1.05rem;
  color: #222;
  margin-bottom: 10px;
  flex: 1;
  display: block;
  overflow: visible;
  text-overflow: unset;
  max-height: none;
}

.news-card .news-mlnlp-meta {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #666;
}

.news-card .news-mlnlp-meta span {
  font-weight: 600;
}

.news-mlnlp-category {
  color: #346eeb;
}

.news-mlnlp-sentiment {
  color: #eb3734;
}

.news-mlnlp-entities {
  color: #e94e77;
}

.news-mlnlp-language {
  color: #b0b8c9;
}

.news-card .news-link {
  color: #346eeb;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.2s;
  font-size: 1.01rem;
}

.news-card .news-link:hover {
  color: #eb3734;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .news-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .news-search-bar {
    width: 100%;
  }
  
  #newsHeadlines {
    grid-template-columns: 1fr;
  }
}
