/* * CSS Variablen für konsistentes Design
 * Palette: Helles Pastel Grün (Soft Sage)
 * Wirkt natürlich, beruhigend und sehr freundlich.
 */
:root {
  --bg-color: #FFFFFF;       /* Klarer Weiß-Hintergrund */
  --card-bg: #FFFFFF;        /* Reines Weiß für Karten */
  --text-main: #111111;      /* Schwarz für alle Texte */
  --text-light: #111111;     /* Ebenfalls Schwarz – kein Grau mehr */
  
  /* Pastellgrün (warm, seriös, einladend) */
  --accent-color: #79BFA5;
  --accent-hover: #64A88E;
  
  /* Sekundärfarbe für sehr helle Flächen */
  --accent-light-bg: #FFFFFF;
  
  --border-radius: 12px;
  --spacing-section: 4rem;
  --max-width: 960px;
  --header-height: 70px;
}

/* Sichtbare Textmarkierung */
::selection {
  background-color: #ffd54f;
  color: #000000;
}

/* Reset & Basis-Typografie */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Medien und Text: nie breiter als Viewport, sauberer Umbruch */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

p,
li,
a,
h1,
h2,
h3,
h4,
span {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Allgemeine saubere mobile Basis: kein horizontaler Überlauf bei Zoom */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  /* Flexbox für Sticky Footer */
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* Garantiert, dass der Body mindestens die volle Höhe des Viewports einnimmt */
  overflow-x: hidden;
}

/* Zwingt den Hauptinhalt, den gesamten freien Platz einzunehmen und den Footer nach unten zu drücken */
main {
  flex-grow: 1;
}

/* Typografie */
h1, h2, h3 {
  line-height: 1.3;
  margin-bottom: 1rem;
  color: #1F3344;
  font-weight: 600;
}

h1 { font-size: 2.5rem; }
h2 { 
    font-size: 2rem; 
    margin-top: 1rem; 
    color: #1F3344;
    font-weight: 600; 
}
h3 { font-size: 1.25rem; color: #1F3344; }

p, li, address, td { margin-bottom: 1rem; color: #263746; }

a { text-decoration: none; color: inherit; transition: all 0.2s ease; }

ul { list-style: none; }

/* „Weitere Themen …“ auf allen Ratgeber- und Artikelseiten:
   sauberer Abschluss nach unten, kein Hochziehen mehr */
section[aria-labelledby="weitere-themen-heading"] {
  padding-top: 2.25rem;
  padding-bottom: 3.25rem;
  margin-top: 0;
}

section[aria-labelledby="weitere-themen-heading"] h2,
section[aria-labelledby="weitere-themen-heading"] h3 {
  margin-top: 0;
  margin-bottom: 0.65rem;
}

section[aria-labelledby="weitere-themen-heading"] ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0;
  row-gap: 0.4rem;
  max-width: 100%;
  margin: 0.55rem auto 0;
  padding: 0;
}

section[aria-labelledby="weitere-themen-heading"] ul li {
  margin-bottom: 0;
}

section[aria-labelledby="weitere-themen-heading"] ul li:not(:last-child)::after {
  content: " / ";
  white-space: pre;
}

/* Container Utility */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(252, 253, 249, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(121, 191, 165, 0.22);
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

/* Auf allen Seiten mit Hero-Bild: kein zusätzlicher Header-Hintergrund,
   damit die Navbar direkt auf dem Bild liegt (wie auf der Startseite).
   Gilt auch für Seiten, bei denen #hero nicht in <main> liegt (z.B. Mitgliedschaft). */
body:has(#hero) header {
  background-color: transparent;
  backdrop-filter: none;
  border-bottom: none;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: 54px;
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(121, 191, 165, 0.45);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(46, 95, 78, 0.14);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-color);
}

.nav-brand::before {
  content: "";
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 1.75rem;
  border-radius: 0.45rem;
  background: url("../assets/mietervereinigung-berlin-logo.svg") center / cover no-repeat;
  box-shadow: 0 10px 20px rgba(31, 51, 68, 0.18);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-main);
}

.nav-links a:hover, .nav-links a:focus {
  color: var(--accent-color);
  text-decoration: none;
  background: rgba(121, 191, 165, 0.16);
  border-radius: 999px;
}

/* Button in Navigation behält Button-Styles */
.nav-links a.btn {
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
}

.nav-links a.btn:hover, .nav-links a.btn:focus {
  text-decoration: none;
  transform: translateY(-1px);
}

/* Hilfsklasse für Anchor-Scroll-Offset wegen Fixed Header */
section {
  scroll-margin-top: calc(var(--header-height) + 2rem);
  padding: var(--spacing-section) 0;
}

/* Zentrierte Überschriften/Einleitungen der Hauptsektionen */
#leistungen,
#mitgliedschaft,
#kontakt {
  text-align: center;
}

/* Zentrierte Überschriften nur auf der Mitgliedschaftsseite und Startseite */
#beitragsmodelle h2,
#beitragsmodelle h3,
#leistungen h2,
#mitgliedschaft h2 {
  text-align: center;
}

/* Inhaltsseiten: alle h2 und h3 zentriert */
.container h2,
.container h3,
.leistungen-section h2,
section[aria-labelledby] h2 {
  text-align: center;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

/* Grüne Überschriften in Artikel-Sections (alte + neue Struktur) */
main section.container h2,
main .news-page.container h2 {
  color: var(--accent-color);
}

/* Fachartikel lesbarer: Überschriften in längeren Inhaltsseiten linksbündig */
.ratgeber-page .news-card h2,
.ratgeber-page .news-card h3,
.kontakt-page h2,
.verein-page .news-card h2,
.verein-page .news-card h3 {
  text-align: left;
}

/* Hero Section */
#hero {
  padding-top: 0;
  padding-bottom: 0;
  text-align: center;
  background-image: none;
  background-size: initial;
  position: relative;
  color: #fff;
  border-radius: 0;
  min-height: clamp(600px, 66vh, 760px);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

/* SEO-optimiertes Bild im Hero */
.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 1;
}

/* Overlay für Lesbarkeit */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(180deg, rgba(74, 74, 74, 0.65), rgba(0, 0, 0, 0.45));
  z-index: 2;
}

/* Inhalt über Bild/Overlay */
#hero .hero-content {
  position: relative;
  z-index: 3;
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 4rem;
}

#hero .hero-content h1 {
  margin-bottom: 0;
}

/* Hinweisblock unter dem Hero-Bild (nicht im Overlay-Bereich) */
.hero-important-below {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

.hero-important-below .important-note {
  margin-top: 0;
}

/* Lesbarkeit des Texts im Hero sicherstellen */
#hero h1,
#hero p {
  color: #fff;
}
#hero .hero-subtitle {
  color: #FFF3E5;
}

.hero-eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  opacity: 0.75;
  letter-spacing: 0.02em;
  text-transform: none;
}

.hero-title .hero-title-sub {
  display: block;
  font-size: 0.82em;
  font-weight: 600;
  margin-top: 0.15em;
  line-height: 1.15;
}

/* Kontrast für sekundären Button auf Bildhintergrund */
#hero .btn-secondary {
  color: #fff;
  border-color: rgba(255,255,255,0.9);
}
#hero .btn-secondary:hover,
#hero .btn-secondary:focus-visible {
  background-color: rgba(255,255,255,0.15);
}

/* Primärer Button im Hero-Bereich - Weißer Hintergrund, grüne Schrift */
#hero .btn-primary {
  background-color: #fff;
  color: var(--accent-hover);
  border-color: #fff;
}

#hero .btn-primary:hover {
  background-color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.hero-subtitle {
  display: block;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-intro {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
}

.article-lead-below {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.article-lead-below p {
  max-width: 880px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  background: #FFFFFF;
  border: 1px solid rgba(121, 191, 165, 0.30);
  border-left: 4px solid #79BFA5;
  border-radius: 12px;
  color: #17324d;
  line-height: 1.65;
  font-size: 1.03rem;
}

.article-seo-intro {
  margin: 0 0 1.5rem;
  padding: 0;
  background: #FFFFFF;
  color: #243646;
  font-size: 1.04rem;
  line-height: 1.72;
}

.article-date {
  color: #666666;
  font-size: 0.9rem;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
}

.hero-seo-intro {
  max-width: 900px;
  margin: 0.9rem auto 0;
  color: #F7FAF8;
  font-size: clamp(1rem, 1.5vw, 1.08rem);
  line-height: 1.7;
  font-weight: 500;
}

#hero + .article-lead-below + .news-page {
  padding-top: 0;
}

.article-lead-below + .hero-important-below {
  padding-top: 0.25rem;
  padding-bottom: 1.25rem;
}

.article-lead-below + .hero-important-below + .news-page {
  padding-top: 0;
}

/* Unterseiten: identischer sichtbarer Bildausschnitt wie Startseite */
body:has(#hero):not(:has(main.home-page)) #hero {
  min-height: clamp(600px, 66vh, 760px);
  height: clamp(600px, 66vh, 760px);
  overflow: hidden;
}

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: 50px; /* Pill shape */
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(148, 191, 167, 0.3);
}

.btn-primary {
  background-color: var(--accent-color);
  color: #fff;
  border: 2px solid var(--accent-color);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
  box-shadow: none;
}

.btn-secondary:hover {
  background-color: rgba(148, 191, 167, 0.15);
  transform: translateY(-2px);
}

/* Verein Section */
.verein-content {
  background-color: #fff;
  padding: 2.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 8px 20px rgba(148, 191, 167, 0.12);
  text-align: left;
}

/* Leistungen (Grid Layout) */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* HILFSKLASSE für 2-Spalten-Layout (Vergleich) */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch; /* sorgt für gleiche Höhe */
}

.grid-2 .card {
  height: 100%;
}

.grid-2 .card h3 {
  margin-top: 0;
}

/* Drückt den Button in der Card immer nach unten */
.card a.btn {
  margin-top: auto;
}

/* Icon-Styling für die Leistungs-Karten */
.card-icon {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 0.8rem;
  /* Flexbox zentriert das SVG horizontal und vertikal */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* WICHTIG: Damit das SVG die Größe des Textes (2.5rem) annimmt */
.card-icon svg {
  width: 1em;
  height: 1em;
}

.card {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0,0,0,0.02);
  text-align: left;
}

/* Zentriert den Inhalt (Icons, h3, p) in den Leistungskarten */
#leistungen .card {
  text-align: center;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(148, 191, 167, 0.2);
  border-color: rgba(148, 191, 167, 0.4);
}

/* Mitgliedschaft (Listen Styling) */
.benefits-list {
  margin-top: 1rem;
}

.benefits-list li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.8rem;
  color: var(--text-main);
}

.benefits-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

.important-note {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--accent-light-bg);
  border-radius: var(--border-radius);
  color: #111111;
  font-weight: 500;
  text-align: center;
  border: 1px dashed rgba(148, 191, 167, 0.5);
}

.cta-box {
  margin-top: 2rem;
  margin-bottom: 1.5rem;
  padding: 1.75rem 1.5rem;
  text-align: center;
  background-color: var(--accent-light-bg);
  border-radius: var(--border-radius);
  border: 1px solid rgba(148, 191, 167, 0.35);
}

.cta-box p {
  margin: 0 0 1rem;
  color: #111111;
}

.cta-box p:last-of-type {
  margin-bottom: 0;
}

.cta-box .btn-primary {
  margin-top: 0.25rem;
}

.legal-disclaimer {
  margin-top: 2rem;
  margin-bottom: 0;
  padding: 1.25rem 1.35rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #444444;
  background-color: #f8f9fb;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent-color);
}

/* Kontakt Section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

.contact-info strong {
  color: var(--text-main);
  display: block;
  margin-top: 1rem;
}
.contact-info { text-align: left; }

/* Desktop: Einleitungstext in Mieterberatung mittig */
@media (min-width: 769px) {
  #beratung-berlin > p {
    text-align: center;
  }
}

/* FOOTER - NEUE STRUKTUR (mit MAXIMAL reduzierten Abständen - Stufe 3) */
/* Basis-Styling für den gesamten Footer */
footer {
  margin-top: 4rem;
  background-color: #d8dce3;
  padding: 1.15rem 0 0.9rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

footer a {
  color: var(--text-light);
  text-decoration: none;
}

footer a:hover {
  color: var(--text-main);
}

.footer-list {
  list-style: none;
  padding: 0;
}

/* Vertikaler Abstand von Text/Adress-Absätzen weiter reduziert */
.footer-address p,
.footer-hours p {
  /* Von 0.2rem auf 0.1rem reduziert (minimaler Abstand) */
  margin-top: 0.1rem; 
}

.footer-address p:first-child,
.footer-hours p:first-child {
  margin-top: 0;
}

/* OBERE REIHE (Adresse links, Bürozeiten rechts) */
.footer-top-grid {
  display: grid;
  gap: 1.5rem; 
  /* Stärker reduziert: Abstand zur unteren Zeile von 1rem auf 0.75rem */
  padding-bottom: 0.75rem; 
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* 2-Spalten-Layout für Desktop für Adresse und Bürozeiten */
@media (min-width: 768px) {
  .footer-top-grid {
    grid-template-columns: 2fr 1fr;
  }
  .footer-hours {
    text-align: right;
  }
}

/* UNTERE REIHE (Copyright links, Links rechts auf einer Linie) */
.footer-bottom-line {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  /* Stärker reduziert: Abstand zur oberen Zeile von 0.75rem auf 0.5rem */
  padding-top: 0.5rem;
  gap: 0.5rem; /* Abstand zwischen Copyright und Links auf Mobile */
}

@media (min-width: 768px) {
  .footer-bottom-line {
    flex-direction: row;
    align-items: center;
  }
  .footer-legal-links {
    text-align: right;
    margin-left: auto;
  }
}

/* Links im Footer */
footer a {
  color: var(--text-main);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Mobile / Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }

  section {
    scroll-margin-top: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Container volle Breite, einheitliche Abstände */
  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    box-sizing: border-box;
  }

  /* Überschriften auf Mobile durchgängig mittig (inkl. Leistungen) */
  #main h1,
  #main h2,
  #main h3 {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
  }

  .ratgeber-page .news-card h2,
  .ratgeber-page .news-card h3,
  .verein-page .news-card h2,
  .verein-page .news-card h3,
  .kontakt-page h2 {
    text-align: center !important;
  }

  /* Nur Mobile: Mieterberatung & Mitgliedschaft mittig */
  #mitgliedschaft,
  #mitgliedschaft h2,
  #mitgliedschaft h3,
  #mitgliedschaft p,
  #mitgliedschaft .important-note,
  #mitgliedschaft .card,
  #mitgliedschaft .card p,
  #mitgliedschaft .card h3,
  #beratung-berlin,
  #beratung-berlin h2,
  #beratung-berlin h3,
  #beratung-berlin > p,
  #beratung-berlin .membership-note,
  #beratung-berlin .card,
  #beratung-berlin .card p,
  #beratung-berlin .card h3,
  #beratung-berlin .card h4,
  .topic-more-link,
  .membership-note {
    text-align: center !important;
  }

  .topic-more-link a {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Mobile: Abschnitt „Umfangreiche Leistungen bei niedrigem Beitrag“ – negativen Versatz aus, Luft nach oben */
  .leistungen,
  .leistungen-section,
  .services-section,
  section.leistungen {
    margin-top: 0 !important;
    padding-top: 48px !important;
    position: relative;
    top: 0 !important;
    transform: none !important;
  }

  .leistungen-page-pullup {
    margin-top: 0 !important;
    padding-top: calc(48px + 2.75rem) !important;
    position: relative;
    top: 0 !important;
    transform: none !important;
  }

  .leistungen h2,
  .leistungen-section h2,
  .services-section h2,
  section.leistungen h2,
  .section-title {
    margin-top: 0 !important;
    padding-top: 0 !important;
    text-align: center !important;
    line-height: 1.2;
  }

  #leistungen,
  #leistungen .container,
  #leistungen h2,
  #leistungen > p {
    text-align: center;
  }

  /* Grids untereinander statt nebeneinander */
  .grid-3,
  .grid-2 {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }

  .grid-2 .card {
    height: auto;
  }

  /* Karten volle Breite, nicht gequetscht */
  .card,
  .verein-content {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto;
    margin-right: auto;
  }

  /* Text in Karten linksbündig für bessere Lesbarkeit */
  .card p,
  .card h4,
  .verein-content p {
    text-align: left;
  }

  #leistungen .card p,
  #leistungen .card h3 {
    text-align: center;
  }

  /* Button-Gruppe untereinander, volle Breite */
  .button-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .button-group .btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  /* Hero Anpassungen für Mobile */
  #hero {
    min-height: 420px;
  }

  #hero .hero-content {
    padding-top: 2rem; 
    padding-bottom: 2rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Google Maps Karte responsive für mobile Geräte */
  .card iframe {
    height: 300px;
  }
}

/* Accessibility Focus Styles */
*:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Skip-Link für Tastaturnutzer */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: #fff;
  color: var(--text-main);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  z-index: 10000;
}

/* --- NEUE HILFSKLASSEN (Refactoring) --- */

/* Abstände (Utilities) */
.pt-2 { padding-top: 2rem; }
.pt-4 { padding-top: 4rem; }
.mt-1 { margin-top: 1rem; }
.mt-1-5 { margin-top: 1.5rem; }
.mt-2 { margin-top: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* Hilfsklasse: Text nicht umbrechen */
.nowrap {
  white-space: nowrap;
}

.center-text {
  text-align: center;
}

.topic-more-link {
  margin-top: 0.5rem;
}

.membership-note {
  margin-top: 1.5rem;
}

/* =========================================
   AKTUELLES – aufgeräumte Endversion
========================================= */

.news-page {
  padding-top: 5.5rem;
  padding-bottom: 4rem;
}

.news-title {
  margin: 0 0 1rem;
  text-align: center;
  line-height: 1.1;
}

.news-intro {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
}

/* Ratgeber-Übersicht: Lead unter der H1 (größer, 2–3 Zeilen) */
.ratgeber-overview .news-intro {
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  line-height: 1.55;
  max-width: 820px;
  color: #222222;
}

/* Ratgeber-Übersicht: Einleitung und Vertrauenszeile optisch wie news-intro mittig */
.ratgeber-overview .ratgeber-intro-seo,
.ratgeber-overview .ratgeber-trust-note {
  text-align: center;
}

/* Abstand unter der Überschrift "Häufige Themen" */
.ratgeber-overview > h2:first-of-type {
  margin-bottom: 2rem;
}

/* Fetter Link unten in den Ratgeber-Boxen (einheitlich) */
.ratgeber-overview .news-card-cta {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.ratgeber-overview .news-card-cta:last-child {
  margin-bottom: 0;
}

.ratgeber-overview .news-card-cta strong {
  font-weight: 700;
}

.article-badge-new {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 0 0.75rem !important;
  padding: 0.3rem 0.7rem !important;
  border-radius: 999px;
  background-color: #ffd84d !important;
  border: 2px solid #d3a300;
  color: #1a1a1a !important;
  font-size: 0.82rem !important;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1 !important;
  text-transform: uppercase;
  box-shadow: 0 0 0 3px rgba(255, 216, 77, 0.35), 0 3px 10px rgba(0, 0, 0, 0.14);
}

/* Beitrag teilen unter Artikeltext (Fachseiten) */
.news-page .news-card .share-box {
  text-align: center;
}

.ratgeber-overview.news-page .news-card .news-card-cta a {
  color: #2c5aa0;
  font-size: 1.0625rem;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ratgeber-overview.news-page .news-card .news-card-cta a:hover,
.ratgeber-overview.news-page .news-card .news-card-cta a:focus-visible {
  color: #1e4080;
}

.news-page .news-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.news-page .news-card {
  width: 100%;
  max-width: 100%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  color: #111111;
  box-sizing: border-box;
}

.news-page .news-card-welcome {
  max-width: 100%;
}

.news-page .news-card h2 {
  margin: 0.35rem 0 0.95rem;
  font-size: clamp(1.65rem, 2.6vw, 2.05rem);
  line-height: 1.28;
  text-align: center;
  color: var(--accent-color);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-page .news-card h2 a {
  font-size: inherit;
  font-weight: inherit;
}

.news-card h2 a,
.news-card h3 a,
.news-page .news-card h2 a,
.news-page .news-card h3 a {
  color: inherit;
  text-decoration: none;
}

.news-card h2 a:hover,
.news-card h2 a:focus,
.news-card h3 a:hover,
.news-card h3 a:focus,
.news-page .news-card h2 a:hover,
.news-page .news-card h2 a:focus,
.news-page .news-card h3 a:hover,
.news-page .news-card h3 a:focus {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.news-page .news-card h3 {
  font-size: 1.35rem;
  line-height: 1.35;
  margin-top: 24px;
  margin-bottom: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-page .news-card p,
.news-page .news-card li,
.news-page .news-card a,
.news-page .news-card span,
.news-page .news-card strong {
  margin: 0 0 1rem;
  text-align: left;
  color: #111111;
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.news-page .news-date {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #111111;
  margin: 0 0 0.35rem;
  text-align: left;
}

.news-page .news-source {
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #111111;
}

.news-page .news-source strong {
  color: #111111;
}

.info-hinweis {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: #f5f7fa;
  border-left: 4px solid #2c5aa0;
  border-radius: 8px;
  font-size: 0.98rem;
  line-height: 1.5;
  color: #111111;
}

.news-actions {
  margin-top: 1rem;
}

.news-actions .share-btn {
  margin: 0;
}

.share-btn {
  margin: 0;
}

.share-btn:active {
  transform: translateY(1px);
}

.share-box {
  margin-top: 1.6rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(121, 191, 165, 0.22);
}

.share-button,
.share-btn.btn,
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(121, 191, 165, 0.55);
  border-radius: 999px;
  background: rgba(121, 191, 165, 0.12);
  color: #275447;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 86, 69, 0.08);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.share-button::before,
.share-btn::before {
  content: "↗";
  font-size: 0.92em;
  line-height: 1;
  opacity: 0.9;
}

.share-button:hover,
.share-button:focus,
.share-btn:hover,
.share-btn:focus {
  background: rgba(121, 191, 165, 0.2);
  border-color: rgba(100, 168, 142, 0.75);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 86, 69, 0.14);
  outline: none;
}

.share-button:focus-visible,
.share-btn:focus-visible {
  outline: 2px solid rgba(100, 168, 142, 0.9);
  outline-offset: 2px;
}

.share-feedback {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: #2b4a3f;
  min-height: 1.2em;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1rem 0 1.2rem;
}

.news-card table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #ffffff;
}

.news-card th,
.news-card td {
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  text-align: left;
  vertical-align: top;
}

.news-card th {
  background: #f5f7fa;
  font-weight: 700;
  color: #111111;
}

/* Mobile */
@media (max-width: 768px) {
  .news-page {
    padding-top: 3.5rem;
    padding-bottom: 3rem;
  }

  .news-title {
    margin-bottom: 0.9rem;
  }

  .news-intro {
    margin: 0 auto 1.5rem;
  }

  .news-page,
  .news-page.container,
  .news-page .news-list,
  .news-page .news-card,
  .news-page .news-card * {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .news-page .news-list {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .news-page .news-card {
    padding: 20px 14px;
    border-radius: 12px;
  }

  .news-page .news-card h2 {
    font-size: clamp(1.5rem, 5vw, 1.85rem);
    line-height: 1.25;
    margin-bottom: 14px;
  }

  .news-page .news-card h3 {
    font-size: 1.22rem;
    line-height: 1.32;
    margin-top: 22px;
    margin-bottom: 10px;
  }

  .news-page .news-card p,
  .news-page .news-card li {
    font-size: 1.06rem;
    line-height: 1.72;
    letter-spacing: 0.01em;
    hyphens: auto;
  }

  .news-page .news-card a,
  .news-page .news-card span,
  .news-page .news-card strong {
    hyphens: auto;
  }

  .news-page .news-date,
  .news-page .news-source {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .news-actions {
    margin-top: 1.2rem;
  }

  .news-page .share-btn {
    width: 100%;
    padding: 0.68rem 0.95rem;
    font-size: 0.92rem;
  }

  .news-page .share-button {
    width: 100%;
    padding: 0.68rem 0.95rem;
    font-size: 0.92rem;
  }
}

.topic-more-link a,
.topic-more-link a:visited,
.topic-more-link a:hover,
.topic-more-link a:focus {
  text-decoration: underline !important;
  text-underline-offset: 2px;
  font-weight: 600;
}

.topic-more-link a:hover,
.topic-more-link a:focus {
  text-decoration-thickness: 2px;
}

.subpage-links {
  margin-top: 1.5rem;
}

/* Spezielle Karte für Bürozeiten (flach, grüner Hintergrund) */
.card-flat-accent {
  background-color: var(--accent-light-bg);
  box-shadow: none;
  border: 1px solid rgba(148, 191, 167, 0.2);
}

.card-flat-accent > h4:first-of-type {
  margin-top: 2rem;
}

/* Button Helper für Unterseiten */
.btn-block-mobile {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

/* Ab ca. Tablet-/Desktop-Breite: Text nicht umbrechen -> gleiche Höhe */
@media (min-width: 640px) {
  .btn-block-mobile {
    white-space: nowrap;
  }
}

/* SPEZIFISCHE ANPASSUNG: Abstand der H2 auf der Mitgliedschaftsseite */
#beitragsmodelle h2 {
    /* Reduziert den Abstand UNTER der H2 (Überschrift "Beitragsmodelle") auf 1rem */
    margin-bottom: 1rem;
}

/* Reduziert die Abstände der Beitragsmodelle-Sektion */
#beitragsmodelle {
    padding-top: 1rem; /* Statt Standard 4rem */
    padding-bottom: 2rem; /* Statt Standard 4rem */
}

/* Reduziert den Abstand nach der ersten Sektion vor Beitragsmodelle */
#main > section:first-of-type {
    padding-bottom: 1rem; /* Statt Standard 4rem */
}

/* Weniger Abstand für die Untersektion "Kosten für den Schriftverkehr" */
#beitragsmodelle > section.mt-4 {
  padding-top: 1rem;      /* statt 4rem Standard */
  padding-bottom: 1.5rem; /* etwas kompakter nach unten */
}

/* Minimaler Footer */
.footer-minimal {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

.footer-minimal a {
  color: var(--text-main);
  text-decoration: none;
}

.footer-minimal a:hover {
  color: var(--accent-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-minimal p {
  margin: 0;
  opacity: 0.9;
}

@media (max-width: 768px) {
  /* Überschriften: sauberer Zeilenumbruch, „Berlin e.V.“ bleibt zusammen (via &nbsp;) */
  h1, h2, h3 {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
    line-height: 1.2;
  }
}

/* =========================================
   NAVIGATION – Desktop breiter, Mobile stabil
========================================= */

/* Nav-Container auf Desktop breiter und luftiger */
header nav {
  max-width: 1280px;
  padding-left: 28px;
  padding-right: 28px;
  gap: 24px;
}

/* Seitentitel „Mietervereinigung Berlin e.V.“ mehr Platz, weniger Umbruch */
.nav-brand {
  flex: 0 0 270px;
  max-width: 270px;
  line-height: 1.2;
  white-space: nowrap;
  min-width: 0;
}

/* Navigationselemente in einer Zeile, ausgewogen verteilt */
.nav-links {
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 34px;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav-links a {
  white-space: nowrap;
}

.nav-links a.btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Etwas mehr Platz für mittlere Desktopgrößen */
@media (max-width: 1200px) {
  header nav {
    padding-left: 20px;
    padding-right: 20px;
    gap: 18px;
  }

  .nav-brand {
    flex: 0 0 240px;
    max-width: 240px;
  }

  .nav-links {
    gap: 24px;
  }
}

/* Tablet sauber reduzieren */
@media (max-width: 992px) {
  header nav {
    padding-left: 16px;
    padding-right: 16px;
    gap: 14px;
  }

  .nav-brand {
    flex: 0 0 210px;
    max-width: 210px;
    font-size: 0.95rem;
  }

  .nav-links {
    gap: 18px;
  }

  .nav-links a {
    font-size: 0.96rem;
  }
}

/* =========================================
   MOBILE NAVIGATION – saubere Endversion
========================================= */
@media (max-width: 768px) {
  :root {
    --header-height: auto;
  }

  header {
    position: static !important;
    height: auto !important;
    padding: 0.9rem 0 1rem;
  }

  nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.85rem;
    width: 100%;
    max-width: 100%;
    padding: 0 1rem !important;
    text-align: center;
  }

  .nav-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.25rem;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1.2;
    white-space: normal;
    max-width: 100%;
    flex: unset;
  }

  .nav-links {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem 0.6rem;
    width: 100%;
    max-width: 100%;
    align-items: center;
    justify-items: center;
    text-align: center;
    margin: 0 auto;
  }

  .nav-links a:not(.btn) {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.25;
    white-space: nowrap;
    min-width: 0;
  }

  .nav-links a.btn,
  .nav-links a.btn.btn-primary {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0.3rem auto 0;
    text-align: center;
  }

  #hero .hero-content {
    padding-top: 2.5rem !important;
  }
}

/* =========================================
   Startseite: Vertrauensblock, Teaser, CTA-Band
========================================= */
.home-trust-block,
.home-content-teaser {
  margin: 3rem 0;
}

.home-trust-block.compact-section,
.home-content-teaser.compact-section {
  margin: 2rem 0;
}

section.home-trust-block.compact-section,
section.home-content-teaser.compact-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.home-section-head {
  margin-bottom: 1.5rem;
}

.home-section-head.compact-head {
  margin-bottom: 1rem;
}

.home-section-head-center {
  text-align: center;
}

.home-section-head h2 {
  margin-bottom: 0.75rem;
}

.home-section-head.compact-head h2 {
  margin-bottom: 0.6rem;
}

.section-link-line {
  margin-top: 1rem;
}

.section-head-link,
.section-sub-link {
  color: inherit;
  text-decoration: none;
}

.section-head-link:hover,
.section-sub-link:hover,
.section-head-link:focus-visible,
.section-sub-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-section-head .section-sub-link {
  display: inline;
}

.home-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.home-trust-block .news-card,
.home-content-teaser .news-card {
  width: 100%;
  max-width: 100%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 14px;
  padding: 28px 32px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  color: #111111;
  box-sizing: border-box;
}

.home-content-teaser .home-section-head h2,
.home-trust-block .home-section-head h2 {
  color: var(--accent-color);
}

.home-content-teaser .news-card h3 {
  font-size: 1.35rem;
  line-height: 1.35;
  margin: 0 0 12px;
}

.home-content-teaser .news-card-cta {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.home-content-teaser .news-card .news-card-cta a {
  color: #2c5aa0;
  font-size: 1.0625rem;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.home-content-teaser .news-card .news-card-cta a:hover,
.home-content-teaser .news-card .news-card-cta a:focus-visible {
  color: #1e4080;
}

.cta-band {
  margin: 2.25rem 0 0;
  padding: 2rem 0;
  background: #f5f7fa;
}

.cta-band-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.cta-band-text {
  flex: 1 1 60%;
}

.cta-band .cta-band-inner h2,
.cta-band .cta-band-inner p {
  text-align: left;
}

.cta-band-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.equal-buttons .btn-equal {
  min-width: 190px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

@media (max-width: 900px) {
  .home-grid-2 {
    grid-template-columns: 1fr;
  }

  .cta-band-inner:not(.cta-band-inner--stacked) {
    flex-direction: column;
    align-items: flex-start;
  }

  .cta-band-inner:not(.cta-band-inner--stacked) .cta-band-actions {
    width: 100%;
  }

  .cta-band-inner:not(.cta-band-inner--stacked) .equal-buttons .btn-equal {
    width: 100%;
  }
}

/* =========================================
   Startseite (#main.home-page): enger, CTA gestapelt
========================================= */
main.home-page > section.home-trust-block.compact-section,
main.home-page > section.home-content-teaser.compact-section {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

main.home-page > section.home-trust-block.compact-section:first-of-type {
  margin-top: 0;
  padding-top: 1rem;
}

main.home-page #hero .hero-content {
  padding-bottom: 4rem;
}

main.home-page .home-section-head.compact-head {
  margin-bottom: 0.55rem;
}

main.home-page .home-trust-lead {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  line-height: 1.45;
  color: #222222;
}

main.home-page .home-grid-2 {
  gap: 0.85rem;
}

main.home-page .home-trust-block .news-card,
main.home-page .home-content-teaser .news-card {
  padding: 20px 22px;
}

/* CTA: Text zentriert, Buttons darunter nebeneinander; Band schließt an Footer an */
section.cta-band-home {
  margin-top: 1.25rem;
  margin-bottom: 0;
  padding-top: 1.75rem;
  padding-bottom: 2rem;
}

main.home-page > section.cta-band-home,
main.verein-page > section.cta-band-home,
main.ratgeber-page > section.cta-band-home,
main.fehler-page > section.cta-band-home,
main.wohngeld-page > section.cta-band-home,
main.wohnungsbesichtigung-page > section.cta-band-home,
main.wbs-page > section.cta-band-home,
main.indexmiete-page > section.cta-band-home,
main.mietminderung-page > section.cta-band-home,
main.wohnungsmaengel-page > section.cta-band-home,
main.kuendigung-page > section.cta-band-home,
main.untervermietung-page > section.cta-band-home,
main.aktuelles-page > section.cta-band-home {
  margin-top: 1.25rem;
  margin-bottom: 0;
  padding-top: 1.75rem;
  padding-bottom: 2rem;
}

main.ratgeber-page > section[aria-labelledby="weitere-themen-heading"] + section.cta-band-home,
main.fehler-page > section[aria-labelledby="weitere-themen-heading"] + section.cta-band-home,
main.wohngeld-page > section[aria-labelledby="weitere-themen-heading"] + section.cta-band-home,
main.wohnungsbesichtigung-page > section[aria-labelledby="weitere-themen-heading"] + section.cta-band-home,
main.wbs-page > section[aria-labelledby="weitere-themen-heading"] + section.cta-band-home,
main.indexmiete-page > section[aria-labelledby="weitere-themen-heading"] + section.cta-band-home,
main.mietminderung-page > section[aria-labelledby="weitere-themen-heading"] + section.cta-band-home,
main.wohnungsmaengel-page > section[aria-labelledby="weitere-themen-heading"] + section.cta-band-home,
main.kuendigung-page > section[aria-labelledby="weitere-themen-heading"] + section.cta-band-home,
main.untervermietung-page > section[aria-labelledby="weitere-themen-heading"] + section.cta-band-home {
  margin-top: 0;
}

.cta-band-inner--stacked {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
}

.cta-band-inner--stacked .cta-band-text {
  flex: 0 1 auto;
  max-width: 38rem;
  margin: 0 auto;
  width: 100%;
}

.cta-band-inner--stacked .cta-band-text h2,
.cta-band-inner--stacked .cta-band-text p {
  text-align: center;
}

main.home-page .cta-band-home .cta-band-text h2,
main.verein-page .cta-band-home .cta-band-text h2,
main.ratgeber-page .cta-band-home .cta-band-text h2,
main.fehler-page .cta-band-home .cta-band-text h2,
main.wohngeld-page .cta-band-home .cta-band-text h2,
main.wohnungsbesichtigung-page .cta-band-home .cta-band-text h2,
main.wbs-page .cta-band-home .cta-band-text h2,
main.indexmiete-page .cta-band-home .cta-band-text h2,
main.mietminderung-page .cta-band-home .cta-band-text h2,
main.wohnungsmaengel-page .cta-band-home .cta-band-text h2,
main.kuendigung-page .cta-band-home .cta-band-text h2,
main.aktuelles-page .cta-band-home .cta-band-text h2 {
  margin-top: 0;
}

.cta-band-inner--stacked .cta-band-actions {
  justify-content: center;
  flex-wrap: wrap;
  width: auto;
  max-width: 100%;
}

/* Startseite: Buttonbereich im CTA etwas tiefer setzen */
main.home-page .cta-band-home .cta-band-inner--stacked .cta-band-actions {
  margin-top: 0.75rem;
}

.cta-band-inner--stacked .equal-buttons .btn-equal {
  min-width: 168px;
  width: auto;
}

body:has(main.home-page) footer,
body:has(main.verein-page) footer,
body:has(main.ratgeber-page) footer,
body:has(main.fehler-page) footer,
body:has(main.wohngeld-page) footer,
body:has(main.wohnungsbesichtigung-page) footer,
body:has(main.wbs-page) footer,
body:has(main.indexmiete-page) footer,
body:has(main.mietminderung-page) footer,
body:has(main.wohnungsmaengel-page) footer,
body:has(main.kuendigung-page) footer,
body:has(main.untervermietung-page) footer,
body:has(main.kontakt-page) footer,
body:has(main.aktuelles-page) footer {
  margin-top: 0;
}

main.home-page + footer,
main.verein-page + footer,
main.ratgeber-page + footer,
main.fehler-page + footer,
main.wohngeld-page + footer,
main.wohnungsbesichtigung-page + footer,
main.wbs-page + footer,
main.indexmiete-page + footer,
main.mietminderung-page + footer,
main.wohnungsmaengel-page + footer,
main.kuendigung-page + footer,
main.untervermietung-page + footer,
main.kontakt-page + footer,
main.aktuelles-page + footer {
  margin-top: 0;
}

@media (max-width: 900px) {
  main.home-page .cta-band-inner--stacked,
  main.verein-page .cta-band-inner--stacked,
  main.ratgeber-page .cta-band-inner--stacked,
  main.fehler-page .cta-band-inner--stacked,
  main.wohngeld-page .cta-band-inner--stacked,
  main.wohnungsbesichtigung-page .cta-band-inner--stacked,
  main.wbs-page .cta-band-inner--stacked,
  main.indexmiete-page .cta-band-inner--stacked,
  main.mietminderung-page .cta-band-inner--stacked,
  main.wohnungsmaengel-page .cta-band-inner--stacked,
  main.kuendigung-page .cta-band-inner--stacked,
  main.untervermietung-page .cta-band-inner--stacked,
  main.aktuelles-page .cta-band-inner--stacked {
    align-items: center;
  }

  main.home-page .cta-band-inner--stacked .cta-band-actions,
  main.verein-page .cta-band-inner--stacked .cta-band-actions,
  main.ratgeber-page .cta-band-inner--stacked .cta-band-actions,
  main.fehler-page .cta-band-inner--stacked .cta-band-actions,
  main.wohngeld-page .cta-band-inner--stacked .cta-band-actions,
  main.wohnungsbesichtigung-page .cta-band-inner--stacked .cta-band-actions,
  main.wbs-page .cta-band-inner--stacked .cta-band-actions,
  main.indexmiete-page .cta-band-inner--stacked .cta-band-actions,
  main.mietminderung-page .cta-band-inner--stacked .cta-band-actions,
  main.wohnungsmaengel-page .cta-band-inner--stacked .cta-band-actions,
  main.kuendigung-page .cta-band-inner--stacked .cta-band-actions,
  main.untervermietung-page .cta-band-inner--stacked .cta-band-actions,
  main.aktuelles-page .cta-band-inner--stacked .cta-band-actions {
    justify-content: center;
    width: 100%;
    max-width: 22rem;
  }

  main.home-page .cta-band-inner--stacked .equal-buttons .btn-equal,
  main.verein-page .cta-band-inner--stacked .equal-buttons .btn-equal,
  main.ratgeber-page .cta-band-inner--stacked .equal-buttons .btn-equal,
  main.fehler-page .cta-band-inner--stacked .equal-buttons .btn-equal,
  main.wohngeld-page .cta-band-inner--stacked .equal-buttons .btn-equal,
  main.wohnungsbesichtigung-page .cta-band-inner--stacked .equal-buttons .btn-equal,
  main.wbs-page .cta-band-inner--stacked .equal-buttons .btn-equal,
  main.indexmiete-page .cta-band-inner--stacked .equal-buttons .btn-equal,
  main.mietminderung-page .cta-band-inner--stacked .equal-buttons .btn-equal,
  main.wohnungsmaengel-page .cta-band-inner--stacked .equal-buttons .btn-equal,
  main.kuendigung-page .cta-band-inner--stacked .equal-buttons .btn-equal,
  main.untervermietung-page .cta-band-inner--stacked .equal-buttons .btn-equal,
  main.aktuelles-page .cta-band-inner--stacked .equal-buttons .btn-equal {
    flex: 1 1 calc(50% - 0.4rem);
    min-width: 0;
    max-width: none;
  }
}

/* Seite leistungen.html: Karten-Layout (Salbei-Akzente) */
.leistungen-page-pullup {
  margin-top: -3.75rem;
  /* Überschrift + Einleitung etwas nach unten (~2 Zeilen) */
  padding-top: 3rem;
}

.leistungen-spotlight h2 {
  text-align: center;
}

.leistungen-spotlight__lead {
  text-align: center;
  color: #4a4a4a;
  max-width: 36rem;
  margin: 0 auto 2rem;
  line-height: 1.55;
}

.leistungen-icon-grid .leistungen-card-title {
  color: var(--accent-color);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.leistungen-berlin-text {
  text-align: center;
  padding-top: 0;
}

.leistungen-berlin-text h2 {
  margin-bottom: 1rem;
}

.leistungen-berlin-text p {
  max-width: 42rem;
  margin: 0 auto;
  color: #333;
}

.leistungen-zwei-spalten-block__grid .card {
  text-align: left;
}

.card--sage-tint {
  background-color: var(--accent-light-bg);
  border-color: rgba(148, 191, 167, 0.28);
}

.leistungen-block-card-heading {
  color: var(--accent-color);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: left;
}

.leistungen-subheading {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.leistungen-mitgliedschaft-intro {
  text-align: center;
  padding: 2.5rem 0 0;
}

.leistungen-mitgliedschaft-intro h2 {
  margin-bottom: 0.5rem;
}

.leistungen-mitgliedschaft-intro__lead {
  color: #666;
  font-size: 1.05rem;
  margin-bottom: 0;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.leistungen-vorteile-wrap {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.leistungen-vorteile-card {
  text-align: center;
  align-items: center;
  max-width: 36rem;
  margin: 0 auto;
}

.leistungen-vorteile-card__title {
  color: var(--accent-color);
  margin-bottom: 1.25rem;
}

.benefits-list--narrow {
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.leistungen-vorteile-note {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
  text-align: center;
}

.leistungen-vorteile-cta {
  margin-top: 0.25rem;
}

.leistungen-praxis-faq .card {
  text-align: left;
}

.leistungen-praxis-faq .leistungen-single-topic-card + .leistungen-faq-unified {
  margin-top: 2rem;
}

.leistungen-faq-unified {
  text-align: left;
}

.leistungen-faq-unified .leistungen-vorteile-card__title {
  text-align: center;
  width: 100%;
}

.leistungen-faq-flow {
  margin-top: 0.5rem;
}

.leistungen-faq-flow > h4.leistungen-subheading {
  margin-top: 1.5rem;
}

.leistungen-faq-flow > h4.leistungen-subheading:first-of-type {
  margin-top: 0.25rem;
}

.leistungen-faq-flow > p {
  margin-bottom: 0.25rem;
}

.leistungen-faq-flow > p:last-child {
  margin-bottom: 0;
}

.leistungen-single-topic-card {
  text-align: left;
}

.leistungen-single-topic-card .leistungen-subheading:first-of-type {
  margin-top: 0;
}

.leistungen-crosslink-section h2 {
  text-align: center;
}

.leistungen-crosslink-text {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto 1.5rem;
  color: #333;
}

.leistungen-crosslink-actions {
  text-align: center;
  margin-bottom: 0;
}

.leistungen-beratung-grid {
  margin-top: 2rem;
}

.home-leistungen-nach-aktuelles,
.home-anliegen-nach-aktuelles {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.home-leistungen-nach-aktuelles-link {
  margin-bottom: 0;
}

.leistungen-mitgliedschaft-cta {
  text-align: center;
  margin-top: 2rem;
}

.leistungen-crosslink-text--after-card {
  margin-top: 1.75rem;
  margin-bottom: 0;
}

/* --- Ratgeber Mieterhöhung: Quick-Check + CTA-Brücken --- */
/* Quick-Check direkt unter dem Hero-Bild (nicht im Overlay) */
.hero-quick-check-section {
  position: relative;
  z-index: 4;
  padding: 1.35rem 0 1.6rem;
  background: var(--bg-color);
  text-align: left;
}

main.ratgeber-page .hero-quick-check-section .article-quick-check {
  margin-top: 0;
  margin-bottom: 0;
  max-width: none;
  width: 100%;
}

.article-quick-check {
  background: var(--accent-light-bg);
  border-left: 4px solid var(--accent-color);
  padding: 1rem 1.25rem 1.15rem;
  margin: 1.25rem 0 0;
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  text-align: left;
}

.article-quick-check .article-quick-check-title {
  display: block;
  color: var(--accent-hover);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.article-quick-check-lead {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text-main);
}

.article-quick-check-brand {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 0.6rem 0.75rem;
  background: rgba(148, 191, 167, 0.18);
  border-radius: 8px;
}

.article-quick-check-facts {
  margin: 0;
}

.article-quick-check-fact {
  margin-bottom: 1rem;
}

.article-quick-check-fact:last-child {
  margin-bottom: 0;
}

.article-quick-check-fact dt {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-hover);
  margin-bottom: 0.3rem;
}

.article-quick-check-fact dd {
  margin: 0;
  padding: 0;
  line-height: 1.55;
  font-size: 0.98rem;
}

.article-quick-check ul {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

.article-quick-check li {
  margin-bottom: 0.35rem;
}

.article-quick-check li:last-child {
  margin-bottom: 0;
}

.ratgeber-intro-seo,
.ratgeber-trust-note,
.article-trust-note,
.article-context-note {
  margin: 16px 0;
}

.article-trust-note,
.article-context-note,
.ratgeber-trust-note,
.ratgeber-intro-seo {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

main.ratgeber-page .ratgeber-overview.news-page {
  padding-top: 1.5rem;
}

.ratgeber-overview .ratgeber-intro-seo {
  margin-top: 0;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  font-size: clamp(1.05rem, 1.3vw, 1.15rem);
  line-height: 1.7;
  font-weight: 500;
  color: #17324d;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(239, 246, 255, 0.98));
  border: 1px solid rgba(29, 78, 137, 0.12);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(23, 50, 77, 0.08);
}

main.datenschutz-page > h1 {
  margin-top: 7rem;
  text-align: center;
}

@media (max-width: 768px) {
  main.ratgeber-page .ratgeber-overview.news-page {
    padding-top: 2.25rem;
  }

  .ratgeber-overview .ratgeber-intro-seo {
    padding: 0.9rem 1rem;
  }
}

.article-trust-note {
  font-size: 1rem;
}

.ratgeber-faq {
  padding: 20px 0 10px;
}

.ratgeber-faq h2 {
  margin-bottom: 14px;
}

.ratgeber-faq h3 {
  margin-top: 20px;
  margin-bottom: 8px;
}

/* =========================================
   MOBILE-ONLY FEINSCHLIFF (ohne Desktop-Eingriff)
========================================= */
@media (max-width: 768px) {
  /* Hero auf Mobil kompakter, damit Content schneller sichtbar ist */
  body:has(#hero):not(:has(main.home-page)) #hero {
    min-height: 460px !important;
    height: auto !important;
  }

  #hero .hero-content {
    padding-top: 2.1rem !important;
    padding-bottom: 2rem !important;
  }

  /* SEO-Intro unter H1 mobil lesbar halten */
  .hero-seo-intro {
    font-size: 0.97rem;
    line-height: 1.55;
    max-width: 94%;
    margin-top: 0.7rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    overflow: hidden;
  }

  /* Artikel soll mobil schneller beginnen */
  #hero + .news-page {
    padding-top: 1.2rem !important;
  }

  /* Mobile Navigation luftiger und besser klickbar */
  .nav-links {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.65rem 0.55rem !important;
  }

  .nav-links a:not(.btn) {
    white-space: normal !important;
    line-height: 1.2 !important;
    padding: 0.25rem 0.3rem;
  }

  /* Mitgliedschaft: negativen Desktop-Offset mobil neutralisieren */
  .leistungen-section[style] {
    margin-top: 0 !important;
  }
}
