/*
 * Homepage precision pass
 * - mobile benefits 2x2 alignment
 * - review intro light-mode contrast
 * - hero quick-link / slider-control safe zone
 */

/* Review intro: keep the highlighted phrase readable in light mode. */
html:not([data-theme="dark"]) body.papillon-front-screen .papillon-home-vitrine .reviews-intro h2 b,
html[data-theme="light"] body.papillon-front-screen .papillon-home-vitrine .reviews-intro h2 b{
  color:#f4d7a1!important;
  text-shadow:0 1px 0 rgba(0,0,0,.08);
}
html[data-theme="dark"] body.papillon-front-screen .papillon-home-vitrine .reviews-intro h2 b{
  color:var(--dk-gold,#d1af70)!important;
}

/* Reserve a real safe zone between hero quick links and slider pagination. */
@media (min-width:921px){
  body.papillon-front-screen .papillon-home-vitrine .market-slide-copy{
    padding-block-end:124px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .hero-quick-links{
    margin-block-end:0!important;
  }
}

@media (max-width:920px){
  body.papillon-front-screen .papillon-home-vitrine .market-slide-copy{
    padding-block-end:118px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .hero-quick-links{
    position:relative;
    z-index:3;
    margin-block-start:14px!important;
    margin-block-end:0!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .market-slider-controls{
    z-index:8!important;
  }
}

@media (max-width:700px){
  /* Benefits: true balanced 2x2 composition, only on mobile. */
  body.papillon-front-screen .papillon-home-vitrine .home-services{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-rows:1fr!important;
    gap:8px!important;
    margin-top:24px!important;
    padding:8px!important;
    border-radius:18px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .home-service-card{
    display:grid!important;
    grid-template-rows:38px auto!important;
    grid-template-columns:1fr!important;
    min-width:0!important;
    min-height:116px!important;
    height:100%!important;
    align-content:center!important;
    align-items:center!important;
    justify-items:center!important;
    gap:8px!important;
    padding:12px 8px 11px!important;
    border-radius:13px!important;
    text-align:center!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .home-service-card::after{
    display:none!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .home-service-card .service-icon{
    position:static!important;
    display:grid!important;
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    min-height:36px!important;
    flex:0 0 36px!important;
    place-items:center!important;
    margin:0 auto!important;
    border-radius:11px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .home-service-card .service-icon .papillon-icon{
    width:17px!important;
    height:17px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .home-service-card>div{
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:2px!important;
    margin:0!important;
    text-align:center!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .home-service-card b{
    display:block!important;
    width:100%!important;
    margin:0!important;
    font-size:11.5px!important;
    font-weight:820!important;
    line-height:1.55!important;
    text-align:center!important;
    white-space:nowrap!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .home-service-card small{
    display:block!important;
    width:100%!important;
    max-width:138px!important;
    margin:1px auto 0!important;
    font-size:11.5px!important;
    line-height:1.65!important;
    text-align:center!important;
    overflow-wrap:normal!important;
    word-break:normal!important;
  }

  /* Slider: links live in their own lane, pagination gets a separate lane below. */
  body.papillon-front-screen .papillon-home-vitrine .market-slide-copy{
    padding-block-end:116px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .hero-quick-links{
    width:100%!important;
    min-height:32px!important;
    align-items:center!important;
    gap:6px!important;
    margin-top:14px!important;
    padding-bottom:2px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    scroll-padding-inline:2px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .hero-quick-links a{
    min-height:40px!important;
    flex:0 0 auto!important;
    margin:0!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .market-slider-controls{
    bottom:14px!important;
  }
}

@media (max-width:390px){
  body.papillon-front-screen .papillon-home-vitrine .home-services{
    gap:7px!important;
    padding:7px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .home-service-card{
    min-height:110px!important;
    padding:10px 6px!important;
    gap:7px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .home-service-card .service-icon{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    min-height:34px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .home-service-card b{
    font-size:11.5px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .home-service-card small{
    max-width:126px!important;
    font-size:11.5px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .market-slide-copy{
    padding-block-end:110px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .market-slider-controls{
    bottom:12px!important;
  }
}

/* Hero quick paths: the gold marker participates in layout instead of sitting
   underneath the label, and the whole row keeps a protected lane above dots. */
body.papillon-front-screen .papillon-home-vitrine .hero-quick-links{
  position:relative!important;
  z-index:5!important;
  align-items:center!important;
  margin-block-end:42px!important;
}
body.papillon-front-screen .papillon-home-vitrine .hero-quick-links a{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  padding:6px 11px!important;
}
body.papillon-front-screen .papillon-home-vitrine .hero-quick-links a::before{
  position:static!important;
  inset:auto!important;
  display:block!important;
  width:6px!important;
  height:6px!important;
  flex:0 0 6px!important;
  margin:0!important;
}
body.papillon-front-screen .papillon-home-vitrine .market-slider-controls{
  z-index:9!important;
}
@media(max-width:700px){
  body.papillon-front-screen .papillon-home-vitrine .hero-quick-links{
    margin-block-end:46px!important;
    padding-block-end:0!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .hero-quick-links a{
    min-height:40px!important;
    gap:7px!important;
    padding:7px 10px!important;
  }
  body.papillon-front-screen .papillon-home-vitrine .hero-quick-links a::before{
    width:5px!important;
    height:5px!important;
    flex-basis:5px!important;
  }
}
