/* Projekte/Blog – Aufbau angelehnt an die Beitraege auf terracom.de:
   Bild, Titel, Byline, Abschnitte mit Zwischenueberschriften, Bilder mit Unterschrift,
   ein Block "Interaktiv", Haeufige Fragen, Autorenbox, Download/Kontakt, Zurueck/Weiter. */

/* Uebersicht + Startseite */
.post-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.post-card {
  display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(18px, 3vw, 36px);
  padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); align-items: start;
}
.post-card .thumb { aspect-ratio: 16 / 9; border-radius: var(--r-s); overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); }
.post-card .thumb img, .post-card .thumb svg { width: 100%; height: 100%; object-fit: cover; }
.post-card h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin: 6px 0 8px; }
.post-card p { color: var(--muted); margin: 0 0 10px; max-width: 64ch; }
.post-card .read { color: var(--link); font-weight: 600; }
.post-card:hover h3 { text-decoration: underline; text-decoration-color: var(--dial); text-underline-offset: 5px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: .88rem; color: var(--muted); }
.post-cat { font-weight: 600; color: var(--dial); }
@media (max-width: 720px) { .post-card { grid-template-columns: 1fr; } }

/* Beitrag */
.post-head { padding: clamp(32px, 5vw, 60px) 0 24px; }
.post-head h1 { max-width: 22ch; font-size: clamp(2rem, 4.4vw, 3.1rem); margin: 10px 0 14px; }
.post-head .standfirst { font-size: 1.2rem; color: var(--muted); max-width: 60ch; margin: 0 0 18px; }
.post-hero { margin: 0 0 8px; border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line); background: var(--panel-2); }
.post-hero img, .post-hero svg { width: 100%; height: auto; display: block; }
.post-body { max-width: 720px; margin: 0 auto; padding: 24px 0 40px; font-size: 1.08rem; line-height: 1.65; }
.post-body h2 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); margin: 1.9em 0 .55em; }
.post-body h3 { margin: 1.4em 0 .4em; }
.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li { margin: .3em 0; }
.post-body code { font-family: var(--mono); font-size: .88em; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.post-body pre { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-s); padding: 14px 16px; overflow-x: auto; font: 400 .9rem/1.5 var(--mono); }
.post-body pre code { background: none; padding: 0; }
.post-body figure { margin: 28px 0; }
.post-body figure.wide { margin-left: clamp(-120px, -8vw, 0px); margin-right: clamp(-120px, -8vw, 0px); }
.post-body figure img { border-radius: var(--r-s); border: 1px solid var(--line); margin: 0 auto; }
.post-body figcaption { font-size: .9rem; color: var(--muted); margin-top: 8px; }
.post-body blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--dial); color: var(--muted); }

/* Interaktiv: Schritte/Reiter, generisch ueber data-Attribute (blog.js) */
.interaktiv { margin: 34px 0; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--panel); overflow: hidden; }
.interaktiv-head { display: flex; align-items: baseline; gap: 12px; padding: 14px 18px 0; }
.interaktiv-head .tag { font: 600 .78rem/1 var(--font); color: var(--ink); background: var(--dial); padding: 4px 8px; border-radius: 4px; }
.interaktiv-head h3 { margin: 0; font-size: 1.1rem; }
.ia-choices { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ia-choices button {
  font: 600 .92rem/1.2 var(--font); padding: 8px 12px; border-radius: var(--r-s); cursor: pointer;
  background: var(--panel-2); color: var(--muted); border: 1px solid var(--line);
}
.ia-choices button[aria-pressed="true"] { background: var(--dial-glow); color: var(--text); border-color: var(--dial); }
.ia-panel { padding: 16px 18px 18px; }
.ia-panel[hidden] { display: none; }
.ia-panel img { border-radius: var(--r-s); border: 1px solid var(--line); margin-bottom: 10px; }
.ia-panel p:last-child { margin-bottom: 0; }

/* Haeufige Fragen */
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--dial); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* Autor, Aktionen, Weiterblaettern */
.author-box { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; margin: 40px 0 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--panel); }
.author-box .brand-plate { margin-top: 2px; }
.author-box h2 { font-size: 1.05rem; margin: 0 0 4px; }
.author-box p { margin: 0; color: var(--muted); font-size: .98rem; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--line); padding: 22px 0 56px; }
.post-nav a { text-decoration: none; color: var(--text); }
.post-nav small { display: block; color: var(--muted); }
.post-nav a:hover strong { text-decoration: underline; text-decoration-color: var(--dial); }
.post-nav .next { text-align: right; }

/* Kasten "Benoetigte Hardware" am Anfang eines Beitrags */
.hw-box { margin: 0 0 32px; padding: 18px 22px; border: 1px solid var(--line); border-left: 4px solid var(--dial); border-radius: var(--r-m); background: var(--panel); }
.hw-box h2 { font-size: 1.15rem; margin: 0 0 8px; }
.hw-box p, .hw-box ul { margin: 0 0 10px; }
.hw-box ul { padding-left: 1.2em; }
.hw-box .hw-warn { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); }
.hw-box .hw-warn strong { color: var(--err); }
