/* CHANNMAS Theme v1.2.7 — spacious consultation carousel with an intentional next-card preview. */
/* Only this homepage section grows wider; other section alignments stay unchanged. */
.consultations-section .consultation-layout{
  min-width:0;
  width:min(calc(100% - 76px),1460px);
  max-width:none;
  grid-template-columns:minmax(280px,305px) minmax(0,1fr);
  column-gap:36px;
}
.consultations-section .section-intro{min-width:0}
.consultations-section .section-intro h2{max-width:310px}

.chm-consult-carousel{min-width:0;width:100%}
.chm-consult-carousel .consult-card{min-width:0}
/* Desktop: three fully readable cards + about half the next card when available. */
.chm-consult-carousel.is-enhanced .chm-consult-track{
  --chm-consult-visible:3;
  --chm-consult-gap:15px;
  --chm-consult-peek:0px;
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:calc((100% - (var(--chm-consult-visible) - 1)*var(--chm-consult-gap) - var(--chm-consult-peek))/var(--chm-consult-visible));
  grid-template-columns:none;
  gap:var(--chm-consult-gap);
  overflow-x:auto;
  overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;
  scroll-padding-inline:1px;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
  padding-block:4px 12px;
}
.chm-consult-carousel.is-enhanced.has-overflow .chm-consult-track{
  --chm-consult-peek:clamp(118px,10.4vw,168px);
}

/*
 * v1.2.7: Fade ONLY the far-right edge of the next-card preview.
 * A mask fades the card to the actual background in both light and dark modes;
 * unlike the previous solid overlay, it does not obscure the entire peek.
 * JS removes .has-next when the last card is reached so the last card remains
 * completely legible. Never hide navigation controls or block pointer input.
 */
.chm-consult-carousel.is-enhanced.has-overflow.has-next .chm-consult-track{
  -webkit-mask-image:linear-gradient(to right,#000 0%,#000 calc(100% - 68px),transparent 100%);
  mask-image:linear-gradient(to right,#000 0%,#000 calc(100% - 68px),transparent 100%);
}
.chm-consult-carousel.is-enhanced .chm-consult-track::-webkit-scrollbar{display:none}
.chm-consult-carousel.is-enhanced .consult-card{
  scroll-snap-align:start;
  height:100%;
  box-sizing:border-box;
  min-height:322px;
  padding:23px 19px 19px;
  transition:border-color .2s ease,box-shadow .2s ease;
}
.chm-consult-carousel.is-enhanced .consult-card:hover{
  border-color:color-mix(in srgb,var(--jade) 50%,var(--outline));
  box-shadow:0 12px 29px rgba(7,35,26,.11);
}
.chm-consult-carousel.is-enhanced .consult-card h3{font-size:1rem}
.chm-consult-carousel.is-enhanced .consult-card .btn{min-height:44px}
.chm-consult-carousel .consult-icon.icon-violet{background:#eee2fd;color:#7c50b5}
.chm-consult-carousel .consult-card .chm-consult-violet-cta{background:#bda9fa;color:#172b24;border:1px solid #bda9fa}
.chm-consult-carousel .consult-card .chm-consult-violet-cta:hover,.chm-consult-carousel .consult-card .chm-consult-violet-cta:focus-visible{background:#d2c5ff;border-color:#d2c5ff;color:#172b24}
.chm-consult-controls[hidden]{display:none!important}
.chm-consult-controls{display:flex;align-items:center;justify-content:center;gap:17px;margin-top:16px}
.chm-consult-nav{appearance:none;border:1px solid var(--outline);background:var(--surface);color:var(--ink);width:38px;height:38px;display:grid;place-items:center;border-radius:50%;cursor:pointer;transition:background .18s,border-color .18s,color .18s}
.chm-consult-nav:hover:not(:disabled){border-color:var(--jade);background:var(--surface-mint);color:var(--jade)}
.chm-consult-nav:disabled{opacity:.35;cursor:not-allowed}
.chm-consult-nav:focus-visible,.chm-consult-dot:focus-visible{outline:3px solid #a9e9ca;outline-offset:3px}
.chm-consult-dots{display:flex;align-items:center;justify-content:center;gap:10px;min-height:18px}
.chm-consult-dot{padding:0;border:1px solid var(--outline);background:var(--outline);width:10px;height:10px;border-radius:50%;cursor:pointer;transition:background .15s,transform .15s}
.chm-consult-dot[aria-current="true"]{background:var(--jade);border-color:var(--jade);transform:scale(1.2)}
/* Switch to full-width carousel when the sidebar would squeeze the cards. */
@media(max-width:1360px){
  .consultations-section .consultation-layout{
    width:min(calc(100% - 50px),1080px);
    grid-template-columns:minmax(0,1fr);
    gap:27px;
  }
  .consultations-section .section-intro h2{max-width:850px}
  .consultations-section .section-intro>p:not(.eyebrow){max-width:700px}
}
@media(max-width:1020px){
  .chm-consult-carousel.is-enhanced .chm-consult-track{--chm-consult-visible:2}
  .chm-consult-carousel.is-enhanced.has-overflow .chm-consult-track{--chm-consult-peek:clamp(75px,12vw,138px)}
  .chm-consult-carousel.is-enhanced.has-overflow.has-next .chm-consult-track{
    -webkit-mask-image:linear-gradient(to right,#000 0%,#000 calc(100% - 52px),transparent 100%);
    mask-image:linear-gradient(to right,#000 0%,#000 calc(100% - 52px),transparent 100%);
  }
}
@media(max-width:760px){
  .consultations-section .consultation-layout{width:min(calc(100% - 34px),540px)}
  .chm-consult-carousel.is-enhanced .chm-consult-track{--chm-consult-visible:1}
  .chm-consult-carousel.is-enhanced.has-overflow .chm-consult-track{--chm-consult-peek:clamp(36px,14vw,74px)}
  .chm-consult-carousel.is-enhanced.has-overflow.has-next .chm-consult-track{
    -webkit-mask-image:linear-gradient(to right,#000 0%,#000 calc(100% - 28px),transparent 100%);
    mask-image:linear-gradient(to right,#000 0%,#000 calc(100% - 28px),transparent 100%);
  }
  .chm-consult-carousel.is-enhanced .consult-card{min-height:286px;padding:21px 17px 17px}
  .chm-consult-controls{margin-top:12px}
}
@media(prefers-reduced-motion:reduce){.chm-consult-carousel.is-enhanced .chm-consult-track{scroll-behavior:auto}.chm-consult-nav,.chm-consult-dot{transition:none!important}}
