/* ─────────────────────────────────────────────────────────────
   DOCTOR PAGE — HERO OPENING PARAGRAPH

   The paragraph under the H1 now carries the education line from the
   content document as well as the intro, so it runs longer. At every
   width: right-aligned, cut to 4 lines, and a "קראו עוד" toggle that
   appears only when the text actually runs past those 4 lines
   (assets/js/doctor-bio-readmore.js measures it and adds .is-needed).

   Replaces two older behaviours in team-member.css: on desktop the box
   was capped at 350px with its own scrollbar and the toggle was hidden;
   on mobile it was centred, cut at 3 lines and the toggle always showed.
   Selectors are one class heavier than team-member.css, as in the other
   doctor-*-figma.css files.
   ───────────────────────────────────────────────────────────── */

.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-desc {
  text-align: right !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Imported bios can carry their own centring on inner elements. */
.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-desc * {
  text-align: right !important;
}

/* Intro and education are two <p>s; they read as one block. */
.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-desc p {
  margin: 0 !important;
}

.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-desc.is-collapsed {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 4 !important;
  line-clamp: 4;
  overflow: hidden !important;
}

/* Hidden until the script finds more than 4 lines. */
.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-readmore-wrap {
  display: none !important;
}

.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-readmore-wrap.is-needed {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;   /* RTL: against the right edge */
  text-align: right !important;
  width: 100% !important;
  padding: 0 !important;
  margin-top: 12px !important;
}

.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-readmore-btn {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  color: #283565 !important;
  font-family: Polin, sans-serif !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: normal !important;
  text-align: right !important;
  cursor: pointer !important;
}

/* team-member.css removes the outline on this button. */
.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-readmore-btn:focus-visible {
  outline: 2px solid #087CF5 !important;
  outline-offset: 3px !important;
}

.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-readmore-wrap .dmc-dr-readmore-line {
  width: 61px !important;
  height: 2px !important;
  background: #087CF5 !important;
  margin: 4px 0 0 0 !important;
}

@media (max-width: 767px) {
  /* 44px touch target without moving anything: the padding grows the hit
     area and the matching negative margin gives the space back. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-readmore-btn {
    font-size: 16px !important;
    min-height: 44px !important;
    padding: 11px 0 !important;
    margin: -11px 0 !important;
  }

  /* Mobile already spaces it with margin-bottom (doctor-hero-figma.css). */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-readmore-wrap.is-needed {
    margin-top: 0 !important;
  }
}
