/*
Theme Name: IFB Sprachen Anpassungen
Theme URI: https://ifb-sprachen.de/
Description: Update-sicheres Child-Theme für IFB Sprachen Modern. Macht die Startseite, Kopf- und Fußtexte sowie wichtige Layoutwerte ohne Bearbeitung des Hauptthemes anpassbar.
Author: IFB
Template: ifb-sprachen-modern
Version: 1.21.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: ifb-sprachen-anpassungen
*/

/*
 * Eigene dauerhafte CSS-Ergänzungen können hier ergänzt werden.
 * Für sehr kleine Änderungen ist „Design → Anpassen → Zusätzliches CSS“
 * noch sicherer, weil diese Datei bei einem Child-Theme-Update ersetzt wird.
 */

.ifs-home-custom-content .wp-block-image,
.ifs-home-custom-content .wp-block-gallery {
  margin-block: 1.5rem;
}

.ifs-home-custom-content > *:first-child {
  margin-top: 0;
}

.ifs-home-custom-content > *:last-child {
  margin-bottom: 0;
}

.ifbs-hero__grid--single {
  grid-template-columns: minmax(0, 48rem);
}

.ifbs-hero__grid--single .ifs-hero__copy {
  max-width: 48rem;
}


/* Einstufungstest – vierte Angebotskarte */
.ifbs-goals-grid .ifbs-goal-card--test {
  border-color: rgba(22, 143, 130, 0.34);
  background: linear-gradient(145deg, #ffffff 0%, rgba(238, 246, 248, 0.9) 100%);
}

.ifbs-goals-grid .ifbs-goal-card--test .ifs-card__icon {
  background: rgba(22, 143, 130, 0.13);
  color: var(--ifs-teal-dark);
}

.ifbs-goals-grid .ifbs-goal-card--test::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 0.28rem;
  background: linear-gradient(90deg, var(--ifs-blue), var(--ifs-teal));
  content: "";
}

/* Compact start-page structure, version 1.2.0 */
.ifbs-hero--compact {
  padding-block: clamp(3.4rem, 7vw, 6rem);
}

.ifbs-hero__grid--single {
  grid-template-columns: minmax(0, 58rem);
}

.ifbs-hero__grid--single .ifs-hero__copy {
  max-width: 58rem;
}

.ifbs-hero-actions {
  gap: 0.65rem;
}

.ifbs-quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ifbs-quick-card {
  padding: 1.35rem;
}

.ifbs-quick-card .ifs-card__icon {
  width: 2.75rem;
  margin-bottom: 0.9rem;
}

.ifbs-quick-card h3 {
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
}

.ifbs-goal-card--advice {
  border-color: rgba(22, 119, 165, 0.24);
  background: linear-gradient(145deg, #ffffff 0%, rgba(237, 247, 250, 0.86) 100%);
}

.ifbs-current-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.ifbs-current-panel {
  min-width: 0;
  border: 1px solid var(--ifs-line);
  border-radius: var(--ifs-radius-lg);
  background: var(--ifs-white);
  padding: clamp(1.15rem, 3vw, 1.65rem);
  box-shadow: var(--ifs-shadow-sm);
}

.ifbs-current-panel__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ifbs-current-panel__heading h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
}

.ifbs-current-panel .ifs-results,
.ifbs-current-panel .ifs-exam-results {
  grid-template-columns: 1fr;
}

.ifbs-current-panel .ifs-card {
  padding: 1.15rem;
  box-shadow: none;
}

.ifbs-current-panel .ifs-card__icon {
  width: 2.35rem;
  margin-bottom: 0.7rem;
  border-radius: 0.75rem;
}

.ifbs-current-panel .ifs-card p {
  margin-bottom: 0.4rem;
}

.ifbs-current-panel .ifs-meta-list {
  margin-top: 0.7rem;
}

.ifbs-benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.ifbs-benefit-item {
  min-width: 0;
  border-top: 1px solid var(--ifs-line);
  padding-top: 1.25rem;
}

.ifbs-benefit-item .ifs-card__icon {
  width: 2.7rem;
  margin-bottom: 0.85rem;
  box-shadow: none;
}

.ifbs-benefit-item h3 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
}

.ifbs-benefit-item p {
  margin: 0;
  color: var(--ifs-muted);
}

@media (max-width: 68rem) {
  .ifbs-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ifbs-benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 48.875rem) {
  .ifbs-current-grid,
  .ifbs-quick-grid,
  .ifbs-benefit-grid {
    grid-template-columns: 1fr;
  }

  .ifbs-current-panel__heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .ifbs-hero-actions .ifs-button {
    width: 100%;
    justify-content: center;
  }
}

/* Useful fallback when no confirmed future dates are published yet. */
.ifbs-current-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 52rem;
}

.ifbs-current-empty {
  display: grid;
  align-items: center;
  border: 1px solid rgba(22, 119, 165, 0.22);
  border-radius: var(--ifs-radius-lg);
  background: linear-gradient(145deg, #ffffff 0%, rgba(232, 244, 251, 0.76) 100%);
  padding: clamp(1.35rem, 4vw, 2.25rem);
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem 2rem;
  box-shadow: var(--ifs-shadow-sm);
}

.ifbs-current-empty h3 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
}

.ifbs-current-empty p {
  max-width: 47rem;
  margin-bottom: 0;
  color: var(--ifs-muted);
}

.ifbs-current-empty .ifs-actions {
  justify-content: flex-end;
}

@media (max-width: 68rem) {
  .ifbs-current-empty {
    grid-template-columns: 1fr;
  }

  .ifbs-current-empty .ifs-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 48.875rem) {
  .ifbs-current-empty .ifs-button {
    width: 100%;
    justify-content: center;
  }
}

/* Compact address strip below the real location photographs. */
.ifbs-location-addresses {
  display: grid;
  margin-top: 1rem;
  border: 1px solid var(--ifs-line);
  border-radius: var(--ifs-radius-md);
  background: var(--ifs-white);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  box-shadow: var(--ifs-shadow-sm);
}

.ifbs-location-addresses > div {
  display: grid;
  min-width: 0;
  padding: 1rem 1.1rem;
  gap: 0.18rem;
}

.ifbs-location-addresses > div + div {
  border-left: 1px solid var(--ifs-line);
}

.ifbs-location-addresses small {
  color: var(--ifs-teal-dark);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ifbs-location-addresses strong {
  color: var(--ifs-navy);
}

.ifbs-location-addresses span {
  color: var(--ifs-muted);
  overflow-wrap: anywhere;
}

.ifbs-location-link {
  margin: 0.85rem 0 0;
  text-align: right;
}

@media (max-width: 48.875rem) {
  .ifbs-location-addresses {
    grid-template-columns: 1fr;
  }

  .ifbs-location-addresses > div + div {
    border-top: 1px solid var(--ifs-line);
    border-left: 0;
  }

  .ifbs-location-link {
    text-align: left;
  }
}


/* Dedicated footer logo, independently selectable in the Customizer. */
.ifbs-footer-logo {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 1rem;
}
.ifbs-footer-logo__image {
  display: block;
  width: auto;
  max-width: min(100%, 19rem);
  height: auto;
  object-fit: contain;
}
.ifs-site-footer .ifs-footer-column:first-child > .custom-logo-link {
  display: inline-flex;
  margin-bottom: 1rem;
}
.ifs-site-footer .ifs-footer-column:first-child > .custom-logo-link .custom-logo {
  width: auto;
  max-width: min(100%, 19rem);
  height: auto;
}


/* -------------------------------------------------------------------------
 * Authentic IFB photography on the home page (child theme 1.6.0)
 * ---------------------------------------------------------------------- */

.ifbs-responsive-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.ifbs-home-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ifbs-photo--privacy-none {
  filter: saturate(.96) contrast(.99);
}

.ifbs-photo--privacy-soft {
  filter: blur(.45px) saturate(.93) contrast(.99);
  transform: scale(1.004);
}

.ifbs-photo--privacy-strong {
  filter: blur(1.35px) saturate(.9) contrast(.98);
  transform: scale(1.012);
}

.ifbs-hero__grid--photo {
  align-items: center;
  grid-template-columns: minmax(0, 1.02fr) minmax(23rem, .98fr);
  gap: clamp(2rem, 5vw, 5.5rem);
}

.ifbs-hero__grid--photo .ifs-hero__copy {
  max-width: 48rem;
}

.ifbs-hero-photo-wrap {
  min-width: 0;
}

.ifbs-hero-photo {
  position: relative;
  overflow: hidden;
  min-height: clamp(23rem, 37vw, 34rem);
  margin: 0;
  border: 1px solid rgba(18, 51, 74, .12);
  border-radius: clamp(1.2rem, 2.6vw, 2.35rem);
  background: #dfecef;
  box-shadow: 0 1.5rem 3.5rem rgba(18, 51, 74, .16);
  isolation: isolate;
}

.ifbs-hero-photo::after {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(10, 38, 57, .7));
  content: "";
  pointer-events: none;
  z-index: 1;
}

.ifbs-hero-photo figcaption {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
  display: grid;
  color: #fff;
  gap: .18rem;
  z-index: 2;
}

.ifbs-hero-photo figcaption span {
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.ifbs-hero-photo figcaption strong {
  max-width: 26rem;
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  line-height: 1.25;
}

.ifbs-goal-card--tutoring {
  border-color: rgba(22, 119, 165, .28);
  background: linear-gradient(145deg, #fff 0%, rgba(236, 246, 250, .92) 100%);
}

.ifbs-goal-card--tutoring .ifs-card__icon {
  background: rgba(22, 119, 165, .12);
  color: var(--ifs-blue);
}

.ifbs-home-learning {
  overflow: hidden;
}

.ifbs-home-learning__grid {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, .88fr) minmax(28rem, 1.12fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.ifbs-home-learning__copy {
  max-width: 42rem;
}

.ifbs-home-learning__copy h2 {
  max-width: 35rem;
}

.ifbs-feature-list {
  display: grid;
  margin: 1.5rem 0 1.65rem;
  padding: 0;
  list-style: none;
  gap: .7rem;
}

.ifbs-feature-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--ifs-navy);
  font-weight: 700;
}

.ifbs-feature-list li::before {
  position: absolute;
  top: .1rem;
  left: 0;
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: rgba(22, 143, 130, .13);
  color: var(--ifs-teal-dark);
  content: "✓";
  font-size: .75rem;
  font-weight: 900;
  place-items: center;
}

.ifbs-home-learning__media {
  overflow: hidden;
  border: 1px solid rgba(18, 51, 74, .12);
  border-radius: var(--ifs-radius-lg);
  background: var(--ifs-white);
  box-shadow: var(--ifs-shadow-md);
}

.ifbs-home-learning__media .ifbs-home-photo {
  aspect-ratio: 16 / 9;
}

.ifbs-photo-note {
  margin: 0;
  border-top: 1px solid var(--ifs-line);
  padding: .8rem 1rem;
  color: var(--ifs-muted);
  font-size: .82rem;
}

.ifbs-location-atmosphere {
  display: grid;
  overflow: hidden;
  margin-bottom: 1.35rem;
  border: 1px solid rgba(18, 51, 74, .12);
  border-radius: var(--ifs-radius-lg);
  background: var(--ifs-white);
  grid-template-columns: minmax(0, 1.35fr) minmax(19rem, .65fr);
  box-shadow: var(--ifs-shadow-sm);
}

.ifbs-location-atmosphere__media {
  min-height: 18rem;
  overflow: hidden;
}

.ifbs-location-atmosphere__copy {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: clamp(1.5rem, 4vw, 2.7rem);
}

.ifbs-location-atmosphere__copy h3 {
  margin-bottom: .75rem;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
}

.ifbs-location-atmosphere__copy p:not(.ifs-eyebrow) {
  color: var(--ifs-muted);
}

@media (max-width: 68rem) {
  .ifbs-hero__grid--photo,
  .ifbs-home-learning__grid,
  .ifbs-location-atmosphere {
    grid-template-columns: 1fr;
  }

  .ifbs-hero__grid--photo .ifs-hero__copy,
  .ifbs-home-learning__copy {
    max-width: 52rem;
  }

  .ifbs-hero-photo {
    min-height: clamp(20rem, 62vw, 32rem);
  }

  .ifbs-location-atmosphere__media {
    min-height: 20rem;
  }
}

@media (max-width: 48.875rem) {
  .ifbs-hero-photo {
    min-height: 18rem;
    border-radius: 1.25rem;
  }

  .ifbs-hero-photo figcaption {
    right: .9rem;
    bottom: .9rem;
    left: .9rem;
  }

  .ifbs-home-learning__grid {
    gap: 1.5rem;
  }

  .ifbs-home-learning__copy .ifs-button {
    width: 100%;
    justify-content: center;
  }

  .ifbs-location-atmosphere__media {
    min-height: 15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ifbs-photo--privacy-soft,
  .ifbs-photo--privacy-strong {
    transform: none;
  }
}

/* Ensure fixed visual frames are fully covered by responsive images. */
.ifbs-hero-photo .ifbs-home-photo,
.ifbs-location-atmosphere__media .ifbs-home-photo {
  position: absolute;
  inset: 0;
}

.ifbs-location-atmosphere__media {
  position: relative;
}

.ifbs-home-learning__media .ifbs-responsive-picture {
  height: auto;
}

.ifbs-home-learning__media .ifbs-home-photo {
  height: auto;
  aspect-ratio: 16 / 9;
}


/* -------------------------------------------------------------------------
 * Startseiten-Panorama ausschließlich auf der Homepage (Version 1.8.0)
 * ---------------------------------------------------------------------- */

.ifbs-hero--panorama {
  padding-block: clamp(3.25rem, 6vw, 5.75rem);
}

.ifbs-hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2rem, 4vw, 3.25rem);
}

.ifbs-hero__content {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr);
}

.ifbs-hero__content--card {
  grid-template-columns: minmax(0, 1.05fr) minmax(20rem, .65fr);
  gap: clamp(2rem, 6vw, 5rem);
}

.ifbs-hero--panorama .ifs-hero__copy {
  max-width: 66rem;
}

.ifbs-hero--panorama .ifs-hero__copy .ifs-lead {
  max-width: 51rem;
}

.ifbs-hero--panorama .ifs-hero__copy h1 {
  max-width: 15ch;
}

.ifbs-hero--panorama .ifs-trust-row {
  max-width: 52rem;
}

.ifbs-hero-panorama-wrap {
  min-width: 0;
}

.ifbs-hero-panorama {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 21 / 9;
  margin: 0;
  border: 1px solid rgba(18, 51, 74, .12);
  border-radius: clamp(1rem, 1.8vw, 1.55rem);
  background: #e5eef0;
  box-shadow: 0 1.35rem 3.35rem rgba(18, 51, 74, .15);
  isolation: isolate;
}

.ifbs-hero-panorama .ifbs-responsive-picture,
.ifbs-hero-panorama .ifbs-home-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.ifbs-hero-panorama .ifbs-home-photo {
  object-fit: cover;
  object-position: 50% 50%;
}

/* Das komplette Panorama wird weichgezeichnet, nicht nur einzelne Gesichter. */
.ifbs-hero-panorama .ifbs-home-photo--full-blur {
  filter: blur(2px) saturate(.9) brightness(1.03) contrast(.96);
  transform: scale(1.025);
}

.ifbs-hero-panorama::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(245, 251, 252, .11), rgba(255, 255, 255, .02));
  content: "";
  pointer-events: none;
}

@media (max-width: 68rem) {
  .ifbs-hero__content--card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 48.875rem) {
  .ifbs-hero--panorama {
    padding-block: 2.6rem 3.25rem;
  }

  .ifbs-hero-shell {
    gap: 1.65rem;
  }

  .ifbs-hero-panorama {
    aspect-ratio: 16 / 9;
    border-radius: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ifbs-hero-panorama .ifbs-home-photo--full-blur {
    transform: scale(1.025);
  }
}


/* -------------------------------------------------------------------------
 * Normale Bildbereiche auf ausgewählten Unterseiten (Version 1.9.0)
 * Keine langen Headerbilder: Bilder erscheinen als 4:3-Inhaltskarten.
 * ---------------------------------------------------------------------- */

.ifbs-subpage-media {
  padding-block: clamp(2.5rem, 4.8vw, 4.25rem);
}

.ifbs-subpage-media .ifs-photo-story {
  grid-template-columns: minmax(18rem, .92fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 5vw, 4.75rem);
}

.ifbs-subpage-photo {
  width: min(100%, 40rem);
  aspect-ratio: 4 / 3;
  justify-self: center;
}

.ifbs-subpage-photo .ifbs-responsive-picture,
.ifbs-subpage-photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.ifbs-subpage-photo img {
  object-fit: cover;
  object-position: center;
}

.ifbs-subpage-photo__image--classroom {
  filter: saturate(.94) contrast(.99);
}

.ifbs-subpage-media .ifs-photo-story__copy h2 {
  max-width: 19ch;
  font-size: clamp(1.9rem, 3.7vw, 2.85rem);
}

.ifbs-subpage-media .ifs-photo-story__copy .ifs-lead {
  max-width: 42rem;
}

.ifbs-subpage-media--reverse .ifbs-subpage-photo {
  order: 2;
}

.ifbs-subpage-media--reverse .ifs-photo-story__copy {
  order: 1;
}

@media (max-width: 68rem) {
  .ifbs-subpage-media .ifs-photo-story {
    grid-template-columns: 1fr;
  }

  .ifbs-subpage-media--reverse .ifbs-subpage-photo,
  .ifbs-subpage-media--reverse .ifs-photo-story__copy {
    order: initial;
  }

  .ifbs-subpage-photo {
    width: min(100%, 46rem);
  }
}

@media (max-width: 48.875rem) {
  .ifbs-subpage-media {
    padding-block: 2.25rem;
  }

  .ifbs-subpage-photo {
    border-radius: 1rem;
  }

  .ifbs-subpage-media .ifs-photo-story {
    gap: 1.5rem;
  }
}


/* 1.9.1: robuste Darstellung der eingebauten Startseitenbilder. */
.ifbs-home-learning__media img,
.ifbs-location-atmosphere__media img,
.ifs-location-photo-card__media img {
  width: 100%;
  max-width: none;
}


/* -------------------------------------------------------------------------
 * Mobile Navigation, Footer und Zugänglichkeit (Version 1.10.0)
 * ---------------------------------------------------------------------- */

html {
  scroll-padding-top: calc(var(--ifs-header-height, 5rem) + 2rem);
}

:target {
  scroll-margin-top: calc(var(--ifs-header-height, 5rem) + 2rem);
}

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid rgba(22, 143, 130, .48);
  outline-offset: 3px;
}

.ifs-content,
.ifs-page-stack,
.ifs-card,
.ifs-action-panel,
.ifs-highlight-panel,
.ifs-form-section,
.ifs-footer-column {
  min-width: 0;
  overflow-wrap: anywhere;
}

.ifs-actions,
.ifbs-footer-bottom-links,
.ifbs-mobile-nav-contact {
  flex-wrap: wrap;
}

.ifbs-mobile-nav-actions,
.ifbs-submenu-toggle {
  display: none;
}

.ifbs-footer-direct-contact {
  display: grid;
  margin-top: 1.15rem;
  gap: .45rem;
}

.ifbs-footer-direct-contact a {
  width: fit-content;
  color: #fff;
  font-weight: 750;
}

.ifbs-footer-bottom-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.ifbs-back-to-top {
  color: #fff !important;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media (max-width: 68rem) {
  body.menu-open {
    overflow: hidden;
  }

  .ifs-primary-nav .menu-item-has-children {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3rem;
    align-items: start;
    column-gap: .25rem;
  }

  .ifs-primary-nav .menu-item-has-children > a {
    grid-column: 1;
    grid-row: 1;
  }

  .ifbs-submenu-toggle {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    place-items: center;
    width: 3rem;
    min-height: 3rem;
    border: 1px solid rgba(18, 51, 74, .1);
    border-radius: .75rem;
    background: #fff;
    color: var(--ifs-navy);
    cursor: pointer;
  }

  .ifbs-submenu-toggle__icon {
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 160ms ease;
  }

  .ifbs-submenu-toggle[aria-expanded="true"] .ifbs-submenu-toggle__icon {
    transform: rotate(180deg);
  }

  .ifs-primary-nav .menu-item-has-children > .sub-menu {
    grid-column: 1 / -1;
  }

  .ifbs-mobile-nav-actions {
    display: grid;
    width: min(100%, 46rem);
    margin: 1rem auto 0;
    border-top: 1px solid var(--ifs-line);
    padding-top: 1rem;
    gap: .8rem;
  }

  .ifbs-mobile-nav-cta {
    width: 100%;
    justify-content: center;
  }

  .ifbs-mobile-nav-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem 1rem;
  }

  .ifbs-mobile-nav-contact a {
    color: var(--ifs-navy);
    font-size: .92rem;
    font-weight: 750;
    text-decoration: none;
  }

  .ifs-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ifs-footer-bottom {
    align-items: flex-start;
  }
}

@media (max-width: 48.875rem) {
  .ifs-topbar__message {
    display: none;
  }

  .ifs-topbar__inner,
  .ifs-topbar__links {
    width: 100%;
  }

  .ifs-topbar__links {
    justify-content: space-between;
  }

  .ifbs-mobile-nav-contact {
    align-items: stretch;
    flex-direction: column;
  }

  .ifbs-mobile-nav-contact a {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    border: 1px solid var(--ifs-line);
    border-radius: .75rem;
    background: #fff;
    padding: .6rem .8rem;
  }

  .ifs-footer-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .ifs-footer-bottom,
  .ifbs-footer-bottom-links {
    align-items: flex-start;
    flex-direction: column;
  }

  .ifbs-footer-bottom-links,
  .ifs-footer-legal {
    width: 100%;
  }

  .ifs-footer-legal {
    gap: .65rem 1rem;
  }

  .ifs-form-field input,
  .ifs-form-field select,
  .ifs-form-field textarea,
  .ifs-placement-test input,
  .ifs-placement-test select,
  .ifs-placement-test textarea {
    font-size: 1rem;
  }

  .ifs-button,
  button,
  input[type="submit"] {
    min-height: 2.75rem;
  }
}

@media (max-width: 24.5rem) {
  .ifs-container {
    width: min(100% - 1.25rem, var(--ifs-container));
  }

  .ifs-primary-nav {
    padding-inline: .65rem;
  }

  .ifs-primary-nav a {
    padding-inline: .75rem;
  }

  .ifs-footer-legal {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ifbs-submenu-toggle__icon {
    transition: none;
  }
}

@media (max-width: 68rem) {
  .ifs-primary-nav .sub-menu[hidden] {
    display: none !important;
  }
}

/* -------------------------------------------------------------------------
 * Startseiten-Hero final: centered content + lightly blurred background
 * Version 1.18.0
 * ---------------------------------------------------------------------- */
.ifbs-hero--background {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(560px, 68vh, 720px);
  display: flex;
  align-items: stretch;
  padding-block: 0;
  background: #f5f8fa;
}

.ifbs-hero--background .ifbs-hero-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2.5rem), 75rem);
  max-width: 75rem;
  min-height: clamp(560px, 68vh, 720px);
  margin-inline: auto;
  display: flex;
  align-items: center;
  padding-block: clamp(3.5rem, 6vw, 5.25rem);
  box-sizing: border-box;
}

.ifbs-hero--background .ifbs-hero-background,
.ifbs-hero--background .ifbs-hero-background__overlay {
  position: absolute;
  inset: 0;
}

.ifbs-hero--background .ifbs-hero-background { z-index: -3; }

.ifbs-hero--background .ifbs-hero-background__overlay {
  z-index: -2;
  background: linear-gradient(90deg,
    rgba(255,255,255,.22) 0%,
    rgba(255,255,255,.14) 28%,
    rgba(255,255,255,.07) 50%,
    rgba(255,255,255,.025) 72%,
    rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.ifbs-hero--background .ifbs-hero-background__media,
.ifbs-hero--background .ifbs-hero-background__media picture,
.ifbs-hero--background .ifbs-hero-background__media img {
  width: 100%;
  height: 100%;
}

.ifbs-hero--background .ifbs-hero-background__media { margin: 0; }

/* Light softness only: the classroom remains clearly recognisable. */
.ifbs-hero--background .ifbs-hero-background__media img {
  display: block;
  object-fit: cover;
  object-position: center;
  filter: blur(.72px) saturate(.99) brightness(1.0);
  transform: scale(1.012);
}

.ifbs-hero--background .ifbs-hero__content {
  width: 100%;
  display: block;
}

.ifbs-hero--background .ifs-hero__copy {
  width: min(100%, 46rem);
  max-width: 46rem;
  padding: 0;
}

.ifbs-hero--background .ifs-hero__copy h1 {
  max-width: 15ch;
  margin-bottom: 1.1rem;
  text-shadow: 0 1px 1px rgba(255,255,255,.45);
}

.ifbs-hero--background .ifs-hero__copy .ifs-lead {
  max-width: 42rem;
  margin-bottom: 1.5rem;
  color: #263f57;
}

.ifbs-hero--background .ifbs-hero-actions { margin-bottom: 1.65rem; }

.ifbs-hero--background .ifs-trust-row {
  width: min(100%, 46rem);
  max-width: 46rem;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(18,51,74,.12);
  border-radius: 14px;
  padding: .65rem 0;
  box-shadow: 0 10px 28px rgba(18,51,74,.08);
  backdrop-filter: blur(5px);
}

.ifbs-hero--background .ifs-trust-item { padding-inline: 1.1rem; }
.ifbs-hero--background .ifs-hero__visual { display: none; }

/* Keep every home-page section on the same centered content grid. */
body.home .ifs-section > .ifs-container,
body.front-page .ifs-section > .ifs-container {
  width: min(calc(100% - 2.5rem), 75rem);
  max-width: 75rem;
  margin-inline: auto;
}

@media (max-width: 68rem) {
  .ifbs-hero--background .ifbs-hero-shell,
  body.home .ifs-section > .ifs-container,
  body.front-page .ifs-section > .ifs-container {
    width: min(calc(100% - 2rem), 75rem);
  }
}

@media (max-width: 48.875rem) {
  .ifbs-hero--background,
  .ifbs-hero--background .ifbs-hero-shell { min-height: 650px; }

  .ifbs-hero--background .ifbs-hero-background__overlay {
    background: linear-gradient(180deg,
      rgba(255,255,255,.93) 0%,
      rgba(255,255,255,.86) 42%,
      rgba(255,255,255,.45) 72%,
      rgba(255,255,255,.10) 100%);
  }

  .ifbs-hero--background .ifbs-hero-background__media img {
    object-position: center;
    filter: blur(2.6px) saturate(.98) brightness(1.02);
  }

  .ifbs-hero--background .ifbs-hero-shell {
    width: min(calc(100% - 1.5rem), 75rem);
    padding-block: 3rem 2rem;
  }

  .ifbs-hero--background .ifs-hero__copy h1 { max-width: 100%; }
  .ifbs-hero--background .ifs-trust-row { width: 100%; padding: .35rem 0; }
}

@media (max-width: 36rem) {
  .ifbs-hero--background,
  .ifbs-hero--background .ifbs-hero-shell { min-height: 700px; }

  .ifbs-hero--background .ifs-hero__copy h1 {
    font-size: clamp(2.45rem, 11.5vw, 3.25rem);
  }

  .ifbs-hero--background .ifs-hero__copy .ifs-lead { font-size: 1rem; }
  .ifbs-hero--background .ifbs-hero-actions { margin-bottom: 1.15rem; }

  .ifbs-hero--background .ifs-trust-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ifbs-hero--background .ifs-trust-item {
    border-right: 0;
    border-bottom: 1px solid rgba(18,51,74,.12);
    padding-block: .5rem;
  }

  .ifbs-hero--background .ifs-trust-item:last-child { border-bottom: 0; }
}



/* -------------------------------------------------------------------------
 * 1.20.0: hero readability correction
 * The hero is rendered by this child theme while all editable home-page
 * content remains supplied by IFB Sprachen Core settings.
 * The bundled classroom panorama is a sharp, privacy-safe source image.
 * Only a very light optical softness is applied in the browser.
 * ---------------------------------------------------------------------- */
:root {
  --ifbs-home-content-width: 75rem;
  --ifbs-home-gutter: 2.5rem;
}

body.home .ifs-section > .ifs-container,
body.front-page .ifs-section > .ifs-container,
body.home .ifbs-hero-shell,
body.front-page .ifbs-hero-shell {
  width: min(calc(100% - var(--ifbs-home-gutter)), var(--ifbs-home-content-width)) !important;
  max-width: var(--ifbs-home-content-width) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

.ifbs-hero--background {
  min-height: clamp(540px, 62vh, 650px);
}

.ifbs-hero--background .ifbs-hero-shell {
  min-height: clamp(540px, 62vh, 650px);
  padding-block: clamp(2.75rem, 5vw, 4.25rem);
}

.ifbs-hero--background .ifbs-hero-background__overlay {
  background: linear-gradient(90deg,
    rgba(255,255,255,.58) 0%,
    rgba(255,255,255,.46) 24%,
    rgba(255,255,255,.20) 50%,
    rgba(255,255,255,.045) 74%,
    rgba(255,255,255,0) 100%) !important;
}

.ifbs-hero--background .ifbs-hero-background__media img {
  display: block;
  object-fit: cover;
  object-position: center center;
  filter: blur(1.35px) saturate(.97) brightness(1.02) contrast(.98) !important;
  transform: scale(1.012) !important;
}

.ifbs-hero--background .ifbs-hero__content {
  width: 100%;
  display: block;
}

.ifbs-hero--background .ifs-hero__copy {
  width: min(100%, 46rem);
  max-width: 46rem;
}

.ifbs-hero--background .ifs-hero__copy h1 {
  max-width: 15ch;
  margin-bottom: .9rem;
  text-shadow: 0 1px 2px rgba(255,255,255,.55);
}

.ifbs-hero--background .ifs-hero__copy .ifs-eyebrow {
  text-shadow: 0 1px 2px rgba(255,255,255,.75);
}

.ifbs-hero--background .ifs-hero__copy .ifs-lead {
  text-shadow: 0 1px 2px rgba(255,255,255,.85);
}

.ifbs-hero--background .ifs-hero__copy .ifs-lead {
  max-width: 42rem;
  margin-bottom: 1.35rem;
  color: #263f57;
}

.ifbs-hero--background .ifbs-hero-actions {
  margin-bottom: 1.35rem;
}

.ifbs-hero--background .ifs-trust-row {
  width: min(100%, 46rem);
  max-width: 46rem;
  background: rgba(255,255,255,.90);
}

@media (max-width: 68rem) {
  :root { --ifbs-home-gutter: 2rem; }
}

@media (max-width: 48.875rem) {
  :root { --ifbs-home-gutter: 1.5rem; }

  .ifbs-hero--background,
  .ifbs-hero--background .ifbs-hero-shell {
    min-height: 610px;
  }

  .ifbs-hero--background .ifbs-hero-background__overlay {
    background: linear-gradient(180deg,
      rgba(255,255,255,.54) 0%,
      rgba(255,255,255,.32) 45%,
      rgba(255,255,255,.10) 75%,
      rgba(255,255,255,0) 100%) !important;
  }

  .ifbs-hero--background .ifbs-hero-background__media img {
    filter: blur(1.5px) saturate(.97) brightness(1.02) contrast(.98) !important;
    transform: scale(1.014) !important;
  }
}

@media (max-width: 36rem) {
  .ifbs-hero--background,
  .ifbs-hero--background .ifbs-hero-shell {
    min-height: 660px;
  }
}


/* -------------------------------------------------------------------------
 * 1.21.0: strong hero text contrast
 * Readability is solved with a light content surface rather than stronger
 * image blur. The classroom remains clearly visible on the right.
 * ---------------------------------------------------------------------- */
.ifbs-hero--background .ifs-hero__copy {
  position: relative;
  width: min(100%, 47rem);
  max-width: 47rem;
  padding: 2rem 2.25rem 1.85rem;
  box-sizing: border-box;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 22px;
  box-shadow: 0 14px 38px rgba(18,51,74,.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.ifbs-hero--background .ifs-hero__copy h1 {
  text-shadow: none;
}

.ifbs-hero--background .ifs-hero__copy .ifs-eyebrow,
.ifbs-hero--background .ifs-hero__copy .ifs-lead {
  text-shadow: none;
}

.ifbs-hero--background .ifs-hero__copy .ifs-lead {
  color: #173b59;
  font-weight: 500;
}

.ifbs-hero--background .ifbs-hero-actions .ifs-button--ghost {
  background: rgba(255,255,255,.96);
  border-color: rgba(18,51,74,.24);
  box-shadow: 0 3px 10px rgba(18,51,74,.06);
}

/* Reduce visual competition from the image without making it blurry. */
.ifbs-hero--background .ifbs-hero-background__overlay {
  background: linear-gradient(90deg,
    rgba(255,255,255,.30) 0%,
    rgba(255,255,255,.20) 36%,
    rgba(255,255,255,.06) 62%,
    rgba(255,255,255,0) 100%) !important;
}

.ifbs-hero--background .ifbs-hero-background__media img {
  filter: blur(.9px) saturate(.96) brightness(1.02) contrast(.98) !important;
}

@media (max-width: 48.875rem) {
  .ifbs-hero--background .ifs-hero__copy {
    width: 100%;
    max-width: none;
    padding: 1.65rem 1.4rem 1.5rem;
    border-radius: 18px;
    background: rgba(255,255,255,.91);
  }

  .ifbs-hero--background .ifbs-hero-background__overlay {
    background: linear-gradient(180deg,
      rgba(255,255,255,.86) 0%,
      rgba(255,255,255,.72) 48%,
      rgba(255,255,255,.20) 82%,
      rgba(255,255,255,0) 100%) !important;
  }
}
