/* ===== CSS Variables ===== */
:root {
  --primary-color: #d7dbe0;
  --accent-color: #007aff;
  --text-light: #fff;
  --text-dark: #333;
  --bg-light: #f2f2f7;
  --border-light: #c8c7cc;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* ===== Base ===== */
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg-light);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
}

/* ===== Navigation ===== */
nav {
  background: linear-gradient(to bottom, #fefefe 0%, #d7dbe0 100%);
  border-bottom: 1px solid var(--border-light);
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.2rem;
}

nav .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav .logo img {
  height: 35px;
}

nav .logo h1 {
  font-size: 1.2rem;
  color: #111;
  margin: 0;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

nav ul li a {
  text-decoration: none;
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.95rem;
}

nav ul li a:hover {
  text-decoration: underline;
}

#menu_icon {
  display: none;
  font-size: 1.4rem;
  cursor: pointer;
}

/* ===== Hero Section ===== */
.hero {
  text-align: center;
  padding: 3rem 1rem;
}

.hero h2 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  color: var(--accent-color);
}

.hero p {
  font-size: 1rem;
  color: #555;
}

/* ===== Sort and Search Bar ===== */
.news-sort-selector {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem auto;
  flex-wrap: wrap;
}

.news-sort-selector select,
.news-sort-selector input {
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.9rem;
  outline: none;
}

/* ===== Updates Container ===== */
.news-container {
  max-width: 850px;
  margin: 0 auto 3rem;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 1.8rem;
}

/* ===== Individual Update ===== */
.update {
  border-bottom: 1px solid #e5e5e5;
  padding: 1.2rem 0;
}

.update:last-child {
  border-bottom: none;
}

.update h3 {
  margin: 0 0 0.3rem;
  color: var(--accent-color);
  font-size: 1.1rem;
  font-weight: 600;
}

.update small {
  color: #777;
  font-size: 0.85rem;
}

.update p {
  margin: 0.6rem 0 0;
  color: #444;
  line-height: 1.6;
}

/* ===== Badge ===== */
.update-badge {
  display: inline-block;
  background: linear-gradient(to bottom, #fefefe 0%, #d7dbe0 100%);
  border: 1px solid #c7c7cc;
  border-radius: 10px;
  padding: 0.25rem 0.6rem;
  color: var(--accent-color);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

/* ===== Loading and Empty ===== */
#loadingMsg {
  text-align: center;
  padding: 2rem;
  color: #777;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 60px;
    right: 10px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1rem;
  }

  nav ul.active {
    display: flex;
  }

  #menu_icon {
    display: block;
  }

  .hero h2 {
    font-size: 1.6rem;
  }

  .news-container {
    margin: 1rem;
    padding: 1.2rem;
  }
}
