/* ─────────────────────────────────────────────────────────────
   DOCTOR PAGE — HERO AND FLOATING BAR, ALIGNED TO THE DESIGN FILE

   Figma: desktop 460:44760 (1920 frame) · mobile 460:75121 (390 frame).
   Every number below was read off a node in that file, not estimated.

   Selectors are deliberately one class heavier than team-member.css
   (.dmc-dr-page-wrapper.dmc-dr-story … against its .dmc-dr-story …). That
   file sets most of the hero with !important, and the template enqueues it
   at render time, so load order is not something to rely on — specificity
   settles it either way.

   Two things in the hero are NOT set here, because a stylesheet cannot
   reach them: the breadcrumb offset and the tab labels are both written
   inline by the template, so they are handled in doctor-page-fixes.php.

   Desktop reference, page coordinates in the 1920 frame:
     header bottom  117      breadcrumbs   155   (38 below the header)
     photo          279,41   684x800            (starts behind the header)
     H1             1246,264 Polin Bold 70 / 73.806
     bio            1059,396 630 wide, Polin Regular 18 / 25
     info grid      1120,603 569x59, 37px either side of each divider
     watermark      230,235  607x529, Polin Bold 201.524 / 176.333, 3 lines

   Measured after: every element lands within 6px of the frame, and that 6px
   is the live header being 6px shorter than the one in the design.
   ───────────────────────────────────────────────────────────── */


/* ============================================================
   DESKTOP HERO
   ============================================================ */
@media (min-width: 1025px) {

  /* The photo starts 114px above the breadcrumbs — it tucks behind the
     header. The section's inline style clips that off, so clip only the
     axis that needs it: overflow-x:clip does not force the other axis into
     a scroll container, which overflow:hidden would. */
  .dmc-dr-page-wrapper.dmc-dr-story #sec-about {
    overflow-x: clip !important;
    overflow-y: visible !important;
  }

  /* The two columns were centred against each other, so the text block
     floated to wherever the photo's height left it. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-split {
    align-items: flex-start !important;
  }

  /* H1 top sits 223px below the photo top (264 − 41). */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-left {
    padding-top: 69px !important;
  }

  /* Was clamp(36px, 4vw, 56px) / 1.1 — 14px short of the design. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-title {
    font-size: 70px !important;
    line-height: 73.806px !important;
    margin: 0 0 58px 0 !important;   /* H1 bottom 338 → bio top 396 */
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-desc {
    line-height: 25px !important;    /* was `normal`; 6 lines = the design's 150px */
    padding-left: 0 !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-info-grid {
    margin-top: 57px !important;     /* bio bottom 546 → grid top 603 */
    gap: 37px !important;            /* 37 either side of each divider */
  }

  /* The photo box is already 684x800 — the asset's own size and the
     design's. Only its position was wrong: 99px low, and 29px in from
     where the design insets it. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-right {
    margin-top: -154px !important;   /* photo top 35 here = the design's 41 */
    margin-left: 29px !important;    /* design insets it 49px from the container */
    align-items: flex-start !important;
    z-index: 0 !important;           /* stays under the header it passes behind */
  }

  /* Rendered as one line with an ellipsis, because of white-space:nowrap
     and a 600px cap. The design wraps it to three lines and lets the photo
     cover the right of it. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-bg-text {
    top: 194px !important;           /* watermark 235 − photo top 41 */
    left: -49px !important;          /* design starts it at the container edge */
    right: auto !important;
    transform: none !important;
    width: 607px !important;
    max-width: 607px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: left !important;
  }
}


/* ============================================================
   MOBILE HERO — Figma 460:75121, measured in its 390 frame

   Note the structure this has to work with: below 767px
   .dmc-dr-bio-left is display:contents, so the H1, bio, "קראו עוד",
   photo and info grid are all direct flex children of the split and are
   ordered with `order`. The split's 24px gap therefore lands between every
   one of them and adds to each margin — which is why the gaps below are
   set by zeroing that gap rather than by shrinking margins.
   ============================================================ */
@media (max-width: 767px) {

  /* breadcrumbs bottom 127 → H1 166 is 39px in the design, 70 here. */
  .dmc-dr-page-wrapper.dmc-dr-story #sec-about {
    padding-top: 19px !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-split {
    gap: 0 !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-title {
    margin-bottom: 25px !important;  /* H1 bottom 208 → bio 233 */
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-desc {
    margin-bottom: 20px !important;  /* bio bottom 299 → "קראו עוד" 319 */
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-readmore-wrap {
    margin-bottom: 22px !important;  /* its rule 345 → photo 367 */
  }

  /* Design: 270x276 out of a 684x800 asset — a crop, not a fit. Contained,
     it renders 236 wide and reads small against the text. 77% is 270 of the
     design's 350 container, so it holds that ratio at any phone width. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-image-wrap {
    justify-content: flex-start !important;  /* RTL: against the right edge */
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-img {
    width: 270px !important;
    max-width: 77% !important;
    height: 276px !important;
    object-fit: cover !important;
    object-position: center top !important;  /* keeps the head, drops the lower arms */
    margin-right: 25px !important;           /* design leaves 25 right, 55 left */
  }

  /* Two problems here, not one. The nowrap is the same as on desktop — the
     design wraps this to Do / Ba / Ch. The gradient is mobile-only:
     team-member.css paints it white-to-transparent, which on a white page
     is simply invisible, so the watermark was not rendering at all. The
     design has the same blue as desktop. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-bg-text {
    top: -11px !important;           /* watermark 367 → photo 378 */
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: left !important;
    background: linear-gradient(90deg, #087CF5 0%, #FFF 53.37%) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
  }
}


/* ============================================================
   MOBILE FLOATING BAR — Figma 460:75121

   The bar stays position:fixed, as asked. Only its contents are brought to
   the design.

     bar        14,646  365x75  radius 35, white, drop shadow blur 30
     phone pill 28,663   92x40  radius 50, "*6149" Polin Bold 20, centred
     label     155,672  123x25  Polin Semibold 18 / 25, ONE line
     chevron   128,683   17x9   10px to the left of the label
     whatsapp  320,663   44x44  15 from the bar's right edge

   The live bar had the right box sizes already. What was wrong was the
   label: line-height 18 in a 25px slot, wrapping to two lines inside a
   75px bar, because the first tab carried the doctor's name. That text is
   shortened in doctor-page-fixes.php; this keeps it on one line for the
   longer labels too, which the design never had to show.
   ============================================================ */
@media (max-width: 767px) {

  /* The right-hand box was 92px wide holding a 44px button, so 48px of the
     label's room was going nowhere. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-story-dropdown-side-right {
    flex: 0 0 44px !important;
    width: 44px !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-story-dropdown-trigger-center {
    flex: 1 1 auto !important;
    min-width: 0 !important;         /* without this a flex item will not shrink */
    gap: 10px !important;            /* design: 10 between chevron and label */
    height: 25px !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-story-dropdown-text {
    display: block !important;
    line-height: 25px !important;    /* was 18 — the cause of the two lines */
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-story-dropdown-chevron-wrapper {
    flex: 0 0 17px !important;
    width: 17px !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-story-dropdown-chevron {
    width: 17px !important;
    height: 9px !important;
  }

  /* "*6149" is centred in its pill in the design; it was pushed to one end
     by justify-content:flex-end and an 18px pad. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-story-dropdown-phone {
    justify-content: center !important;
    padding: 0 !important;
  }
}

/* ============================================================
   HERO INFO ROW — תואר מקצועי / תחום התמחות ראשי / שנות ניסיון

   The three blocks were centred against each other (team-member.css,
   align-items:center), so a value that wraps to two lines pushed its own
   label up and the three labels sat at different heights. Top-aligned
   instead, so every label starts on the same line; the dividers stretch to
   the tallest block rather than keeping their fixed 59px.
   Phone stacks the blocks in a column, so this is 768px and up.
   ============================================================ */
@media (min-width: 768px) {
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-info-grid {
    align-items: flex-start !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-bio-info-divider {
    align-self: stretch !important;
    height: auto !important;
    min-height: 59px !important;
  }
}
