/**
 * tpl_schule – news.css
 * News-Bereich, 3-4 Karten nebeneinander
 */

.tpl-news-section {
  background: var(--white);
  padding: 60px 0;
}

/* Äußerer Container – 1 Spalte, das oszee-news-grid (Override) macht das eigentliche 3-Spalten-Layout */
.tpl-news-grid {
  display: block;
  width: 100%;
}

/* News-Karte (com_content article list / mod_articles_latest) */
.tpl-news-card,
.tpl-news-grid article {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}

.tpl-news-card:hover,
.tpl-news-grid article:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* Bild */
.tpl-news-card__img,
.tpl-news-grid article .article-image {
  height: 168px;
  overflow: hidden;
  position: relative;
  background: var(--gray-mid);
}

.tpl-news-card__img img,
.tpl-news-grid article .article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tpl-news-card:hover .tpl-news-card__img img,
.tpl-news-grid article:hover .article-image img {
  transform: scale(1.04);
}

/* Kategorie-Badge */
.tpl-news-card__cat {
  position: absolute;
  bottom: 10px;
  left: 12px;
  background: var(--blue-primary);
  border-radius: 3px;
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  text-transform: uppercase;
  z-index: 2;
}

/* Body */
.tpl-news-card__body,
.tpl-news-grid article .article-info {
  padding: 18px 18px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tpl-news-card__meta,
.tpl-news-grid article .article-info-term {
  font-size: 12px;
  color: var(--gray-dark);
}

.tpl-news-card__title,
.tpl-news-grid article h2,
.tpl-news-grid article h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.3;
}

.tpl-news-card__title a,
.tpl-news-grid article h2 a,
.tpl-news-grid article h3 a {
  color: var(--text-color);
}

.tpl-news-card__title a:hover,
.tpl-news-grid article h2 a:hover,
.tpl-news-grid article h3 a:hover {
  color: var(--blue-primary);
}

.tpl-news-card__intro,
.tpl-news-grid article .article-introtext p {
  font-size: 13.5px;
  color: #444;
  line-height: 1.55;
  flex: 1;
  margin: 0;
}

.tpl-news-card__link,
.tpl-news-grid article .readmore a {
  display: inline-block;
  color: var(--blue-primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-top: 4px;
  text-decoration: none;
  transition: color var(--transition);
}

.tpl-news-card__link:hover,
.tpl-news-grid article .readmore a:hover {
  color: var(--blue-secondary);
}

/* tpl-news-grid responsive – entfällt, da oszee-news-grid das Layout übernimmt */

/* =====================================================
   mod_articles_category OVERRIDE – 3×3 Grid
   Position: news
===================================================== */

.oszee-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
}

/* ─── Karte ─── */
.oszee-news-card {
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}

.oszee-news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* ─── Bild ─── */
.oszee-news-card__img-wrap {
  display: block;
  position: relative;
  height: 190px;
  overflow: hidden;
  background: var(--gray-mid);
  flex-shrink: 0;
}

.oszee-news-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.oszee-news-card:hover .oszee-news-card__img {
  transform: scale(1.04);
}

/* Platzhalter wenn kein Bild */
.oszee-news-card__img-placeholder {
  width: 100%;
  height: 100%;
  background: var(--gray-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
}

/* Kategorie-Badge */
.oszee-news-card__cat {
  position: absolute;
  bottom: 10px;
  left: 12px;
  background: var(--blue-primary);
  border-radius: 3px;
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 9px;
  text-transform: uppercase;
  z-index: 2;
}

/* ─── Body ─── */
.oszee-news-card__body {
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.oszee-news-card__meta {
  font-size: 12px;
  color: var(--gray-dark);
}

.oszee-news-card__title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.oszee-news-card__title a {
  color: var(--text-color);
  text-decoration: none;
  transition: color var(--transition);
}

.oszee-news-card__title a:hover {
  color: var(--blue-primary);
}

.oszee-news-card__intro {
  font-size: 13.5px;
  color: #444;
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.oszee-news-card__link {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-primary);
  letter-spacing: 0.04em;
  text-decoration: none;
  margin-top: auto;
  padding-top: 4px;
  transition: color var(--transition);
}

.oszee-news-card__link:hover {
  color: var(--blue-secondary);
}

.oszee-news-empty {
  color: var(--gray-dark);
  font-style: italic;
  padding: 24px 0;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .oszee-news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .oszee-news-grid { grid-template-columns: 1fr; }
}
