/* Mobile layout 320–480px for header, footer and Ratgeber.
   Does not change texts or images. Desktop 1281+ is untouched.
   Loaded last so it can override older header shrink rules. */

@media (max-width: 480px) {
  html, body {
    overflow-x: clip;
  }
  body {
    font-size: 17px;
    line-height: 1.6;
  }

  header .wrap.nav,
  .wrap.nav {
    height: 60px;
    min-height: 60px;
    max-height: none;
    padding: 0 14px;
    gap: 8px;
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
  }
  .nav .logo {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 132px;
  }
  .nav .logo img {
    display: block;
    height: auto !important;
    width: auto;
    max-height: 32px !important;
    max-width: 100%;
    flex-shrink: 1 !important;
    object-fit: contain;
  }
  .hdr-right {
    gap: 8px;
    flex: 0 0 auto;
  }
  .lang-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    box-sizing: border-box;
  }
  .lang-btn .code {
    display: none;
  }
  .cta-termin {
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px !important;
    font-size: 13px;
    gap: 6px;
    box-sizing: border-box;
  }
  .cta-termin .l {
    display: none !important;
  }
  .cta-termin .cal {
    display: inline-block !important;
    width: 18px;
    height: 18px;
  }
  .nav-burger {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    box-sizing: border-box;
  }
  .lang-menu {
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
  }
  .lang-menu a {
    min-height: 44px;
  }
  .nav.menu-open nav ul {
    max-height: calc(100vh - 60px);
    padding: 8px 16px 16px;
  }
  .nav.menu-open nav ul a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 0;
  }

  img, video {
    max-width: 100%;
  }
  video {
    height: auto;
  }

  .partner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .partner img {
    height: 20px;
    width: auto;
    max-width: 42%;
    flex: 0 0 auto;
  }

  footer {
    overflow-wrap: anywhere;
  }
  footer .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

  input, select, textarea {
    font-size: 16px;
    max-width: 100%;
    box-sizing: border-box;
  }
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="tel"],
  #suche input {
    min-height: 44px;
  }

  /* Ratgeber */
  .wrap:not(.nav) {
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }
  .rb-hero {
    margin: 16px 0 12px;
    border-radius: 14px;
  }
  .rb-hero > div {
    padding: 22px 16px;
  }
  .rb-hero h1 {
    overflow-wrap: anywhere;
    font-size: 1.5rem;
    line-height: 1.2;
  }
  .rb-hero p {
    font-size: 1rem;
  }
  .rb-hero img {
    min-height: 0;
    max-height: 220px;
    width: 100%;
    object-fit: cover;
  }
  .einstiege .card {
    padding: 16px 16px;
  }
  .einstiege li a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 0;
  }
  .chapters {
    gap: 8px;
  }
  .chapters a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    box-sizing: border-box;
  }
  .catalog a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 0;
  }
  .read {
    padding: 20px 16px 48px;
    box-sizing: border-box;
  }
  .read img,
  .read video {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
  .read .cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
  }
  .more a,
  .sources a {
    overflow-wrap: anywhere;
  }
}

/* Below 420px the CTA short label (Appointment, Rendez-vous) does not fit beside logo, language and burger. Icon only; aria-label stays. */
@media (max-width: 419px) {
  .cta-termin .s {
    display: none !important;
  }
}

@media (min-width: 420px) and (max-width: 480px) {
  .cta-termin .s {
    display: inline !important;
  }
}

@media (max-width: 359px) {
  header .wrap.nav,
  .wrap.nav {
    padding: 0 12px;
    gap: 6px;
  }
  .nav .logo {
    max-width: 120px;
  }
  .hdr-right {
    gap: 6px;
  }
}

/* Long German compounds and full-width banners at 320px */
@media (max-width: 480px) {
  .read,
  .read p,
  .read .deck,
  .read li,
  .read h1,
  .read h2,
  .read h3,
  .sources,
  .more {
    overflow-wrap: anywhere;
  }
  #fBanner,
  #fBanner .container,
  #fBanner .f-top-in,
  #fBanner .f-top-txt,
  #fBanner .f-count {
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
  }
  #fBanner .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  #fBanner .btn {
    white-space: normal;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    height: auto;
  }
  #fBanner .fb-txt,
  #fBanner small,
  #fBanner em,
  #fBanner .f-count {
    overflow-wrap: anywhere;
  }
}

/* texte-chatgpt: Unterüberschriften und FAQ */
#fachpartner h2,
#fachpartner .faq h2,
#produkte h2.sub,
#faq h2 {
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 22px 0 10px;
}
#fachpartner .faq,
#produkte #faq {
  padding-top: 12px;
  padding-bottom: 48px;
}
#fachpartner .faq h3,
#produkte #faq h3 {
  font-size: 1.05rem;
  margin: 18px 0 6px;
}
#fachpartner .zbox p {
  margin: 0 0 8px;
  color: var(--slate-2);
}
#produkte .price-note {
  margin: 18px 0 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}
#produkte #faq .wrap {
  max-width: 760px;
  text-align: left;
}

/* texte-chatgpt: PAD coming-soon Hinweis */
#produkte .soon-line {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--slate);
  overflow-wrap: anywhere;
}
