/* ============================================================
   IAI Group — News List Page
   ============================================================ */

.news-list-main {
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.news-list-container {
  max-width: 1100px;
  padding-top: 0;
  padding-bottom: 100px;
}

/* ── Page header ─────────────────────────────────────────── */
.news-list-page-header {
  padding: 56px 0 44px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.news-list-page-header::before {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 24px;
}
.news-list-page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 10px;
}
.news-list-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.news-list-count {
  font-size: .82rem;
  color: var(--text-dim);
  font-weight: 500;
  letter-spacing: .3px;
}

/* ── Toolbar ─────────────────────────────────────────────── */
.nl-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.nl-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}
.nl-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-dim);
  pointer-events: none;
}
#newsSearch {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  padding: 10px 36px 10px 36px;
  outline: none;
  transition: border-color .2s;
}
#newsSearch:focus { border-color: var(--accent); }
#newsSearch::placeholder { color: var(--text-dim); }

.nl-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: .75rem;
  cursor: pointer;
  display: none;
  padding: 4px;
  line-height: 1;
}
.nl-search-clear:hover { color: var(--text-muted); }

#newsSort {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  padding: 10px 14px;
  outline: none;
  cursor: pointer;
  transition: border-color .2s;
  white-space: nowrap;
}
#newsSort:focus { border-color: var(--accent); }

/* ── Filter rows ─────────────────────────────────────────── */
.nl-filters-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}
.nl-filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.nl-filter-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: 56px;
}
.nl-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nl-filter-pill {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  font-family: 'Inter', sans-serif;
}
.nl-filter-pill:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--border-hover);
}
.nl-filter-pill.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

/* ── Featured card (first item, full-width) ──────────────── */
.nl-card-featured {
  display: grid;
  grid-template-columns: 420px 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  margin-bottom: 32px;
  transition: border-color .25s, box-shadow .25s, transform .25s;
  position: relative;
}
.nl-card-featured::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(99,179,237,.04) 0%, transparent 60%);
  pointer-events: none;
  transition: opacity .25s;
  opacity: 0;
}
.nl-card-featured:hover {
  border-color: rgba(99,179,237,.4);
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  transform: translateY(-2px);
  opacity: 1;
}
.nl-card-featured:hover::before { opacity: 1; }

.nl-featured-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--surface2);
  min-height: 260px;
}
.nl-featured-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.nl-card-featured:hover .nl-featured-img-wrap img { transform: scale(1.04); }
.nl-featured-no-img {
  background: linear-gradient(135deg, var(--surface2) 0%, rgba(99,179,237,.08) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nl-featured-no-img svg {
  width: 64px;
  height: 64px;
  opacity: .15;
}

.nl-featured-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(9,9,15,.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nl-featured-body {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.nl-featured-body .nl-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nl-featured-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0;
}
.nl-featured-body p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nl-featured-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 4px;
  transition: gap .2s;
}
.nl-card-featured:hover .nl-featured-read-more { gap: 10px; }

/* ── Regular card grid ───────────────────────────────────── */
.news-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) {
  .news-list-grid { grid-template-columns: repeat(2, 1fr); }
  .nl-card-featured { grid-template-columns: 1fr; }
  .nl-featured-img-wrap { min-height: 200px; max-height: 220px; }
}
@media (max-width: 560px) {
  .news-list-grid { grid-template-columns: 1fr; }
}

/* ── Regular card ────────────────────────────────────────── */
.nl-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative;
}
.nl-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nl-card:hover {
  border-color: rgba(99,179,237,.3);
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(0,0,0,.3);
  opacity: 1;
}
.nl-card:hover::after { transform: scaleX(1); }

.nl-card-img-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface2);
  flex-shrink: 0;
}
.nl-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.nl-card:hover .nl-card-img-wrap img { transform: scale(1.05); }

.nl-card-no-img {
  background: linear-gradient(135deg, var(--surface2) 0%, rgba(124,58,237,.06) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nl-card-no-img svg {
  width: 36px;
  height: 36px;
  opacity: .12;
}

.nl-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}
.nl-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nl-card-body h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: .97rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  margin: 0;
  transition: color .2s;
}
.nl-card:hover .nl-card-body h4 { color: #fff; }
.nl-card-body p {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nl-read-more {
  font-size: .78rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s;
}
.nl-card:hover .nl-read-more { gap: 8px; }

/* ── Badge color overrides ───────────────────────────────── */
.news-badge[data-type="Scholarship"] { background: rgba(99,179,237,.15);  color: #63b3ed; border-color: rgba(99,179,237,.25); }
.news-badge[data-type="Award"]       { background: rgba(246,173,85,.15);  color: #f6ad55; border-color: rgba(246,173,85,.25); }
.news-badge[data-type="Publication"] { background: rgba(183,148,244,.15); color: #b794f4; border-color: rgba(183,148,244,.25); }
.news-badge[data-type="Grant"]       { background: rgba(104,211,145,.15); color: #68d391; border-color: rgba(104,211,145,.25); }
.news-badge[data-type="Hiring"]      { background: rgba(79,209,197,.15);  color: #4fd1c5; border-color: rgba(79,209,197,.25); }
.news-badge[data-type="Event"]       { background: rgba(252,129,129,.15); color: #fc8181; border-color: rgba(252,129,129,.25); }
.news-badge[data-type="Workshop"]    { background: rgba(246,135,179,.15); color: #f687b3; border-color: rgba(246,135,179,.25); }
.news-badge[data-type="Seminar"]     { background: rgba(118,228,247,.15); color: #76e4f7; border-color: rgba(118,228,247,.25); }
.news-badge[data-type="Media"]       { background: rgba(250,240,137,.15); color: #ecc94b; border-color: rgba(250,240,137,.25); }
.news-badge[data-type="Visit"]       { background: rgba(154,230,180,.15); color: #9ae6b4; border-color: rgba(154,230,180,.25); }

/* ── Empty state ─────────────────────────────────────────── */
.nl-empty {
  padding: 80px 0;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.nl-empty p { font-size: 1rem; }
