/* Therapie Bellevue 1.6.8 — layout, typography and keyboard/touch refinements.
   Loaded after the base stylesheet. No change to branding or stored content. */

/* Natural word wrapping, not isolated letters in narrow method columns. */
.site-content h1, .site-content h2, .site-content h3 {
  word-break: normal;
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
  hyphens: auto;
  hyphenate-limit-chars: 8 3 3;
  text-wrap: balance;
}
.tb-lead, .tb-video-section__copy p { text-wrap: pretty; }
.tb-service-links a {
  grid-template-columns: minmax(0, 1fr) 1.15rem;
  grid-template-rows: auto auto;
  gap: .3rem 1rem;
  padding: 1.05rem .1rem;
}
.tb-service-links a > strong,
.tb-service-links a > span { grid-column: 1; min-width: 0; word-break: normal; overflow-wrap: normal; }
.tb-service-links a > strong { grid-row: 1; -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 8 3 3; }
.tb-service-links a > span { grid-row: 2; }
.tb-service-links a::after { grid-column: 2; grid-row: 1 / 3; align-self: center; justify-self: end; }

/* One primary action, then two evenly spaced secondary links — never a 2+1 wrap. */
.tb-split--personal .tb-button-row,
.tb-profile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  justify-items: start;
  gap: .2rem;
}
.tb-split--personal .tb-button-row > .tb-button { width: fit-content; max-width: 100%; margin-bottom: .65rem; }
.tb-split--personal .tb-button-row > .tb-text-link { min-height: 44px; padding-block: .45rem; }
.tb-text-link { min-width: 0; max-width: 100%; }

/* The shared search-form flex rule must not squeeze the knowledge-search label. */
.tb-search-form--knowledge { display: block; width: 100%; max-width: none; margin: 0; }
.tb-search-form--knowledge > div { width: 100%; }
.tb-search-form input[type="hidden"] { display: none; }

/* Video: concise introduction, readable text and actual-source aspect ratio. */
.tb-video-section .tb-kicker { color: #ffd5d9; }
.tb-video-section h2 { max-width: 19ch; }
.tb-video-description { width: 100%; margin-top: .8rem; color: #fff; border-top: 1px solid rgba(255,255,255,.35); }
.tb-video-description summary { padding: .7rem 0; cursor: pointer; min-height: 44px; font-size: .9rem; }
.tb-video-description p { margin: .35rem 0 .9rem; font-size: .92rem; line-height: 1.65; }
.tb-brand-video__media[data-video-format="landscape"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.tb-brand-video__media[data-video-format="portrait"] { width: auto; max-width: 100%; height: auto; max-height: 76svh; aspect-ratio: 9 / 16; margin-inline: auto; }

/* New-tab hint for external websites; telephone/email/messenger behaviour stays native. */
a.tb-link-external::after { content: "↗"; display: inline-block; margin-inline-start: .35em; font-size: .85em; line-height: 1; text-decoration: none; }
.tb-source-list a.tb-link-external::after { content: none; }
.tb-source-list a.tb-link-external { overflow-wrap: anywhere; }
.tb-section--ink .tb-link-external,
.tb-section--ink .tb-link-external:visited { color: #fff; }
.tb-section--ink .tb-link-external:hover { color: #ffd5d9; }
.tb-footer__legal a { display: inline-flex; align-items: center; min-height: 44px; }

/* Keep narrow components from forcing their own minimum widths. */
.tb-human-statement > *, .tb-credentials > *, .tb-paths > *,
.tb-knowledge-tools__inner > *, .tb-related-panel > *, .tb-myokine-card { min-width: 0; }
.tb-human-statement { grid-template-columns: minmax(0, .55fr) minmax(0, 1.45fr); }
.tb-credential-badge { flex-wrap: wrap; }
.tb-credential-badge a { max-width: 100%; }
.tb-credential-badge img { max-width: min(180px, 100%); }
.tb-header__inner { min-width: 0; }
.tb-brand .custom-logo { max-width: min(100%, 260px); object-fit: contain; }
.tb-menu-toggle { flex-shrink: 0; min-width: 44px; min-height: 44px; }

@media (min-width: 981px) {
  .tb-nav .sub-menu { max-height: min(70vh, 620px); overflow-y: auto; }
}
@media (max-width: 980px) {
  .tb-human-statement { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .tb-nav { max-height: calc(100svh - 94px); max-height: var(--tb-menu-available-height, calc(100svh - 94px)); overscroll-behavior: contain; }
  .tb-nav:not(.is-open) { visibility: hidden; }
  .tb-nav:not(.is-open) * { visibility: hidden; }
}
@media (max-width: 700px) {
  .tb-service-links a { grid-template-columns: minmax(0, 1fr) 1rem; gap: .3rem .7rem; }
  .tb-service-links a::after { display: block; }
  .tb-split--personal .tb-button-row > .tb-button { width: 100%; }
  .tb-video-section h2 { max-width: none; }
  .tb-brand-video__media { width: 100%; max-height: 76svh; }
  .tb-form input, .tb-form select, .tb-form textarea { font-size: 16px; }
  .tb-related-panel__links a { overflow-wrap: break-word; -webkit-hyphens: auto; hyphens: auto; }
  .tb-brand { max-width: calc(100% - 68px); }
}
@media (prefers-reduced-motion: reduce) {
  .tb-text-link:hover::after { transform: none; }
}
@media print {
  .tb-back-to-top, .tb-video-section, .tb-profile-actions { display: none !important; }
}
/* Qualification badges retain their own light surface inside dark sections. */
.tb-section--ink .tb-credential-badge a.tb-link-external,
.tb-section--ink .tb-credential-badge a.tb-link-external:visited { color: var(--tb-ink); }
.tb-section--ink .tb-credential-badge a.tb-link-external:hover { color: var(--tb-red-dark); }
/* A narrow video-introduction column needs a quieter headline than a full-width hero. */
.tb-video-section h2 { font-size: clamp(1.8rem, 2.5vw, 2.35rem); line-height: 1.18; }


/* Version 1.6.7: education and qualifications need space, not narrow columns.
   Scoped to existing components: no content import or database change. */
.tb-timeline { width: 100%; min-width: 0; }
.tb-timeline > article {
  grid-template-columns: 7.5rem minmax(0, 1fr);
  column-gap: clamp(1.25rem, 2.5vw, 2rem);
  row-gap: .5rem;
}
.tb-timeline > article > * { min-width: 0; }
.tb-timeline > article > :first-child {
  margin: 0;
  color: var(--tb-red);
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .025em;
  line-height: 1.6;
}
.tb-timeline h3 {
  font-size: clamp(1.25rem, 1.7vw, 1.4rem);
  line-height: 1.3;
  margin-bottom: .55rem;
  text-wrap: wrap;
}
.tb-timeline p { max-width: 80ch; line-height: 1.65; }
.tb-credentials {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.75rem, 3vw, 3rem);
  row-gap: 0;
}
.tb-credentials > article {
  min-width: 0;
  padding-block: 1.6rem;
}
.tb-credentials h3 {
  font-size: clamp(1.25rem, 1.7vw, 1.4rem);
  line-height: 1.3;
  margin-bottom: .65rem;
  text-wrap: wrap;
}
.tb-credentials p {
  font-size: 1.0625rem;
  line-height: 1.65;
  max-width: 72ch;
  overflow-wrap: break-word;
}
@media (max-width: 900px) {
  .tb-timeline > article { grid-template-columns: minmax(0, 1fr); gap: .45rem; }
  .tb-credentials { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .tb-timeline > article { padding-block: 1.3rem; }
  .tb-credentials > article { padding-block: 1.3rem; }
}
@media print {
  .tb-timeline > article, .tb-credentials > article { break-inside: avoid; }
}


/* Version 1.6.8: keep timeline copy in its own grid area after WordPress wpautop.
   Legacy HTML <article><span>date</span><div>copy</div></article> can be
   delivered as <article><span>date</span></p><div>copy</div></article>.
   The HTML parser inserts an empty <p>, occupying the second grid cell.
   Explicit areas prevent the copy being auto-placed in the narrow date column.
   Only the timeline component is affected; stored text is not rewritten.
*/
.tb-timeline > article {
  grid-template-areas: "date copy";
  grid-template-rows: auto;
  align-items: start;
}
.tb-timeline > article > :first-child {
  grid-area: date;
}
.tb-timeline > article > div {
  grid-area: copy;
  width: 100%;
  max-width: none;
  min-width: 0;
}
/* Ignore empty paragraph/break nodes inserted by the content formatter.
   Paragraphs inside the copy and all non-empty date paragraphs stay visible. */
.tb-timeline > p:empty,
.tb-timeline > br,
.tb-timeline > article > p:empty,
.tb-timeline > article > br {
  display: none;
}
@media (max-width: 900px) {
  .tb-timeline > article {
    grid-template-areas: "date" "copy";
  }
}
