/**
 * @file
 * News / Aktuelles section and cards.
 */

.news-section {
  padding: 4rem 0;
  background: var(--background);
}

.news-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 2rem;
}

.news-tabs__btn {
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--muted);
  color: var(--muted-foreground);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.news-tabs__btn:hover {
  background: var(--secondary);
}

.news-tabs__btn.is-active {
  background: var(--primary);
  color: #fff;
}

.news-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.news-featured {
  cursor: pointer;
}

.news-featured__media {
  position: relative;
  overflow: hidden;
  background: var(--primary);
  height: 16rem;
}

@media (min-width: 1024px) {
  .news-featured__media {
    height: 20rem;
  }
}

.news-featured__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: transform 0.5s ease;
}

.news-featured:hover .news-featured__media img {
  transform: scale(1.05);
}

.news-featured__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27, 43, 94, 0.9), rgba(27, 43, 94, 0.4), transparent);
}

.news-featured__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
}

.news-featured__title {
  margin-top: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  font-family: var(--font-serif);
}

@media (min-width: 1024px) {
  .news-featured__title {
    font-size: 1.5rem;
  }
}

.news-featured__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem;
}

.news-featured__body {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.25rem;
}

.news-featured__excerpt {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  line-height: 1.625;
}

.news-featured__more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
}

.news-featured__more:hover {
  text-decoration: underline;
}

.news-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-card {
  display: flex;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.news-card:hover {
  border-color: var(--primary);
}

.news-card__thumb {
  width: 5rem;
  height: 5rem;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--muted);
}

.news-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card__thumb img {
  transform: scale(1.05);
}

.news-card__title {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.375;
  font-family: var(--font-serif);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card:hover .news-card__title {
  color: var(--primary);
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
}

.news-side__all {
  display: block;
  border: 1px solid var(--border);
  text-align: center;
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.news-side__all:hover {
  background: var(--primary);
  color: #fff;
}
