.stacked-cards-wrapper {
  position: relative;
}

.stacked-cards-wrapper > h2 {
  margin-bottom: var(--space-l);
}

.stacked-cards-wrapper > p {
  margin-bottom: var(--space-l);
}

.stacked-cards {
  width: 100%;
  max-width: var(--max-content-width);
  height: auto;
  display: block;
}

.stacked-cards .stacked-card {
  width: 100%;
  height: 156px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  transform-origin: 50%;
  display: flex;
  justify-content: space-between;
  background-color: transparent;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.stacked-cards .stacked-card a {
  text-decoration: none;
}

.stacked-cards .stacked-card .stacked-card-text {
  width: 100%;
  padding: var(--space-m);
  display: flex;
  flex-direction: column;
}

.stacked-cards .stacked-card .stacked-card-text .stacked-card-text-top {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 100%;
  align-items: center;
}

.stacked-cards .stacked-card .stacked-card-text .stacked-card-title {
  color: var(--grey-disabled);
  font-size: 1.5rem;
}

.stacked-cards .stacked-card:not(.active) .stacked-card-description {
  display: none;
}

.stacked-cards .stacked-card:not(.active) .stacked-card-title-button {
  display: none;
}

.stacked-cards .stacked-card .stacked-card-image-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  transition: width 0.3s ease-in-out, background-position 0.3s ease-in-out, background-size 0.3s ease-in-out;
  transform-origin: 50%;
}

.stacked-cards .stacked-card .stacked-card-image {
  width: 100%;
  height: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  transition: all 0.3s ease-in-out;
  transform-origin: 50%;
}

.stacked-cards .stacked-card .stacked-card-image.border-radius-top {
  border-radius: 16px 16px 0 0;
}

.stacked-cards .stacked-card .stacked-card-image.border-radius-bottom {
  border-radius: 0 0 16px 16px;
}

.stacked-cards .stacked-card .stacked-card-image.border-radius-full {
  border-radius: 16px;
}


/* Card active */


.stacked-cards .stacked-card.active {
  min-height: 156px;
  height: 298px; {# 548px; #} 
  background-color: #fff;
  box-shadow: var(--card-default-shadow);
  margin-top: calc(var(--space-xs) / 2);
  margin-bottom: calc(var(--space-xs) / 2);
  border-radius: var(--main-border-radius);
  position: relative;
  transition: box-shadow 0.3s ease-in-out;
}

.stacked-cards .stacked-card.active:hover {
  box-shadow: var(--card-active-shadow);
}

.stacked-cards .stacked-card.active .stacked-card-text {
  padding: var(--space-m) var(--space-l) var(--space-l);
}

.stacked-cards .stacked-card.active .stacked-card-text .stacked-card-title {
  color: var(--black-color);
  font-size: 2rem;
  padding-right: 1rem;
}

.stacked-cards .stacked-card.active .stacked-card-description .stacked-card-description-item {
  border-bottom: 1px solid var(--grey-lines);
  padding: var(--space-m) 0 var(--space-s) 0;
}

.stacked-cards .stacked-card.active .stacked-card-description .stacked-card-description-item a {
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  padding: 4px 12px;
  margin-left: -12px;
  transition: all 0.3s ease-in-out;
  /* transition: var(--button-link-transition); */
  border-radius: var(--buttons-border-radius);
}

.stacked-cards .stacked-card.active .stacked-card-description .stacked-card-description-item a:hover {
  background-color: var(--button-link-hover-color);
  border-radius: var(--buttons-border-radius);
}

.stacked-cards .stacked-card.active .stacked-card-image-wrapper {
  margin-top: 0;
  margin-bottom: 0;
  min-width: 790px;
  max-width: 790px;
  width: 100%;
  transition: all 0.3s ease-in-out, width 0.1s ease-in-out;
  transform-origin: 50%;
}

.stacked-cards .stacked-card.active .stacked-card-image {
  background-size: cover;
}
  
.stacked-card-image-button {
  display: none;
}


/* Mobile */


@media(max-width: 1280px) {
  .stacked-cards .stacked-card .stacked-card-image-wrapper {
    min-width: unset;
    width: 100%;
  }
}


@media(max-width: 960px) {
  .stacked-cards .stacked-card {
    flex-direction: column-reverse;
  }
  
  .stacked-cards .stacked-card.active {
    height: 100%;
  }
  
  .stacked-cards .stacked-card .stacked-card-text {
    padding: 2rem;
  }
  
  .stacked-cards .stacked-card.active .stacked-card-text {
    padding: var(--space-m);
  }
  
  .stacked-cards .stacked-card.active .stacked-card-text h2 {
    margin-top: 0;
  }

  .stacked-cards .stacked-card .stacked-card-image-wrapper,
  .stacked-cards .stacked-card .stacked-card-image {
    border-radius: 16px 16px 0 0 !important;
  }

  .stacked-cards .stacked-card .stacked-card-image {
    height: 240px;
    position: relative;
  }
  
  .stacked-cards .stacked-card .stacked-card-image-wrapper {
    max-width: 960px !important;
  }
  
  .stacked-cards .stacked-card:not(.active) {
    box-shadow: var(--card-default-shadow);
    border-radius: var(--main-border-radius);
    background-color: var(--white-color);
    height: auto;
  }

  .stacked-cards .stacked-card:not(.active) .stacked-card-image-wrapper {
    display: none;
  }
  
  .stacked-card-title-button {
    display: none;
  }
  
  .stacked-card-image-button {
    display: flex;
    justify-content: flex-start;
    align-items: flex-end;
    height: 100%;
    padding: var(--space-s);
  }
}

