/* =========================================
   News Index & Tag — /static/css/news/news-index.css
   Invid.au dark gaming theme
========================================= */

.container {
  background: radial-gradient(ellipse 70% 45% at 50% 0%, rgba(238, 36, 69, 0.08), transparent 65%);
}

/* ---- Root layout ---- */
.news-index {
  max-width: 1380px;
  margin: 0 auto 3rem;
  padding-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ---- Header ---- */
.news-index__header {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  padding: 3rem 2rem 2.75rem;
  background: var(--deep-green);
  border: 1px solid var(--secondary-teal);
  box-shadow: var(--shadow-soft);
}

.news-index__header::before {
  content: "";
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 420px;
  background: rgba(var(--primary-accent-rgb), 0.09);
  filter: blur(110px);
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

.news-index__header-inner {
  position: relative;
  z-index: 1;
}

.news-index__label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary-accent);
  background: rgba(var(--primary-accent-rgb), 0.1);
  border: 1px solid rgba(var(--primary-accent-rgb), 0.28);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.news-index__label .material-symbols-outlined {
  font-size: 0.95rem;
}

.news-index__header h1 {
  font-family: var(--font-secondary);
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.news-index__header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 520px;
}

/* Tag page — back link */
.news-index__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  margin-top: 1.25rem;
  transition: color 0.2s;
}

.news-index__back:hover {
  color: var(--primary-accent);
}

.news-index__back .material-symbols-outlined {
  font-size: 1rem;
}

/* ---- Cards grid ---- */
.news-index__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

/* ---- Card ---- */
.news-index__card {
  background: var(--deep-green);
  border: 1px solid var(--secondary-teal);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-soft);
}

.news-index__card:hover {
  border-color: rgba(var(--primary-accent-rgb), 0.45);
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

/* Feature image */
.news-index__card-image {
  width: 100%;
  padding-top: 52%;
  background-image: var(--card-bg);
  background-size: cover;
  background-position: center;
  background-color: var(--secondary-teal);
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.news-index__card:hover .news-index__card-image {
  opacity: 0.9;
}

/* Card body */
.news-index__card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.25rem 1.5rem 1.5rem;
  gap: 0.6rem;
}

/* Tag pill */
.news-index__card-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.2rem 0.6rem;
  background: rgba(var(--primary-accent-rgb), 0.1);
  border: 1px solid rgba(var(--primary-accent-rgb), 0.22);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Title */
.news-index__card-title {
  font-family: var(--font-secondary);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}

.news-index__card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.news-index__card-title a:hover {
  color: var(--primary-accent);
}

/* Meta: author + date */
.news-index__card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.news-index__card-meta a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.news-index__card-meta a:hover {
  color: var(--primary-accent);
}

.news-index__card-meta-sep {
  opacity: 0.4;
}

/* Summary */
.news-index__card-summary {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Read more link */
.news-index__card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary-accent);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--secondary-teal);
}

.news-index__card-link .material-symbols-outlined {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.news-index__card-link:hover .material-symbols-outlined {
  transform: translateX(4px);
}

/* ---- Empty state ---- */
.news-index__empty {
  text-align: center;
  padding: 3rem 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: var(--text-muted);
}

/* ---- News list + sidebar layout ---- */
.news-index__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
  align-items: start;
}

/* ---- Article list ---- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-list__item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.4rem 1.5rem;
  background: var(--deep-green);
  border: 1px solid var(--secondary-teal);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: var(--shadow-soft);
}

.news-list__item:hover {
  border-color: rgba(var(--primary-accent-rgb), 0.45);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.news-list__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.news-list__thumb {
  width: 160px;
  height: 106px;
  flex-shrink: 0;
  border-radius: 10px;
  background-image: var(--thumb-bg);
  background-size: cover;
  background-position: center;
  background-color: var(--secondary-teal);
  transition: opacity 0.2s ease;
}

.news-list__item:hover .news-list__thumb {
  opacity: 0.85;
}

.news-list__title {
  font-family: var(--font-secondary);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}

.news-list__summary {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-list__readmore {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary-accent);
  font-weight: 700;
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

.news-list__readmore .material-symbols-outlined {
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.news-list__item:hover .news-list__readmore .material-symbols-outlined {
  transform: translateX(4px);
}

/* ---- Sidebar ---- */
.news-index__sidebar {
  position: sticky;
  top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.news-sidebar__widget {
  background: var(--deep-green);
  border: 1px solid var(--secondary-teal);
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
}

.news-sidebar__widget-title {
  font-family: var(--font-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-accent);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--secondary-teal);
}

.news-sidebar__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-sidebar__tag {
  display: inline-flex;
  padding: 0.25rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--secondary-teal);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.news-sidebar__tag:hover {
  background: rgba(var(--primary-accent-rgb), 0.1);
  border-color: rgba(var(--primary-accent-rgb), 0.35);
  color: var(--primary-accent);
}

.news-sidebar__trending {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-sidebar__trending-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.news-sidebar__trending-num {
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  font-weight: 700;
  color: rgba(var(--primary-accent-rgb), 0.25);
  line-height: 1;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: right;
}

.news-sidebar__trending-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  text-decoration: none;
  line-height: 1.4;
  transition: color 0.2s;
}

.news-sidebar__trending-title:hover {
  color: var(--primary-accent);
}

.news-sidebar__trending-meta {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* ---- Responsive grid (tag page) ---- */
@media (max-width: 1024px) {
  .news-index__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---- Responsive list+sidebar ---- */
@media (max-width: 960px) {
  .news-index__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-index__sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .news-index__header {
    padding: 2.25rem 1.5rem 2rem;
  }
}

@media (max-width: 640px) {
  .news-index__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .news-index__header {
    padding: 2rem 1.25rem 1.75rem;
  }

  .news-index__sidebar {
    grid-template-columns: 1fr;
  }

  .news-list__thumb {
    width: 110px;
    height: 74px;
  }
}

@media (max-width: 480px) {
  .news-list__item {
    flex-direction: column-reverse;
  }

  .news-list__thumb {
    width: 100%;
    height: 180px;
    border-radius: 8px;
  }
}
