/* Nebenkostenverteiler — gemeinsame Styles für Unterseiten
   (Impressum, Datenschutz, AGB, Widerruf, Kontakt, FAQ, Blog) */

:root {
  --green: #1f4d3d;
  --green-dark: #163a2e;
  --green-light: #d8e8d8;
  --cream: #f4ede2;
  --cream-light: #faf5ed;
  --cream-dark: #efe8d9;
  --border: #e0d8cb;
  --border-strong: #d6cfc0;
  --text: #2c2926;
  --text-soft: #6b665e;
  --text-mute: #8b857c;
  --error: #c44a3e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* clip statt hidden — sonst killt der Scroll-Container das position: sticky des Headers */
html, body { overflow-x: clip; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
}
.serif { font-family: 'Playfair Display', Georgia, serif; }

/* HEADER — feste Höhe für einheitliches Aussehen über alle Seiten */
.site-header {
  background: var(--green);
  color: var(--cream);
  padding: 0 2rem;
  min-height: 64px;
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.site-header .logo { justify-self: start; }
.site-header .nav { justify-self: center; }
.site-header > *:nth-child(3) { justify-self: end; }
@media (max-width: 800px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0.7rem 1rem;
    min-height: 0;
  }
  .site-header .logo,
  .site-header .nav { justify-self: center; }
  .nav { justify-content: center; }
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--cream);
}
/* logo-icon: SVG-Icon (favicon.svg) mit eingebautem grünem Hintergrund.
   Kein background/border-radius nötig — das SVG bringt sein eigenes Design mit. */
.logo-icon {
  width: 32px;
  height: 32px;
  display: block;
  flex-shrink: 0;
}
.nav { display: flex; gap: 1.75rem; align-items: center; }
.nav a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav a:hover, .nav a.active { color: var(--cream); }
.nav a.active { font-weight: 600; position: relative; }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
}
/* Senkrechter Trennstrich zwischen Startseiten-Themen und externen Seiten */
.nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(244,237,226,0.28);
  margin: 0 0.25rem;
  flex-shrink: 0;
}
/* Rechte Header-Sektion: DE/EN + Account
   → identisch zur Startseite (index.html .lang-toggle / .account-btn), damit die
   Buttons in Größe/Look nicht zwischen Startseite und Unterseiten springen. */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.header-lang {
  display: inline-flex;
  background: rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 3px;
}
.header-lang button {
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.7);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}
.header-lang button.active { background: var(--cream); color: var(--green); }
.header-lang button:hover:not(.active) { color: var(--cream); }

/* Account-Button (eingeloggt) — matcht .account-btn auf der Startseite */
.header-acc-btn,
.header-acc-login {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--cream);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.15s;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}
.header-acc-btn:hover,
.header-acc-login:hover { background: rgba(255,255,255,0.2); }
.header-acc-avatar {
  width: 22px; height: 22px;
  background: var(--cream); color: var(--green);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
  flex: 0 0 auto;
}
.header-acc-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 800px) {
  .header-right { justify-content: center; }
  .header-acc-name { display: none; }
}
@media (max-width: 600px) {
  .header-acc-btn,
  .header-acc-login { padding: 0.4rem 0.7rem; font-size: 0.78rem; }
}

@media (max-width: 800px) {
  .nav-divider { display: none; }
}
.nav .nav-badge {
  background: #ff7a1f;
  color: white;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 0.35rem;
  vertical-align: 1px;
}

/* MAIN */
.page-main {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}
.page-main h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--green);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}
.page-main .lead-date {
  color: var(--text-mute);
  font-size: 0.88rem;
  margin-bottom: 2rem;
}
.page-main h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  color: var(--green);
  margin: 2.5rem 0 0.85rem;
  line-height: 1.3;
}
.page-main h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--text);
  margin: 1.8rem 0 0.5rem;
}
.page-main p { margin-bottom: 1rem; color: var(--text); }
.page-main ul, .page-main ol { margin: 0 0 1rem 1.5rem; }
.page-main li { margin-bottom: 0.45rem; }
/* Inline-Links im Content-Bereich unterstreichen — Buttons (.btn) davon ausnehmen */
.page-main a:not(.btn) { color: var(--green); text-decoration: underline; }
.page-main a:not(.btn):hover { color: var(--green-dark); }
.page-main strong { color: var(--text); }
.page-main hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* PLACEHOLDER — markiert Stellen, die der Betreiber ersetzen muss */
.placeholder {
  background: #fff3d9;
  border-left: 3px solid #b88a00;
  padding: 0.15rem 0.45rem;
  font-family: 'Courier New', monospace;
  font-size: 0.92em;
  color: #6b4f00;
  border-radius: 3px;
}

/* INFO BOX */
.info-box {
  background: var(--cream-light);
  border-left: 4px solid var(--green);
  border-radius: 6px;
  padding: 1rem 1.2rem;
  margin: 1.25rem 0;
  font-size: 0.92rem;
}
.info-box.warn {
  background: #fef5ee;
  border-left-color: #b88a00;
}
.info-box.warn strong { color: #6b4f00; }
.info-box.danger {
  background: #fff3f1;
  border-left-color: var(--error);
}
.info-box strong { color: var(--green); display: block; margin-bottom: 0.35rem; }

/* CONTACT CARDS */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
  margin: 1.5rem 0;
}
.contact-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.contact-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  color: var(--green);
}
.contact-card p { font-size: 0.92rem; }
.contact-card-single { margin: 1.5rem 0; max-width: 640px; }
.contact-mail { font-size: 1.05rem; font-weight: 600; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green);
  color: var(--cream);
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn:hover {
  background: var(--green-dark);
  transform: translateY(2px);
  box-shadow: 0 2px 6px rgba(31,77,61,0.18);
  text-decoration: none;
}
.btn.outline {
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
}
.btn.outline:hover { background: var(--green); color: var(--cream); }

/* FAQ items */
.faq-list { margin: 1.5rem 0; }
.faq-list details {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.7rem;
  padding: 0;
  overflow: hidden;
}
.faq-list summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.96rem;
  list-style: none;
  position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 1rem;
  color: var(--green);
  font-size: 1.4rem;
  line-height: 1;
  font-weight: 400;
}
.faq-list details[open] summary::after { content: "−"; }
.faq-list details[open] summary { background: var(--cream-light); }
.faq-list .faq-body {
  padding: 0 1.25rem 1.2rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}
.faq-cat-h {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--green);
  margin: 2rem 0 0.75rem;
}

/* BLOG */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  margin-top: 2rem;
}
.blog-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.18s;
}
.blog-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(31,77,61,0.10);
}
.blog-card .blog-card-image {
  background: linear-gradient(135deg, var(--green-light), var(--cream-dark));
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
}
.blog-card .blog-card-body {
  padding: 1.2rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card .blog-card-cat {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.blog-card h3 {
  font-family: 'Playfair Display', serif;
  color: var(--text);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}
.blog-card p {
  font-size: 0.9rem;
  color: var(--text-soft);
  flex: 1;
  margin-bottom: 1rem;
}
.blog-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card .read-more {
  color: var(--green);
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* BLOG ARTICLE */
.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-mute);
  font-size: 0.85rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.blog-article-meta .pill {
  background: var(--green-light);
  color: var(--green);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.78rem;
}
.blog-toc {
  background: var(--cream-light);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.92rem;
}
.blog-toc strong { display: block; margin-bottom: 0.4rem; color: var(--green); }
.blog-toc ol { margin: 0 0 0 1.25rem; }
.blog-cta {
  background: var(--green);
  color: var(--cream);
  padding: 1.75rem;
  border-radius: 14px;
  text-align: center;
  margin: 2.5rem 0 0;
}
.blog-cta h3 {
  font-family: 'Playfair Display', serif;
  color: var(--cream);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.blog-cta p { color: rgba(244,237,226,0.85); margin-bottom: 1.25rem; }
.blog-cta .btn {
  background: var(--cream);
  color: var(--green);
}
.blog-cta .btn:hover { background: white; }

/* FOOTER */
.site-footer {
  background: var(--green-dark);
  color: rgba(244,237,226,0.78);
  padding: 3rem 1.5rem 1.5rem;
  font-size: 0.85rem;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 {
  color: var(--cream);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.85rem;
}
.footer-grid a {
  display: block;
  color: rgba(244,237,226,0.78);
  text-decoration: none;
  padding: 0.25rem 0;
}
.footer-grid a:hover { color: var(--cream); }
.footer-grid a.active {
  color: var(--cream);
  font-weight: 600;
  position: relative;
  padding-left: 0.85rem;
}
.footer-grid a.active::before {
  content: "›";
  position: absolute;
  left: 0;
  color: var(--cream);
  font-weight: 700;
}
.footer-bottom {
  border-top: 1px solid rgba(244,237,226,0.15);
  padding-top: 1.5rem;
  font-size: 0.78rem;
  text-align: center;
  color: rgba(244,237,226,0.5);
}

@media (max-width: 600px) {
  .nav { gap: 1rem; }
  .nav a { font-size: 0.82rem; }
  .site-header { padding: 0.7rem 1rem; }
  .page-main { padding: 2rem 1.1rem 3rem; }
}
