a {
  text-decoration: none;
}

/* === Main Layout === */
.news-wrapper {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  /* padding: 0 0.5rem; */
}

.news-container {
  flex: 1 1 600px;
  max-width: 50rem;
  /* border: 1px solid red; */
  border-radius: 18px;
  padding: 0 0.5rem;
}

/* .trending-news */
.trending-news {
  width: 350px;
}

#trending-news .news-card .thumbnail {
  width: 87px;
  height: 60px;
  border-radius: 0.375rem;
}

#trending-news .news-text h2 {
  font-size: 1rem;
}

.section-title {
  margin: 0;
  padding: 0.5rem 0 0 0.5rem;
;
}

/* === News Card === */
.news-card {
  display: flex;
  gap: 1rem;
  width: 100%;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

.thumbnail {
  width: 108px;
  height: 72px;
  border-radius: 0.375rem;
}

.news-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-text h2 {
  font-size: 1.2rem;
  margin: 0 0 0.25rem;
  color: var(--headline-color);
}

.news-text p {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--summary-color);
}

.news-card .time {
  font-size: 0.9rem;
  color: var(--time-color);
}

/* === Pagination Controls === */
.nav-buttons {
  display: flex;
  justify-content: space-between;
  max-width: 50rem;
  width: 100%;
  margin: 2rem 0;
}

.nav-btn {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--headline-color);
}

.nav-btn:hover {
  text-decoration: underline;
}

.nav-placeholder {
  visibility: hidden;
  pointer-events: none;
}

.header-left,
.header-right {
  display: flex;
  gap: 0.5rem;
}

.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.logo-text {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-color);
}

/* Hide toggle button on desktop */
#layout-toggle {
  display: none;
}

/* Show as floating button on mobile */
@media (max-width: 768px) {
  #layout-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    background: var(--card-bg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.2s ease;
  }

  #layout-toggle svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: var(--text-color);
  }

  .news-wrapper {
    gap: 0;
  }
  .news-text h2 {
  font-size: 1rem;
  }

.news-text p {
  display: none;
}

}

/* === Responsive === */
@media (max-width: 768px) {

  body.layout-1 .news-wrapper {
    flex-direction: column;
  }

  body.layout-1 .pagination-controls {
    border-bottom: 1px solid var(--border-color);
  }

  body.layout-1 .trending-news {
    width: 100%;
  }
  body.layout-1 .thumbnail {
    width: 102px;
    height: 68px;
  }
}

@media (max-width: 768px) {


  body.layout-2 .news-wrapper {
    flex-direction: column;
  }

  body.layout-2 .pagination-controls {
    border-bottom: 1px solid var(--border-color);
  }

  body.layout-2 .trending-news {
    width: 100%;
  }

  body.layout-2 .news-card:not(#trending-news .news-card) {
    flex-direction: column;
    align-items: flex-start;
  }

  body.layout-2 .thumbnail {
    width: 100%;
    height: auto;
  }
}

/* === No Results Message === */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  margin: 2rem 0;
}

.no-results h2 {
  /* font-size: 1.5rem; */
  margin-bottom: 1rem;
  color: var(--text-color);
}

.no-results p {
  color: var(--text-color);
  /* font-size: 1.1rem; */
}