/*
 * Mobile Inhalte – Abstände, Umbruch, responsive Überschriften
 * baumann-makler.de
 * Fließtext-Basis: 14px — Überschriften immer erkennbar größer
 */

/* === Inhaltsabstand & Bilder (alle Seiten) === */
#fl_content_margin {
  box-sizing: border-box;
}

#fl_content .postcontent,
#fl_content .fl_post,
#fl_content .fl_post_content_inner,
#fl_content .fl_article {
  box-sizing: border-box;
  max-width: 100%;
}

#fl_content .postcontent img {
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}

#fl_content .rg-scr-img-list,
#fl_content .rg-scr-slice-container {
  max-width: 100%;
  overflow: hidden;
}

/* Startseite – Ball kleiner & zentriert */
.home_flex1 .home_item_1 {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.home_flex1 .home_item_1 img {
  max-width: min(100%, 180px);
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

.home_item_2 img[alt="stempel"] {
  max-width: min(100%, 110px);
  height: auto;
}

@media (min-width: 768px) {
  #fl_content_margin {
    padding: 30px 28px 20px 28px !important;
  }

  #fl_content .fl_post {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .home_flex1 .home_item_1 img {
    max-width: min(100%, 200px);
  }
}

@media (min-width: 1024px) {
  #fl_content_margin {
    padding: 36px 36px 24px 36px !important;
  }
}

@media (max-width: 767px) {
  #fl_content_margin {
    padding: 20px 16px 28px 16px !important;
    margin-bottom: 36px !important;
    box-sizing: border-box;
  }

  #fl_content .list .postcontent,
  #fl_content .grid .postcontent,
  #fl_content .postcontent {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.5;
  }

  #fl_content .postcontent p,
  #fl_content .postcontent li {
    font-size: 14px;
    line-height: 1.5;
  }

  .fl_post,
  .fl_post_content_inner,
  .fl_article {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
  }

  #fl_content .postcontent img,
  .rg-scr-img-list img {
    max-width: 100% !important;
    height: auto !important;
  }

  #fl_content .postcontent iframe {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .accordion-inner {
    padding: 12px 10px !important;
  }

  /* Überschriften-Hierarchie (Minimum jeweils über 14px Fließtext) */
  #fl_content .postcontent h1,
  #fl_content h1.fl_page_title {
    font-size: clamp(1.35rem, 5vw, 1.85rem) !important; /* ca. 21.6–29.6 px */
    line-height: 1.22 !important;
    font-weight: 600;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: anywhere;
  }

  #fl_content .postcontent h2,
  #fl_content .postcontent h2.rl_sliders-title,
  #fl_content .postcontent h2.nn_sliders-title {
    font-size: clamp(1.22rem, 4.5vw, 1.55rem) !important; /* ca. 19.5–24.8 px */
    line-height: 1.28 !important;
    font-weight: 600;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: anywhere;
  }

  #fl_content .postcontent h3 {
    font-size: clamp(1.12rem, 4vw, 1.38rem) !important; /* ca. 17.9–22.1 px */
    line-height: 1.32 !important;
    font-weight: 600;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: anywhere;
  }

  #fl_content .postcontent h4 {
    font-size: clamp(1.06rem, 3.6vw, 1.22rem) !important; /* ca. 17–19.5 px */
    line-height: 1.35 !important;
    font-weight: 600;
  }

  #fl_content .postcontent h5 {
    font-size: clamp(1rem, 3.4vw, 1.12rem) !important; /* ca. 16–17.9 px */
    line-height: 1.35 !important;
    font-weight: 600;
  }

  #fl_content .postcontent h6 {
    font-size: clamp(0.97rem, 3.2vw, 1.08rem) !important; /* ca. 15.5–17.3 px */
    line-height: 1.35 !important;
    font-weight: 600;
  }

  .rl_sliders .accordion-heading .accordion-toggle,
  .rl_sliders .rl_sliders-toggle-inner,
  .nn_sliders .nn_sliders-toggle-inner {
    font-size: clamp(1.05rem, 3.8vw, 1.18rem) !important; /* ca. 16.8–18.9 px */
    line-height: 1.35 !important;
    font-weight: 600;
    white-space: normal !important;
    text-align: left;
  }

  .rl_sliders .accordion-heading .accordion-toggle {
    padding: 10px 8px !important;
  }
}

@media (max-width: 480px) {
  #fl_content_margin {
    padding: 16px 12px 22px 12px !important;
  }

  div.home_flex1 {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  div.home_item_1,
  div.home_item_2 {
    max-width: 100% !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    box-sizing: border-box;
  }

  .home_flex1 .home_item_1 img {
    max-width: min(100%, 160px);
    margin-bottom: 0.75rem;
  }

  #google-map-privacy {
    padding: 0.75em 0.85em !important;
    font-size: 14px;
    line-height: 1.45;
  }

  #google-map-privacy label {
    display: block;
    line-height: 1.45;
  }

  .custom_footer hr + p span,
  .custom_footer .pyramide_slider span {
    font-size: 9pt !important;
    line-height: 1.5 !important;
  }

  #fl_content .postcontent table {
    display: block;
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #fl_content .postcontent img[style*="float"] {
    float: none !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
  }
}

@media (max-width: 400px) {
  #fl_content_margin {
    padding: 14px 10px 18px 10px !important;
  }

  .rl_sliders .accordion-heading .accordion-toggle {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .btn {
    white-space: normal;
    max-width: 100%;
  }
}

/* Seite „Über uns“ – Counter zentriert (Desktop + Mobil) */
#fl_content .postcontent .custom_counter,
#fl_content .postcontent .custom_counter form,
#fl_content .postcontent .custom_counter form p {
  text-align: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

#fl_content .postcontent .custom_counter input[name="countupinput"] {
  text-align: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Seite „Über uns“ – nur Mobil (Desktop unverändert) */
@media (max-width: 767px) {
  #fl_content .postcontent .custom_counter input[name="countupinput"] {
    min-width: 0;
    font-size: clamp(0.8rem, 3.2vw, 1rem) !important;
    white-space: normal;
    overflow-wrap: anywhere;
    word-wrap: break-word;
  }

  #fl_content .postcontent .box_flex1 {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem;
  }

  #fl_content .postcontent .box_item_1,
  #fl_content .postcontent .box_item_2 {
    max-width: 100% !important;
    width: 100% !important;
  }

  #fl_content .postcontent .box_item_2 {
    text-align: center;
  }

  #fl_content .postcontent .box_item_2 img {
    max-width: min(100%, 280px) !important;
    width: auto !important;
    height: auto !important;
  }

  #fl_content .postcontent .divbox_flex2 {
    justify-content: center;
    gap: 0.5rem;
  }

  #fl_content .postcontent .divbox_item1 {
    flex: 1 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
    margin: 8px !important;
    text-align: center;
  }

  #fl_content .postcontent .divbox_item1 img {
    width: 100% !important;
    max-width: 160px;
    height: auto !important;
  }
}

@media (max-width: 400px) {
  #fl_content .postcontent .divbox_item1 {
    flex: 1 1 100%;
    max-width: 220px;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Leistungen / Privatkunden / Geschäftskunden – Akkordeon (Mobil-Slider ≤1000px) */
@media (max-width: 1000px) {
  .pyramide_slider .rl_sliders.accordion > .accordion-group {
    margin-bottom: 12px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    overflow: hidden;
  }

  .pyramide_slider .rl_sliders .accordion-heading {
    margin: 0;
  }

  .pyramide_slider .rl_sliders .accordion-heading .accordion-toggle {
    min-height: 3.75rem;
    padding: 18px 14px !important;
    font-size: clamp(1.14rem, 4.5vw, 1.32rem) !important;
    font-weight: 700;
    line-height: 1.38 !important;
    display: flex;
    align-items: center;
    text-align: left;
    white-space: normal !important;
    background-color: #ececec;
    color: #2e1532;
  }

  .pyramide_slider .rl_sliders .accordion-toggle.collapsed {
    background-color: #f7f7f7;
  }

  .pyramide_slider .rl_sliders .rl_sliders-toggle-inner,
  .pyramide_slider .nn_sliders .nn_sliders-toggle-inner {
    font-size: inherit !important;
    font-weight: inherit;
    line-height: inherit;
    white-space: normal;
    display: block;
    width: 100%;
  }

  .pyramide_slider .rl_sliders .accordion-body .accordion-inner.panel-body {
    padding: 16px 14px 20px !important;
    min-height: 3.25rem;
    font-size: 14px;
    line-height: 1.55;
  }

  /* Titel steht bereits im Klappkopf – Doppelüberschrift im Inhalt ausblenden */
  .pyramide_slider .rl_sliders h2.rl_sliders-title,
  .pyramide_slider .rl_sliders h2.nn_sliders-title {
    display: none;
  }
}

@media (max-width: 480px) {
  .pyramide_slider .rl_sliders .accordion-heading .accordion-toggle {
    min-height: 4.25rem;
    padding: 18px 12px !important;
    font-size: clamp(1.1rem, 5vw, 1.24rem) !important;
  }
}