/* ------------------------------------------------------------------
   Kachelwerk — Aufsatz auf hugo-fresh
   Ziel: hell, bunt, gut lesbar. Nur Farben, Kontrast und Tabellen-/
   Codeblock-Gestaltung; die Struktur des Themes bleibt unberührt.
   ------------------------------------------------------------------ */

:root {
  --kw-tuerkis:   #00b89c;
  --kw-tuerkis-h: #e6faf6;
  --kw-gelb:      #f0b400;
  --kw-gelb-h:    #fff8e1;
  --kw-pink:      #e0316b;
  --kw-pink-h:    #ffeaf1;
  --kw-violett:   #6a3fd6;
  --kw-violett-h: #f0ebff;
  --kw-text:      #253244;
  --kw-text-weak: #5a6b80;
  --kw-linie:     #dfe7f1;
  --kw-flaeche:   #f7fafd;
}

/* --- Grundlesbarkeit ------------------------------------------------ */

body {
  color: var(--kw-text);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

.content p,
.content li {
  color: var(--kw-text);
  font-size: 1.02rem;
  line-height: 1.78;
}

.content { max-width: 62rem; }

.content h2 {
  color: var(--kw-text);
  font-size: 1.85rem;
  font-weight: 700;
  margin-top: 3rem;
  padding-bottom: .45rem;
  border-bottom: 3px solid var(--kw-tuerkis);
}

.content h3 {
  color: var(--kw-violett);
  font-size: 1.32rem;
  font-weight: 700;
  margin-top: 2.1rem;
}

.content h4 { color: var(--kw-text); font-weight: 700; }

.content a          { color: var(--kw-violett); font-weight: 600; text-decoration: none;
                      border-bottom: 2px solid var(--kw-violett-h); transition: border-color .15s; }
.content a:hover    { border-bottom-color: var(--kw-violett); }

.content hr {
  height: 3px; border: 0; margin: 3rem 0;
  background: linear-gradient(90deg,
    var(--kw-tuerkis) 0%,  var(--kw-tuerkis) 25%,
    var(--kw-gelb)    25%, var(--kw-gelb)    50%,
    var(--kw-pink)    50%, var(--kw-pink)    75%,
    var(--kw-violett) 75%, var(--kw-violett) 100%);
  border-radius: 2px;
}

/* --- Tabellen: farbige Kopfzeile, Zebrastreifen -------------------- */

.content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .96rem;
  background: #fff;
}

.content table thead th {
  background: var(--kw-tuerkis);
  color: #fff;
  font-weight: 700;
  text-align: left;
  padding: .8rem 1rem;
  border: 0;
  white-space: nowrap;
}

.content table tbody td {
  padding: .72rem 1rem;
  border: 0;
  border-top: 1px solid var(--kw-linie);
  vertical-align: top;
}

.content table tbody tr:nth-child(even) { background: var(--kw-flaeche); }
.content table tbody tr:hover           { background: var(--kw-tuerkis-h); }
.content table tbody td:first-child     { font-weight: 600; }

/* Breite Tabellen scrollen im Wrapper (siehe render-table.html),
   nicht in der Tabelle selbst — nur so reicht die farbige Kopfzeile
   immer bis zum Rand. */
.kw-tabelle {
  overflow-x: auto;
  margin: 1.6rem 0 2.2rem;
  border-radius: 12px;
  border: 1px solid var(--kw-linie);
  box-shadow: 0 2px 10px rgba(37, 50, 68, .05);
  background: #fff;
}
.kw-tabelle table { margin: 0; border: 0; border-radius: 0; box-shadow: none; min-width: 100%; }

/* --- Code ---------------------------------------------------------- */

.content code {
  background: var(--kw-violett-h);
  color: var(--kw-violett);
  font-weight: 600;
  padding: .12em .45em;
  border-radius: 5px;
  font-size: .92em;
}

.content pre {
  background: #1f2937;
  color: #e8eef7;
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  overflow-x: auto;
  font-size: .92rem;
  line-height: 1.62;
  box-shadow: 0 3px 14px rgba(37, 50, 68, .16);
}

.content pre code {
  background: none;
  color: inherit;
  font-weight: 400;
  padding: 0;
  font-size: inherit;
}

/* Hervorgehobene Blöcke (```bash, ```json …) bringen ihre Hintergrundfarbe als
   Inline-Style mit. Ohne diese Zeile hätten sie einen anderen Grund als die
   übrigen Codeblöcke – und mit einem hellen Schema helle Schrift auf hellem
   Grund. */
.content .highlight pre { background-color: #1f2937 !important; }

/* ASCII-Diagramme brauchen enge Zeilen */
.content pre:not([class]) { line-height: 1.35; }

/* --- Blockzitat als Hinweiskasten ----------------------------------- */

.content blockquote {
  background: var(--kw-gelb-h);
  border-left: 5px solid var(--kw-gelb);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.3rem;
  margin: 1.8rem 0;
  color: var(--kw-text);
}
.content blockquote p:last-child { margin-bottom: 0; }

/* --- Seitenkopf ----------------------------------------------------- */

.section-title {
  color: var(--kw-text);
  font-weight: 800;
  letter-spacing: -.5px;
}
.subtitle.is-muted { color: var(--kw-text-weak) !important; }

.divider { background: var(--kw-tuerkis); height: 4px; width: 72px; border-radius: 2px; }

/* --- Startseite: Karten und Abschnitte bunt ------------------------- */

.feature-card.is-bordered { border: 1px solid var(--kw-linie); border-radius: 14px; }
.feature-card .card-icon img { max-height: 74px; }

#section1 .column:nth-child(1) .feature-card { border-top: 5px solid var(--kw-tuerkis); }
#section1 .column:nth-child(2) .feature-card { border-top: 5px solid var(--kw-gelb); }
#section1 .column:nth-child(3) .feature-card { border-top: 5px solid var(--kw-pink); }

.section-feature-grey { background: var(--kw-flaeche); }

.hero.is-default { background: linear-gradient(160deg, #ffffff 0%, #eef6ff 58%, #e6faf6 100%); }

.title.is-1.is-bold  { color: var(--kw-text); letter-spacing: -1px; }
.landing-caption .subtitle { color: var(--kw-text-weak) !important; font-size: 1.16rem; line-height: 1.7; }

.primary-btn, .accent-btn { background: var(--kw-violett) !important; border-color: var(--kw-violett) !important; }
.primary-btn:hover, .accent-btn:hover { background: #5730c4 !important; border-color: #5730c4 !important; }
.secondary-btn { background: var(--kw-tuerkis) !important; border-color: var(--kw-tuerkis) !important; }

/* --- Navigation ----------------------------------------------------- */

.navbar-item.is-secondary { color: var(--kw-text) !important; font-weight: 600; }
.navbar-item.is-secondary:hover { color: var(--kw-violett) !important; }

/* --- Fußzeile ------------------------------------------------------- */

.footer-dark, footer.footer { background: #253244; }

/* --- Abschnitt "Warum Kachelwerk" (eigener Override statt Kundenstimmen) --- */

.kw-reason {
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 14px;
  padding: 1.7rem 1.6rem;
  height: 100%;
}
.kw-reason-badge {
  display: inline-block;
  background: rgba(255, 255, 255, .95);
  color: var(--kw-violett);
  font-weight: 700;
  font-size: .84rem;
  padding: .28rem .8rem;
  border-radius: 999px;
  margin-bottom: .95rem;
}
.kw-reason-title {
  color: #fff;
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: .55rem;
}
.kw-reason-text {
  color: rgba(255, 255, 255, .9);
  line-height: 1.7;
  font-size: 1rem;
}

/* --- Abschnitt "Warum Kachelwerk": Themenfarbe statt Orange ---------- */

.section.section-secondary {
  background: linear-gradient(135deg, #6a3fd6 0%, #8b5cf6 55%, #00b89c 100%) !important;
}

/* --- Abschluss-Abschnitt: drei Verweiskarten statt totem Formular ---- */

.kw-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  justify-content: center;
  margin-top: 2.6rem;
}
.kw-cta-card {
  flex: 1 1 260px;
  max-width: 330px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  background: #fff;
  border: 1px solid var(--kw-linie);
  border-top: 5px solid var(--kw-violett);
  border-radius: 14px;
  padding: 1.9rem 1.4rem;
  text-decoration: none;
  box-shadow: 0 3px 12px rgba(37, 50, 68, .06);
  transition: transform .16s ease, box-shadow .16s ease;
}
.kw-cta-card:nth-child(2) { border-top-color: var(--kw-tuerkis); }
.kw-cta-card:nth-child(3) { border-top-color: var(--kw-gelb); }
.kw-cta-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(37, 50, 68, .13);
}
.kw-cta-emoji { font-size: 2.1rem; line-height: 1; }
.kw-cta-title { color: var(--kw-text); font-size: 1.2rem; font-weight: 700; }
.kw-cta-text  { color: var(--kw-text-weak); font-size: .96rem; line-height: 1.6; }

/* ==================================================================
   Erklärabschnitt "Was ist ein Tiling-Window-Manager?"
   ================================================================== */

.kw-erklaerung { background: #ffffff; }

.kw-erk-intro {
  max-width: 54rem;
  margin: 0 auto 3.2rem;
}
.kw-erk-intro p {
  font-size: 1.1rem;
  line-height: 1.82;
  color: var(--kw-text);
  margin-bottom: 1.15rem;
}
.kw-erk-intro strong { color: var(--kw-violett); }

/* --- Gegenüberstellung stapelnd / kachelnd --- */

.kw-vergleich {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 3.6rem;
}
.kw-vergleich-karte {
  flex: 1 1 340px;
  max-width: 440px;
  background: #fff;
  border: 1px solid var(--kw-linie);
  border-radius: 16px;
  padding: 1.6rem 1.6rem 1.4rem;
  box-shadow: 0 3px 14px rgba(37, 50, 68, .07);
}
.kw-vergleich-stapelnd { border-top: 5px solid #8697ab; }
.kw-vergleich-kachelnd { border-top: 5px solid var(--kw-tuerkis); }

.kw-vergleich-label {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--kw-text-weak);
  background: var(--kw-flaeche);
  border-radius: 999px;
  padding: .25rem .75rem;
  margin-bottom: .8rem;
}
.kw-vergleich-kachelnd .kw-vergleich-label { color: #00715f; background: var(--kw-tuerkis-h); }

.kw-vergleich-karte h4 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--kw-text);
  margin-bottom: 1rem;
}
.kw-vergleich-karte h4 span { font-weight: 500; color: var(--kw-text-weak); font-size: 1rem; }

.kw-vergleich-karte svg { width: 100%; height: auto; border-radius: 10px; display: block; }

.kw-vergleich-karte ul { margin: 1.1rem 0 0; padding: 0; list-style: none; }
.kw-vergleich-karte li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: .55rem;
  line-height: 1.6;
  color: var(--kw-text);
  font-size: .99rem;
}
.kw-vergleich-stapelnd li::before { content: "✗"; position: absolute; left: 0; color: #c0392b; font-weight: 700; }
.kw-vergleich-kachelnd li::before { content: "✓"; position: absolute; left: 0; color: var(--kw-tuerkis); font-weight: 700; }

.kw-vergleich-pfeil {
  align-self: center;
  font-size: 2.4rem;
  color: var(--kw-tuerkis);
  font-weight: 700;
}
@media (max-width: 900px) { .kw-vergleich-pfeil { transform: rotate(90deg); } }

/* --- Textblöcke --- */

.kw-erk-block {
  max-width: 54rem;
  margin: 0 auto 3rem;
}
.kw-erk-block h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--kw-text);
  margin-bottom: .9rem;
  padding-bottom: .4rem;
  border-bottom: 3px solid var(--kw-gelb);
  display: inline-block;
}
.kw-erk-block p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--kw-text);
  margin-bottom: 1rem;
}
.kw-erk-block strong { color: var(--kw-violett); }
.kw-erk-block a { color: var(--kw-violett); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--kw-violett-h); }
.kw-erk-block a:hover { border-bottom-color: var(--kw-violett); }

/* --- Layoutreihe --- */

.kw-layoutreihe {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin: 1.8rem 0 1.2rem;
}
.kw-layoutreihe figure {
  flex: 1 1 170px;
  max-width: 200px;
  margin: 0;
  text-align: center;
}
.kw-layoutreihe svg {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--kw-linie);
  display: block;
}
.kw-layoutreihe figcaption {
  margin-top: .55rem;
  font-size: .88rem;
  line-height: 1.45;
  color: var(--kw-text-weak);
}
.kw-layoutreihe figcaption strong { color: var(--kw-text); font-size: .98rem; }

.kw-erk-fuss { text-align: center; margin-top: .6rem; }

/* --- Wörterbuch --- */

.kw-glossar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: .9rem;
  margin-top: 1.4rem;
}
.kw-glossar > div {
  background: var(--kw-flaeche);
  border-left: 4px solid var(--kw-tuerkis);
  border-radius: 0 10px 10px 0;
  padding: .85rem 1.1rem;
}
.kw-glossar > div:nth-child(4n+2) { border-left-color: var(--kw-gelb); }
.kw-glossar > div:nth-child(4n+3) { border-left-color: var(--kw-pink); }
.kw-glossar > div:nth-child(4n+4) { border-left-color: var(--kw-violett); }
.kw-glossar dt {
  font-weight: 800;
  color: var(--kw-text);
  font-size: 1.02rem;
  margin-bottom: .2rem;
}
.kw-glossar dt span { font-weight: 500; color: var(--kw-text-weak); font-size: .9rem; }
.kw-glossar dd {
  margin: 0;
  color: var(--kw-text-weak);
  font-size: .95rem;
  line-height: 1.6;
}

/* --- Ehrlichkeits-Hinweis --- */

.kw-erk-hinweis {
  max-width: 54rem;
  margin: 0 auto;
  background: var(--kw-gelb-h);
  border-left: 5px solid var(--kw-gelb);
  border-radius: 0 12px 12px 0;
  padding: 1.15rem 1.4rem;
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--kw-text);
}
.kw-erk-hinweis strong { color: #8a6800; }
.kw-erk-hinweis a { color: var(--kw-violett); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--kw-violett-h); }

/* ==================================================================
   FAQ — aufklappbare Fragen, danach das Wörterbuch
   ================================================================== */

.kw-faq { background: var(--kw-flaeche); }

.kw-faq-liste {
  max-width: 54rem;
  margin: 0 auto 3.2rem;
}

.kw-faq-item {
  background: #fff;
  border: 1px solid var(--kw-linie);
  border-left: 5px solid var(--kw-tuerkis);
  border-radius: 0 12px 12px 0;
  margin-bottom: .75rem;
  overflow: hidden;
  transition: box-shadow .16s ease;
}
.kw-faq-item:nth-child(4n+2) { border-left-color: var(--kw-gelb); }
.kw-faq-item:nth-child(4n+3) { border-left-color: var(--kw-pink); }
.kw-faq-item:nth-child(4n+4) { border-left-color: var(--kw-violett); }
.kw-faq-item[open] { box-shadow: 0 4px 16px rgba(37, 50, 68, .09); }

.kw-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 3rem 1.05rem 1.3rem;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--kw-text);
  position: relative;
  line-height: 1.5;
}
.kw-faq-item summary::-webkit-details-marker { display: none; }
.kw-faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
  color: var(--kw-tuerkis);
}
.kw-faq-item[open] summary::after { content: "−"; }
.kw-faq-item summary:hover { color: var(--kw-violett); }

.kw-faq-antwort {
  padding: 0 1.3rem 1.2rem;
  border-top: 1px solid var(--kw-linie);
  padding-top: 1rem;
}
.kw-faq-antwort p {
  color: var(--kw-text);
  font-size: 1.01rem;
  line-height: 1.75;
  margin-bottom: .85rem;
}
.kw-faq-antwort p:last-child { margin-bottom: 0; }
.kw-faq-antwort strong { color: var(--kw-violett); }
.kw-faq-antwort code {
  background: var(--kw-violett-h);
  color: var(--kw-violett);
  font-weight: 600;
  padding: .12em .42em;
  border-radius: 5px;
  font-size: .92em;
}
.kw-faq-antwort pre {
  background: #1f2937;
  color: #e8eef7;
  border-radius: 10px;
  padding: .85rem 1.1rem;
  overflow-x: auto;
  font-size: .9rem;
  line-height: 1.55;
  margin: .3rem 0 .9rem;
}
.kw-faq-antwort pre code { background: none; color: inherit; font-weight: 400; padding: 0; }
.kw-faq-antwort a { color: var(--kw-violett); font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--kw-violett-h); }
.kw-faq-antwort a:hover { border-bottom-color: var(--kw-violett); }

.kw-faq-glossar { margin-bottom: 0; }
.kw-faq-glossar .kw-glossar > div { background: #fff; }
