/*
 * Ergänzende Styles für den Blog.
 *
 * Bewusst eine eigene Datei: styles.css stammt unverändert aus dem
 * Website-Upload und soll es bleiben. Hier wird ausschliesslich ergänzt,
 * mit denselben Farb- und Radius-Variablen wie die übrige Seite.
 */

/* --- Übersicht ---------------------------------------------------------- */

.blog-index h2 {
  max-width: 18ch;
}

.post-grid {
  align-items: stretch;
}

/* Die Karte selbst wird zum reinen Rahmen, das Padding übernimmt der Link,
   damit die gesamte Kachel klickbar ist. */
.post-card,
.post-card:hover {
  padding: 0;
  overflow: hidden;
}

.post-card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
  padding: 0 0 26px;
  color: inherit;
  text-decoration: none;
}

.post-cover {
  display: flex;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 25, 23, 0.6);
}

.post-cover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}

.post-card-link:hover .post-cover-image,
.post-card-link:focus-visible .post-cover-image {
  transform: scale(1.04);
}

.post-cover-fallback {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.post-meta {
  margin: 24px 26px 0;
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.post-title {
  margin: 10px 26px 0;
  font-size: 1.22rem;
  line-height: 1.35;
}

.post-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 26px 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  color: var(--text-soft);
}

.post-more {
  margin: auto 26px 0;
  padding-top: 20px;
  color: var(--accent);
  font-weight: 600;
}

.post-empty {
  margin-top: 34px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(16, 43, 39, 0.54);
  color: var(--text-soft);
}

/* --- Artikelseite ------------------------------------------------------- */

.post-back {
  display: inline-block;
  margin-bottom: 26px;
  color: var(--text-soft);
  font-size: 0.95rem;
  text-decoration: none;
}

.post-back:hover,
.post-back:focus-visible {
  color: var(--accent);
}

.post-lead {
  max-width: 62ch;
  margin-top: 18px;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.7;
}

.post-hero-cover {
  overflow: hidden;
  margin: 34px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.post-hero-cover img {
  display: block;
  width: 100%;
  height: auto;
}

/* Fliesstext aus NocoDB: die Struktur liefert das CMS, die Abstände hier. */
.post-body {
  display: block;
  line-height: 1.75;
}

.post-body > :first-child {
  margin-top: 0;
}

.post-body > :last-child {
  margin-bottom: 0;
}

.post-body p,
.post-body ul,
.post-body ol,
.post-body blockquote,
.post-body figure,
.post-body pre {
  margin: 0 0 20px;
}

.post-body h2 {
  margin: 38px 0 12px;
  font-size: 1.45rem;
}

.post-body h3 {
  margin: 30px 0 10px;
  font-size: 1.16rem;
}

.post-body ul,
.post-body ol {
  padding-left: 22px;
  color: var(--text-soft);
}

.post-body li {
  margin-bottom: 8px;
}

.post-body a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.post-body blockquote {
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent);
  color: var(--text-soft);
  font-style: italic;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-small);
}

.post-body code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(7, 25, 23, 0.7);
  font-size: 0.92em;
}

.post-body pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(7, 25, 23, 0.7);
}

.post-body pre code {
  padding: 0;
  background: none;
}

.post-body table {
  display: block;
  overflow-x: auto;
  width: 100%;
  border-collapse: collapse;
}

.post-body th,
.post-body td {
  padding: 10px 14px;
  border: 1px solid var(--line);
  text-align: left;
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 900px) {
  /* styles.css macht .service-card unterhalb 900px zu einem zweispaltigen
     Icon-Layout. Die Blogkarte hat kein Icon und bleibt einspaltig. */
  .post-card {
    display: block;
  }
}

@media (max-width: 560px) {
  .post-meta,
  .post-title,
  .post-excerpt,
  .post-more {
    margin-right: 20px;
    margin-left: 20px;
  }

  .post-card-link {
    padding-bottom: 22px;
  }
}
