/* KRP spacing and text alignment system
 * Images remain edge-to-edge. Text content follows one responsive inset.
 */
:root {
  --krp-card-pad: 28px;
}

@media (max-width: 61.1875rem) {
  :root {
    --krp-card-pad: 24px;
  }
}

@media (max-width: 38.75rem) {
  :root {
    --krp-card-pad: 20px;
  }
}

/* Text-only service and readability cards. */
.krp-site .krp-card,
.krp-site .krp-reading-card {
  box-sizing: border-box;
  padding: var(--krp-card-pad) !important;
}

/* Treatment overview cards: retain full-width colour areas and inset their text. */
.route-behandlungen .krp-concern > h3,
.route-behandlungen .krp-concern > p,
.route-behandlungen .krp-treatment-card > h3,
.route-behandlungen .krp-treatment-card > p {
  margin-left: var(--krp-card-pad) !important;
  margin-right: var(--krp-card-pad) !important;
  text-align: left !important;
}

/* The number tabs are intentionally hidden. Give the first visible heading
 * the same inset at the top that its copy already has at either side. */
.route-behandlungen .krp-concern > h3,
.route-behandlungen .krp-treatment-card > h3 {
  margin-top: var(--krp-card-pad) !important;
}

.route-behandlungen .krp-concern > .krp-concern__link,
.route-behandlungen .krp-treatment-card > strong {
  box-sizing: border-box;
  padding: var(--krp-card-pad) !important;
  text-align: left !important;
}

/* Team cards: portraits stay flush; all copy uses the common inset. */
.route-ihre-praxis-team .krp-original-team__dentists article > :is(h2, h3, h4, h5, h6, p),
.route-ihre-praxis-team .krp-original-team__grid article > :is(h2, h3, h4, h5, h6, p),
.krp-site .krp-person__caption {
  box-sizing: border-box;
  padding-left: var(--krp-card-pad) !important;
  padding-right: var(--krp-card-pad) !important;
  text-align: left !important;
}

.route-ihre-praxis-team .krp-original-team__dentists article > :is(img, picture, figure),
.route-ihre-praxis-team .krp-original-team__grid article > :is(img, picture, figure) {
  padding: 0 !important;
}

/* News cards previously had no inset around their copy. */
.route-ihre-praxis-neuigkeiten .krp-news-card {
  overflow: hidden;
}

.route-ihre-praxis-neuigkeiten .krp-news-card > figure {
  margin: 0 !important;
  padding: 0 !important;
}

.route-ihre-praxis-neuigkeiten .krp-news-card > figure img {
  display: block;
  width: 100%;
  max-width: none;
  padding: 0 !important;
}

.route-ihre-praxis-neuigkeiten .krp-news-card > time {
  display: block;
  margin: 0 !important;
  padding: var(--krp-card-pad) var(--krp-card-pad) 0 !important;
  text-align: left !important;
}

.route-ihre-praxis-neuigkeiten .krp-news-card > :is(h1, h2, h3, h4, h5, h6) {
  margin: 12px 0 0 !important;
  padding: 0 var(--krp-card-pad) !important;
  text-align: left !important;
}

.route-ihre-praxis-neuigkeiten .krp-news-card > p {
  margin: 12px 0 0 !important;
  padding: 0 var(--krp-card-pad) var(--krp-card-pad) !important;
  text-align: left !important;
}

/* Reinforce a shared left edge for editorial copy without affecting centred graphics. */
.krp-site .krp-article > :is(h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, address),
.krp-site .krp-card > :is(h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, address),
.krp-site .krp-reading-card > :is(h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, address) {
  text-align: left !important;
}

/*
 * Text-led prophylaxis detail pages use a full-width legacy content wrapper.
 * Centre the editorial column so headings, body copy and reading cards share
 * one stable edge instead of touching the viewport.
 */
.krp-site[class*="route-behandlungen-prophylaxe-"] .krp-content .krp-article {
  box-sizing: border-box;
  width: min(calc(100% - 60px), 864px) !important;
  max-width: 864px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.krp-site[class*="route-behandlungen-prophylaxe-"] .krp-content .krp-article > :is(h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, address) {
  text-align: left !important;
}

@media (max-width: 38.75rem) {
  .krp-site[class*="route-behandlungen-prophylaxe-"] .krp-content .krp-article {
    width: calc(100% - 40px) !important;
  }
}

/* Keep the animated submit control in its reserved form column. */
html body.krp-site .krp-main .krp-content .krp-prophylaxis-form > .krp-form button.krp-button[type="submit"] {
  position: absolute !important;
}

/* Restore the original filled location choices inside the sticky bottom menu. */
@media (max-width: 61.1875rem) {
  html body.krp-site .krp-bottom-nav__locations a {
    color: #FFFFFF !important;
    background-color: #0070B7 !important;
    background-image: none !important;
    background-size: auto !important;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    transition: transform 180ms ease, filter 180ms ease !important;
  }

  html body.krp-site .krp-bottom-nav__locations .is-wieren {
    background-color: #79B41D !important;
  }

  html body.krp-site .krp-bottom-nav__locations a:hover,
  html body.krp-site .krp-bottom-nav__locations a:focus-visible {
    color: #FFFFFF !important;
    filter: brightness(1.06);
  }

  html body.krp-site .krp-bottom-nav__locations a:active {
    color: #FFFFFF !important;
    transform: scale(.96);
  }
}
