/* =========================================================
   News & Insights — news-v2.css   (ni- prefix)
   Layout follows the approved visual reference:
   dark photo hero > inline filter bar with search > 2-col
   horizontal cards > centred pagination.
   ========================================================= */

/* ---------- page base ---------- */
.ni-page {
  background: #ffffff;
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}

/* ---------- breadcrumb ---------- */
.ni-crumbbar { background:#fff; border-bottom:1px solid #eceff3; padding:11px 0; }
.ni-crumb { font-size:12.5px; color:#6b7280; display:flex; align-items:center; flex-wrap:wrap; }
.ni-crumb a { color:#6b7280; text-decoration:none; }
.ni-crumb a:hover { color:#0a64e0; text-decoration:none; }
.ni-crumb .fa-house { font-size:11px; color:#4b5563; margin-right:8px; }
.ni-crumb .fa-angle-right { margin:0 9px; font-size:10px; color:#9ca3af; }
.ni-crumb-current { color:#1f2937; font-weight:700; }

/* ---------- hero ---------- */
.ni-hero {
  position: relative;
  color: #ffffff;
  padding: 58px 0 54px;
  background:
    linear-gradient(100deg, rgba(3,18,38,.94) 0%, rgba(4,22,46,.80) 46%, rgba(6,30,60,.58) 100%),
    radial-gradient(120% 140% at 88% 12%, rgba(56,130,220,.55) 0%, rgba(6,24,48,0) 62%),
    linear-gradient(180deg, #0a2748 0%, #061a30 100%);
  overflow: hidden;
}
.ni-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 64px);
  mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%);
}
.ni-hero-inner { position: relative; z-index: 1; }
.ni-hero h1 {
  font-size: 40px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.9px;
  line-height: 1.2;
}
.ni-hero p {
  font-size: 15.5px;
  margin: 0;
  max-width: 720px;
  color: rgba(255,255,255,.84);
}

/* ---------- main ---------- */
.ni-main { padding: 0; background:#fff; }

/* ---------- toolbar (tabs + search) ---------- */
.ni-toolbar {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: nowrap;
  margin: 26px 0 22px;
}

.ni-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}

.ni-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
  font-family: inherit;
  white-space: nowrap;
}
.ni-tab i { font-size: 14px; color: #7c8798; transition: color .18s ease; }
.ni-tab:hover { background: #f2f6fb; color: #0a64e0; }
.ni-tab:hover i { color: #0a64e0; }
.ni-tab-active,
.ni-tab-active:hover {
  background: #0a64e0;
  color: #ffffff;
}
.ni-tab-active i,
.ni-tab-active:hover i { color: #ffffff; }

.ni-search {
  position: relative;
  flex: 0 0 300px;
  width: 300px;
  margin-left: auto;
  max-width: 100%;
}
.ni-search i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #9aa3af;
  pointer-events: none;
}
.ni-search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 36px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  font-size: 13.5px;
  color: #1f2937;
  font-family: inherit;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
  -webkit-appearance: none;
}
.ni-search input::placeholder { color: #9aa3af; }
.ni-search input:focus {
  border-color: #0a64e0;
  box-shadow: 0 0 0 3px rgba(10,100,224,.10);
}

/* ---------- card grid ---------- */
.ni-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.ni-card {
  background: #ffffff;
  border: 1px solid #e6eaf0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.ni-card:hover {
  border-color: #cfe0f7;
  box-shadow: 0 10px 26px rgba(10,50,110,.10);
  transform: translateY(-2px);
}

.ni-card-img {
  flex: 0 0 200px;
  min-height: 196px;
  background: #f4f7fa;
  overflow: hidden;
  display: block;
}
.ni-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.ni-card:hover .ni-card-img img { transform: scale(1.04); }

.ni-card-body {
  flex: 1;
  min-width: 0;
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
}

/* category tag */
.ni-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .2px;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 9px;
  line-height: 1.5;
}
.ni-tag-guide  { background:#e8f1ff; color:#0a64e0; }
.ni-tag-app    { background:#e7f7ee; color:#15803d; }
.ni-tag-source { background:#f1eafe; color:#7c3aed; }

/* card title */
.ni-card-body h2 {
  font-size: 17.5px;
  font-weight: 700;
  margin: 0;
  line-height: 1.4;
  letter-spacing: -0.2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ni-card-body h2 a { color:#0f172a; text-decoration:none; transition:color .18s; }
.ni-card-body h2 a:hover { color:#0a64e0; }

/* description */
.ni-card-body p {
  font-size: 13.5px;
  color: #6b7280;
  margin: 7px 0 0;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* card footer */
.ni-card-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 14px;
}
.ni-date,
.ni-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #94a3b8;
  white-space: nowrap;
}
.ni-arrow {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  font-size: 13px;
  text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.ni-arrow:hover { background: #f2f6fb; color: #0a64e0; }

/* ---------- pagination ---------- */
.ni-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 34px 0 54px;
}
.ni-page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #e3e8ee;
  border-radius: 9px;
  background: #ffffff;
  color: #64748b;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ni-page-btn:hover:not(:disabled):not(.ni-page-active) {
  border-color: #0a64e0;
  color: #0a64e0;
}
.ni-page-active {
  background: #0a64e0;
  border-color: #0a64e0;
  color: #ffffff;
  cursor: default;
}
.ni-page-btn:disabled { opacity: .4; cursor: default; }

/* ---------- CTA block ---------- */
.ni-cta {
  padding: 0 0 64px;
  background: #ffffff;
}
.ni-cta-wrap {
  width: 90%;
  margin: 0 auto;
  padding: 0 15px;
}
.ni-cta-inner {
  background: #f7f9fc;
  border: 1px solid #e6eaf0;
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.ni-cta-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 280px;
}
.ni-cta-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #e8f1ff;
  color: #0a64e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.ni-cta-left h3 { font-size: 18px; font-weight: 700; margin: 0 0 4px; color: #0f172a; }
.ni-cta-left p { font-size: 14px; color: #6b7280; margin: 0; }
.ni-cta-right { display: flex; gap: 12px; flex-wrap: wrap; }

.ni-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s ease;
  border: 1px solid transparent;
  font-family: inherit;
  white-space: nowrap;
}
.ni-btn-outline { background:#ffffff; border-color:#d1d5db; color:#374151; }
.ni-btn-outline:hover { border-color:#0a64e0; color:#0a64e0; background:#f0f6ff; }
.ni-btn-primary { background:#0a64e0; border-color:#0a64e0; color:#ffffff; }
.ni-btn-primary:hover { background:#0853bd; border-color:#0853bd; color:#ffffff; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .ni-toolbar { flex-wrap: wrap; gap: 14px; }
  .ni-tabs { flex-wrap: wrap; }
  .ni-search { flex: 1 1 100%; width: 100%; margin-left: 0; }
  .ni-card-img { flex: 0 0 170px; min-height: 180px; }
  .ni-card-body h2 { font-size: 16.5px; }
}
@media (max-width: 992px) {
  .ni-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ni-hero { padding: 40px 0 36px; }
  .ni-hero h1 { font-size: 27px; letter-spacing: -0.4px; }
  .ni-hero p { font-size: 14px; }
  .ni-toolbar { gap: 12px; margin: 20px 0 18px; }
  .ni-tabs { gap: 4px; }
  .ni-tab { padding: 8px 11px; font-size: 13px; gap: 6px; border-radius: 8px; }
  .ni-tab i { font-size: 12px; }
  .ni-card { flex-direction: column; }
  .ni-card-img { flex: 0 0 auto; width: 100%; height: 190px; min-height: 0; }
  .ni-card-body { padding: 16px 16px 14px; }
  .ni-card-foot { gap: 12px; }
  .ni-cta-inner { padding: 22px 20px; flex-direction: column; align-items: flex-start; }
  .ni-cta-left { flex-direction: column; align-items: flex-start; gap: 10px; }
  .ni-btn { padding: 10px 18px; font-size: 13px; }
}
