.mgh-home-consultants-carousel{
    --mgh-gap: 1.2rem;
    --mgh-card-radius: 24px;
    --mgh-edge-fade: 56px;
    width: 100%;
}

.mgh-home-consultants-carousel .mgh-home-consultants-viewport{
    width: 100%;
    overflow: hidden;
    overflow: clip;
    padding-bottom: 0.2rem;
    direction: rtl;
    -ms-overflow-style: none;
    scrollbar-width: none;
    touch-action: pan-y;
    cursor: grab;
    position: relative;
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 var(--mgh-edge-fade), #000 calc(100% - var(--mgh-edge-fade)), transparent 100%);
    mask-image: linear-gradient(to left, transparent 0, #000 var(--mgh-edge-fade), #000 calc(100% - var(--mgh-edge-fade)), transparent 100%);
}

.mgh-home-consultants-carousel.is-dragging .mgh-home-consultants-viewport{
    cursor: grabbing;
}

.mgh-home-consultants-carousel.is-dragging{
    user-select: none;
    -webkit-user-select: none;
}

.mgh-home-consultants-carousel .mgh-home-consultants-viewport::-webkit-scrollbar{
    width: 0;
    height: 0;
}

.mgh-home-consultants-track{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: var(--mgh-gap);
    padding: 3rem 0.8rem 1rem 0.8rem;
    transform: translate3d(0,0,0);
    will-change: transform;
    direction: ltr;
}

.mgh-consultant-card{
    position: relative;
    isolation: isolate;
    flex: 0 0 calc((100% - (3 * var(--mgh-gap))) / 4);
    min-width: 0;
    text-decoration: none;
    border-radius: var(--mgh-card-radius);
    padding: 1.1rem 1.1rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    direction: rtl;
    background: rgba(41, 25, 25, 0.20);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    -webkit-user-drag: none;
    user-select: none;
}

@media (max-width: 1024px){
    .mgh-consultant-card{
        flex: 0 0 calc((100% - (1 * var(--mgh-gap))) / 2);
    }
}

@media (max-width: 767px){
    .mgh-home-consultants-carousel{
        --mgh-edge-fade: 26px;
    }
    .mgh-consultant-card{
        flex: 0 0 100%;
    }
}

.mgh-consultant-card::before,
.mgh-consultant-card::after{
    content: "";
    position: absolute;
    top: 1.4rem;
    bottom: 1.4rem;
    width: 0.1rem;
    border-radius: 999rem;
    background: linear-gradient(180deg, rgb(254 254 254 / 5%) 0%, rgba(252, 255, 255, 0.40) 50%, rgb(252 255 255 / 10%) 100%);
    opacity: 0.65;
    pointer-events: none;
    z-index: 1;
}

.mgh-consultant-card::before{
    left: 0;
}

.mgh-consultant-card::after{
    right: 0;
}

.mgh-consultant-card > *{
    position: relative;
    z-index: 2;
}

.mgh-consultant-card-media{
    width: 9rem;
    height: 8rem;
    border-radius: 1rem;
    overflow: hidden;
    margin-top: -3rem;
    box-shadow: 0 10px 26px rgba(0,0,0,0.28);
}

.mgh-consultant-card-img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mgh-consultant-card-name{
    margin-top: 1rem;
    color: var(--mgh-color-7, #fcffff);
    font-size: 0.95rem;
    font-weight: 600;
    text-shadow: 0 4px 4px rgba(0,0,0,0.44);
    text-wrap: balance;
}

.mgh-consultant-card-desc{
    margin-top: 0.6rem;
    color: rgba(246, 246, 246, 0.98);
    font-size: 0.88rem;
    font-weight: 400;
    text-wrap: balance;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(2 * 1.55em);
}

.mgh-consultant-card-cta{
  margin-top: auto;
  width: 100%;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10rem;
  background: linear-gradient(42deg, var(--mgh-color-3) 0%, var(--mgh-color-5) 100%);
  color: var(--mgh-color-7, #fcffff);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: inset 0 4px 4px rgba(72, 40, 58, 0.56);
  text-shadow: 0 2px 4px rgba(0,0,0,0.68);
  position: relative;
  overflow: hidden;
  background-size: 200% 200%;
  transition: background-position 500ms ease;
  background-position: 0% 50%;
  z-index: 0;
}

.mgh-consultant-card-cta::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(42deg, var(--mgh-color-5) 0%, var(--mgh-color-3) 100%);
  opacity: 0;
  transition: opacity 350ms ease;
  pointer-events: none;
  z-index: -1;
}

.mgh-consultant-card-cta:hover::before{ opacity: 1; }
.mgh-consultant-card-cta:hover{ background-position: 100% 50%; }

.mgh-consultant-card:focus-visible{
    outline: 2px solid var(--mgh-color-3);
    outline-offset: 4px;
}

.mgh-home-consultants-carousel .mgh-home-services-dots{
    margin-top: 1.1rem;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.mgh-home-consultants-carousel .mgh-home-services-dot{
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999rem;
    background: transparent;
    border: 1px solid var(--mgh-color-7, #fcffff);
    padding: 0;
    cursor: pointer;
    transition: width 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.mgh-home-consultants-carousel .mgh-home-services-dot.is-active{
    width: 2rem;
    height: 0.5rem;
    border-radius: 999rem;
    background: var(--mgh-color-7, #fcffff);
    border-color: transparent;
}


.mgh-home-consultants-carousel .mgh-home-services-dot:focus-visible{
    outline: 2px solid var(--mgh-color-3);
    outline-offset: 4px;
}

.mgh-consultant-card{
  transition: background-color 250ms ease, box-shadow 250ms ease, transform 250ms ease;
}

.mgh-consultant-card-name,
.mgh-consultant-card-desc{
  transition: color 250ms ease;
}

.mgh-consultant-card:hover{
  background-color: rgba(41, 25, 25, 0.30);
}

@media (prefers-reduced-motion: reduce){
    .mgh-home-consultants-track{
        will-change: auto;
    }
}
