/**
 * Shared Program card.
 * Mobile-first and shared by Academic Programs, Courses and Program recommendations.
 */
.jci-program-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  padding: 0 0 28px;
  border-bottom: 1px solid #d9dee7;
  color: #0b2a4c;
}

.jci-program-card__media {
  display: block;
  overflow: hidden;
  contain: paint;
  min-height: 190px;
  aspect-ratio: 16 / 9;
  background: #eef2f8;
  color: #487cff;
  text-decoration: none;
}

.jci-program-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001) translate3d(0, 0, 0);
  transform-origin: center;
  transition: transform 360ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Lightweight media microinteraction shared by every Program/Course card.
 * Transform-only animation keeps layout stable and stays on the compositor. */
.jci-program-card__media:hover .jci-program-card__image {
  transform: scale(1.045) translate3d(1.2%, -1.2%, 0);
}

/* Program header artwork can be SVG. Keep vector geometry fully visible in
 * catalogue/recommendation cards instead of applying the photographic cover
 * crop used by raster editorial images. */
.jci-program-card__image--vector {
  object-fit: contain;
}

.jci-program-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 190px;
  font-size: 36px;
}

.jci-program-card__body {
  min-width: 0;
  padding-top: 18px;
}

.jci-program-card__eyebrow,
.jci-program-card__subtitle {
  margin: 0 0 8px;
  color: #487cff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.jci-program-card__title {
  margin: 0;
  padding: 0;
  font-family: "DM Sans", sans-serif;
  font-size: clamp(24px, 7vw, 32px);
  font-weight: 700;
  line-height: 1.04;
}

.jci-program-card__title a {
  color: #0b2a4c;
  text-decoration: none;
}

.jci-program-card__description {
  margin: 12px 0 0;
  color: #34383f;
  font-size: 15px;
  line-height: 1.5;
}

.jci-program-card__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin: 18px 0 0;
}

.jci-program-card__meta-item {
  min-width: 0;
}

.jci-program-card__meta dt {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.jci-program-card__meta dd {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: #34383f;
  font-size: 13px;
  line-height: 1.35;
}

.jci-program-card__meta-icon {
  display: inline-flex;
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.jci-program-card__meta-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jci-program-card__meta-value {
  min-width: 0;
}

.jci-program-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: fit-content;
  min-height: 40px;
  margin-top: 20px;
  padding: 0 14px;
  border: 1px solid #0b2a4c;
  border-radius: 8px;
  box-sizing: border-box;
  color: #0b2a4c;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.jci-program-card__cta-arrow {
  display: inline-block;
  flex: 0 0 auto;
  color: var(--color-brand-blue, #487cff);
}

/* Shared outline action used by the Course-card CTA and the Course hero's
 * Contact us action. The hero retains its context-specific layout rules on
 * mobile, while color, border, radius, typography and arrow interaction stay
 * on one reusable visual contract. */
.jci-outline-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  min-height: 38px;
  padding: 0 22px;
  border: 1px solid var(--color-brand-navy, #041c40);
  border-radius: 8px;
  box-sizing: border-box;
  background: #fff;
  color: var(--color-brand-navy, #041c40);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.jci-outline-cta__icon {
  display: block;
  flex: 0 0 28px;
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  height: auto;
  max-height: 14px;
  margin: 0;
  object-fit: contain;
  filter: none;
  transition: transform 160ms ease, filter 160ms ease;
}

.jci-program-card__title a:hover,
.jci-program-card__title a:focus-visible {
  color: #487cff;
}

.jci-program-card__cta:hover,
.jci-program-card__cta:focus-visible {
  border-color: #487cff;
  background: #487cff;
  color: #fff;
}

.jci-program-card__cta:hover .jci-program-card__cta-arrow,
.jci-program-card__cta:focus-visible .jci-program-card__cta-arrow {
  color: #fff;
  transform: translateX(4px);
}

/* Keep the shared outline interaction identical to Contact us even when the
 * element is also a Program-card CTA. */
.jci-outline-cta:hover,
.jci-outline-cta:focus-visible {
  border-color: #2f68ff;
  background: #2f68ff;
  color: #fff;
  text-decoration: none;
}

.jci-outline-cta:hover .jci-outline-cta__icon,
.jci-outline-cta:focus-visible .jci-outline-cta__icon {
  filter: brightness(0) invert(1);
}


/* Courses listing owns its result-grid geometry here instead of relying on the
 * retired generic .programs-grid rules from the legacy stylesheet. Related
 * surfaces intentionally override the same markup class with their native rails. */
#courses-results .programs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 992px) {
  #courses-results .programs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  #courses-results .programs-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Catalogue variants share the same card geometry and metadata-pill primitive. */
.jci-program-card.jci-program-card--catalog {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  height: auto;
  margin: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.jci-program-card--catalog .jci-program-card__media {
  min-height: 0;
  aspect-ratio: 4 / 3;
}

.jci-program-card--catalog .jci-program-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  min-height: 0;
  padding-top: 12px;
}

/* Shared metadata pill primitive.
 * Long-Program listings and catalogue cards use one visual component; only the
 * contextual background changes. Inline SVGs inherit currentColor and add no
 * extra media requests. */
.jci-meta-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 10px;
  border-radius: 5px;
  background-color: var(--jci-meta-pill-background, #d6dff27a);
  color: #071b3a;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.jci-meta-pill--catalog {
  --jci-meta-pill-background: #f1f3f6;
}

.jci-meta-pill__icon {
  display: inline-flex;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.jci-meta-pill__icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.jci-meta-pill__value {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  gap: 0;
}

/* Catalogue metadata reuses the long-list pill component. Pills wrap as
 * complete units without widening the card or recommendation rail. */
.jci-program-card--catalog .jci-program-card__catalog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: #071b3a;
}

.jci-program-card--catalog .jci-program-card__catalog-meta .jci-program-card__meta-item {
  max-width: 100%;
}

.jci-program-card--catalog .jci-program-card__catalog-meta dd {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: auto;
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
}

.jci-program-card--catalog .jci-program-card__meta-value {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.jci-program-card--catalog .jci-program-card__meta-item--price {
  font-weight: 600;
}


/* Courses listing keeps metadata compact and editorial: text only, blue and
 * separated by vertical bars. Related cards retain the shared pill treatment. */
.jci-program-card--course-grid .jci-program-card__catalog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  color: var(--color-brand-blue, #487cff);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.jci-program-card--course-grid .jci-program-card__meta-item--textual {
  display: inline-flex;
  align-items: baseline;
  max-width: 100%;
}

.jci-program-card--course-grid .jci-program-card__meta-item--textual:not(:first-child)::before {
  content: "|";
  margin: 0 6px;
  color: currentColor;
}

.jci-program-card--course-grid .jci-program-card__meta-item--textual dd {
  color: currentColor;
  font: inherit;
}

.jci-program-card--course-grid,
.jci-program-card--course-grid .jci-program-card__body,
.jci-program-card--course-grid .jci-program-card__catalog-meta,
.jci-program-card--related-course,
.jci-program-card--related-course .jci-program-card__body,
.jci-program-card--related-program,
.jci-program-card--related-program .jci-program-card__body {
  max-width: 100%;
  min-width: 0;
}

.jci-program-card--catalog .jci-program-card__title {
  margin: 14px 0;
  font-size: 18px;
  line-height: 1.15;
}

.jci-program-card--catalog .jci-program-card__description {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.jci-program-card--catalog .jci-program-card__cta {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 0;
  padding-bottom: 0;
}

@media (min-width: 769px) {
  .jci-program-card {
    height: 100%;
    padding-bottom: 32px;
  }

  .jci-program-card.jci-program-card--catalog {
    padding-bottom: 0;
  }

  .jci-program-card__title {
    font-size: clamp(22px, 2vw, 30px);
  }

  .jci-program-card__description {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jci-program-card__image,
  .jci-program-card__cta,
  .jci-program-card__cta-arrow {
    transition: none;
  }

  .jci-program-card__media:hover .jci-program-card__image {
    transform: none;
  }
}

/* Shared related-Program component used below Program request forms.
 * The card primitive already belongs to this stylesheet; keeping the section
 * and its controls here lets Course and long-Program templates reuse one
 * implementation without loading the full Course stylesheet. */
.jci-program-related-programs {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 80px 0;
  contain: paint;
  background: #fff;
}

.jci-program-related-programs__heading {
  display: block;
}

.jci-program-related-programs__title {
  margin: 0;
  padding: 0;
  color: var(--bs-body-color, #041c40);
  font-family: "DM Sans", sans-serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: -0.018em;
}

.jci-program-related-programs__nav {
  display: none;
}

.jci-program-related-programs__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

/* The same arrow primitive is also used by the existing Related courses rail. */
.jci-short-program-related__arrow {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(4, 28, 64, 0.18);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.jci-short-program-related__arrow::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23487cff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.jci-short-program-related__arrow--prev::before {
  transform: rotate(180deg);
}

.jci-short-program-related__arrow:hover,
.jci-short-program-related__arrow:focus-visible {
  border-color: var(--color-brand-blue, #487cff);
  background: #f4f7ff;
  outline: none;
}

.jci-short-program-related__arrow:disabled {
  opacity: 0.32;
  cursor: default;
}

@media (max-width: 768px) {
  .jci-program-related-programs {
    padding: 56px 0;
  }

  .jci-program-related-programs__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
  }

  .jci-program-related-programs__title {
    font-size: clamp(26px, 7vw, 30px);
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .jci-program-related-programs__nav {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
  }

  .jci-program-related-programs__nav .jci-short-program-related__arrow {
    width: 34px;
    height: 34px;
  }

  .jci-program-related-programs__grid {
    display: flex;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    margin-top: 22px;
    padding: 0 0 12px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .jci-program-related-programs__grid::-webkit-scrollbar {
    display: none;
  }

  .jci-program-related-programs__grid > .jci-program-card--related-program {
    flex: 0 0 min(84%, 310px);
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

