/* Custom Spotlight similar to Spotlight v1 from the Theme Manager */
.spotlight-TM-v1,
.spotlight-TM-v1 *,
.spotlight-TM-v1 *::before,
.spotlight-TM-v1 *::after {
  box-sizing: border-box;
}

.spotlight-TM-v1 {
  padding: 40px 20px;
  background-color: var(--section-background-color, #FFF);
}

@media only screen and (min-width: 600px) {
  .spotlight-TM-v1 {
    padding-inline: 32px;
  }
}

.spotlight-TM-v1-title {
  font-size: 32px;
  line-height: 1.2;
  text-transform: capitalize;
  color: var(--primary-color);
  word-break: break-word;
  margin-top: 30px;
}

@media only screen and (min-width: 1400px) {
  .spotlight-TM-v1-title {
    font-size: 35px;
  }
}

.spotlight-TM-v1 .header-slot-container {
  padding-right: 0;
  border: 0;

  h2 {
    color: var(--section-title-color, currentColor);
  }
}

.spotlight-TM-v1-slider {
  margin-top: 20px;
  margin-bottom: 50px;
  width: 100%;
  margin-inline: auto;
  --columns: 1;
  --gap: 25px;
}

.spotlight-TM-v1-slider:not(.swiper-initialized) .spotlight-TM-v1-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}

.spotlight-TM-v1-wrapper>div {
  text-decoration: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spotlight-TM-v1-slider:not(.swiper-initialized) .spotlight-TM-v1-wrapper>div {
  width: calc((100% / var(--columns)) - ((var(--columns) - 1) * var(--gap)) / var(--columns));
}

.spotlight-TM-v1-wrapper>div .graduate-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--spotlight-image-size, 230px);
  max-width: calc(100% - 107px);
  margin-bottom: 30px;
  position: relative;
  aspect-ratio: 1/1;

  &::after {
    background-color: transparent;
    border-bottom: 10px solid var(--image-border-color, var(--secondary-color));
    border-left: 10px solid transparent;
    border-radius: 50%;
    border-right: 10px solid var(--image-border-color, var(--secondary-color));
    border-top: 10px solid transparent;
    box-sizing: content-box;
    content: "";
    height: 100%;
    position: absolute;
    right: -10px;
    top: -10px;
    transition: transform .3s ease-in-out;
    width: 100%;
  }

  & span {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
  }
}

.spotlight-TM-v1-wrapper>div:hover .graduate-image::after {
  transform: rotate(15deg);
}

.spotlight-TM-v1-wrapper>div .graduate-image img {
  border-radius: 50vw;
  width: 100%;
  height: 100%;
  display: block;
  aspect-ratio: 1/1;
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.spotlight-TM-v1 .graduate-name,
.spotlight-TM-v1 .graduate-school {
  transition: all .25s linear;
}

.spotlight-TM-v1 .graduate-name {
  order: var(--spotlight-author-order, 1);
}

.spotlight-TM-v1 .graduate-name * {
  color: var(--spotlight-author-color, var(--primary-color));
  text-decoration: none;
  text-align: var(--text-alignment, justify);
  margin-top: 15px;
  text-transform: capitalize;

  span {
    white-space: normal !important;
  }
}

.spotlight-TM-v1 .graduate-name h3 {
  font-size: 21px;
}

.spotlight-TM-v1 .graduate-name h4 {
  font-size: 19px;
}

.spotlight-TM-v1 .content-wrap-inner {
  display: flex;
  flex-direction: column;

  @media only screen and (min-width: 1280px) {
    padding-inline: 20px;
  }
}

.spotlight-TM-v1 .graduate-school {
  font-size: 16px;
  line-height: 1.5;
  color: var(--spotlight-quote-color, #000);
  text-decoration: none;
  text-align: var(--text-alignment, justify);
  margin-top: .75em;
  order: var(--spotlight-quote-order, 0);

  span {
    white-space: normal !important;
  }
}

.spotlight-TM-v1-slider:not(.swiper-initialized) .custom-swiper-navigation,
.spotlight-TM-v1-slider.swiper-initialized:not(:has(.swiper-slide:nth-child(2))) .custom-swiper-navigation {
  display: none;
}

/* .spotlight-TM-v1-slider.swiper-initialized .custom-swiper-navigation {
  display: flex;
  justify-content: center;
  margin-block: 30px;
  gap: clamp(0.938rem, 5.03rem, 4.375rem);
} */
.spotlight-TM-v1-slider.swiper-initialized .custom-swiper-navigation {
  margin: 0;
}

.spotlight-TM-v1-slider.swiper-initialized .custom-swiper-navigation>div {
  /* cursor: pointer; */
  width: 1em;
  height: 1em;
  font-size: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  margin-right: 5px;
  background: var(--arrows-bg-color, var(--primary-color));
  color: var(--arrows-color, var(--primary-color-contrast));
  opacity: 0.75;
  border-radius: 50%;
  transition: all .35s ease-in-out;
  position: absolute;
  z-index: 1;
  top: calc(var(--spotlight-image-size, 230px)/2);
  transform: translateY(-50%);

  &:hover {
    opacity: 1;
  }

  &::after {
    content: "";
    font-size: 6px;
    width: 1em;
    height: 1em;
    border: solid currentColor;
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 1em;

  }
}

.spotlight-TM-v1-slider.swiper-initialized .custom-swiper-navigation .js-custom-spotlight-TM-v1-arrow-prev {
  left: 0;

  &::after {
    transform: rotate(135deg);
    -webkit-transform: rotate(135deg);
    margin-left: 7px;
  }
}

.spotlight-TM-v1-slider.swiper-initialized .custom-swiper-navigation .js-custom-spotlight-TM-v1-arrow-next {
  right: 0;

  &::after {
    transform: rotate(-45deg);
    -webkit-transform: rotate(-45deg);
    margin-right: 7px;
  }
}

@media only screen and (min-width: 1440px) {
  .spotlight-TM-v1-wrapper>div .graduate-image {
    max-width: calc(100% - 130px);
  }

  .spotlight-TM-v1-slider.swiper-initialized .custom-swiper-navigation>div {
    font-size: 50px;
  }

  .spotlight-TM-v1 .graduate-name h3 {
    font-size: 24px;
  }

  .spotlight-TM-v1 .graduate-name h4 {
    font-size: 21px;
  }
}

@media only screen and (min-width: 600px) {
  .spotlight-TM-v1-slider {
    margin-inline: auto;
    --columns: 2;
    --gap: 5%;
  }
}

@media only screen and (min-width: 980px) {
  .spotlight-TM-v1-slider {
    margin-inline: auto;
    --columns: 3;
  }
}

@media only screen and (min-width: 1280px) {
  .spotlight-TM-v1-slider {
    margin-inline: auto;
    --columns: 4;
  }
}


.spotlight-TM-v1-slider.swiper-initialized {
  position: relative;

  .swiper-slide:not(.swiper-slide-active) {
    /* cursor: pointer; */
  }

  .swiper-slide-active {

    .activeClickedHack {
      display: none;
    }
  }
}

.spotlight-TM-v1-slider .read-more:not(:has(a)) {
  display: none;
}

.spotlight-TM-v1-slider .read-more {
  text-align: var(--text-alignment, left);
  order: var(--read-more-order, 2);
}

.spotlight-TM-v1-slider .read-more a {
  margin-top: 10px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  box-sizing: border-box;
  background-color: var(--read-more-background, var(--secondary-color));
  color: var(--read-more-color, var(--secondary-color-contrast));
  transition: all .35s ease-in-out;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 700;
  position: relative;

  &::after {
    content: '';
    width: 10px;
    height: 10px;
    background-color: var(--read-more-color, var(--secondary-color-contrast));
    mask-image: url("data:image/svg+xml,%3Csvg width='9' height='10' viewBox='0 0 9 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.52867 8.52869L4.47133 9.47135L8.94267 5.00002L4.47133 0.528687L3.52867 1.47135L6.39067 4.33335H0V5.66669H6.39067L3.52867 8.52869Z' fill='%234D515A'/%3E%3C/svg%3E%0A");
    mask-repeat: no-repeat no-repeat;
    mask-position: center center;
    mask-size: contain;
  }

  &:hover {
    background-color: var(--primary-color);
    color: #FFF;

    &::after {
      background-color: #FFF;
    }
  }
}

.spotlight-TM-v1-slider:not(:has(.link-actions)) .only-in-cms {
  display: none !important;
}

/* hide arrows */
@media only screen and (max-width: 959px) {
  .spotlight-TM-v1-slider:not(:has(.swiper-slide:nth-child(2))) {
    .custom-swiper-navigation {
      display: none;
    }
  }
}

@media only screen and (min-width: 960px) {
  .spotlight-TM-v1-slider:not(:has(.swiper-slide:nth-child(3))) {
    .custom-swiper-navigation {
      display: none;
    }
  }
}

@media only screen and (min-width: 1280px) {
  .spotlight-TM-v1-slider:not(:has(.swiper-slide:nth-child(4))) {
    .custom-swiper-navigation {
      display: none;
    }
  }
}

@media only screen and (min-width: 2100px) {
  .spotlight-TM-v1-slider:not(:has(.swiper-slide:nth-child(6))) {
    .custom-swiper-navigation {
      display: none;
    }
  }
}

/* VERTICAL SLIDER */
@media only screen and (min-width: 960px) {
  #app .view-container:has(.spotlight-TM-v1.vertical)>div {
    min-width: 400px;

    &>div {
      height: 100%;
      display: flex;
      flex-direction: column;
    }
  }
}

#app .spotlight-TM-v1.vertical {
  --text-alignment: left;
  --icon-size: 35px;
  height: 100%;
  flex: 1;
  display: flex !important;
  flex-direction: column;

  @media only screen and (min-width: 1280px) {
    --icon-size: 40px;
  }

  .spotlight-TM-v1-slider {
    height: 100%;
    width: 100%;
    flex: 1;
    margin: 0;
    display: flex;
    min-height: 500px;

    &:has(.swiper-slide:nth-child(4)) {
      .custom-swiper-navigation {
        display: flex;
      }
    }

    &:not(.swiper-initialized) {
      .spotlight-TM-v1-wrapper {
        flex-direction: column;
        gap: 30px;
        justify-content: flex-start;

        &>div {
          width: 100%;

          &:nth-child(n+4) {
            display: none;
          }
        }
      }
    }

    .spotlight-TM-v1-wrapper {
      width: calc(100% - var(--icon-size));
      flex: 1;
      padding-right: 10px;
    }

    .custom-swiper-navigation {
      width: var(--icon-size);
      flex-direction: column;
      align-items: center;
      --swiper-scrollbar-bg-color: color-mix(in srgb, var(--primary-color), transparent 75%);
      --swiper-scrollbar-drag-bg-color: var(--primary-color);
      --swiper-scrollbar-border-radius: 0;

      .custom-scrollbar {
        flex: 1;
        font-size: unset;
        inset: 0;
        position: relative;
        transform: unset;
        border-radius: 0;
        width: 0.4em;
        align-items: unset;
        justify-content: unset;
        background: var(--swiper-scrollbar-bg-color);
        margin: 0;
      }

      .custom-scrollbar:after {
        content: none;
      }

      .custom-swiper-prev,
      .custom-swiper-next {
        inset: 0;
        position: relative;
        transform: none;
        margin: 0;
        margin-bottom: 12px;
        width: var(--icon-size);
        height: var(--icon-size);

        &.swiper-button-disabled {
          opacity: 0.3;
        }
      }

      .custom-swiper-prev::after {
        transform: rotate(-136deg);
        -webkit-transform: rotate(-136deg);
        margin-left: 0;
        margin-top: 5px;
      }

      .custom-swiper-next::after {
        transform: rotate(45deg);
        -webkit-transform: rotate(45deg);
        margin-right: 0;
        margin-top: -5px;
      }
    }

    .spotlight-TM-v1-wrapper>div {
      flex-direction: row;
      align-items: center;

      @media only screen and (max-width: 600px) {
        flex-direction: column;
        gap: 10px;

        .graduate-image {
          width: 150px;
        }
      }
    }

    .spotlight-TM-v1-wrapper>div .graduate-image {
      margin-right: 10px;
      margin-block: 10px;

      @media only screen and (min-width: 960px) {
        min-width: 40%;
      }

    }
  }

  .graduate-name h4 {
    font-size: 18px;

    @media only screen and (min-width: 1440px) {
      font-size: 20px;
    }
  }

  .content-wrap-inner {
    padding-right: 0;
    padding-left: 15px;
  }

  .graduate-school {
    margin-top: 0;
  }
}

/* END Custom Spotlight similar to Spotlight v1 from the Theme Manager */