html {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #f0f0f0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;

  color: #2b2b2b;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

a {
  color: #003388;
}

main {
  flex: 1;
  
  max-width: 1200px;
  width: calc(100% - 50px);
  margin: 0 auto;
  padding: 20px;
}

.govnotice img {
  height: 10px;
  width: auto;
}

.govnotice {
  font-size: 12px;
  background-color: #f2f2f2;
  padding: 3px;
}

.bubbled {
  background: rgba(255, 255, 255, 1);
  border-radius: 14px;
  padding: 10px;
  outline: 1px solid gray;
}

.th .bubbled {
  display: flex;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}

.th a {
  text-decoration: none;
  margin: 0;
}

header {
  background-color: #d1d1d1;
  padding: 3px;
  outline: 7px solid red;
  
  display: flex;
  justify-content: space-between;
  width: 100%;
  box-sizing: border-box;
}

.news-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.news-content {
  display: flex;
  flex-direction: column;
}

.news-title {
  font-weight: bold;
  text-decoration: none;
  margin-bottom: 6px;
}

.news-description {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

.news-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.news-column h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Mobile: stack latest and politics */
@media (max-width: 700px) {
  .news-row {
    grid-template-columns: 1fr;
  }
}

main {
  flex: 1;
  max-width: 1200px;
  width: calc(100% - 50px);
  margin: 0 auto;
  padding: 20px;

  display: flex;
  flex-direction: column;
  gap: 14px; /* replaces the <br> tags */
}

.bubbled {
  background: rgba(255, 255, 255, 1);
  border-radius: 14px;
  padding: 10px;
  outline: 1px solid gray;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 0;                    /* remove the flex gap */
}

.news-card + .news-card {
  margin-top: 24px;          /* only between real cards */
}

/* no extra space under the last card in a bubble */
.news-list > :last-child,
.news-list > :last-child .news-content,
.news-list > :last-child .news-title,
.news-list > :last-child .news-description {
  margin-bottom: 0;
}

/* Kill any trailing space inside the last card of a bubble */
.news-list > *:last-child,
.news-list > *:last-child *:last-child {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Make sure images don't add line-height whitespace */
.news-image {
  display: block;
}

.news-list > li {
  list-style: none;
  margin: 0;
  padding: 0;
}

main {
  flex: 1;
  max-width: 1200px;
  width: calc(100% - 50px);
  margin: 0 auto;
  padding: 20px;

  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: start;
}

.content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.sidebar-title {
  margin: 0 0 8px;
  font-size: 1rem;
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-list button {
  all: unset;
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #003388;
  text-transform: capitalize;
}

.category-list button:hover {
  background: #eef2f8;
}

.category-list button.active {
  background: #003388;
  color: #fff;
}

@media (max-width: 700px) {
  main {
    grid-template-columns: 1fr;
  }

  .news-row {
    grid-template-columns: 1fr;
  }
}

/* Star button on each card */
.fav-star {
  all: unset;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  margin-left: auto;
  color: #ccc;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}

.fav-star:hover {
  color: #d4a017;
  background: #fff8e1;
}

.fav-star.active {
  color: #d4a017;
}

/* Golden favorites category button */
.category-list .favorites-btn {
  color: #b8860b;
  font-weight: bold;
}

.category-list .favorites-btn:hover {
  background: #fff8e1;
}

.category-list .favorites-btn.active {
  background: #d4a017;
  color: #fff;
}

.news-empty {
  margin: 0;
  color: #888;
  font-style: italic;
}