/* === Tagline (subheader under logo) === */
.tagline {
  font-style: italic;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* === Navbar links === */
.nav-links a {
  margin-left: 1.5rem;
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #2e86de;
}

/* === Main Homepage Layout === */
main.home-layout {
  display: flex;
  flex-wrap: wrap;
  max-width: 80%;
  margin: 2rem auto;
  padding: 0 1rem;
}

.content {
  flex: 2;
  min-width: 60%;
}

.sidebar {
  flex: 1;
  min-width: 250px;
  max-width: 330px;
  margin-left: 2rem;
  background: #ffffff;
  padding: 1rem;
  border: 1px solid #ddd;
}

/* === Article Preview Buttons === */
.article-button {
  display: block;
  background: white;
  border: 2px solid #ddd;
  border-left: 6px solid #444;
  padding: 1.2rem 1.5rem;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  border-radius: 7px;
}

.article-button:hover {
  border: 2px solid #2e86de;
  border-left: 8px solid #18426d;
}

.article-content-flex {
  display: flex;
  align-items: stretch;
  /* Both children same height */
  text-decoration: none;
}

.image-col {
  height: auto;
  flex: 0 0 auto;
  overflow: hidden;
  display: flex;
}

.image-col img {
  max-width: 100%;
  max-height: 130px;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 5px;
}

.article-preview-text {
  padding: 0rem 0rem 0rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 130px; 
}

.article-preview-text h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.7rem;
  line-height: 1.15;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: normal;
  overflow: hidden;
}

.article-preview-text p {
  margin: 0 0 0.7rem 0;
  color: #333;
  font-size: 1rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: normal;
}

.category,
.date {
  font-size: 0.93em;
  color: #666;
  font-weight: 500;
}

.date {
  text-align: right;
  margin-right: 0;
}

.category {
  margin-right: 1.1em;
}

.meta-row {
  margin-top: auto;  /* This will push it to the bottom */
  display: flex;
  gap: 0.5em;
  align-items: center;
    justify-content: space-between;
}

/* === Footer === */
footer {
  background: #0e0e0e;
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 3rem;
}


.category-table {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5em;
}

.category-btn {
  padding: 0.65em 1.2em;
  border: none;
  border-radius: 0.8em;
  background: #232a3b;
  color: #fff;
  font-weight: 600;
  font-size: 0.8em;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s;
  box-shadow: 0 1px 8px #0002;
}

.category-btn.active,
.category-btn:hover {
  background: #3a476a;
  color: #fff;
  box-shadow: 0 2px 12px #232a3b66;
}


.toggle-categories-btn {
  background: #232a3b;
  color: #fff;
  border: none;
  border-radius: 0.8em;
  padding: 0.7em 1.4em;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 8px #0001;
  transition: background 0.18s, box-shadow 0.18s;
}
.toggle-categories-btn:hover, .toggle-categories-btn:focus {
  background: #3a476a;
  box-shadow: 0 2px 12px #232a3b33;
}



@media (max-width: 1400px) {
  main.home-layout {
    flex-direction: column;
  }

  .sidebar {
    max-width: 100%;
    margin-left: 0;
  }
}

/* === Responsive Adjustments === */
@media (max-width: 1000px) {
  .nav-links a {
    margin-left: 1rem;
  }

  main.home-layout {
    flex-direction: column;
    padding: 1rem;
    max-width: 99vw;
    margin: 0;
  }

  .sidebar {
    margin-left: 0;
    margin-top: 2rem;
  }

  .article-content-flex {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }

  .image-col {
    width: 100%;
    align-items: stretch;
    max-height: 250px;
    height: auto;
    object-fit: cover;
    display: block;
  }
  .image-col img {
    max-height: 250px;
  }

  .cover-thumb {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin-bottom: 0.5rem;
  }

  .article-preview-text {
    padding: 0rem;
  }

  .article-preview-text h2 {
    margin: 0 0 1rem 0;
  }
}