/* Julie Faes | Hotfix V30 — Pilates & Yoga editorial layout.
   Scope : homepage #yoga-lucie only.
   No change to photos, booking links, forms, HYROX, other pages.

   Replaces the asymmetric forced row heights that were stretching Pilates
   and clipping the copy in the bottom Lucie portrait card.
*/

@media (min-width:1091px) {
  /* Two balanced cards above a wide, content-sized Lucie story. */
  #yoga-lucie.jf-wellness--v24 .jf-balance__layout {
    display:grid;
    grid-template-columns:minmax(0, 1fr) minmax(0, 1.07fr);
    grid-template-rows:auto auto;
    gap:18px;
    align-items:stretch;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__right {
    display:contents;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__pilates--text {
    grid-column:1;
    grid-row:1;
    height:auto;
    min-height:0;
    padding:clamp(26px,2.65vw,36px);
    justify-content:flex-start;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__pilates--text h3 {
    margin-top:clamp(20px,2vw,30px);
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__yoga {
    grid-column:2;
    grid-row:1;
    height:auto;
    min-height:0;
    grid-template-columns:46% minmax(0,1fr);
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait {
    grid-column:1 / -1;
    grid-row:2;
    display:grid;
    grid-template-columns:minmax(300px,35%) minmax(0,1fr);
    align-items:stretch;
    height:auto;
    min-height:235px;
    max-height:none;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait-media {
    min-height:235px;
    height:auto;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait-content {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    min-height:0;
    overflow:visible;
    padding:clamp(26px,3vw,42px);
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait-content h3 {
    max-width:24ch;
    margin:10px 0 12px;
    font-size:clamp(1.6rem,2.35vw,2.5rem);
    line-height:1.08;
    text-wrap:balance;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait-content p {
    max-width:54ch;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait-arrow {
    margin-top:18px;
    flex:0 0 auto;
    align-self:flex-start;
  }
}

/* Tablet : content-led rows, never fractional heights. */
@media (min-width:761px) and (max-width:1090px) {
  #yoga-lucie.jf-wellness--v24 .jf-balance__layout {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto;
    align-items:start;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__pilates--text {
    height:auto;
    min-height:0;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__right {
    display:grid;
    grid-template-rows:auto auto;
    gap:18px;
    min-height:0;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__yoga,
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait {
    height:auto;
    min-height:0;
    max-height:none;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait-media {
    min-height:230px;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait-arrow {
    margin-top:18px;
  }
}

/* Phone / small tablet : actual block height follows all text and the CTA.
   Avoid the portrait being cropped by inherited grid row constraints. */
@media (max-width:760px) {
  #yoga-lucie.jf-wellness--v24 .jf-balance__layout {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto;
    align-items:start;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__pilates--text {
    height:auto;
    min-height:0;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__right {
    display:flex;
    flex-direction:column;
    gap:14px;
    min-height:0;
    height:auto;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__yoga {
    display:flex;
    flex-direction:column;
    height:auto;
    min-height:0;
    max-height:none;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__yoga-media {
    height:clamp(215px,63vw,290px);
    min-height:0;
    flex:0 0 auto;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait {
    display:flex;
    flex-direction:column;
    height:auto;
    min-height:0;
    max-height:none;
    overflow:hidden;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait-media {
    height:clamp(210px,60vw,275px);
    min-height:0;
    width:100%;
    flex:0 0 auto;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait-content {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:flex-start;
    height:auto;
    min-height:0;
    max-height:none;
    overflow:visible;
    padding:22px 20px 24px;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait-content h3 {
    max-width:none;
    font-size:clamp(1.35rem,6vw,1.9rem);
    line-height:1.13;
    letter-spacing:-.035em;
    margin:10px 0 12px;
    text-wrap:balance;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait-content p {
    margin:0;
  }
  #yoga-lucie.jf-wellness--v24 .jf-balance__portrait-arrow {
    flex:0 0 auto;
    margin-top:18px;
    align-self:flex-start;
  }
}

/* The Pilates text CTA should underline only its text, never the full card. */
#yoga-lucie.jf-wellness--v24 .jf-balance__pilates--text .jf-balance__text-link {
  align-self:flex-start;
  max-width:100%;
}
