/* YouMind Engine Carousel — index.html home-section-5 (sc279–sc318) + .home-engine mobile */

.ymct-engine-carousel {
  font: 400 16px/1.5 Poppins, sans-serif;
  color: #0a0a0a;
  width: 100%;
  max-width: none !important;
  box-sizing: border-box;
  /* White padding (not transparent margin) — HTML home-section+home-section is 120px over white main */
  margin: 0;
  padding-top: 120px;
  padding-bottom: 120px;
  background: #fff;
  overflow: visible;
}
.ymct-engine-carousel.alignfull {
  width: 100vw;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
.ymct-engine-carousel *,
.ymct-engine-carousel *::before,
.ymct-engine-carousel *::after { box-sizing: border-box; }
.ymct-engine-carousel p { margin: 0; }
.ymct-engine-carousel img {
  max-width: none;
  border: 0;
}

.ymct-engine-carousel .ec-section {
  width: 100%;
  background: #fff;
  position: relative;
}

.ymct-engine-carousel .ec-inner {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding: 0 80px;
  display: flex;
  flex-direction: column;
  gap: 52px;
  align-items: stretch;
}

/* Intro — visual order matches screenshot (heading above circles) */
.ymct-engine-carousel .ec-intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
}
.ymct-engine-carousel .ec-heading {
  font-family: Poppins, Arial, sans-serif;
  font-weight: 500;
  line-height: 1.3;
  color: #0a0a0a;
  font-size: 48px;
  text-transform: uppercase;
  white-space: nowrap;
}
.ymct-engine-carousel .ec-desc {
  font-family: "Mona Sans", Arial, sans-serif;
  font-weight: 400;
  line-height: 1.4;
  color: #565656;
  font-size: 20px;
  letter-spacing: -0.2px;
  max-width: 1133px;
  width: 100%;
}

/* Desktop overlapping circles — sc282 grid */
.ymct-engine-carousel .ec-stage {
  display: block;
  width: 100%;
  line-height: 0;
}
.ymct-engine-carousel .ec-stage-grid {
  display: grid;
  grid-template-rows: max-content;
  place-items: start;
  position: relative;
  width: 100%;
  line-height: 0;
}
.ymct-engine-carousel .ec-bubble {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-rows: max-content;
  place-items: start;
  position: relative;
  width: 35.97%;
}
.ymct-engine-carousel .ec-bubble--2 {
  margin-left: 32.01%;
  width: 35.98%;
}
.ymct-engine-carousel .ec-bubble--3 {
  margin-left: 64.03%;
  width: 35.97%;
}

.ymct-engine-carousel .ec-bubble-bg {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  width: 100%;
  height: 348.51px;
}
.ymct-engine-carousel .ec-bubble-bg img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.ymct-engine-carousel .ec-bubble-card {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  margin-left: 15.21%;
  margin-top: 63.77px;
  position: relative;
  z-index: 1;
  width: 69.72%;
  height: 220.616px;
  text-align: center;
}

.ymct-engine-carousel .ec-bubble-icon {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  width: 84px;
  height: 84px;
}
.ymct-engine-carousel .ec-bubble--1 .ec-bubble-icon {
  width: 84.06px;
  height: 84.06px;
}
.ymct-engine-carousel .ec-bubble-icon img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.ymct-engine-carousel .ec-bubble--1 .ec-bubble-icon img {
  inset: -1.24%;
  width: auto;
  height: auto;
  max-width: none;
  position: absolute;
  left: -1.24%;
  top: -1.24%;
  right: -1.24%;
  bottom: -1.24%;
  width: 102.48%;
  height: 102.48%;
}
.ymct-engine-carousel .ec-bubble--2 .ec-bubble-icon img {
  inset: 0;
}
.ymct-engine-carousel .ec-bubble--3 .ec-bubble-icon img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 83.572px;
  height: 76.09px;
  transform: translate(-50%, -50%);
  inset: auto;
}

.ymct-engine-carousel .ec-bubble-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
  overflow-wrap: break-word;
}
.ymct-engine-carousel .ec-bubble--1 .ec-bubble-copy {
  width: 243px;
}
.ymct-engine-carousel .ec-bubble-title {
  font-family: Poppins, Arial, sans-serif;
  font-weight: 500;
  line-height: 1.4;
  color: #121413;
  font-size: 24px;
  white-space: nowrap;
}
.ymct-engine-carousel .ec-bubble-text {
  font-family: Poppins, Arial, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  color: #031728;
  font-size: 16px;
  letter-spacing: 0.32px;
}
.ymct-engine-carousel .ec-bubble--1 .ec-bubble-text {
  width: 100%;
  min-width: 100%;
}
.ymct-engine-carousel .ec-bubble--2 .ec-bubble-text {
  width: 327px;
  max-width: 100%;
}
.ymct-engine-carousel .ec-bubble--3 .ec-bubble-text {
  width: 352px;
  max-width: 100%;
}

/* Mobile carousel hidden on desktop */
.ymct-engine-carousel .ec-mobile {
  display: none;
}

/* —— Tablet —— */
@media (max-width: 1439px) and (min-width: 768px) {
  .ymct-engine-carousel {
    padding-top: 80px;
    padding-bottom: 80px;
  }
  .ymct-engine-carousel .ec-inner {
    padding: 0 40px;
    gap: 40px;
  }
  .ymct-engine-carousel .ec-heading {
    font-size: 36px;
    white-space: normal;
  }
  .ymct-engine-carousel .ec-desc {
    font-size: 18px;
    max-width: 100%;
  }
  .ymct-engine-carousel .ec-bubble-title {
    font-size: 20px;
    white-space: normal;
  }
  .ymct-engine-carousel .ec-bubble-text {
    font-size: 14px;
  }
  .ymct-engine-carousel .ec-bubble--1 .ec-bubble-copy,
  .ymct-engine-carousel .ec-bubble--2 .ec-bubble-text,
  .ymct-engine-carousel .ec-bubble--3 .ec-bubble-text {
    width: 100%;
    max-width: 100%;
  }
  .ymct-engine-carousel .ec-bubble-bg {
    height: auto;
    aspect-ratio: 1 / 1;
    max-height: none;
  }
  .ymct-engine-carousel .ec-bubble-card {
    height: auto;
    min-height: 180px;
    margin-top: 18%;
  }
}

/* —— Mobile (.home-engine) —— */
@media (max-width: 767px) {
  .ymct-engine-carousel,
  .ymct-engine-carousel.alignfull {
    margin-top: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    background: #fff;
  }
  .ymct-engine-carousel .ec-inner {
    padding: 60px 20px;
    gap: 44px;
  }
  .ymct-engine-carousel .ec-heading {
    font-size: 32px;
    line-height: 38px;
    white-space: normal;
    text-transform: none;
  }
  .ymct-engine-carousel .ec-desc {
    margin-top: 0;
    font: 400 20px/28px Arial, sans-serif;
    letter-spacing: -0.2px;
    max-width: 100%;
  }
  .ymct-engine-carousel .ec-intro {
    gap: 12px;
  }
  .ymct-engine-carousel .ec-stage {
    display: none;
  }
  .ymct-engine-carousel .ec-mobile {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    overflow: hidden;
  }
  .ymct-engine-carousel .ec-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
  }
  .ymct-engine-carousel .ec-carousel::-webkit-scrollbar {
    display: none;
  }
  .ymct-engine-carousel .ec-mcard {
    flex: none;
    width: 353px;
    height: 267.175px;
    padding: 48.88px 40px 30px;
    text-align: center;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 0;
  }
  .ymct-engine-carousel .ec-mcard-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    pointer-events: none;
    z-index: -1;
    display: block;
  }
  .ymct-engine-carousel .ec-mcard-icon {
    width: 64.44px;
    height: 64.44px;
    object-fit: contain;
    margin-bottom: 15.33px;
    display: block;
  }
  .ymct-engine-carousel .ec-mcard-title {
    margin: 0;
    font-family: Poppins, Arial, sans-serif;
    font-size: 24px;
    line-height: 34px;
    font-weight: 500;
    color: #121413;
    white-space: nowrap;
  }
  .ymct-engine-carousel .ec-mcard-text {
    font-size: 14px;
    line-height: 21px;
    font-weight: 500;
    max-width: 270px;
    margin: 2.3px 0 0;
    color: #031728;
    font-family: Poppins, Arial, sans-serif;
  }
  .ymct-engine-carousel .ec-mcard:first-child .ec-mcard-text {
    max-width: 186px;
  }
  .ymct-engine-carousel .ec-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
  }
  .ymct-engine-carousel .ec-ctrl {
    width: 46px;
    height: 46px;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
  }
  .ymct-engine-carousel .ec-ctrl img {
    display: block;
    width: 46px;
    height: 46px;
  }
  .ymct-engine-carousel .ec-ctrl:first-child img {
    transform: rotate(180deg) scaleY(-1);
  }
  .ymct-engine-carousel .ec-ctrl:focus-visible {
    outline: 2px solid #199a91;
    outline-offset: 4px;
  }
}

@media (max-width: 374px) {
  .ymct-engine-carousel .ec-mcard {
    width: 280px;
    height: 267px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .ymct-engine-carousel .ec-mcard-title {
    font-size: 20px;
  }
  .ymct-engine-carousel .ec-heading {
    font-size: 28px;
    line-height: 34px;
  }
  .ymct-engine-carousel .ec-desc {
    font-size: 18px;
    line-height: 26px;
  }
}
