/**
 * @file
 * Styles for Impact Highlight Block.
 */

.nextdc-impact-highlight-block {
  width: 100%;
  padding: 96px 0;
}

@media (max-width: 767.98px) {
  .nextdc-impact-highlight-block {
    padding: 48px 0;
  }
}

.nextdc-impact-highlight-block__title {
  font-family: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 56px;
  line-height: 120%;
  letter-spacing: 0.032em;
  color: #ffffff;
  margin-bottom: 40px;
}


@media (max-width: 767.98px) {
  .nextdc-impact-highlight-block__title {
    font-size: 36px;
  }
}

.nextdc-impact-highlight-block__content {
  width: 100%;
}

/* Grid Layout - 3 columns for impact highlight */
.nextdc-impact-highlight-block__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  width: 100%;
}

@media (max-width: 1279.98px) {
  .nextdc-impact-highlight-block__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 767.98px) {
  .nextdc-impact-highlight-block__grid {
    grid-template-columns: 1fr;
  }
}

/* Card */
.nextdc-impact-highlight-block__card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  cursor: pointer;
  aspect-ratio: 88 / 79;
  @media (max-width: 767.98px) {
    aspect-ratio: 186 / 221;
  }
}

/* Card Image */
.nextdc-impact-highlight-block__card-image {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.nextdc-impact-highlight-block__card-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 1s ease-in-out;
  aspect-ratio: 4 / 3;
}

.nextdc-impact-highlight-block__card:hover .nextdc-impact-highlight-block__card-image img {
  transform: scale(1.05);
}

/* Card Content - positioned at bottom, expands upward on hover */
.nextdc-impact-highlight-block__card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #201850;
  color: #ffffff;
  padding: 19px;
  overflow: hidden;
  transition: padding 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transform-origin: bottom;
}

@media (max-width: 767.98px) {
  .nextdc-impact-highlight-block__card-content {
    padding: 24px;
    position: relative;
    align-items: center;
  }
  
  .nextdc-impact-highlight-block__card {
    cursor: default;
  }
  
  .nextdc-impact-highlight-block__card-image img {
    transform: none;
  }
}

.nextdc-impact-highlight-block__card-content-inner {
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  display: flex;
  flex-direction: column;
  text-align: center;
}

/* Card Title */
.nextdc-impact-highlight-block__card-title {
  font-family: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 120%;
  letter-spacing: 0.032em;
  color: #ffffff;
  margin: 0;
  transition: margin-bottom 1s ease-in-out;
}


/* Card Body/Description */
.nextdc-impact-highlight-block__card-body {
  margin-top: 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s, 
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s,
              margin-top 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
  transform: translateY(20px);
  visibility: hidden;
}

.nextdc-impact-highlight-block__card-body p {
  font-family: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 140%;
  letter-spacing: 0.032em;
  color: #ffffff;
  margin: 0;
}

@media (max-width: 767.98px) {
  .nextdc-impact-highlight-block__card-body {
    opacity: 1;
    max-height: none;
    margin-top: 12px;
    transform: translateY(0);
    display: block;
    overflow: visible;
  }
}

/* Card CTA */
.nextdc-impact-highlight-block__card-cta {
  margin-top: 0;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s, 
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s,
              margin-top 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
  transform: translateY(20px);
  visibility: hidden;
}

@media (max-width: 767.98px) {
  .nextdc-impact-highlight-block__card-cta {
    opacity: 1;
    max-height: none;
    margin-top: 16px;
    transform: translateY(0);
    display: block;
    overflow: visible;
  }
}

.nextdc-impact-highlight-block__card__cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 130%;
  letter-spacing: 0.032em;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 1s ease-in-out;
}

.nextdc-impact-highlight-block__card__cta-link:hover,
.nextdc-impact-highlight-block__card__cta-link:focus {
  color: #ffffff;
  text-decoration: none;
}

.nextdc-impact-highlight-block__card__cta-link::after {
  content: '';
  display: inline-block;
  width: 22px;
  height: 20px;
  margin-left: 8px;
  background-image: url('/themes/custom/nextdc/images/arrow-right.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  transition: transform 1s ease-in-out;
}

.nextdc-impact-highlight-block__card__cta-link:hover::after {
  transform: translateX(4px);
}



@media (max-width: 767.98px) {
  
  .nextdc-impact-highlight-block__card:hover .nextdc-impact-highlight-block__card-image img {
    transform: none;
  }
}

.nextdc-impact-highlight-block__card:hover .nextdc-impact-highlight-block__card-content-inner {
  transform: translateY(0);
}

.nextdc-impact-highlight-block__card:hover .nextdc-impact-highlight-block__card-body {
  opacity: 1;
  max-height: 200px;
  margin-top: 12px;
  transform: translateY(0);
  visibility: visible;
}

.nextdc-impact-highlight-block__card:hover .nextdc-impact-highlight-block__card-cta {
  opacity: 1;
  max-height: 100px;
  margin-top: 16px;
  transform: translateY(0);
  visibility: visible;
}

/* Focus state for accessibility */
.nextdc-impact-highlight-block__card:focus-within .nextdc-impact-highlight-block__card-content {
  padding-top: 32px;
  padding-bottom: 24px;
  padding-left: 19px;
  padding-right: 19px;
}

.nextdc-impact-highlight-block__card:focus-within .nextdc-impact-highlight-block__card-body {
  opacity: 1;
  max-height: 200px;
  margin-top: 12px;
  transform: translateY(0);
  visibility: visible;
}

.nextdc-impact-highlight-block__card:focus-within .nextdc-impact-highlight-block__card-cta {
  opacity: 1;
  max-height: 100px;
  margin-top: 16px;
  transform: translateY(0);
  visibility: visible;
}

img.nextdc-impact-highlight-block{
  padding: 0 !important;
}