/* Julie Faes V20 — responsive home carousel rebuilt around content height.
   The older 56/44 fixed-height grid and absolute controls were the reason for
   overlaps at tablet and phone dimensions. Desktop V19 stays untouched. */
@media (max-width: 968px) {
  /* The hero now grows with its content instead of clipping at 760px. */
  .hero.jf-home-hero {
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    width:100%;
    height:auto;
    min-height:0;
    max-height:none;
    margin:78px 0 0;
    padding:0;
    overflow:hidden;
    text-align:left;
    background:#071526;
    isolation:isolate;
  }
  .hero.jf-home-hero::before {display:none;}
  .hero.jf-home-hero .jf-home-hero__backdrops {inset:0;z-index:0;pointer-events:none;}

  /* Only the active slide participates in layout; height adjusts naturally. */
  .hero.jf-home-hero .jf-home-slide {
    position:relative;
    inset:auto;
    display:none;
    flex:none;
    width:100%;
    max-width:none;
    height:auto;
    min-height:0;
    margin:0;
    padding:0;
    align-self:stretch;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:none;
    transition:none;
    z-index:2;
    box-sizing:border-box;
  }
  .hero.jf-home-hero .jf-home-slide--team:not(.is-active),
  .hero.jf-home-hero .jf-home-slide:not(.jf-home-slide--team):not(.is-active) {
    display:none;
  }
  .hero.jf-home-hero .jf-home-slide--team.is-active {display:block;}
  .hero.jf-home-hero .jf-home-slide:not(.jf-home-slide--team).is-active {display:flex;}
  .hero.jf-home-hero .jf-home-slide.is-active {
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:none;
  }

  /* Mobile first slide — copy on navy, photo at its natural full width below. */
  .hero.jf-home-hero .jf-team-split {
    display:flex;
    flex-direction:column;
    width:100%;
    height:auto;
    min-height:0;
    margin:0;
    padding:0;
    gap:0;
    overflow:hidden;
    background:#071526;
    border:0;
    border-radius:0;
    box-shadow:none;
  }
  .hero.jf-home-hero .jf-team-split::before,
  .hero.jf-home-hero .jf-team-split::after {display:none;content:none;}
  .hero.jf-home-hero .jf-team-copy--panel {
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    position:relative;
    inset:auto;
    flex:none;
    width:100%;
    height:auto;
    min-height:0;
    max-width:none;
    margin:0;
    padding:clamp(28px,4.8vw,44px) clamp(22px,5vw,46px) clamp(26px,4.5vw,40px);
    clip-path:none;
    background:linear-gradient(135deg,#071526 0%,#0d233a 100%);
    box-shadow:none;
    border:0;
    border-radius:0;
    box-sizing:border-box;
    overflow:visible;
    z-index:2;
  }
  .hero.jf-home-hero .jf-slide-eyebrow {
    margin:0 0 17px;
    font-size:clamp(.63rem,1.25vw,.75rem);
    line-height:1.5;
    letter-spacing:.11em;
  }
  .hero.jf-home-hero .jf-home-slide--team h2 {
    margin:0 0 16px;
    max-width:21ch;
    font-size:clamp(2.15rem,5.2vw,3.2rem);
    line-height:1.075;
    letter-spacing:-.044em;
    text-wrap:balance;
  }
  .hero.jf-home-hero .jf-slide-lead {
    margin:0;
    max-width:46ch;
    font-size:clamp(.94rem,1.45vw,1.08rem);
    line-height:1.62;
  }
  .hero.jf-home-hero .jf-slide-actions {
    display:flex;
    align-items:center;
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:10px;
    margin-top:20px;
    width:100%;
  }
  .hero.jf-home-hero .jf-slide-actions .jf-btn {
    width:auto;
    min-height:42px;
    padding:11px 15px;
    font-size:.67rem;
    gap:9px;
    flex:0 1 auto;
    box-sizing:border-box;
    white-space:nowrap;
  }

  .hero.jf-home-hero .jf-team-photo-link {
    display:block;
    position:relative;
    inset:auto;
    flex:none;
    width:100%;
    height:auto;
    min-height:0;
    aspect-ratio:16/9;
    margin:0;
    padding:0;
    overflow:hidden;
    clip-path:none;
    border:0;
    border-radius:0;
    background:#0d1e31;
    box-shadow:none;
    z-index:1;
  }
  .hero.jf-home-hero .jf-team-photo-link::before,
  .hero.jf-home-hero .jf-team-photo-link__edge {display:none;}
  .hero.jf-home-hero .jf-team-photo-link::after {
    z-index:2;
    background:linear-gradient(0deg,rgba(2,9,17,.22),transparent 35%);
  }
  .hero.jf-home-hero .jf-team-photo-link img,
  .hero.jf-home-hero .jf-team-photo-link:hover img {
    display:block;
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    min-height:0;
    object-fit:cover;
    object-position:center 70%;
    transform:none;
    transition:none;
    z-index:1;
  }
  .hero.jf-home-hero .jf-team-photo-link__zoom {
    position:absolute;
    z-index:3;
    bottom:14px;
    right:15px;
    left:auto;
    padding:10px 14px;
    font-size:.67rem;
    letter-spacing:.1em;
    pointer-events:none;
  }

  /* Slide 2 stays a hero with centered type, not a copied desktop canvas. */
  .hero.jf-home-hero .jf-home-slide:not(.jf-home-slide--team) {
    min-height:clamp(350px,55svh,570px);
    box-sizing:border-box;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:clamp(42px,7vw,80px) clamp(22px,5vw,50px);
    text-align:center;
  }
  .hero.jf-home-hero .jf-home-slide:not(.jf-home-slide--team) .hero-title {
    display:block;
    width:100%;
    max-width:100%;
    margin:0 auto;
    text-align:center;
  }
  .hero.jf-home-hero .jf-home-slide:not(.jf-home-slide--team) .hero-title h1 {
    font-size:clamp(2.8rem,8.3vw,5.2rem);
    line-height:1.01;
    letter-spacing:-.055em;
    margin:0 0 12px;
    overflow-wrap:normal;
    text-align:center;
  }
  .hero.jf-home-hero .jf-home-slide:not(.jf-home-slide--team) .hero-sub {
    margin:12px auto 0;
    max-width:40ch;
    font-size:.84rem;
    line-height:1.55;
    text-align:center;
  }
  .hero.jf-home-hero .jf-home-slide:not(.jf-home-slide--team) .jf-slide-link {
    margin-top:22px;
    text-align:center;
    line-height:1.5;
  }

  /* Dedicated navigation bar beneath both slides: never over photo/buttons. */
  .hero.jf-home-hero .jf-slider-controls {
    position:relative;
    flex:none;
    bottom:auto;
    left:auto;
    right:auto;
    display:flex;
    justify-content:center;
    align-items:center;
    width:100%;
    min-height:66px;
    margin:0;
    padding:12px 18px 14px;
    gap:9px;
    border:0;
    border-top:1px solid rgba(255,255,255,.1);
    border-radius:0;
    background:#061423;
    color:#fff;
    backdrop-filter:none;
    box-sizing:border-box;
    z-index:6;
  }
  .hero.jf-home-hero .jf-slider-arrow {
    flex:none;
    width:37px;
    height:37px;
  }
  .hero.jf-home-hero .jf-slider-dots button {width:30px;height:30px;}
  .hero.jf-home-hero .jf-slider-dots button span {width:23px;}
  .hero.jf-home-hero .jf-slider-count {margin:0 4px;font-size:.7rem;}
}

@media (max-width:600px) {
  .hero.jf-home-hero {margin-top:72px;height:auto;min-height:0;}
  .hero.jf-home-hero .jf-team-copy--panel {padding:27px 22px 26px;}
  .hero.jf-home-hero .jf-slide-eyebrow {font-size:.59rem;letter-spacing:.085em;margin-bottom:15px;}
  .hero.jf-home-hero .jf-home-slide--team h2 {
    max-width:20ch;
    font-size:clamp(1.88rem,8.05vw,2.55rem);
    line-height:1.065;
    letter-spacing:-.045em;
    margin-bottom:14px;
  }
  .hero.jf-home-hero .jf-slide-lead {font-size:.93rem;line-height:1.58;}
  .hero.jf-home-hero .jf-slide-actions {margin-top:17px;gap:8px;}
  .hero.jf-home-hero .jf-slide-actions .jf-btn {font-size:.62rem;min-height:41px;padding:10px 12px;gap:7px;}
  /* 4:3 is the source image ratio: show everyone with minimal cropping. */
  .hero.jf-home-hero .jf-team-photo-link {aspect-ratio:4/3;}
  .hero.jf-home-hero .jf-team-photo-link img,
  .hero.jf-home-hero .jf-team-photo-link:hover img {object-position:center;}
  .hero.jf-home-hero .jf-team-photo-link__zoom {right:12px;bottom:12px;padding:9px 12px;}
  .hero.jf-home-hero .jf-home-slide:not(.jf-home-slide--team) {min-height:clamp(365px,58svh,540px);padding:36px 20px;}
  .hero.jf-home-hero .jf-home-slide:not(.jf-home-slide--team) .hero-title h1 {font-size:clamp(2.2rem,10.5vw,3.4rem);}
  .hero.jf-home-hero .jf-slider-controls {min-height:62px;padding:10px 14px 12px;}
}

@media (max-width:355px) {
  .hero.jf-home-hero .jf-team-copy--panel {padding-inline:18px;}
  .hero.jf-home-hero .jf-home-slide--team h2 {font-size:clamp(1.75rem,8vw,2rem);}
  .hero.jf-home-hero .jf-slide-actions .jf-btn {white-space:normal;text-align:center;}
}
