/*
 * Newspaper-style feed CSS.
 * Extends /static/site.css — reuses its design tokens and base styles.
 * Only adds new rules for the column grid, section headers, and item layout.
 */

/* Reduce gap between site nav and date nav */
.page-header {
  margin-bottom: 0;
  padding-bottom: 0;
}
.page-nav.section-nav {
  margin-bottom: 0;
  padding-bottom: 4px;
}

/* Date and country selects row — two equal-width dropdowns */
.feed-controls-np {
  display: flex !important;
  gap: 12px;
  margin-bottom: 1.5rem;
}
.feed-controls-np .feed-control {
  flex: 1;
  min-inline-size: 0;
  display: block;
}
.feed-controls-np .feed-control .control-select {
  inline-size: 100% !important;
  max-inline-size: 100% !important;
}

/* Section: full-width bold uppercase header above the column grid */
.np-section {
  margin-bottom: 2.5rem;
}

.np-section-header {
  grid-column: 1 / -1;
  border-top: 2px solid var(--border-strong);
  padding-top: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}

/* Three-column newspaper layout using CSS columns — browser distributes items automatically */
.np-columns {
  column-count: 3;
  column-gap: 0;
  column-rule: 1px solid var(--border);
}
.np-columns[data-items="1"] { column-count: 1; }
.np-columns[data-items="2"] { column-count: 2; }

@media (max-width: 600px) {
  .np-columns {
    column-count: 2;
  }
}

.np-column {
  display: contents;
}

.np-column--rule {
  /* rules handled by column-rule above */
}

/* Item layout */
.np-item {
  break-inside: avoid;
  padding: 0 0.6rem 1.5rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.np-item-image {
  display: block;
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  margin-bottom: 0.6rem;
}

.np-columns[data-items="1"] .np-item-image {
  max-width: min(320px, 100%);
}

.np-item-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.3rem;
}

.np-item-title a {
  color: var(--text);
  text-decoration: none;
}

.np-item-title a:hover {
  text-decoration: underline;
  color: var(--accent);
}

.np-item-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

/* Body text clamped to ~4 lines for visual balance across columns */
.np-item-body,
.np-item .content-body {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 601px) {
  .np-columns[data-items="1"] .np-item-body,
  .np-columns[data-items="1"] .np-item .content-body {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 600px) {
  .np-item-body,
  .np-item .content-body {
    -webkit-line-clamp: 8;
  }
}

.np-item-tags {
  margin: 0.3rem 0 0;
  font-size: 0.72rem;
  color: var(--muted, #888);
  line-height: 1.4;
}

.np-tag + .np-tag::before {
  content: " · ";
}
