/* The footer remains readable when a link is hovered, focused or pressed. */
body #colophon #footer-navigation #footer-menu a:is(:hover, :focus-visible, :active) {
  color: var(--kbb-public-link-ink, #115d55) !important;
  text-decoration: underline;
  text-underline-offset: .15em;
}

/* Editorial pages share a measure and rhythm. Course-detail grids are styled separately. */
body.page main .entry-content {
  --kbb-page-measure: 74rem;
  --kbb-section-space: clamp(1.65rem, 3.2vw, 3.1rem);
}

body.page:not(.home) main .entry-content {
  max-width: var(--kbb-page-measure);
  margin-inline: auto;
}

body:is(.page-id-24, .page-id-25, .page-id-26, .page-id-27, .page-id-28, .page-id-29, .page-id-30, .page-id-31)
  main .entry-content > .wp-block-group {
  padding-block: var(--kbb-section-space) !important;
}

body.page main .entry-content :is(.kbb-v7-lead, .kbb-v7-section-heading, .kbb-v7-event-principle p) {
  max-inline-size: 64ch;
}

/* Keep the entrance copy and choices together on the original KBB photo. */
body.kbb-v7-start .kbb-home-hero {
  min-height: 0 !important;
  padding: clamp(1rem, 4.4vw, 3.75rem) clamp(1rem, 4.5vw, 4rem) !important;
}

body.kbb-v7-start .kbb-home-hero .kbb-glass {
  width: min(100%, 74rem);
  padding: 0 !important;
  margin-inline: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none !important;
}

body.kbb-v7-start .kbb-home-hero .wp-block-columns {
  gap: clamp(1rem, 2.75vw, 2.5rem);
  margin-block-end: 0;
}

body.kbb-v7-start .kbb-home-hero :is(.kbb-reading-panel, .kbb-info-panel) {
  padding: clamp(1.15rem, 2.65vw, 2.4rem) !important;
}

body.kbb-v7-start .kbb-home-hero .kbb-logo-inline {
  display: none;
}

body.kbb-v7-start .kbb-home-hero h1.wp-block-heading {
  font-size: clamp(1.7rem, 4.1vw, 3.25rem) !important;
  line-height: 1.14 !important;
  margin-block: 0 1rem !important;
}

body.kbb-v7-start .kbb-home-hero .kbb-reading-panel p {
  max-inline-size: 61ch;
  font-size: clamp(1rem, 1.3vw, 1.12rem) !important;
  line-height: 1.62;
  margin-block: 0 1.2rem;
}

body.kbb-v7-start .kbb-home-hero .wp-block-buttons {
  margin-block: 1rem 0;
  gap: .65rem;
}

body.kbb-v7-start .kbb-home-hero .wp-block-button__link {
  padding: .68rem 1rem !important;
}

body.kbb-v7-start .entry-content.single-content > .kbb-home-news-section {
  margin: var(--kbb-section-space) auto 0;
  max-width: var(--kbb-page-measure);
  padding-block: 0 var(--kbb-section-space) !important;
}

body.kbb-v7-start .kbb-home-offers-section {
  padding-block: var(--kbb-section-space) !important;
}

/* Site photos stay proportional to the paragraphs and cards around them. */
body.kbb-v7-kbb-das-sind-wir .entry-content > figure.kbb-location-visual,
body.page-id-30 .entry-content figure.kbb-symbolbild {
  width: min(100%, 46rem);
  max-width: 100% !important;
  margin-inline: auto !important;
}

body.kbb-v7-kbb-das-sind-wir .entry-content > figure.kbb-location-visual img,
body.page-id-30 .entry-content figure.kbb-symbolbild img {
  width: 100%;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover;
}

body.kbb-v7-kbb-das-sind-wir .entry-content > .kbb-leitbild-section {
  padding-block: 0 var(--kbb-section-space) !important;
}

body.kbb-v7-unternehmen .entry-content .kbb-location-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
  margin-block: 1.75rem 2.25rem;
}

body.kbb-v7-unternehmen .entry-content .kbb-location-pair figure {
  width: 100%;
  max-width: none;
  margin: 0;
}

body.kbb-v7-unternehmen .entry-content .kbb-location-pair figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

body.kbb-v7-bildungsangebote .entry-content figure.kbb-location-learning {
  width: min(100%, 47rem);
  max-width: 100%;
  margin-inline: auto;
}

body.kbb-v7-bildungsangebote .entry-content figure.kbb-location-learning > img {
  aspect-ratio: 2 / 1;
}

body.page-id-241 .entry-content > .kbb-course-archive {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  padding-block-start: 1rem;
}

body.page-id-241 .entry-content .kbb-section-head h2 {
  margin-block-start: .6rem;
}

body.page-id-241 .entry-content .kbb-course-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.page-id-241 .entry-content .kbb-course-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 27rem));
  justify-content: start;
}

body.kbb-v7-hersteller-events .kbb-v7-event-hero {
  align-items: stretch;
}

body.kbb-v7-hersteller-events .kbb-v7-events :is(.kbb-v7-event-lead, .kbb-v7-event-room) img {
  min-height: 0;
  height: auto;
  aspect-ratio: 16 / 11;
}

body.kbb-v7-hersteller-events .kbb-v7-event-lead {
  align-self: center;
}

body.kbb-v7-hersteller-events .kbb-v7-event-topics {
  padding-block: var(--kbb-section-space);
}

body.kbb-v7-hersteller-events .kbb-v7-formats {
  padding-block: var(--kbb-section-space);
}

@media (max-width: 767px) {
  body.kbb-v7-start .kbb-home-hero .wp-block-columns {
    row-gap: 1rem;
  }

  body.kbb-v7-unternehmen .entry-content .kbb-location-pair {
    grid-template-columns: minmax(0, 1fr);
  }

  body.page-id-241 .entry-content .kbb-course-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body.page-id-241 .entry-content .kbb-course-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 379px) {
  body.page-id-241 .entry-content .kbb-course-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}
