/* Smartphone-Layout – Desktop (#xr_xrii) bleibt unverändert ab 901px */

@media (min-width: 901px) {
  .borg-m-app {
    display: none !important;
  }
}

@media (max-width: 900px) {
  #xr_xrii,
  .borg-fab-stack,
  .borg-scroll-top,
  .borg-logo-home {
    display: none !important;
  }

  html,
  body {
    overflow-x: hidden !important;
    max-width: 100%;
    margin: 0;
  }

  .borg-m-app {
    --borg-m-header-h: 3.75rem;
    display: block;
    font-family: "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: #1a1a1a;
    background: #b8ac9f;
    min-height: 100vh;
    position: relative;
  }

  .borg-m-header {
    position: sticky;
    top: 0;
    z-index: 520;
    background: #b8ac9f;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .borg-m-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    min-height: 3.5rem;
  }

  .borg-m-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
  }

  .borg-m-logo img {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .borg-m-logo__text {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .borg-m-logo__text strong {
    font-family: "Times New Roman", Times, serif;
    font-size: 1.15rem;
    color: #b48e51;
    letter-spacing: 0.12em;
  }

  .borg-m-burger {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
  }

  .borg-m-burger span {
    display: block;
    height: 2px;
    background: #1a1a1a;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  body.borg-m-nav-open .borg-m-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  body.borg-m-nav-open .borg-m-burger span:nth-child(2) {
    opacity: 0;
  }

  body.borg-m-nav-open .borg-m-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .borg-m-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 500;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    cursor: pointer;
  }

  body.borg-m-nav-open .borg-m-nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .borg-m-nav {
    position: fixed;
    top: var(--borg-m-header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 510;
    display: flex;
    flex-direction: column;
    background: #f4f2f0;
    padding: 0.75rem 1rem 0;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
  }

  .borg-m-nav__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.75rem;
  }

  .borg-m-nav__legal {
    flex-shrink: 0;
    margin: 0;
    padding: 0.85rem 0 calc(0.85rem + env(safe-area-inset-bottom, 0px));
    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: #f4f2f0;
  }

  .borg-m-nav__legal a {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
  }

  .borg-m-nav__legal-sep {
    color: #666;
    font-weight: 400;
  }

  body.borg-m-nav-open .borg-m-nav {
    transform: translateX(0);
  }

  body.borg-m-nav-open .borg-m-nav[aria-hidden="false"] {
    visibility: visible;
  }

  .borg-m-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .borg-m-nav__item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .borg-m-nav__row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }

  .borg-m-nav__link {
    flex: 1;
    display: block;
    padding: 0.9rem 0.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    color: #1a1a1a;
  }

  .borg-m-nav__link.is-active,
  .borg-m-sub__link.is-active {
    color: #b48e51;
  }

  .borg-m-subtoggle {
    width: 2.75rem;
    height: 2.75rem;
    margin-right: 0.15rem;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 10px;
    background: #ebe6e0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .borg-m-subtoggle:active {
    background: #ddd6cc;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .borg-m-nav__item--has-sub.is-open .borg-m-subtoggle {
    background: #f0e6d6;
    border-color: rgba(180, 142, 81, 0.45);
  }

  .borg-m-subtoggle::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #3a3532;
    border-bottom: 2px solid #3a3532;
    transform: translate(-50%, -58%) rotate(45deg);
    transition: transform 0.2s ease;
  }

  .borg-m-nav__item--has-sub.is-open .borg-m-subtoggle::before {
    transform: translate(-50%, -42%) rotate(-135deg);
    border-color: #8a6d3f;
  }

  .borg-m-sub {
    list-style: none;
    margin: 0;
    padding: 0 0 0.5rem 0.75rem;
    display: none;
  }

  .borg-m-nav__item--has-sub.is-open .borg-m-sub {
    display: block;
  }

  .borg-m-sub__link {
    display: block;
    padding: 0.55rem 0.25rem;
    text-decoration: none;
    color: #333;
    font-size: 1rem;
  }

  .borg-m-nav__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    background: #b48e51;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
  }

  .borg-m-main {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    z-index: 1;
  }

  .borg-m-hero {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #3a3532;
  }

  .borg-m-hero__media {
    width: 100%;
    aspect-ratio: 5 / 3.6;
    flex-shrink: 0;
    overflow: hidden;
    background: #8a7f74;
  }

  .borg-m-hero--short .borg-m-hero__media {
    aspect-ratio: 5 / 2.8;
  }

  .borg-m-hero--image-only .borg-m-hero__media {
    aspect-ratio: 5 / 2.6;
  }

  .borg-m-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
    display: block;
  }

  .borg-m-hero__copy {
    flex-shrink: 0;
    padding: 0.95rem 1rem 1.15rem;
    background: #3a3532;
    color: #ffffff;
  }

  .borg-m-kicker {
    margin: 0 0 0.45rem;
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.35;
    letter-spacing: 0.01em;
    color: #f4f2f0;
  }

  .borg-m-hero__copy .borg-m-h1 {
    margin: 0;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(1.45rem, 5.2vw, 1.85rem);
    line-height: 1.2;
    font-weight: 700;
    color: #ffffff;
    max-width: 22rem;
  }

  .borg-m-h1 {
    margin: 0;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(1.45rem, 5.2vw, 1.85rem);
    line-height: 1.2;
    font-weight: 700;
  }

  .borg-m-section {
    padding: 1.35rem 1rem 1.5rem;
    background: #f4f2f0;
  }

  .borg-m-section + .borg-m-section {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

  .borg-m-prose p {
    margin: 0 0 1rem;
    max-width: 42rem;
  }

  .borg-m-h2 {
    margin: 0 0 0.85rem;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.5rem;
    line-height: 1.2;
    color: #1a1a1a;
  }

  .borg-m-h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
  }

  .borg-m-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .borg-m-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  }

  /* Xara-Pad-Grafiken (604×665): volle Höhe, damit Überschrift nicht abgeschnitten wird */
  .borg-m-card--pad {
    overflow: visible;
    background: transparent;
    box-shadow: none;
  }

  .borg-m-card--pad .borg-m-card__media {
    aspect-ratio: 604 / 665;
    overflow: hidden;
    background: #e8e4df;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  }

  .borg-m-card--pad .borg-m-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
  }

  .borg-m-card--pad .borg-m-card__body {
    margin-top: 0.35rem;
    background: #fff;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  }

  .borg-m-card__media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #ddd;
  }

  .borg-m-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .borg-m-card__body {
    padding: 1rem 1rem 1.15rem;
  }

  .borg-m-card__body p {
    margin: 0;
    font-size: 0.98rem;
    color: #444;
  }

  .borg-m-figure {
    margin: 1rem 0;
    border-radius: 12px;
    overflow: hidden;
    background: #e8e4df;
  }

  .borg-m-figure img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    object-position: center;
    display: block;
  }

  .borg-m-team {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .borg-m-team__card {
    text-align: center;
    background: #fff;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  }

  .borg-m-team__card img {
    width: min(100%, 280px);
    margin: 0 auto;
    border-radius: 50%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
  }

  .borg-m-team__name {
    margin: 0.85rem 0 0.15rem;
    font-family: "Times New Roman", Times, serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #b48e51;
  }

  .borg-m-team__role {
    margin: 0;
    font-size: 1rem;
    color: #444;
  }

  .borg-m-contact {
    padding: 1.5rem 1rem 2rem;
    background: #b48e51;
    color: #fff;
    text-align: center;
  }

  .borg-m-contact .borg-m-h2 {
    color: #fff;
  }

  .borg-m-contact__line {
    margin: 0.35rem 0;
  }

  .borg-m-contact a:not(.borg-m-btn) {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
  }

  .borg-m-btn,
  .borg-m-contact a.borg-m-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    background: #ffffff;
    color: #8a6d3f !important;
    -webkit-text-fill-color: #8a6d3f !important;
    font-weight: 700;
    text-decoration: none !important;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  }

  .borg-m-footer {
    padding: 1.5rem 1rem 2rem;
    background: #1a1a1a;
    color: #f4f2f0;
    font-size: 0.95rem;
    text-align: center;
  }

  .borg-m-footer p {
    margin: 0.35rem 0;
  }

  .borg-m-footer a {
    color: #f4f2f0;
  }

  .borg-m-footer__brand {
    font-weight: 700;
    font-size: 1.05rem;
  }

  .borg-m-footer__legal {
    margin-top: 1rem !important;
    opacity: 0.85;
  }

  .borg-m-scroll-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 40;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: 50%;
    background: #b48e51;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    cursor: pointer;
  }

  .borg-m-scroll-top[hidden] {
    display: none !important;
  }

  body.borg-m-nav-open {
    overflow: hidden;
  }

  .borg-m-kicker--inline {
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #5c4d3a;
  }

  .borg-m-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .borg-m-form__group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .borg-m-form__group label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #3d3428;
  }

  .borg-m-form input,
  .borg-m-form select,
  .borg-m-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    font: inherit;
    font-size: 1rem;
    background: #fff;
    color: #111;
  }

  .borg-m-form textarea {
    min-height: 6.5rem;
    resize: vertical;
  }

  .borg-m-form .borg-contact-consent {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #3d3428;
    cursor: pointer;
  }

  .borg-m-form .borg-contact-consent input {
    width: auto;
    margin-top: 0.2rem;
    flex-shrink: 0;
  }

  .borg-m-form__submit {
    width: 100%;
    margin-top: 0.25rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
  }

  .borg-m-contact-flash {
    margin: 0 0 0.5rem;
  }

  .borg-contact-flash {
    padding: 0.75rem 0.85rem;
    border-radius: 10px;
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .borg-contact-flash--ok {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #a5d6a7;
  }

  .borg-contact-flash--err {
    background: #ffebee;
    color: #b71c1c;
    border: 1px solid #ef9a9a;
  }

  .borg-contact-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }
}
