/* ================================================================
   KS Hausbau — modern long-form content page (TOC, tinted sections,
   author box, FAQ accordion). Framework-independent, mobile-first.
   Scoped under .ks-article so it never leaks into the rest of the site.
   ================================================================ */

.ks-article {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 0 60px;
  color: #444;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}

/* .pgl-intro / .lead (legacy theme wrapper) add ~115px of top padding —
   collapse that down, scoped only to pages using this new article layout. */
.pgl-intro:has(.ks-article) {
  padding-top: 24px;
  margin-bottom: 0;
}
.pgl-intro .lead:has(.ks-article) {
  padding-top: 0;
}

/* ---------- Headings inside the article ---------- */
.ks-article h1 {
  font-size: 28px;
  line-height: 1.25;
  margin: 0 0 16px;
  color: #1a1a1a;
}
.ks-article h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 40px 0 14px;
  padding-top: 4px;
  color: #1a1a1a;
}
.ks-article h3 {
  font-size: 18px;
  line-height: 1.35;
  margin: 24px 0 10px;
  color: #1a1a1a;
}
.ks-article > .ks-toc + h2,
.ks-article-body > h2:first-child {
  margin-top: 0;
}
.ks-article p {
  margin: 0 0 16px;
}
.ks-article ul {
  margin: 0 0 20px;
  padding-left: 0;
  list-style: none;
}

/* ---------- Lead + hero CTA row ---------- */
.ks-article-lead {
  font-size: 18px;
  line-height: 1.6;
  color: #555;
}
.ks-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 36px;
}
.ks-hero-cta .btn {
  margin: 0;
}

/* ---------- Table of contents ---------- */
.ks-toc {
  background: #f7f7f7;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  padding: 20px 24px;
  margin: 0 0 40px;
}
.ks-toc-title {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #666;
  margin: 0 0 12px;
}
.ks-toc ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: ks-toc-counter;
}
.ks-toc li {
  counter-increment: ks-toc-counter;
  margin-bottom: 8px;
}
.ks-toc li::before {
  content: counter(ks-toc-counter) ".";
  display: inline-block;
  width: 22px;
  color: #0063af;
  font-weight: 700;
}
.ks-toc a {
  color: #444;
  text-decoration: none;
}
.ks-toc a:hover,
.ks-toc a:focus {
  color: #0063af;
  text-decoration: underline;
}

/* ---------- Checklist (Vorteile etc.) ---------- */
.ks-check-list li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
}
.ks-check-list li::before {
  content: "\f00c";
  font-family: "FontAwesome";
  position: absolute;
  left: 0;
  top: 1px;
  color: #0063af;
  font-size: 14px;
}
.ks-criteria-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}
.ks-criteria-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0063af;
}

/* ---------- Tinted sections ---------- */
.ks-section-tinted {
  border-radius: 8px;
  padding: 28px 28px 8px;
  margin: 40px 0;
}
.ks-section-tinted > h2:first-child,
.ks-section-tinted > h3:first-child {
  margin-top: 0;
}
.ks-section-blue {
  background: #eef5fb;
}
.ks-section-orange {
  background: #fdf3e7;
}
.ks-section-gray {
  background: #f4f4f4;
}

/* ---------- Author box ---------- */
.ks-author-box {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 20px 24px;
  margin: 40px 0;
}
.ks-author-box img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.ks-author-name {
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 2px;
}
.ks-author-role {
  color: #666;
  font-size: 14px;
  margin: 0 0 6px;
}
.ks-author-note {
  font-size: 13px;
  color: #888;
  margin: 0;
}

/* ---------- FAQ accordion ---------- */
.ks-faq {
  border-top: 1px solid #e6e6e6;
}
.ks-faq-item {
  border-bottom: 1px solid #e6e6e6;
}
.ks-faq-question-wrap {
  margin: 0;
  font-size: inherit;
}
.ks-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 18px 4px;
  font-size: 17px;
  font-weight: 600;
  color: #1a1a1a;
}
.ks-faq-icon {
  flex-shrink: 0;
  color: #0063af;
  transition: transform 0.2s ease;
}
.ks-faq-question[aria-expanded="true"] .ks-faq-icon {
  transform: rotate(180deg);
}
.ks-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.ks-faq-answer-inner {
  padding: 0 4px 18px;
  color: #555;
}
.ks-faq-answer-inner p {
  margin: 0;
}

/* ---------- CTA banner ---------- */
.ks-cta-banner {
  background: #0063af;
  color: #fff;
  border-radius: 8px;
  padding: 36px 28px;
  margin: 48px 0 0;
  text-align: center;
}
.ks-cta-banner h2 {
  color: #fff;
  margin-top: 0;
}
.ks-cta-banner p {
  color: #eaf2fa;
}
.ks-cta-banner .btn-primary {
  background-color: #f39207;
  border-color: #f39207;
  color: #fff;
}
.ks-cta-banner .btn-primary:hover,
.ks-cta-banner .btn-primary:focus {
  background-color: #fff;
  border-color: #fff;
  color: #0063af;
}
.ks-cta-banner a.ks-cta-phone {
  color: #fff;
  text-decoration: underline;
}

@media (min-width: 768px) {
  .ks-article {
    padding: 56px 0 80px;
  }
  .ks-article h1 {
    font-size: 36px;
  }
  .ks-article h2 {
    font-size: 26px;
  }
  .ks-article h3 {
    font-size: 20px;
  }
}
