/* =========================================================
   NEWS (list + article detail) - page stylesheet
   Mockup: 20251013-002_Mockup_Spectre_News_v001
   ========================================================= */

/* --- Hero: left aligned, compact --- */
.hero--news {
  padding: clamp(3rem, 6vw, 4.4rem) 0 clamp(3rem, 6vw, 4.2rem);
  background-position: center;
  background-size: cover;
}
.hero--news .hero__content { text-align: left; }
.hero--news .hero__title {
  margin: 0 0 1.4rem;
  max-width: none;
}
.hero--news .hero__subtitle {
  margin: 0;
  max-width: none;                                 /* one line (feedback 29.09.), wraps only on narrow screens */
  color: #fff;
}

/* --- List --- */
.section--news-list {
  /* top: the first date's capitals as far below the hero as its last line is above the edge (4rem / 3.25rem,
     hero spacing in components.css) - the date's capitals start 0.35rem into its line */
  padding: 3.65rem 0 clamp(3rem, 6vw, 3.9rem);
  background: #fff;
}
@media (max-width: 900px) { .section--news-list { padding-top: 2.9rem; } }
@media (max-width: 480px) { .section--news-list { padding-top: 2.5rem; } }
.news-list {
  display: flex;
  flex-direction: column;
  gap: clamp(2.75rem, 6vw, 4rem);
}
.news-list__empty { font-size: var(--fs-body); color: #333; }

.news-list-item,
.news-list-item:first-child,
.news-list-item:last-child {
  display: grid;
  grid-template-columns: 23.5% minmax(0, 1fr);
  gap: 0 3.8%;
  align-items: start;
  padding: 0;
  border: 0;
  scroll-margin-top: 6rem;
}

/* portrait cover (235 x 336 in the mockup) */
.news-list-item__media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 235 / 336;
  border-radius: 14px;
  overflow: hidden;
  background: #061233 url("../../img/hero-glow.webp") center / cover no-repeat;
  position: relative;
}
.news-list-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.news-list-item__media:hover img { transform: scale(1.03); }

.news-list-item__body {
  display: block;
  padding-top: 0.1rem;
  color: #333;
}

/* date: large + light, short violet rule below */
.news-list-item__date {
  display: block;
  font-size: calc(var(--fs-h2) * 0.7);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #333;
  margin: 0;
}
.news-list-item__date::after {
  content: "";
  display: block;
  width: 1.8rem;
  height: 2px;
  margin: 1.1rem 0 1.25rem;
  background: var(--color-primary, #6d28d9);
}
.news-list-item__author {
  font-size: var(--fs-small);
  color: #333;
  margin: 0 0 0.9rem;
  line-height: 1.3;
}

.news-list-item__title {
  font-size: var(--fs-body);
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 0.7rem;
  color: #333;
}
.news-list-item__title a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.news-list-item__title a:hover { color: var(--color-primary, #6d28d9); text-decoration: none; }

.news-list-item__excerpt,
.news-list-item__content {
  font-size: var(--fs-small);
  line-height: 1.5;
  color: #333;
  margin: 0;
}
.news-list-item__excerpt p,
.news-list-item__content p { margin: 0 0 0.8rem; }
.news-list-item__excerpt a,
.news-list-item__content a { color: #722be2; }
.news-list-item__content h2,
.news-list-item__content h3 { font-size: var(--fs-small); font-weight: 600; margin: 1.2rem 0 0.4rem; color: #333; }
.news-list-item__content figure { margin: 1rem 0; }
.news-list-item__content img { max-width: 100%; height: auto; border-radius: 10px; }
.news-list-item__content blockquote { margin: 0 0 0.8rem; padding-left: 1rem; border-left: 2px solid var(--color-primary, #6d28d9); }
.news-list-item__full { margin: 0; }

/* tags: white pills with hairline border */
.news-list-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1.1rem 0 0;
}
.news-list-item__tag {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  background: #fff;
  border: 1px solid #b9b9b9;
  border-radius: 999px;
  font-size: var(--fs-small);
  line-height: 1.35;
  color: #333;
}

/* links: stacked, icon in front */
.news-list-item__links,
.news-list-item__full .news-list-item__links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin: 1.1rem 0 0;
}
.news-list-item__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #722be2;
  font-size: var(--fs-ui);
  font-weight: 500;
  text-decoration: none;
  line-height: 1.45;
  transition: color 0.2s ease;
}
.news-list-item__link .icon { width: 0.95em; height: 0.95em; }
.news-list-item__link:hover { text-decoration: none; color: var(--color-primary-hover, #6d28d9); }

/* toggle: "Read more" (chevron right) / "Collapse article" (chevron up) */
.news-list-item__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
  color: #722be2;
  font-size: var(--fs-ui);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}
.news-list-item__toggle:hover { text-decoration: none; color: var(--color-primary-hover, #6d28d9); }
.news-list-item__toggle .icon { width: 0.9em; height: 0.9em; transition: transform 0.2s ease; }
.news-list-item__toggle[aria-expanded="true"] .icon { transform: rotate(-90deg); }
.news-list-item__toggle:hover .icon { transform: translateX(3px); }
.news-list-item__toggle[aria-expanded="true"]:hover .icon { transform: rotate(-90deg) translateX(3px); }
.news-list-item--expanded .news-list-item__toggle { margin-top: 1.1rem; }

.news-list__back { margin: 3.5rem 0 0; text-align: center; }
.news-list__back-link { color: #722be2; font-size: var(--fs-ui); font-weight: 500; text-decoration: none; transition: color 0.2s ease; }
.news-list__back-link::before { content: "< "; color: #b2b2b2; }
.news-list__back-link:hover { text-decoration: none; color: var(--color-primary-hover, #6d28d9); }

/* --- Pagination:  <  1 2 3 4 5 6  >  --- */
.section--news-list .pagination {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.2rem;
  margin-top: clamp(2.5rem, 5vw, 3.4rem);
}
.section--news-list .pagination .pagination__link {
  width: auto;
  height: auto;
  min-width: 1.5rem;
  padding: 0.15rem 0.3rem;
  border: 0;
  border-radius: 4px;
  background: none;
  font-size: var(--fs-ui);
  font-weight: 500;
  line-height: 1.2;
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}
.section--news-list .pagination .pagination__link:hover { color: #722be2; background: none; text-decoration: none; }
.section--news-list .pagination .pagination__link.is-active { color: #722be2; font-weight: 700; background: none; }
.section--news-list .pagination .pagination__link--prev { margin-right: 0.4rem; }
.section--news-list .pagination .pagination__link--next { margin-left: 0.4rem; }
.section--news-list .pagination .pagination__link.is-disabled { color: #b2b2b2; cursor: default; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .news-list-item,
  .news-list-item:first-child,
  .news-list-item:last-child { grid-template-columns: 28% minmax(0, 1fr); gap: 0 1.5rem; }
}
@media (max-width: 600px) {
  .news-list-item,
  .news-list-item:first-child,
  .news-list-item:last-child { grid-template-columns: 1fr; gap: 1.25rem 0; }
  .news-list-item__media { width: 100%; max-width: none; aspect-ratio: 16 / 10; height: auto; }
  .news-list-item__media--empty { display: none; }
  .hero--news .hero__subtitle { max-width: none; }
}
