/* Tab cards — MSIL Corporate CC Pt 2.
 * Mobile: 6532:25692 — Tablet: 6532:25945 — Desktop: 6532:25373
 * Tablet/desktop: description lives in .tab-cards__item; borders on the item;
 * shared .tab-cards__stage is absolute in .tab-cards__media (desktop) or after stack (mobile). */

.tab-cards {
  box-sizing: border-box;
  color: var(--corp-color-text);
  font-family: var(--corp-font-family);
}

.tab-cards *,
.tab-cards *::before,
.tab-cards *::after {
  box-sizing: border-box;
}

.tab-cards__inner {
  display: flex;
  flex-direction: column;
  gap: 36px;
  padding: 36px 20px 53px 20px;
  width: 100%;
}

.tab-cards__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tab-cards__eyebrow {
  * {
    color: var(--corp-color-text);
    font-size: var(--corp-type-mobile-tag-1-font-size);
    font-weight: var(--corp-type-mobile-tag-1-font-weight);
    line-height: var(--corp-type-mobile-tag-1-line-height);
    margin: 0;
    opacity: 0.4;
    text-transform: uppercase;
  }
}

.tab-cards__title :where(h1, h2, h3, h4, h5, h6) {
  color: var(--corp-color-text);
  font-size: var(--corp-type-mobile-display-2-font-size);
  font-weight: var(--corp-type-mobile-display-2-font-weight);
  letter-spacing: -0.56px;
  line-height: var(--corp-type-mobile-display-5-line-height);
  margin: 0;
}

.tab-cards__title :where(h1, h2, h3, h4, h5, h6) strong,
.tab-cards__title :where(h1, h2, h3, h4, h5, h6) b {
  color: var(--corp-color-primary);
  font-weight: inherit;
}

.tab-cards__lede {
  color: rgb(0 0 0 / 60%);
  font-size: var(--corp-type-body-sm-font-size);
  line-height: var(--corp-type-body-sm-line-height);
}

.tab-cards__lede p {
  margin: 0;
}

.tab-cards__layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: relative;
  width: 100%;
}

.tab-cards__tabs-col {
  min-width: 0;
  width: 100%;
}

.tab-cards__tabstack {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
  width: 100%;
}

.tab-cards__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  position: relative;
  width: 100%;
  z-index: 0;
}

.tab-cards__media {
  display: none;
}

.tab-cards__tab {
  align-items: flex-start;
  background: transparent;
  border: none;
  border-radius: var(--corp-radius-sm);
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 16px;
  margin: 0;
  padding: 0px 0px 12px 0px;
  text-align: start;
  width: 100%;
}

.tab-cards__tab:focus {
  outline: none;
}

.tab-cards__tab:focus-visible {
  outline: 2px solid var(--corp-color-focus);
  outline-offset: 2px;
}

.tab-cards__index {
  flex: 0 0 auto;
  font-size: var(--corp-type-mobile-tag-1-font-size);
  font-weight: var(--corp-type-mobile-tag-1-font-weight);
  letter-spacing: 0.06em;
  line-height: var(--corp-type-mobile-tag-1-line-height);
  min-width: 3.25rem;
}

.tab-cards__index-suffix {
  display: none;
}

.tab-cards__thumb {
  border-radius: 12px;
  display: none;
  flex: 0 0 auto;
  height: 56px;
  overflow: hidden;
  width: 56px;
}

.tab-cards__thumb picture,
.tab-cards__thumb img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.tab-cards__title-host {
  flex: 1 1 auto;
  min-width: 0;
  transition: transform 0.35s ease;
}

.tab-cards__tab-title {
  color: var(--corp-color-text);
  display: block;
  font-size: var(--corp-type-mobile-heading-xl-font-size);
  font-weight: var(--corp-type-mobile-display-2-font-weight);
  letter-spacing: -0.22px;
  line-height: var(--corp-type-tablet-display-4xl-line-height);
  margin: 0;
}

.tab-cards__item:not(.is-active) .tab-cards__title-host {
  max-height: 26px;
  overflow: hidden;
}

.tab-cards__item:not(.is-active) .tab-cards__index,
.tab-cards__item:not(.is-active) .tab-cards__tab-title {
  opacity: 0.4;
}

.tab-cards__item.is-active .tab-cards__index,
.tab-cards__item.is-active .tab-cards__tab-title {
  opacity: 1;
}

.tab-cards__desc {
  color: var(--corp-color-text);
  opacity: 0.6;
  display: none;
  font-size: var(--corp-type-mobile-body-3-font-size);
  font-weight: var(--corp-type-mobile-body-3-font-weight);
  line-height: var(--corp-type-mobile-body-3-line-height);
  min-width: 0;
}

.tab-cards__item:not(.is-active) .tab-cards__desc {
  display: none;
}

.tab-cards__desc p {
  margin: 0 0 0.5rem;
}

.tab-cards__desc p:last-child {
  margin-bottom: 0;
}

.tab-cards__item.is-active .tab-cards__desc {
  display: block;
}

/* Mobile: stage follows tab stack in layout */
.tab-cards__layout>.tab-cards__stage {
  border-radius: var(--corp-radius-xxxl);
  height: 194px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.tab-cards__img-slot {
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.tab-cards__img-slot.is-active {
  opacity: 1;
  z-index: 1;
}

.tab-cards__pic-wrap {
  height: 100%;
  width: 100%;
}

.tab-cards__pic-wrap--desktop {
  display: none;
}

.tab-cards__pic-wrap picture,
.tab-cards__pic-wrap img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

@media screen and (width >=768px) and (width < 1200px) {
  .tab-cards__inner {
    padding: 69px 20.5px 59px 19.5px;
    gap: 10px;
  }

  .tab-cards__intro {
    gap: 13px;
  }

  .tab-cards__eyebrow {
    * {
      font-size: var(--corp-type-tablet-heading-2-font-size);
      font-weight: var(--corp-type-tablet-heading-2-font-weight);
      letter-spacing: normal;
      line-height: var(--corp-type-tablet-heading-2-line-height);
    }
  }

  .tab-cards__title :where(h1, h2, h3, h4, h5, h6) {
    color: var(--corp-color-primary);
    font-size: var(--corp-type-tablet-display-font-size);
    letter-spacing: -0.42px;
  }

  .tab-cards__tabstack {
    gap: 35px;
  }

  .tab-cards__item {
    border-top: 1px solid rgb(0 0 0 / 10%);
    gap: 0;
    padding-top: 11px;
  }

  .tab-cards__item:not(.is-active) {
    display: flex;
    flex-direction: column;
  }

  .tab-cards__item.is-active {
    column-gap: var(--grid-gutter-width);
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 3fr);
    grid-template-rows: auto;
  }

  .tab-cards__item.is-active .tab-cards__tab {
    align-self: center;
    gap: 13px;
  }

  .tab-cards__item.is-active .tab-cards__media {
    display: none;
  }

  .tab-cards__item.is-active .tab-cards__desc {
    align-self: start;
    color: var(--corp-color-text);
    opacity: 1;
    display: block;
    font-size: var(--corp-type-tablet-body-2-font-size);
    font-weight: var(--corp-type-tablet-body-2-font-weight);
    grid-column: 2;
    grid-row: 1;
    letter-spacing: -0.36px;
    line-height: var(--corp-type-tablet-display-6xl-line-height);
    max-width: 262px;
  }


  .tab-cards__item.is-active .tab-cards__thumb {
    display: block;
  }

  .tab-cards__tab {
    align-items: start;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 13.4px;
    padding: 0;
  }

  .tab-cards__item:not(.is-active) .tab-cards__tab {
    gap: 11px;
  }

  .tab-cards__index {
    font-size: var(--corp-type-tablet-body-sm-2-font-size);
    font-weight: var(--corp-type-tablet-body-sm-2-font-weight);
    letter-spacing: -0.3px;
    line-height: var(--corp-type-tablet-body-sm-2-line-height);
    min-width: 0;
    padding-top: 0;
    display: flex;
  }

  .tab-cards__index-suffix {
    display: block;
    color: var(--corp-color-text);
    font-size: var(--corp-type-tablet-body-sm-2-font-size);
    font-weight: var(--corp-type-tablet-body-sm-2-font-weight);
    letter-spacing: -0.3px;
    line-height: var(--corp-type-tablet-body-sm-2-line-height);
    opacity: 0.4;
  }

  .tab-cards__thumb {
    border-radius: var(--corp-radius-xsm);
    height: 56.7px;
    width: 69px;
  }

  .tab-cards__tab-title {
    font-size: var(--corp-type-tablet-heading-lg-font-size);
    letter-spacing: -0.01em;

  }

  .tab-cards__item.is-active .tab-cards__tab-title {
    font-size: var(--corp-type-tablet-heading-xl-font-size);
    letter-spacing: -0.2px;
    line-height: var(--corp-type-tablet-display-4xl-line-height);
  }

  .tab-cards__item:not(.is-active) .tab-cards__index,
  .tab-cards__item:not(.is-active) .tab-cards__tab-title {
    opacity: 1;
  }

  .tab-cards__item:not(.is-active) .tab-cards__index {
    color: rgb(0 0 0 / 40%);
  }

  .tab-cards__item:not(.is-active) .tab-cards__tab-title {
    font-size: var(--corp-type-tablet-heading-lg-font-size);
    color: rgb(0 0 0 / 60%);
  }

  .tab-cards__item.is-active .tab-cards__index,
  .tab-cards__item.is-active .tab-cards__tab-title {
    color: var(--corp-color-text);
  }

  .tab-cards__item:not(.is-active) .tab-cards__title-host {
    max-height: calc(1.4 * var(--corp-type-tablet-heading-lg-font-size));
  }

  .tab-cards__item.is-active .tab-cards__title-host {
    max-height: none;
    overflow: visible;
    transform: translateX(4px);
  }

  .tab-cards__layout>.tab-cards__stage {
    display: none;
  }
}

@media screen and (width >=1200px) {

  .tab-cards__inner {
    gap: 26px;
    padding: 78px 56px 35px 56px;
  }

  .tab-cards__intro {
    gap: 24px;
  }

  .tab-cards__eyebrow {
    * {
      font-size: var(--corp-type-desktop-heading-4-font-size);
      font-weight: var(--corp-type-desktop-heading-4-font-weight);
      letter-spacing: -0.4px;
      line-height: var(--corp-type-desktop-heading-4-line-height);
    }
  }

  .tab-cards__title :where(h1, h2, h3, h4, h5, h6) {
    color: var(--corp-color-primary);
    font-size: var(--corp-type-desktop-heading-xxl-font-size);
    font-weight: var(--corp-type-desktop-heading-xxl-font-weight);
    letter-spacing: -1.5px;
    line-height: var(--corp-type-desktop-heading-4xxl-line-height);
  }

  .tab-cards__tabstack {
    gap: 51px;
  }

  .tab-cards__item {
    border-top: 1px solid rgb(0 0 0 / 10%);
    gap: 0;
    padding-top: 20px;
  }

  .tab-cards__item:not(.is-active) {
    display: flex;
    flex-direction: column;
  }


  .tab-cards__item:not(.is-active) .tab-cards__media {
    display: none;
  }

  .tab-cards__item.is-active {
    align-items: start;
    column-gap: var(--grid-gutter-width);
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
    min-height: 153px;
    z-index: 1;
  }

  .tab-cards__item.is-active:last-child {
    padding-bottom: 130px;
  }

  .tab-cards__item.is-active .tab-cards__tab {
    grid-column: 1;
    grid-row: 1;
  }

  .tab-cards__item.is-active .tab-cards__media {
    align-self: stretch;
    display: block;
    grid-column: 2;
    grid-row: 1;
    position: relative;
    width: 100%;
    z-index: 2;
  }

  .tab-cards__item.is-active .tab-cards__desc {
    align-self: start;
    color: var(--corp-color-text);
    opacity: 1;
    display: block;
    font-size: var(--corp-type-desktop-body-lg-font-size);
    font-weight: var(--corp-type-desktop-body-font-weight);
    grid-column: 3;
    grid-row: 1;
    letter-spacing: -0.01em;
    line-height: var(--corp-type-desktop-heading-3xl-line-height);
    margin: 0;
    max-width: 345px;
  }

  .tab-cards__item.is-active .tab-cards__stage {
    aspect-ratio: 1;
    border-radius: var(--corp-radius-md);
    left: 51%;
    margin-top: 0;
    overflow: hidden;
    position: absolute;
    top: 110px;
    transform: translate(-50%, -50%);
    z-index: 2;
    height: 310px;
  }

  .tab-cards__layout>.tab-cards__stage {
    display: none;
  }

  .tab-cards__tab {
    align-items: center;
    gap: 20px;
    flex-direction: row;
  }

  .tab-cards__index {
    font-size: var(--corp-type-desktop-body-5-font-size);
    font-weight: var(--corp-type-desktop-body-5-font-weight);
    letter-spacing: normal;
    line-height: var(--corp-type-desktop-body-2-line-height);
    min-width: 0;
    padding-top: 0;
    display: flex;
  }

  .tab-cards__item:not(.is-active) .tab-cards__index-suffix {
    display: block;
  }

  .tab-cards__item.is-active .tab-cards__index-suffix {
    display: block;
    opacity: 0.4;
  }

  .tab-cards__tab-title {
    font-size: var(--corp-type-desktop-heading-2-font-size);
    letter-spacing: -1.26px;
    line-height: var(--corp-type-desktop-heading-2-line-height);
  }

  .tab-cards__item.is-active .tab-cards__tab-title {
    font-size: var(--corp-type-mobile-heading-xxl-line-height);
    line-height: var(--corp-type-desktop-heading-1-line-height);
  }

  .tab-cards__item:not(.is-active) .tab-cards__index,
  .tab-cards__item:not(.is-active) .tab-cards__tab-title {
    opacity: 1;
  }

  .tab-cards__item:not(.is-active) .tab-cards__index {
    color: rgb(0 0 0 / 40%);
  }

  .tab-cards__item:not(.is-active) .tab-cards__tab-title {
    color: rgb(0 0 0 / 60%);
  }

  .tab-cards__item.is-active .tab-cards__index,
  .tab-cards__item.is-active .tab-cards__tab-title {
    color: var(--corp-color-text);
  }

  .tab-cards__item:not(.is-active) .tab-cards__title-host {
    max-height: var(--corp-type-desktop-heading-2-line-height);
    overflow: hidden;
  }

  .tab-cards__item.is-active .tab-cards__title-host {
    max-height: none;
    overflow: visible;
    transform: none;
  }

  .tab-cards__item.is-active .tab-cards__thumb {
    display: none;
  }

  .tab-cards__pic-wrap--desktop {
    display: block;
  }

  .tab-cards__pic-wrap--mobile {
    display: none;
  }
}