/* ===== KONTAKT PAGE ===== */

/* ── Desktop ─────────────────────────────────────────────────────────────
   Important: never vertically center *inside the scroll container*.
   Flex centering there can create "negative overflow" that doesn't contribute
   to `scrollHeight`, which makes the custom scrollbar appear late and prevents
   reaching the true bottom.

   Instead:
   - The scroll container is top-aligned.
   - An inner wrapper has `min-height: 100%` and `justify-content: center`.
     When content fits, it centers; when it overflows, free space is 0 so the
     content becomes top-aligned and everything is fully scrollable.
─────────────────────────────────────────────────────────────────────────── */
body.page-kontakt .content-container {
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden; /* scroll is inside .kontakt-scroll */
  padding: 0;
}

.page-kontakt .content-wrapper {
  width:         var(--col-w);
  height:        100%;
  min-height:    0;
  overflow:      hidden; /* scroll is inside .kontakt-scroll */
  display:       flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items:   stretch;
  box-sizing:    border-box;
  margin:        0 auto;  /* horizontal centering in block container */
}

.page-kontakt .kontakt-scroll {
  flex: 1;
  height: auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 var(--pad-lg); /* ensure last line is reachable */
  box-sizing: border-box;

  /* Hide native scrollbar (desktop custom scrollbar renders at screen edge) */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.page-kontakt .kontakt-scroll::-webkit-scrollbar {
  display: none;
}

.page-kontakt .kontakt-scroll-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.page-kontakt .kontakt-content {
  padding: 40px 0;
}

/* ── Shared text styles ─────────────────────────────────────────────────── */

.page-kontakt .content-wrapper > * { margin-bottom: 0; }
.page-kontakt .kontakt            { text-align: left; padding: 0; }
.page-kontakt .kontakt-header     { margin-bottom: 0; }
.page-kontakt .company-name,
.page-kontakt .company-subtitle   { font-weight: var(--fw-regular); }
.page-kontakt .kontakt-section    { padding-top: var(--pad-lg); }
.page-kontakt .section-title      { margin-bottom: 0; }
.page-kontakt .kontakt-line .label { display: inline-block; min-width: 50px; }
.page-kontakt .kontakt-address    { font-style: normal; }

.page-kontakt .kontakt a {
  color:           var(--text-color);
  text-decoration: none;
  font-weight:     var(--fw-regular);
}
.page-kontakt .kontakt a:hover { text-decoration: underline; }

/* ── Custom scrollbar (desktop only, right screen edge) ─────────────────── */
body.page-kontakt .custom-scrollbar {
  position: fixed;
  top:    var(--appbar-h);
  right:  0;
  height: calc(100vh - var(--appbar-h));
  width:  16px;
  z-index: 900;
}
body.page-kontakt .custom-scrollbar.is-hidden       { display: none !important; pointer-events: none !important; }
body.page-kontakt .custom-scrollbar__track          { height: 100%; width: 100%; position: relative; background: rgba(0,0,0,0.08); }
body.page-kontakt .custom-scrollbar__thumb          { position: absolute; left: 2px; right: 2px; top: 0; border-radius: 0; background: var(--grey); cursor: grab; touch-action: none; }
body.page-kontakt .custom-scrollbar.is-dragging .custom-scrollbar__thumb { cursor: grabbing; }
body.page-kontakt .custom-scrollbar__thumb:hover,
body.page-kontakt .custom-scrollbar__thumb:focus-visible { opacity: 0.85; }

/* ── Mobile overrides ────────────────────────────────────────────────────── */
@media (max-width: 799px) {
  body.page-kontakt .content-container {
    display: flex;
    overflow: hidden;
    align-items: stretch;
  }

  body.page-kontakt .custom-scrollbar {
    display: none !important;
    pointer-events: none !important;
  }

  .page-kontakt .content-wrapper {
    width:          100%;
    min-height:     0;
    height:         100%;
    padding:        0 var(--pad-lg);
    justify-content: flex-start;
    align-items:    flex-start;
  }

  .page-kontakt .kontakt-scroll {
    /* Mobile uses native scrolling; custom scrollbar is disabled */
    scrollbar-width: auto;
    -ms-overflow-style: auto;
  }

  .page-kontakt .kontakt-scroll::-webkit-scrollbar {
    display: initial;
  }

  .page-kontakt .kontakt-content {
    padding: var(--pad-lg) 0;
  }
}
