.program-features {
  --program-features-slide-height: 540px;
  padding-top: 3rem;
}

@media (min-width: 768px) {
  .program-features {
    padding-top: 5rem;
  }
}

.program-features__title {
  margin: 0 0 2rem;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--color-text);
  text-align: center;
}

@media (min-width: 768px) {
  .program-features__title {
    font-size: 32px;
    margin-bottom: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .program-features__title {
    font-size: 40px;
  }
}

/* Two-column layout */
.program-features__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .program-features__layout {
    grid-template-columns: minmax(0, 1fr) 38%;
    gap: 23px;
    align-items: stretch;
  }
}

/* Feature grid (desktop) / slider (mobile) */
.program-features__features {
  min-width: 0;
}

.program-features__features-viewport {
  overflow: hidden;
}

@media (min-width: 768px) {
  .program-features__features {
    display: flex;
    flex-direction: column;
  }

  .program-features__features-viewport {
    overflow: visible;
    flex: 1;
  }
}

.program-features__features-track {
  display: flex;
  touch-action: pan-y pinch-zoom;
}

.program-features__features-slide {
  flex: 0 0 100%;
  box-sizing: border-box;
  min-width: 0;
}

@media (max-width: 767px) {
  .program-features__features-track { gap: 10px; }
}

@media (min-width: 768px) {
  .program-features__features-track {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    min-height: 100%;
  }

  .program-features__features-slide {
    flex: none;
  }
}

@media (min-width: 1024px) {
  .program-features__features-track {
    grid-template-columns: repeat(3, 1fr);
  }
}

.program-features__feature {
  background: rgba(44, 46, 131, 0.2);
  border-radius: 18px;
  padding: 22px 20px;
  height: 100%;
  box-sizing: border-box;
}

.program-features__feature-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

.program-features__feature-text {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text);
  opacity: 0.85;
}

/* Features slider controls (mobile only) */
.program-features__features-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .program-features__features-controls {
    display: none;
  }
}

.program-features__features-nav {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary, #2C2E83);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbfbfb;
  transition: opacity 0.2s ease;
}

.program-features__features-nav:hover {
  opacity: 0.8;
}

.program-features__features-pill {
  max-width: 40px;
  height: 6px;
  background: rgba(44, 46, 131, 0.2);
}

.program-features__features-pill.is-active {
  background: var(--color-primary, #2C2E83);
}

.program-features__features-pill:hover:not(.is-active) {
  background: rgba(44, 46, 131, 0.4);
}

@media (max-width: 767px) {
  .program-features__features-pill {
    max-width: 32px;
    height: 5px;
  }
}

/* Right panel */
.program-features__panel {
  position: relative;
  background: linear-gradient(321deg, #2D2E83 -40.98%, #0D1532 157.1%);
  border-radius: 1.75rem;
  padding: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 8px 0 rgba(13, 21, 50, 0.5);
}

/* Panel body: slider + watermark side */
.program-features__panel-body {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 0;
}

/* Slider column */
.program-features__slider {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  border-radius: 1.75rem;
  box-shadow: 0 4px 8px 0 rgba(13, 21, 50, 0.5);
}

/* Watermark side column */
.program-features__panel-side {
  display: none;
}

@media (min-width: 768px) {
  .program-features__panel-side {
    display: flex;
    flex: 0 0 28%;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
  }
}

/* Watermark */
.program-features__watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max-content;
  transform: translate(calc(-50% + 5px), -50%) rotate(-90deg);
  font-size: 173px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  background: linear-gradient(180deg, rgba(251, 251, 251, 0.2) 0%, rgba(251, 251, 251, 0) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Embla slider */
.program-features__embla {
  position: relative;
  z-index: 1;
  width: 100%;
  flex: 1;
  min-height: 0;
}

.program-features__viewport {
  overflow: hidden;
  border-radius: 18px;
}

.program-features__slides {
  display: flex;
  align-items: stretch;
  touch-action: pan-y pinch-zoom;
  gap: 10px;
}

.program-features__slide {
  flex: 0 0 100%;
  min-width: 0;
}

/* Card */
.program-features__card {
  display: block;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.program-features__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 620 / 1080;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #0d1532;
  box-shadow: 2px 3px 10px 0px rgba(13, 21, 50, 0.8);
}

.program-features__image-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #0D15329C;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.program-features__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

.program-features__overlay {
  position: absolute;
  inset: auto 0 0 0;
  min-height: 199px;
  display: flex;
  align-items: flex-end;
  padding: 18px 22px;
  z-index: 2;
  overflow: hidden;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
}

.program-features__overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
  background: linear-gradient(180deg, rgba(13, 21, 50, 0) 0%, rgba(13, 21, 50, 0.3) 52%, rgba(13, 21, 50, 0.8) 100%);
}

.program-features__text {
  position: relative;
  text-align: left;
  color: #FBFBFB;
}

.program-features__label {
  display: block;
  margin-bottom: 15px;
  font-family: "Carmen Sans", sans-serif;
  font-size: 23.66px;
  font-weight: 500;
  line-height: 1.2;
}

.program-features__subheading {
  display: block;
  font-family: "Carmen Sans", sans-serif;
  font-size: 15.06px;
  font-weight: 400;
  line-height: 1.2;
  opacity: 0.95;
}

.program-features__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  color: #FBFBFB;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 3;
  pointer-events: none;
}

.program-features__card:hover .program-features__image-wrapper::before,
.program-features__card:focus-visible .program-features__image-wrapper::before {
  opacity: 1;
}

.program-features__card:hover .program-features__play,
.program-features__card:focus-visible .program-features__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Controls */
.program-features__controls {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.program-features__nav {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FBFBFB;
  color: #2C2E83;
  transition: opacity 0.2s ease;
}

.program-features__nav:hover {
  opacity: 0.85;
}



/* Desktop: fill panel height with slider */
@media (min-width: 768px) {
  .program-features__panel-body {
    align-items: center;
  }

  .program-features__slider {
    align-self: center;
  }

  .program-features__embla {
    flex: 0 0 auto;
  }

  .program-features__slide {
    height: var(--program-features-slide-height);
  }

  .program-features__card {
    height: 100%;
  }

  .program-features__image-wrapper {
    height: 100%;
    aspect-ratio: unset;
    border-radius: 18px;
  }
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .program-features {
    --program-features-slide-height: 500px;
  }

  .program-features__panel {
    padding: 20px;
    margin-top: 1rem;
  }

  .program-features__image-wrapper {
    aspect-ratio: 31 / 46;
    max-height: none;
  }

  .program-features__label {
    font-size: 18px;
  }

  .program-features__subheading {
    font-size: 13px;
  }
}
