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

   Figma: desktop 460:45100 + 460:45117 in frame 460:44760 (1920)
          mobile  460:75397 in frame 460:75121 (390)
   Every number was read off a node, not estimated.

   Same specificity rule as doctor-hero-figma.css: one class heavier than
   team-member.css, because that file sets this section with !important and
   the template enqueues it at render time.

   DESKTOP, page coordinates in the 1920 frame
     heading   1087,1119  603x144  Polin Bold 62 / 72, right, 2 lines
     desc      1108,1303  582x100  Polin Regular 18 / 25, right
     subtitle  1288,1428  402x34   Polin Bold 24, right
     card       298,+n*128 702x101 radius 18.81, text Polin Semibold 24,
                                   46 from the card's right edge
     arrows     230,1257 and 230,1344 — 34x34, so 53px apart
     columns    slider 770 · gap 87 · text 603 = 1460, the full container

   MOBILE, in the 390 frame
     heading    27,1041  336x126  Bold 42 / 42, CENTRED
     desc       35,1192  320x154  Regular 16, right
     subtitle   53,1360  302x25   Bold 18, right
     card       35,+n*88 320x80   radius 18.81, Semibold 18

   One deliberate departure, on mobile. The design frame shows no nav
   arrows — but the list is a five-of-N window and the template ships no
   swipe handler, so removing the only control would strand every specialty
   past the fifth. They are moved below the cards instead, which also gives
   the cards the full column width the design has. Adding a swipe gesture
   and then dropping them is the better end state.
   ───────────────────────────────────────────────────────────── */


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

  /* The design gives the slider 770 and the text 603 with 87 between them,
     which is the full 1460 container with nothing to spare. The container
     here keeps 20px of padding on each side, so the columns are set by flex
     and the text column is pinned to the design's 603 — the slider takes
     whatever is left. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-split {
    gap: 87px !important;
    align-items: center !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-right {
    flex: 0 0 603px !important;
    max-width: 603px !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-left {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  /* heading bottom 1263 → desc top 1303 */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-title {
    margin-bottom: 40px !important;
  }

  /* Was 17px / 27.2 in a 630 box. The design is 18 / 25 in 582, which is
     also what the hero's bio uses — the two paragraphs should not be set
     differently. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-desc {
    font-size: 18px !important;
    line-height: 25px !important;
    max-width: 582px !important;
    margin-right: 0 !important;
    margin-left: auto !important;
    margin-bottom: 25px !important;  /* desc bottom 1403 → subtitle 1428 */
  }

  /* The arrows are 87px apart centre to centre, so 53 between two 34px
     buttons. Scoped to this slider — the education and media rows share
     the .dmc-doctors-carousel__nav class and are a different layout. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-left .dmc-doctors-carousel__nav {
    gap: 53px !important;
    margin-top: 33px !important;     /* pair centre sits 16px below the slider's */
  }
}

/* Above 1500 there is room to drop the container's side padding, which is
   what stands between the card and the design's 702. Below that the padding
   is doing real work and the card simply takes what is left. */
@media (min-width: 1500px) {
  .dmc-dr-page-wrapper.dmc-dr-story #sec-specialties .dmc-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}


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

  /* subtitle bottom 1385 → slider top 1433 */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-split {
    gap: 48px !important;
  }

  /* heading bottom 1167 → desc top 1192 */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-title {
    margin-bottom: 25px !important;
  }

  /* desc bottom 1346 → subtitle 1360 */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-desc {
    margin-bottom: 14px !important;
  }

  /* The arrows sat to the left of the cards and cost them 54px of width.
     Below the slider instead: cards get the full column, and the control
     the design omits is still there. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-left {
    flex-direction: column !important;
    align-items: center !important;
    gap: 24px !important;
    width: 100% !important;
    padding: 0 15px !important;      /* card 320 in the design's 350 container */
    box-sizing: border-box !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-left .dmc-doctors-carousel__nav {
    flex-direction: row !important;
    gap: 15px !important;
    margin-top: 0 !important;
  }

  /* Five rows at the design's pitch: (80 * 5) + (8 * 4). team-member.css
     has 508 here, which is the same five rows at the desktop's 27px gap —
     it left 76px of empty track below the last card. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-left .dmc-dr-vertical-slider-viewport {
    width: 100% !important;
    height: 432px !important;
  }

  /* Cards are 80 tall on an 88 pitch, so 8 between them — not the 27 the
     desktop uses. The template's script had 27 hardcoded; it is patched in
     doctor-page-fixes.php to read the gap off the DOM, or the track would
     step by the wrong amount here. */
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-left .dmc-dr-vertical-slider-track {
    gap: 8px !important;
    width: 100% !important;
  }
}

/* ──────────────────────────────────────────────────────────
   Card text — the paragraph's weight, not a heading's.
   team-member.css sets the card label at 24px/600 (18px/600 on phones),
   sized for one- or two-word labels. The cards now carry full sentences,
   which read heavy at that weight and ran past the fixed 101px/80px card
   (overflow:hidden clipped the third line). Same type as the section's
   paragraph beside it — 18/25 regular (16/22 on phones) — and the card
   grows with its text from the design height up. The marquee measures
   each card's own height, so a taller card is safe.
   ────────────────────────────────────────────────────────── */
.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-left .dmc-dr-vertical-slide {
  height: auto !important;
  min-height: 101px;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

.dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-left .dmc-dr-vertical-slide span {
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 25px !important;
}

@media (max-width: 767px) {
  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-left .dmc-dr-vertical-slide {
    min-height: 80px;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .dmc-dr-page-wrapper.dmc-dr-story .dmc-dr-specialties-left .dmc-dr-vertical-slide span {
    font-size: 16px !important;
    line-height: 22px !important;
  }
}
