/* Ported from Shiraz Direct sd-start-social — homepage video carousel */
.ma-home-social {
  padding: 4rem 0 3.5rem;
  color: #101828;
  overflow: hidden;
}

.ma-home-social__layout {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  width: 100%;
  margin-inline: auto;
  padding-inline-start: max(1rem, calc((100% - 78rem) / 2));
  padding-inline-end: 0;
}

@media (min-width: 960px) {
  .ma-home-social__layout {
    grid-template-columns: 12.5rem minmax(0, 1fr);
    gap: 1.1rem;
  }
}

.ma-home-social__aside {
  display: grid;
  gap: 0.95rem;
  justify-items: start;
  text-align: start;
  padding-inline-end: 0;
}

.ma-home-social__aside h2 {
  margin: 0;
  max-width: 12.5rem;
  color: #101828;
  font-family: 'pbold', sans-serif;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.45;
}

.ma-home-social__nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.ma-home-social__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid #d0d5dd;
  background: #fff;
  color: #667085;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.ma-home-social__arrow:hover:not(:disabled) {
  color: #101828;
  border-color: #98a2b3;
}

.ma-home-social__arrow:disabled {
  opacity: 0.45;
  cursor: default;
}

.ma-home-social__lead {
  margin: 0;
  max-width: 12.5rem;
  color: #667085;
  font-family: 'preg', sans-serif;
  font-size: 0.8125rem;
  line-height: 1.8;
}

.ma-home-social__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: #008181;
  color: #fff;
  font-family: 'pmed', sans-serif;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0, 129, 129, 0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}

.ma-home-social__cta:hover {
  transform: translateY(-1px);
  background: #006868;
  color: #fff;
}

.ma-home-social__cta-ico {
  flex: 0 0 auto;
}

/* Dark neo (homepage + course embeds) */
body.ma-neo .ma-home-social {
  color: var(--ma-ink);
}

body.ma-neo .ma-home-social__aside h2 {
  color: var(--ma-ink);
}

body.ma-neo .ma-home-social__lead {
  color: var(--ma-muted);
}

body.ma-neo .ma-home-social__arrow {
  border-color: transparent;
  background: var(--ma-bg);
  color: var(--ma-ink);
  box-shadow: var(--ma-raise-sm);
}

body.ma-neo .ma-home-social__arrow:hover:not(:disabled) {
  color: var(--ma-accent);
  border-color: transparent;
  background: var(--ma-bg);
}

body.ma-neo .ma-home-social__cta {
  box-shadow: var(--ma-raise-primary);
}

.ma-home-social__viewport {
  min-width: 0;
  overflow: hidden;
}

.ma-home-social__rail {
  --ma-social-gap: 0.85rem;
  display: flex;
  gap: var(--ma-social-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.35rem 0 0.75rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}

.ma-home-social__rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.ma-home-social__rail.is-dragging * {
  pointer-events: none;
}

.ma-home-social__rail::-webkit-scrollbar {
  display: none;
}

.ma-home-vcard {
  position: relative;
  flex: 0 0 auto;
  width: min(12.5rem, 58vw);
  /* Match source 1080×1920 so poster/video are never cropped */
  aspect-ratio: 9 / 16;
  margin: 0;
  border-radius: 1.25rem;
  overflow: hidden;
  scroll-snap-align: start;
  background: #1d2939;
  cursor: pointer;
}

@media (min-width: 960px) {
  .ma-home-social__rail {
    --ma-social-gap: 1rem;
    padding-inline-end: 1.25rem;
  }

  .ma-home-vcard {
    /* Exactly 5 cards visible in the rail */
    width: calc((100% - (4 * var(--ma-social-gap))) / 5);
    max-width: none;
  }
}

@media (min-width: 1200px) {
  .ma-home-social__rail {
    --ma-social-gap: 1.1rem;
  }

  .ma-home-vcard {
    border-radius: 1.35rem;
  }
}

.ma-home-vcard__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #1d2939;
}

.ma-home-vcard.is-playing .ma-home-vcard__play {
  opacity: 0;
  pointer-events: none;
}

.ma-home-vcard__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: rgba(16, 24, 40, 0.12);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(2px);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.ma-home-vcard__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  border-style: solid;
  border-width: 0.45rem 0 0.45rem 0.75rem;
  border-color: transparent transparent transparent #fff;
  transform: translate(-50%, -50%);
}

@media (max-width: 959px) {
  .ma-home-social__layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.15rem;
    padding-inline: 1rem;
    width: 100%;
  }

  .ma-home-social__aside {
    display: contents;
  }

  .ma-home-social__aside h2 {
    order: 1;
    max-width: none;
    margin-inline: auto;
    text-align: center;
  }

  .ma-home-social__nav {
    display: none;
  }

  .ma-home-social__viewport {
    order: 3;
    margin-inline: -1rem;
    width: calc(100% + 2rem);
    overflow: hidden;
  }

  .ma-home-social__rail {
    --ma-social-card: 68vw;
    --ma-social-gap: 0.75rem;
    --ma-social-side: calc((100% - var(--ma-social-card)) / 2);
    gap: var(--ma-social-gap);
    padding-block: 0.25rem 0.85rem;
    padding-inline: var(--ma-social-side);
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--ma-social-side);
  }

  .ma-home-vcard {
    width: var(--ma-social-card);
    border-radius: 1.5rem;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .ma-home-social__lead {
    order: 4;
    max-width: 22rem;
    margin-inline: auto;
    text-align: center;
  }

  .ma-home-social__cta {
    order: 5;
    margin-inline: auto;
  }
}

