/*
 * NEWS HUB — Editorial Intelligence Desk v1.0
 */

:root {
  --nh-dark: #02040a;
  --nh-dark-soft: #0a0f1e;
  --nh-accent: #3b82f6;
  --nh-accent-2: #22d3ee;
  --nh-bg: #f1f5f9;
  --nh-surface: #ffffff;
  --nh-border: #e2e8f0;
  --nh-text-h: #0f172a;
  --nh-text-m: #64748b;
  --nh-fresh: #10b981;
  --nh-display: 'Sora', system-ui, sans-serif;
  --nh-body: 'Inter', system-ui, sans-serif;
  --nh-mono: 'JetBrains Mono', monospace;
  --nh-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

.nh-hero {
  position: relative;
  background: var(--nh-dark);
  padding: clamp(7rem, 14vw, 10rem) 0 clamp(4rem, 8vw, 6rem);
  overflow: hidden;
}

.nh-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 85%);
  pointer-events: none;
}

.nh-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.45;
}

.nh-hero__orb--1 {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.5), transparent 70%);
}

.nh-hero__orb--2 {
  width: 320px;
  height: 320px;
  bottom: -100px;
  left: -60px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 70%);
}

.nh-hero__inner {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 920px;
  margin: 0 auto;
}

.nh-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.25rem;
  margin-bottom: 2rem;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 999px;
  font-family: var(--nh-mono);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nh-accent-2);
}

.nh-live-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nh-fresh);
  animation: nh-pulse 2s ease infinite;
}

@keyframes nh-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}

.nh-hero__title {
  font-family: var(--nh-display);
  font-size: clamp(2.75rem, 9vw, 5.5rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #fff;
  margin: 0 0 1.25rem;
}

.nh-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nh-hero__subtitle {
  font-family: var(--nh-body);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.65;
  color: #94a3b8;
  margin: 0 auto 2.5rem;
  max-width: 680px;
}

.nh-hero__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1rem;
}

.nh-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 120px;
  padding: 0.85rem 1.35rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  backdrop-filter: blur(8px);
}

.nh-stat__value {
  font-family: var(--nh-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
}

.nh-stat__label {
  font-family: var(--nh-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

/* Filter bar */
.nh-filter {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--nh-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nh-filter__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nh-filter__label {
  font-family: var(--nh-mono);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--nh-text-m);
  white-space: nowrap;
}

.nh-filter__chips {
  position: relative;
  flex: 1;
  min-width: 0;
}

.nh-filter__chips::before,
.nh-filter__chips::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  z-index: 2;
  pointer-events: none;
}

.nh-filter__chips::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), transparent);
}

.nh-filter__chips::after {
  right: 0;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.95), transparent);
}

.nh-filter__scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.25rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nh-filter__scroll::-webkit-scrollbar {
  display: none;
}

.nh-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  font-family: var(--nh-mono);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--nh-text-m);
  background: #f8fafc;
  border: 1px solid var(--nh-border);
  border-radius: 999px;
  transition: all 0.25s var(--nh-ease);
}

.nh-chip:hover {
  border-color: #cbd5e1;
  color: var(--nh-text-h);
  transform: translateY(-1px);
}

.nh-chip.is-active {
  background: var(--nh-accent);
  border-color: var(--nh-accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.28);
}

.nh-chip__count {
  padding: 0.1rem 0.4rem;
  font-size: 0.5625rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
}

.nh-chip.is-active .nh-chip__count {
  background: rgba(255, 255, 255, 0.22);
}

.nh-dropdown {
  position: relative;
  flex-shrink: 0;
}

.nh-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  font-family: var(--nh-body);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--nh-text-h);
  background: var(--nh-surface);
  border: 1px solid var(--nh-border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.nh-dropdown__trigger:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.nh-dropdown__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(300px, 88vw);
  max-height: 360px;
  overflow: hidden;
  background: var(--nh-surface);
  border: 1px solid var(--nh-border);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: all 0.22s var(--nh-ease);
  z-index: 200;
}

.nh-dropdown.is-open .nh-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.nh-dropdown__head {
  padding: 0.75rem 1rem;
  font-family: var(--nh-mono);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nh-text-m);
  border-bottom: 1px solid var(--nh-border);
}

.nh-dropdown__list {
  max-height: 280px;
  overflow-y: auto;
  padding: 0.35rem;
}

.nh-dropdown__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--nh-text-h);
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.15s;
}

.nh-dropdown__item:hover {
  background: #f1f5f9;
}

.nh-dropdown__item.is-active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--nh-accent);
}

/* Catalog */
.nh-catalog {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(5rem, 10vw, 8rem);
  background: var(--nh-bg);
}

.nh-catalog__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-bottom: 2.5rem;
}

.nh-catalog__title {
  font-family: var(--nh-display);
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--nh-text-h);
  margin: 0;
}

.nh-catalog__meta {
  font-family: var(--nh-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nh-text-m);
}

/* Featured editorial */
.nh-featured {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 420px;
  margin-bottom: clamp(3rem, 6vw, 5rem);
  background: var(--nh-dark-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.35);
  transition: transform 0.45s var(--nh-ease), box-shadow 0.45s var(--nh-ease), border-color 0.35s;
}

.nh-featured:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 32px 80px rgba(2, 6, 23, 0.5);
}

.nh-featured__media {
  position: relative;
  min-height: 280px;
  overflow: hidden;
}

.nh-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.8s var(--nh-ease), opacity 0.4s;
}

.nh-featured:hover .nh-featured__media img {
  transform: scale(1.04);
  opacity: 1;
}

.nh-featured__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 4, 10, 0.15) 0%, rgba(2, 4, 10, 0.55) 100%);
  pointer-events: none;
}

.nh-featured__fallback {
  width: 100%;
  height: 100%;
  min-height: 280px;
  background:
    linear-gradient(135deg, #1e3a8a 0%, #0f172a 50%, #02040a 100%);
}

.nh-featured__badge {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  z-index: 2;
  padding: 0.4rem 0.85rem;
  font-family: var(--nh-mono);
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--nh-accent);
  border-radius: 6px;
}

.nh-featured__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 4vw, 3.5rem);
}

.nh-featured__cat {
  font-family: var(--nh-mono);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nh-accent-2);
  margin-bottom: 1rem;
}

.nh-featured__title {
  font-family: var(--nh-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: #fff;
  margin: 0 0 1rem;
}

.nh-featured__desc {
  font-size: 1rem;
  line-height: 1.65;
  color: #94a3b8;
  margin: 0 0 1.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nh-featured__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--nh-mono);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
}

.nh-featured__cta svg {
  transition: transform 0.25s var(--nh-ease);
}

.nh-featured:hover .nh-featured__cta svg {
  transform: translateX(4px);
}

/* News grid cards */
.nh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.nh-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--nh-surface);
  border: 1px solid var(--nh-border);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  /* lift/transform: hub-card.css */
}

@media (hover: hover) {
  .nh-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
  }
}

.nh-card__media {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--nh-dark-soft);
}

.nh-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--nh-ease);
}

.nh-card:hover .nh-card__media img {
  transform: scale(1.06);
}

.nh-card__fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #1e293b, #0f172a);
}

.nh-card__date {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  padding: 0.4rem 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.nh-card__date-day {
  font-family: var(--nh-display);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
  color: var(--nh-text-h);
}

.nh-card__date-mon {
  font-family: var(--nh-mono);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nh-text-m);
  margin-top: 0.15rem;
}

.nh-card__cat {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 2;
  padding: 0.35rem 0.65rem;
  font-family: var(--nh-mono);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  border-radius: 6px;
}

.nh-card__fresh {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  padding: 0.25rem 0.55rem;
  font-family: var(--nh-mono);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--nh-fresh);
  border-radius: 4px;
}

.nh-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.35rem 1.35rem 1.25rem;
}

.nh-card__title {
  font-family: var(--nh-display);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--nh-text-h);
  margin: 0 0 0.65rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nh-card__desc {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--nh-text-m);
  margin: 0 0 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nh-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--nh-border);
  margin-top: auto;
}

.nh-card__meta {
  font-family: var(--nh-mono);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nh-text-m);
}

.nh-card__arrow {
  color: var(--nh-accent);
  transition: transform 0.25s var(--nh-ease);
}

.nh-card:hover .nh-card__arrow {
  transform: translateX(4px);
}

/* Empty + pagination */
.nh-empty {
  text-align: center;
  padding: 5rem 1.5rem;
}

.nh-empty__title {
  font-family: var(--nh-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--nh-text-h);
  margin: 0 0 0.5rem;
}

.nh-empty__text {
  color: var(--nh-text-m);
  margin: 0 0 1.5rem;
}

.nh-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: clamp(3rem, 6vw, 5rem);
}

.nh-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.85rem;
  font-family: var(--nh-display);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--nh-text-m);
  background: var(--nh-surface);
  border: 1px solid var(--nh-border);
  border-radius: 12px;
  transition: all 0.25s var(--nh-ease);
}

.nh-page-btn:hover {
  border-color: var(--nh-accent);
  color: var(--nh-accent);
  transform: translateY(-2px);
}

.nh-page-btn.is-active {
  background: var(--nh-accent);
  border-color: var(--nh-accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.3);
}

.nh-page-btn--nav {
  font-family: var(--nh-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


@media (max-width: 1024px) {
  .nh-featured {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nh-filter__row {
    flex-direction: column;
    align-items: stretch;
  }

  .nh-filter__label {
    display: none;
  }

  .nh-dropdown {
    width: 100%;
  }

  .nh-dropdown__trigger {
    width: 100%;
    justify-content: space-between;
  }

  .nh-dropdown__menu {
    left: 0;
    right: 0;
    width: 100%;
  }

  .nh-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .nh-stat {
    min-width: 0;
    padding: 0.65rem 0.5rem;
  }
}

[data-theme="dark"] .nh-filter {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .nh-filter__chips::before {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), transparent);
}

[data-theme="dark"] .nh-filter__chips::after {
  background: linear-gradient(270deg, rgba(15, 23, 42, 0.95), transparent);
}

[data-theme="dark"] .nh-chip {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

[data-theme="dark"] .nh-catalog {
  background: #0b1220;
}

[data-theme="dark"] .nh-card {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .nh-card__title {
  color: #f1f5f9;
}

[data-theme="dark"] .nh-catalog__title {
  color: #f1f5f9;
}
