/* ──────────────────────────────────────────────────────────
   DOCTOR PAGE — #sec-experience, ALIGNED TO THE DESIGN FILE

   Figma: desktop 460:45092 / 460:45091 / 460:45116 in frame 460:44760 (1920)
          mobile  460:75393 / 460:75396 in frame 460:75121 (390)

   DESKTOP, page coordinates in the 1920 frame
     heading   230,1829  770x144   Polin Bold 62 / 72, right, 2 lines
     body      301,2011  699x475   Polin Medium 18, right, 4 paragraphs
     photo    1070,1600  837x1054
     gap between the text column and the photo: 70
     the row spans 230 → 1907, so the photo stops 13 short of the frame edge

   MOBILE, in the 390 frame
     heading    27,1934  336x126   Bold 42 / 42, CENTRED, 3 lines
     body       35,2105  320x176   Medium 16, right, 8 lines then "קראו עוד"
     photo      -9,2293  427x538   full bleed, wider than the frame

   The body copy is 1080 characters in both the design and the page — the
   same four paragraphs. What differs is that the value stored for this
   doctor is plain text with newlines and no markup, so all four rendered as
   one unbroken block of 16px/400. doctor-page-fixes.php §6 wraps that in
   <p> when, and only when, the field holds no tags of its own; the spacing
   below then applies to every doctor the same way.

   One knowing difference: expanded paragraphs are separated by 25px and the
   design butts them together (single newline, paragraph spacing 0). It
   reads better and matches how the stored copy is written. Collapsed on
   mobile they do run together, which is what the frame shows there.
   ────────────────────────────────────────────────────────── */


/* Paragraph rhythm, both breakpoints. */
.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-text p {
  margin: 0 0 25px 0 !important;
}

.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-text p:last-child {
  margin-bottom: 0 !important;
}


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

  /* The heading's box is 770 in the design; the body sits inside it at 699,
     flush to the right. The column was 700, which cost the heading a line
     break the design does not have. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-right {
    flex: 0 1 770px !important;
    width: 770px !important;
    max-width: 770px !important;
  }

  /* heading bottom 1973 → body top 2011 */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-title {
    margin-bottom: 38px !important;
  }

  /* Was 16px / 24 at weight 400. The design is Medium 18 on a 25 line, the
     same body setting as the hero and the specialties. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-text,
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-text p {
    font-size: 18px !important;
    font-weight: 500 !important;
    line-height: 25px !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-text {
    max-width: 699px !important;
    margin-right: 0 !important;
    margin-left: auto !important;
  }
}

/* The row is 1677 wide in the design and only fits above ~1700 with the
   wrapper's 40px of side padding in place. Below that the padding stays and
   the columns take what is left. */
@media (min-width: 1700px) {
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-wrapper {
    padding-left: 0 !important;
    padding-right: 13px !important;
  }
}


/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 767px) {

  /* heading bottom 2060 → body top 2105 */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-title {
    margin-bottom: 45px !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-text p {
    font-size: 16px !important;
    font-weight: 500 !important;
  }

  /* The design shows 8 lines before "קראו עוד" (176 / 22); the clamp was 7.
     The paragraph margin has to go while collapsed or it lands inside the
     clamped run — 8 lines plus one 25px margin measured 201 against the
     frame's 176. Expanded, the margins come back. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-text.is-collapsed {
    -webkit-line-clamp: 8 !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-text.is-collapsed p {
    margin-bottom: 0 !important;
  }

  /* The photo bleeds past both edges in the design — 427 wide in a 390
     frame. It was sitting inside the container's 20px padding at 335.
     The wrapper is a centred column-reverse flex, so the width is all this
     needs; auto margins fought the centring and pushed it 38px off.
     #sec-experience already clips its overflow, so nothing can scroll
     sideways because of this. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-left {
    width: 110vw !important;
    max-width: none !important;
    margin: 0 !important;
  }

  /* height:auto keeps the asset's own 836x855 ratio rather than stretching
     it into the frame's box. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-img {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    object-fit: contain !important;
  }
}

/* ============================================================
   CONTAINER-LEVEL PHOTO FADE INTO THE PAGE  (added 2026-09-16)

   The white fade at the foot of the photo used to be baked into the
   uploaded PNG. Painting white over the image instead showed as a white
   rounded card, because .dmc-dr-page-wrapper carries a background IMAGE —
   the page there is not flat white, so a solid-white overlay had a visible
   edge. So the photo itself is faded to transparent at the bottom with a
   CSS mask: the real page background shows through and the photo dissolves
   into the site with no box, whatever the background is. Container-level,
   so any plain upload gets it with no per-image editing.
   ============================================================ */
.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-img {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 46%, rgba(0, 0, 0, 0) 86%) !important;
          mask-image: linear-gradient(to bottom, #000 0%, #000 46%, rgba(0, 0, 0, 0) 86%) !important;
  -webkit-mask-repeat: no-repeat !important;
          mask-repeat: no-repeat !important;
  -webkit-mask-size: 100% 100% !important;
          mask-size: 100% 100% !important;
}

@media (max-width: 767px) {
  /* Full-bleed, near-square crop on mobile — fade over a shorter bottom band. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-experience-new-img {
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, rgba(0, 0, 0, 0) 100%) !important;
            mask-image: linear-gradient(to bottom, #000 0%, #000 62%, rgba(0, 0, 0, 0) 100%) !important;
  }
}
