/* Gemeinsame Responsive-Regeln für alle Seiten der Inklusio-Lebenswege-Website.
   Diese Datei wird nach den seitenindividuellen Styles geladen, damit mobile
   Korrekturen konsistent gelten und nicht von älteren Regeln überschrieben werden. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 96px;
}

body {
  max-width: 100%;
  overflow-wrap: break-word;
}

img,
video,
iframe,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

main,
section,
article,
header,
footer,
.container,
.content,
.card,
.apply-panel,
.apply-email,
.availability-box,
.official-box {
  min-width: 0;
}

input,
select,
textarea,
button {
  max-width: 100%;
  font: inherit;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
  min-width: 0;
}

.site-header .site-menu {
  box-sizing: border-box !important;
}

.site-header .site-toggle {
  min-width: 44px !important;
  min-height: 44px !important;
  border-radius: 10px !important;
}

.site-header .site-toggle:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 3px;
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 82px;
  }

  .container {
    width: calc(100% - 32px) !important;
    max-width: 100% !important;
  }

  main {
    min-width: 0;
  }

  h1 {
    font-size: clamp(2rem, 8.2vw, 3.1rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  h2 {
    overflow-wrap: anywhere;
  }

  p,
  li,
  a {
    overflow-wrap: anywhere;
  }

  .content,
  .card,
  .apply-panel,
  .apply-email,
  .availability-box,
  .official-box {
    padding: clamp(18px, 5vw, 26px) !important;
    border-radius: 18px;
  }

  .hero-grid,
  .feature-grid,
  .about-grid,
  .offer-grid,
  .person-with-photo,
  .application-form,
  .contact-form {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hero-grid,
  .feature-grid,
  .about-grid,
  .offer-grid,
  .person-with-photo {
    gap: 18px;
  }

  .person-photo {
    width: min(180px, 65vw);
    max-width: 100%;
  }

  .section-head,
  .contact-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .actions,
  .contact-actions {
    flex-wrap: wrap;
  }

  .btn,
  .official-link {
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .footer-grid,
  .footer-row {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .contact-dialog {
    width: calc(100% - 20px);
    max-width: 720px;
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    border-radius: 20px;
  }

  .contact-panel {
    padding: clamp(18px, 5vw, 26px) !important;
  }

  .contact-form,
  .application-form {
    gap: 15px;
  }

  .contact-form .form-field.full,
  .application-form .field.full,
  .required-note,
  .contact-actions {
    grid-column: 1 / -1;
  }

  input[type="file"] {
    width: 100%;
  }

  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}

@media (max-width: 380px) {
  .container {
    width: calc(100% - 24px) !important;
  }

  .site-header .site-nav {
    width: calc(100% - 24px) !important;
    gap: 8px !important;
  }

  .site-header .brand img {
    max-width: 58vw !important;
    max-height: 48px !important;
  }

  .site-header .site-menu {
    left: -12px !important;
    right: -12px !important;
    padding: 10px 12px 14px !important;
  }

  .hero {
    padding-top: 36px;
  }

  .quote {
    max-width: calc(100% - 16px);
  }
}
