@import url('shared.css');

/* =====================
   MAIN CONTENT
   ===================== */

.content {
  margin-top: 150px;
  margin-left: 10%; margin-right: 10%;
  color: var(--text-body);
  margin-bottom: 60px;
  transition: color 0.3s ease;
}

.pagetitle {
  font-size: 70px;
  text-align: center;
  margin: 0 0 40px;
  color: var(--text-primary);
  font-weight: 600;
  transition: color 0.3s ease;
}

/* =====================
   NEWS CARDS
   ===================== */

.news-container { display: flex; flex-direction: column; gap: 30px; }

.news-card {
  background-color: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.news-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 20px;
}

.news-title { font-size: 26px; font-weight: 700; margin: 0; color: var(--text-primary); }

.news-time {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
  padding-top: 5px;
}

.news-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 16px;
}

.news-desc {
  font-size: 17px;
  line-height: 1.7;
  color: var(--card-desc);
  margin: 0;
  white-space: pre-wrap;
}

.no-articles-msg {
  text-align: center;
  font-size: 20px;
  color: var(--text-secondary);
  margin: 40px 0;
}

/* =====================
   SEARCH BAR
   ===================== */

.search-wrap {
  display: flex;
  align-items: center;
  background-color: var(--card-bg);
  border: 2px solid var(--input-border);
  border-radius: 50px;
  padding: 10px 18px;
  margin-bottom: 30px;
  gap: 10px;
  transition: border-color 0.2s ease, background-color 0.3s ease;
}

.search-wrap:focus-within { border-color: var(--accent); }

.search-icon { font-size: 18px; flex-shrink: 0; }

.search-input {
  flex: 1;
  border: none; outline: none;
  font-size: 17px;
  font-family: var(--font-body);
  background: transparent;
  color: var(--text-primary);
}

.search-input::placeholder { color: var(--text-secondary); }

.search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  background: none; border: none; cursor: pointer;
  font-size: 16px;
  color: var(--text-secondary);
  padding: 0; width: 20px; height: 20px; flex-shrink: 0;
  transition: color 0.2s ease;
}

.search-clear:hover { color: var(--text-primary); }

/* =====================
   RESPONSIVE
   ===================== */

@media (max-width: 768px) {
  .content { margin-top: 120px; margin-left: 5%; margin-right: 5%; }
  .pagetitle { font-size: 40px; }
  .news-title { font-size: 18px; }
  .news-card-header { flex-direction: column; }
  .news-desc { font-size: 15px; }
  .news-card { padding: 20px; }
}
