/* ===== NEWS PAGE ===== */
main.news-main {
  padding: 0;
  min-height: 0;
}

.fade-up {
  opacity: 0;
  transform: translateY(1.5rem);
  transition:
    opacity 0.55s ease,
    transform 0.55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: none;
}

.eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.section {
  padding: 5rem 0;
}

/* ===== HERO ===== */
.news-hero {
  background: var(--bg-dark) center / cover no-repeat;
  color: #fff;
  padding: 6rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.news-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.78) 0%,
    rgba(15, 23, 42, 0.5) 55%,
    rgba(15, 23, 42, 0.25) 100%
  );
  pointer-events: none;
}
.news-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 44rem;
}
.news-hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  color: #fff;
  margin-bottom: 1rem;
  max-width: none;
}
.news-hero-sub {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  max-width: none;
}

/* ===== TOOLBAR (search + count) ===== */
.news-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.news-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.news-search-wrap svg {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.news-search {
  width: 100%;
  padding: 0.5625rem 1rem 0.5625rem 2.5rem;
  border: 1.5px solid var(--border);
  border-radius: 0.3rem;
  font-size: 0.9375rem;
  color: var(--text);
  background: #fff;
  outline: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  font-family: inherit;
}
.news-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(246, 153, 50, 0.12);
}
.news-search::placeholder {
  color: var(--text-muted);
}
.news-result-count {
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== FILTER GROUPS — inline label + scrollable pills on all breakpoints ===== */
.news-filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}
.news-filter-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 5rem;
}
.news-filter-label--cat     { color: var(--primary); }
.news-filter-label--country { color: #0ea5e9; }

/* Track: arrows + scrollable pill row */
.news-filter-track {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
  min-width: 0;
}

/* Scroll arrows — always visible */
.news-scroll-btn {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  padding: 0;
}
.news-scroll-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}
.news-scroll-btn:disabled { opacity: 0.25; cursor: default; }

/* ===== FILTERS — no wrap, scroll horizontally ===== */
.news-filters,
.news-country-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-width: 0;
  padding-bottom: 2px;
}
.news-filters::-webkit-scrollbar,
.news-country-filters::-webkit-scrollbar { display: none; }

.news-filter-btn,
.news-country-btn {
  flex-shrink: 0;
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: 2rem;
  padding: 0.4375rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.news-filter-btn:hover:not(:disabled),
.news-country-btn:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--text-muted);
}
.news-filter-btn.active,
.news-country-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.news-filter-btn:disabled,
.news-country-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}
.news-country-btn {
  font-size: 0.8125rem;
  padding: 0.375rem 0.875rem;
}

/* ===== GRID ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ===== CARD ===== */
.news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 1.125rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    box-shadow 0.25s,
    transform 0.25s;
}
.news-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
  transform: translateY(-0.1875rem);
}
.news-card[hidden] {
  display: none;
}

.news-card-image-link {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}
.news-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.news-card:hover .news-card-image {
  transform: scale(1.03);
}

.news-card-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(246, 153, 50, 0.08),
    rgba(246, 97, 50, 0.04)
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
.news-card-image-placeholder svg {
  width: 80%;
  height: 60%;
}

.news-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.news-card-category {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(246, 153, 50, 0.1);
  border-radius: 2rem;
  padding: 0.2rem 0.625rem;
}
.news-card-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.news-card-title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  max-width: none;
}
.news-card-title a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}
.news-card-title a:hover {
  color: var(--primary);
}

.news-card-excerpt {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: none;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin-top: 1.125rem;
  transition: gap 0.15s;
}
.news-card-link:hover {
  gap: 0.5rem;
}

/* ===== NO RESULTS ===== */
.news-no-results {
  text-align: center;
  padding: 4rem 1rem;
  font-size: 1rem;
  color: var(--text-muted);
}

/* ===== PAGINATION ===== */
.news-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.news-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border: 1.5px solid var(--border);
  border-radius: 0.5rem;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
  font-family: inherit;
}
.news-page-btn:hover:not([disabled]) {
  border-color: var(--primary);
  color: var(--primary);
}
.news-page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 700;
}
.news-page-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}
.news-page-ellipsis {
  display: flex;
  align-items: center;
  padding: 0 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 64em) {
  .news-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 48em) {
  .section { padding: 3rem 0; }
  .news-filter-label { min-width: 4.25rem; }
}

@media (max-width: 30em) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}
