.news-main {
  padding-bottom: 92px;
}

.news-hero {
  padding: 84px 0 44px;
}

.news-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 5vw, 4rem);
  line-height: 0.98;
}

.news-hero p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.news-filters-section {
  padding: 0 0 24px;
}

.filters-panel {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(170px, 1fr));
  gap: 18px;
  padding: 28px;
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.filters-panel__field {
  display: grid;
  gap: 10px;
}

.filters-panel__field span {
  font-size: 14px;
  font-weight: 700;
}

.filters-control {
  display: block;
  height: 54px;
  min-height: 54px;
  width: 100%;
  margin: 0;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  background-color: var(--field-bg);
  background-clip: padding-box;
  color: var(--field-text);
  outline: none;
  font-family: "Quicksand", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 54px;
  vertical-align: middle;
  box-sizing: border-box;
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

body[data-theme="dark"] .filters-control {
  background-color: #626262 !important;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

body[data-theme="light"] .filters-control {
  background-color: var(--field-bg) !important;
  color: #1f1f1f;
}

.filters-control::placeholder {
  color: color-mix(in srgb, var(--field-text) 78%, transparent);
}

body[data-theme="dark"] .filters-control::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

body[data-theme="light"] .filters-control::placeholder {
  color: rgba(31, 31, 31, 0.56);
}

.filters-control:hover {
  border-color: color-mix(in srgb, var(--primary) 48%, transparent);
}

.filters-control[type="search"] {
  padding-inline: 22px;
}

.filters-control[type="date"] {
  padding-inline: 18px;
  line-height: 54px;
}

body[data-theme="dark"] .filters-control[type="date"] {
  color-scheme: dark;
}

body[data-theme="light"] .filters-control[type="date"] {
  color-scheme: light;
}

.filters-control[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.9;
}

.filters-control[type="date"]::-webkit-date-and-time-value,
.filters-control[type="date"]::-webkit-datetime-edit,
.filters-control[type="date"]::-webkit-datetime-edit-fields-wrapper,
.filters-control[type="date"]::-webkit-datetime-edit-text,
.filters-control[type="date"]::-webkit-datetime-edit-day-field,
.filters-control[type="date"]::-webkit-datetime-edit-month-field,
.filters-control[type="date"]::-webkit-datetime-edit-year-field {
  line-height: 54px;
  min-height: 54px;
  height: 54px;
}

body[data-theme="dark"] .filters-control[type="date"]::-webkit-datetime-edit,
body[data-theme="dark"] .filters-control[type="date"]::-webkit-date-and-time-value {
  color: #ffffff;
}

body[data-theme="light"] .filters-control[type="date"]::-webkit-datetime-edit,
body[data-theme="light"] .filters-control[type="date"]::-webkit-date-and-time-value {
  color: #1f1f1f;
}

body[data-theme="dark"] .filters-control[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

.filters-control#sort-order {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  height: 54px;
  padding-right: 50px;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 24px) calc(50% - 3px),
    calc(100% - 18px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.filters-control#sort-order option {
  color: #1f1f1f;
}

body[data-theme="dark"] .filters-control#sort-order option {
  color: #ffffff;
  background: #4d4d4d;
}

.filters-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.sector-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.sector-chip {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease;
}

.sector-chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.news-results-bar {
  margin-top: 26px;
}

.news-results-bar p {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.aggregator-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 18px;
}

.aggregator-card {
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.12);
}

.aggregator-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.aggregator-card__body {
  padding: 22px;
}

.aggregator-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
}

.aggregator-card__tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.aggregator-card h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.aggregator-card p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.65;
}

.aggregator-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aggregator-link {
  color: var(--primary);
  font-weight: 700;
}

.empty-state {
  padding: 36px 28px;
  border-radius: 18px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.pagination button {
  min-width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.pagination button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

@media (max-width: 1180px) {
  .filters-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aggregator-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .filters-panel,
  .aggregator-grid {
    grid-template-columns: 1fr;
  }
}
