/* ============================================
   KANZLEI PAGE LAYOUT
   ============================================ */
.page-kanzlei .content-container {
  justify-content: center; /* Center() in Flutter */
  padding: 0;
  overflow: hidden; /* Flutter middle container does not scroll */
}

.page-kanzlei .content-wrapper.kanzlei {
  width: var(--k-container-w);
  height: var(--k-mid-h);
  padding: 0;
  margin: 0 auto;
  min-height: 0;
  overflow: hidden; /* scroll is inside .kanzlei-scroll */
  justify-content: flex-start;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .page-kanzlei .founders-split {
    gap: calc(var(--k-pad-l) * 3);
  }
}

.page-kanzlei .kanzlei-mobile-title {
  display: none;
}

.page-kanzlei .kanzlei-scroll {
  flex: 1;
  height: auto;
  overflow-y: auto; /* SingleChildScrollView */
  padding: 0 10px 8px; /* bottom pad ensures last line is readable */
  min-height: 0;
  box-sizing: border-box;

  /* Hide native scrollbar (we render a custom one at the screen edge) */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge */
}

.page-kanzlei .kanzlei-scroll::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.page-kanzlei .intro-text {
  margin: 0;
  padding-top: var(--k-pad-m);
}

.page-kanzlei .founders-split {
  display: flex;
  flex-direction: column;
  gap: calc(var(--k-pad-l) * 3);
  align-items: flex-start;
  padding-top: calc(var(--k-pad-l) * 1.5);
  padding-bottom: var(--k-pad-l);
}

.page-kanzlei .founder-block {
  flex: 1;
  min-width: 0;
}

.page-kanzlei .founder-media {
  margin: 0;
}

.page-kanzlei .founder-media img {
  width: var(--k-founder-img-w);
  height: var(--k-founder-img-h);
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.page-kanzlei .founder-media figcaption {
  margin-top: var(--k-pad-m);
  color: var(--text-color);
}

.page-kanzlei .founder-text {
  padding-top: var(--k-pad-m);
}

.page-kanzlei .founder-text p {
  margin: 0 0 1em;
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

.page-kanzlei .founder-text p:last-child {
  margin-bottom: 0;
}

.page-kanzlei .kanzlei-text {
  margin-top: 0;
  padding-bottom: var(--k-pad-m);
}

.page-kanzlei .founders-gallery {
  display: flex;
  justify-content: flex-start;
  gap: calc(var(--k-pad-l) * 2);
  margin: 0;
  padding-top: calc(var(--k-pad-l) * 1.5);
  padding-bottom: var(--k-pad-l);
}

.page-kanzlei .founder-card {
  flex: 0 0 200px;
  width: 200px;         /* wide enough for longest name in one line */
  min-width: 0;
  overflow: hidden;
  text-align: center;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.page-kanzlei .founder-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 180 / 175;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.page-kanzlei .founder-card figcaption {
  margin-top: var(--k-pad-m);
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-color);
}

@media (max-width: 799px) {
  .page-kanzlei .content-wrapper.kanzlei {
    width: 100%;
    height: 100%;
  }

  .page-kanzlei .intro-text {
    padding-top: 0;
    margin-top: 0;
  }

  .page-kanzlei .founders-split {
    gap: calc(var(--k-pad-l) * 2);
  }

  .page-kanzlei .kanzlei-mobile-title {
    display: block;
    padding: var(--mobile-title-padding);
    margin: 0;
    text-align: center;
    color: var(--red);
    font-size: calc(var(--fs-base) * 1.2);
    font-weight: var(--fw-page-title);
    letter-spacing: var(--ls-body);
    line-height: var(--lh-body);
  }

  .page-kanzlei .kanzlei-scroll {
    height: auto;
    flex: 1;
    padding: 0 var(--pad-lg) var(--pad-lg);
  }

  .page-kanzlei .founder-media img {
    /* height: 159 * (screenWidth*0.0018), width: 164 * (screenWidth*0.0018) */
    width: calc(29.52vw);
    height: calc(28.62vw);
  }

  .page-kanzlei .founder-media figcaption {
    /* fontSize: 15 * (screenWidth*0.0018) */
    font-size: calc(2.7vw);
    line-height: var(--lh-body);
    letter-spacing: var(--ls-body);
    color: var(--text-color);
  }

  .page-kanzlei .founders-gallery {
    flex-direction: row;
    justify-content: center;
    gap: 24px;
    padding-top: 0;
    padding-bottom: 0;
    margin: 18px 0 28px;
  }

  .page-kanzlei .founder-card {
    flex: 1 1 0;          /* both cards share row equally = same width */
    min-width: 0;
    max-width: 160px;     /* slightly smaller than full-width cards */
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .page-kanzlei .founder-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 180 / 175;
    object-fit: cover;
    border-radius: 3px;
    display: block;
  }

  .page-kanzlei .founder-card figcaption {
    width: 100%;
    font-size: clamp(10px, 2.9vw, 12px);
    letter-spacing: 0;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.4;
    margin-top: 4px;
  }
}

.page-kanzlei .kanzlei-text p {
  font-size: var(--fs-base);
  line-height: var(--lh-body);
}

.page-kanzlei .kanzlei-text a {
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text-color);
  text-decoration: none;
  font-weight: var(--fw-regular);
}

.page-kanzlei .founder-text a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: var(--fw-regular);
}

.page-kanzlei .kanzlei-text a:hover,
.page-kanzlei .founder-text a:hover {
  text-decoration: underline;
  color: var(--text-color);
}

/* ===== KANZLEI CONTENT (legacy content styles) ===== */
.kanzlei-content {
  text-align: left;
}

.kanzlei-content h1,
.kanzlei-content h2 {
  color: var(--red);
  font-weight: var(--fw-regular);
  margin: 24px 0 12px;
}

.kanzlei-content h1 {
  font-size: 1.3em;
  margin-top: 0;
}

.kanzlei-content h2 {
  font-size: 1.1em;
}

.kanzlei-content h3 {
  color: var(--text-color);
  font-weight: var(--fw-regular);
  font-size: 0.95em;
  margin: 16px 0 8px;
}

.kanzlei-content p {
  margin: 12px 0;
  font-size: 0.9em;
  line-height: 1.8;
}

.kanzlei-content a {
  color: inherit;
  text-decoration: none;
}

.kanzlei-content a:hover {
  text-decoration: underline;
}

.kanzlei-content section {
  margin-bottom: var(--space-block);
}

.kanzlei-content {
  line-height: var(--lh-body);
}

.kanzlei-intro {
  margin-bottom: 1.5em;
}

.founders-gallery {
  display: flex;
  gap: 40px;
  margin: 30px 0;
  justify-content: flex-start;
}

.founder-card {
  text-align: left;
  margin: 0;
}

.founder-card img {
  width: 180px;
  height: 175px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}

.founder-card figcaption {
  margin-top: var(--pad-sm);
  font-size: 0.95rem;
  color: var(--text-color);
}

.kanzlei-text {
  margin-top: 24px;
}

.kanzlei-text p {
  margin-bottom: 1em;
  font-size: 0.9em;
  line-height: 1.8;
}

.kanzlei-text a {
  color: var(--text-color);
  text-decoration: none;
}

.kanzlei-text a:hover {
  text-decoration: underline;
}


/* ===== KANZLEI CUSTOM SCROLLBAR (screen edge) ===== */
.page-kanzlei .custom-scrollbar {
  position: fixed;
  top: var(--appbar-h);
  right: 0;
  height: calc(100vh - var(--appbar-h));
  width: 16px;
  z-index: 900; /* below drawer/hamburger, above content */
  /* Keep scrollbar visible and interactive for the Kanzlei page */
  display: block !important;
  pointer-events: auto !important;
}

/* Force visible even if JS toggles `.is-hidden`; keep interactive */
.page-kanzlei .custom-scrollbar.is-hidden {
  display: block !important;
  pointer-events: auto !important;
}

.page-kanzlei .custom-scrollbar__track {
  height: 100%;
  width: 100%;
  position: relative;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.08);
}

.page-kanzlei .custom-scrollbar__thumb {
  position: absolute;
  left: 2px;
  right: 2px;
  top: 0;
  border-radius: 0;
  background: var(--grey);
  opacity: 1;
  cursor: grab;
  touch-action: none;
}

.page-kanzlei .custom-scrollbar.is-dragging .custom-scrollbar__thumb {
  cursor: grabbing;
  opacity: 0.85;
}

.page-kanzlei .custom-scrollbar__thumb:hover,
.page-kanzlei .custom-scrollbar__thumb:focus-visible {
  opacity: 0.85;
}
