/* Mobile-Optimierung – Overflow, Touch, Lesbarkeit */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  overflow-x: hidden;
}
img,
video,
iframe,
svg,
.wp-block-image img,
.kb-img,
.entry-content img {
  max-width: 100%;
  height: auto;
}
/* Content-Bilder nicht croppen */
.entry-content img:not(.hero img):not(.custom-logo) {
  object-fit: contain;
}

/* Tabellen: nur horizontal scrollbar wenn nötig */
.wp-block-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tel-Links als Touch-Ziele */
a[href^="tel:"] {
  display: inline-block;
  min-height: 44px;
  line-height: 1.3;
  padding: 0.35rem 0;
}

#telefon-button {
  min-height: 48px;
  box-sizing: border-box;
}

#sticky-button a {
  display: block;
  padding: 0.35rem 0.5rem;
  min-height: 44px;
  line-height: 1.25;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .inside-article,
  .entry-content {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    box-sizing: border-box;
  }

  h1 {
    font-size: clamp(1.35rem, 5.5vw, 1.85rem) !important;
    line-height: 1.25 !important;
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }
  h2 {
    font-size: clamp(1.2rem, 4.8vw, 1.55rem) !important;
    line-height: 1.3 !important;
  }
  h3 {
    font-size: clamp(1.05rem, 4.2vw, 1.25rem) !important;
  }

  p,
  li,
  td,
  .rank-math-answer {
    font-size: 1.05rem;
    line-height: 1.55;
  }

  /* Buttons / CTAs volle Breite wo sinnvoll */
  .kb-button,
  .kt-button,
  a.button,
  .wp-block-button__link {
    max-width: 100%;
    box-sizing: border-box;
    word-break: break-word;
  }

  /* Sticky CTA über Telefon-Leiste */
  #sticky-button {
    bottom: 70px !important;
    max-width: 94vw !important;
    padding: 10px 14px !important;
    font-size: 0.95rem;
  }
  #telefon-button {
    bottom: 0 !important;
    width: 100% !important;
    left: 0 !important;
    transform: none !important;
    border-radius: 0 !important;
    z-index: 10000;
  }

  /* FAQ mobil */
  .rank-math-block .rank-math-list-item,
  .home-faq-item {
    padding: 0.85rem 0.9rem;
  }

  /* Preistabelle */
  .entry-content table td,
  .entry-content table th {
    padding: 0.55rem 0.65rem;
    font-size: 0.98rem;
  }

  /* Header-Logo nicht sprengen */
  .site-logo img,
  .custom-logo,
  .header-image img {
    max-width: min(100%, 280px);
    height: auto;
  }

  }

@media (max-width: 380px) {
  #sticky-button a {
    font-size: 0.92rem !important;
  }
}

/* Standort-Karte (Kontaktblock) – überall kompakt */
.wp-block-image img.wp-image-5072,
img.wp-image-5072,
img[src*="Map-Hannover-Schluesseldienst-Standort"] {
  max-width: min(280px, 100%) !important;
  width: min(280px, 100%) !important;
  height: auto !important;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.wp-block-image:has(img.wp-image-5072),
.wp-block-image:has(img[src*="Map-Hannover-Schluesseldienst-Standort"]) {
  max-width: min(280px, 100%);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 767px) {
  .entry-content img[style*="width"]:not(.kb-img):not(.wp-image-5072),
  .wp-block-image img[style*="width"]:not(.kb-img):not(.wp-image-5072),
  .entry-content img[width]:not(.kb-img):not(.wp-image-5072) {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }
  .wp-block-image img.wp-image-5072,
  img.wp-image-5072,
  img[src*="Map-Hannover-Schluesseldienst-Standort"] {
    max-width: min(220px, 85vw) !important;
    width: min(220px, 85vw) !important;
  }
}
