/**
 * Erweiterungen OHNE Desktop-Layout zu verändern.
 */

/* Desktop: Xara-Canvas immer sichtbar, Mobile-Shell aus dem Layout */
@media (min-width: 901px) {
  #borg-m-app {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  #xr_xrii {
    visibility: visible !important;
  }

  html,
  body {
    margin: 0;
    padding-bottom: 0 !important;
    background-color: #b48e51;
  }
}

/* Logo: ein durchgängiger Klickbereich (borg-logo-home), alte Teil-Links aus */
.borg-logo-home {
  display: block;
  text-decoration: none;
}

.xr_txt[style*="left:204px"][style*="top:97px"] a.xr_atsh,
a.xr_atsh:has(> span[style*="left:89px"][style*="top:45px"]) {
  pointer-events: none !important;
}

/* Hauptnavigation: Hover + aktuelle Seite (beige) */
a.xr_atsh.borg-nav-main:hover,
a.xr_atsh.borg-nav-main.borg-nav-active,
body[data-borg-page] a.xr_atsh.borg-nav-main.borg-nav-active,
body[data-borg-page] .Normaler_Text a.xr_atsh.borg-nav-main.borg-nav-active,
span.xr_tl.borg-nav-dropdown-active,
span.xr_tl.borg-nav-dropdown-label {
  color: #b48e51 !important;
  -webkit-text-fill-color: #b48e51 !important;
}

span.xr_tl.borg-nav-dropdown-label {
  cursor: pointer;
}

/* Leistungen-Dropdown (weißes Panel): Standard schwarz, Xara-Hover sonst oft weiße Schrift */
div.xr_ap[id^="xr_xp"] .xr_txt.Normal_text_2 a.xr_atsh {
  color: #000000 !important;
  -webkit-text-fill-color: #000000 !important;
}

div.xr_ap[id^="xr_xp"] .xr_txt.Normal_text_2 a.xr_atsh:hover,
div.xr_ap[id^="xr_xp"] .xr_txt.Normal_text_2 a.xr_atsh.borg-nav-active,
div.xr_ap[id^="xr_xp"] .xr_txt.Normal_text_2 a.xr_atsh.borg-nav-dropdown.borg-nav-active {
  color: #b48e51 !important;
  -webkit-text-fill-color: #b48e51 !important;
}

/* Xara-Sticky-FABs + alte große Seiten-Buttons (rechts) ausblenden */
#xr_xpxr_2,
#xr_xpxr_13,
.xr_stickie[id^="xr_xpxr_"],
span.xr_ar[style*="left:2422px"][style*="width:110px;height:110px"],
span.xr_ar[style*="left:2443px"][style*="width:68px;height:45px"],
span.xr_ar[style*="left:2442px"][style*="width:70px;height:68px"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.borg-fab-stack {
  position: fixed;
  right: 14px;
  top: 50%;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translate3d(0, -50%, 0);
}

.borg-fab {
  display: block;
  line-height: 0;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.borg-fab:hover,
.borg-fab:active {
  transform: scale(1.1);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.borg-fab img {
  display: block;
  width: 56px;
  height: 56px;
}

.borg-scroll-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #b48e51;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

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

.borg-scroll-top:hover,
.borg-scroll-top:active {
  transform: scale(1.08);
}

body[data-borg-page="index"] img.xr_rn_[alt="Unsere Leistungen"],
body[data-borg-page="index"] img.xr_rn_[alt="Über uns"],
body[data-borg-page="index"] img.xr_rn_[alt="Ihre Vorteile"],
body[data-borg-page="leistungen"] img.xr_rn_[alt="Persönliche Betreuung"],
body[data-borg-page="leistungen"] img.xr_rn_[alt="Erreichbarkeit & Verbindlichkeit"],
body[data-borg-page="leistungen"] img.xr_rn_[alt="Transparenz & klare Prozesse"],
body[data-borg-page="leistungen"] img.xr_rn_[alt="Technische Verwaltung"] {
  cursor: pointer;
}

body[data-borg-page="index"] #xr_xp1,
body[data-borg-page="index"] #xr_xp2,
body[data-borg-page="index"] #xr_xp3,
body[data-borg-page="leistungen"] #xr_xp1,
body[data-borg-page="leistungen"] #xr_xp2,
body[data-borg-page="leistungen"] #xr_xp3,
body[data-borg-page="leistungen"] #xr_xp4 {
  pointer-events: none;
}

body[data-borg-page="index"] #xr_xp1 *,
body[data-borg-page="index"] #xr_xp2 *,
body[data-borg-page="index"] #xr_xp3 *,
body[data-borg-page="leistungen"] #xr_xp1 *,
body[data-borg-page="leistungen"] #xr_xp2 *,
body[data-borg-page="leistungen"] #xr_xp3 *,
body[data-borg-page="leistungen"] #xr_xp4 * {
  cursor: pointer;
}

/* Pad-Hover: Überschriften nicht am Rand abschneiden */
@media (min-width: 901px) {
  body[data-borg-page="index"] #xr_xp1,
  body[data-borg-page="index"] #xr_xp2,
  body[data-borg-page="index"] #xr_xp3,
  body[data-borg-page="leistungen"] #xr_xp1,
  body[data-borg-page="leistungen"] #xr_xp2,
  body[data-borg-page="leistungen"] #xr_xp3,
  body[data-borg-page="leistungen"] #xr_xp4 {
    overflow: visible !important;
  }

  body[data-borg-page="index"] #xr_xp1 .xr_txt,
  body[data-borg-page="index"] #xr_xp2 .xr_txt,
  body[data-borg-page="index"] #xr_xp3 .xr_txt,
  body[data-borg-page="leistungen"] #xr_xp1 .xr_txt,
  body[data-borg-page="leistungen"] #xr_xp2 .xr_txt,
  body[data-borg-page="leistungen"] #xr_xp3 .xr_txt,
  body[data-borg-page="leistungen"] #xr_xp4 .xr_txt {
    overflow: visible !important;
    height: auto !important;
    min-height: 5.5rem;
  }

  body[data-borg-page="index"] #xr_xp1 .xr_txt h3,
  body[data-borg-page="index"] #xr_xp2 .xr_txt h3,
  body[data-borg-page="index"] #xr_xp3 .xr_txt h3,
  body[data-borg-page="leistungen"] #xr_xp1 .xr_txt h3,
  body[data-borg-page="leistungen"] #xr_xp2 .xr_txt h3,
  body[data-borg-page="leistungen"] #xr_xp3 .xr_txt h3,
  body[data-borg-page="leistungen"] #xr_xp4 .xr_txt h3 {
    transform: translateY(-14px);
  }
}

.borg-pad-catcher {
  display: block;
  cursor: pointer;
  background: transparent;
}

.borg-pad-hit {
  display: block;
  cursor: pointer;
  background: transparent;
  border: none;
  text-decoration: none;
}

a.borg-contact-mail,
a.borg-contact-tel {
  cursor: pointer;
  text-decoration: none;
}

a.borg-contact-mail:hover,
a.borg-contact-tel:hover {
  text-decoration: underline;
}

.borg-footer-col-mieten .xr_tl {
  white-space: nowrap;
}

@media (min-width: 901px) {
  .borg-footer-legal {
    text-align: center;
  }

  .borg-footer-legal .xr_tl {
    position: relative !important;
    width: 100% !important;
  }

  #borg-footer-seo-panel {
    position: absolute;
    left: 0;
    background: #ffffff;
    z-index: 5 !important;
    pointer-events: none;
  }

  .borg-footer-seo-col {
    z-index: 12 !important;
  }

  .borg-footer-legal {
    z-index: 20 !important;
  }
}

/* Team „Über uns“: alte Xara-Zweizeiler ausblenden, neue Blöcke */
body[data-borg-page="ueber-uns"] .xr_txt.xr_s34[style*="top:2645px"],
body[data-borg-page="ueber-uns"] .xr_txt.xr_s34[style*="top: 2645px"] {
  display: none !important;
  visibility: hidden !important;
}

#borg-team-labels .borg-team-block,
.borg-team-block {
  height: auto !important;
  text-align: center;
}

.borg-team-block .borg-team-name,
.borg-team-block .borg-team-role,
.borg-team-card .borg-team-name,
.borg-team-card .borg-team-role {
  position: static !important;
  left: auto !important;
  top: auto !important;
  margin: 0;
  width: 100%;
  text-align: center;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.borg-team-block .borg-team-name,
.borg-team-card .borg-team-name {
  display: block;
  white-space: nowrap !important;
  font-family: "Times New Roman", Times, serif;
  font-weight: bold;
  font-size: calc(16pt + 12px);
  line-height: 1.2;
}

.borg-team-block .borg-team-role,
.borg-team-card .borg-team-role {
  display: block;
  margin-top: 0.5em;
  font-family: "Times New Roman", Times, serif;
  font-weight: bold;
  font-size: calc(16pt + 4px);
  line-height: 1.25;
}

/* Kontaktformulare Desktop */
@media (min-width: 901px) {
  body[data-borg-page^="kontakt"] .borg-contact-xara-static {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

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

  .borg-d-form-wrap {
    position: absolute;
    z-index: 80;
    box-sizing: border-box;
    padding: 1.35rem 1.75rem 1.75rem;
    background: #f4f2f0;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
  }

  .borg-d-form-wrap--kontakt {
    left: 661px;
    top: 1190px;
    width: 1215px;
  }

  .borg-d-form-wrap--kontakt-eigentuemer,
  .borg-d-form-wrap--kontakt-mieter {
    left: 206px;
    top: 618px;
    width: 870px;
  }

  .borg-d-form {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    border: none;
  }

  .borg-d-form__section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 0.25rem;
  }

  .borg-d-form__section + .borg-d-form__section {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
  }

  .borg-d-form__heading {
    margin: 0 0 0.15rem;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
    color: #1a1a1a;
  }

  .borg-d-form__row,
  .borg-d-form__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
  }

  .borg-d-form__row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .borg-d-form__label {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: #3d3428;
  }

  .borg-d-form input,
  .borg-d-form select,
  .borg-d-form textarea {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: #ffffff;
    color: #111111;
    font: inherit;
    font-size: 1rem;
    line-height: 1.35;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .borg-d-form input:focus,
  .borg-d-form select:focus,
  .borg-d-form textarea:focus {
    outline: none;
    border-color: #b48e51;
    box-shadow: 0 0 0 3px rgba(180, 142, 81, 0.22);
  }

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

  .borg-d-form select option {
    color: #111;
  }

  .borg-d-form__footer {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

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

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

  .borg-d-form .borg-d-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 999px;
    background: #ffffff;
    color: #8a6d3f !important;
    -webkit-text-fill-color: #8a6d3f !important;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
  }

  .borg-d-form .borg-d-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  }

  .borg-contact-flash {
    margin: 0 0 1rem;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 15px;
    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;
  }
}
