/**
 * @file news.css
 * News – Teaser-Karten, News-View-Grid und Detailansicht.
 * Mobile-first: gestapelt als Default, mehrspaltig erst ab Breakpoint.
 */

/* ========================================================================
   News-View / -Block: responsives Grid
   ======================================================================== */
.view--news .view__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 600px) {
  .view--news .view__content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .view--news .view__content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Zeilen-Wrapper sollen sich nicht über die Grid-Spaltenbreite hinausdehnen. */
.view--news .view__content > .views-row {
  min-width: 0;
  margin: 0;
}

/* ========================================================================
   News-Teaser (Karte)
   ======================================================================== */
.node--type-news.node--view-mode-teaser {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-teaser__image {
  display: block;
  overflow: hidden;
  line-height: 0;
  border-radius: var(--radius-md);
}

.news-teaser__image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.news-teaser__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-top: var(--space-sm);
}

.news-teaser__title {
  margin: 0 0 var(--space-2xs);
  font-family: var(--font-heading);
  font-size: var(--font-size-h3);
  line-height: var(--line-height-heading);
  font-weight: 700;
}

.news-teaser__title a {
  color: var(--color-text);
  text-decoration: none;
}

.news-teaser__title a:hover,
.news-teaser__title a:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
}

.news-teaser__body {
  color: var(--color-text);
}

.news-teaser__body > :last-child {
  margin-bottom: 0;
}

/* ========================================================================
   News-Detail (Full-View)
   ======================================================================== */
/* Schmale, gut lesbare Spalte; alle Blöcke mittig. */
.node--type-news.node--view-mode-full {
  max-width: var(--layout-width-narrow);
  margin: 0 auto var(--space-2xl);
}

.news-full__title {
  margin: 0 0 var(--space-sm);
  text-align: center;
  font-family: var(--font-heading);
  font-size: var(--font-size-h1);
  line-height: var(--line-height-heading);
}

.news-full__teaser {
  margin: 0 auto var(--space-lg);
  text-align: center;
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
}

.news-full__media {
  margin: var(--space-lg) 0;
}

.news-full__media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.news-full__body > :last-child {
  margin-bottom: 0;
}

.news-full__body blockquote {
  margin: var(--space-md) 0;
  padding: var(--space-sm) var(--space-md);
  border-left: 4px solid var(--color-grey-400);
  font-style: italic;
  color: var(--color-grey-800);
}

.news-full__body table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
}

.news-full__body :is(th, td) {
  padding: var(--space-2xs) var(--space-xs);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.news-full__body th {
  font-weight: 700;
}

/* Verknüpfte Session / Person */
.news-full__session,
.news-full__user {
  margin-top: var(--space-lg);
}

.news-full__user img {
  max-width: 180px;
  border-radius: var(--radius-md);
}
