.ay-cards-desplegables {
  --ay-cd-expanded: 2.15;
  --ay-cd-collapsed: 1;
  --ay-cd-description-spacing: 18px;
  --ay-cd-mobile-card-width: 80%;
  --ay-cd-arrow-top: 50%;
  --ay-cd-arrow-side: 12px;
  width: 100%;
  position: relative;
}

.ay-cards-desplegables,
.ay-cards-desplegables * {
  box-sizing: border-box;
}

.ay-cards-desplegables__list {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.ay-cards-desplegables__item {
  position: relative;
  flex: var(--ay-cd-collapsed) 1 0;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
  min-width: 0;
  background: #111;
  transition: flex-grow 420ms ease, transform 420ms ease, box-shadow 420ms ease;
  outline: none;
}

.ay-cards-desplegables__item.is-active,
.ay-cards-desplegables__item:focus-within,
.ay-cards-desplegables__item:focus {
  flex-grow: var(--ay-cd-expanded);
}

.ay-cards-desplegables--hover .ay-cards-desplegables__item:hover {
  flex-grow: var(--ay-cd-expanded);
}

.ay-cards-desplegables--hover .ay-cards-desplegables__list:hover .ay-cards-desplegables__item.is-active:not(:hover) {
  flex-grow: var(--ay-cd-collapsed);
}

.ay-cards-desplegables__bg,
.ay-cards-desplegables__overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.ay-cards-desplegables__bg {
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform 620ms ease;
}

.ay-cards-desplegables--zoom .ay-cards-desplegables__item:hover .ay-cards-desplegables__bg,
.ay-cards-desplegables--zoom .ay-cards-desplegables__item.is-active .ay-cards-desplegables__bg,
.ay-cards-desplegables--zoom .ay-cards-desplegables__item:focus-within .ay-cards-desplegables__bg {
  transform: scale(1.055);
}

.ay-cards-desplegables__overlay {
  background: #000;
  opacity: .25;
  transition: opacity 320ms ease;
  pointer-events: none;
}

.ay-cards-desplegables__content {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-width: 0;
}

.ay-cards-desplegables__title {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1.05;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.ay-cards-desplegables__description {
  margin: 0 0 var(--ay-cd-description-spacing, 18px);
  color: #fff;
  font-size: 16px;
  line-height: 1.45;
  max-width: 520px;
  transition: opacity 260ms ease, transform 260ms ease, max-height 320ms ease, margin-bottom 260ms ease;
}

.ay-cards-desplegables--desc-hover .ay-cards-desplegables__description {
  opacity: 0;
  max-height: 0;
  margin-bottom: 0;
  overflow: hidden;
  transform: translateY(8px);
}

.ay-cards-desplegables--desc-hover .ay-cards-desplegables__item:hover .ay-cards-desplegables__description,
.ay-cards-desplegables--desc-hover .ay-cards-desplegables__item:focus .ay-cards-desplegables__description,
.ay-cards-desplegables--desc-hover .ay-cards-desplegables__item:focus-within .ay-cards-desplegables__description,
.ay-cards-desplegables--desc-hover.ay-cards-desplegables--click .ay-cards-desplegables__item.is-active .ay-cards-desplegables__description {
  opacity: 1;
  max-height: 320px;
  margin-bottom: var(--ay-cd-description-spacing, 18px);
  transform: translateY(0);
}

.ay-cards-desplegables__description p {
  margin: 0;
}

.ay-cards-desplegables__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-decoration: none !important;
  border: 0;
  line-height: 1.2;
  transition: color 220ms ease, background-color 220ms ease, transform 220ms ease;
}

.ay-cards-desplegables__button:hover,
.ay-cards-desplegables__button:focus {
  transform: translateY(-1px);
}

.ay-cards-desplegables__nav {
  display: none;
}

.ay-cards-desplegables__arrow {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111;
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  transition: transform 220ms ease, opacity 220ms ease, background-color 220ms ease, color 220ms ease;
}

.ay-cards-desplegables__arrow:hover,
.ay-cards-desplegables__arrow:focus {
  transform: scale(1.04);
}

.ay-cards-desplegables__arrow svg {
  display: block;
  width: 24px;
  height: 24px;
  pointer-events: none;
}

@media (max-width: 767px) {
  .ay-cards-desplegables__list {
    gap: 16px;
  }

  .ay-cards-desplegables--mobile-stack .ay-cards-desplegables__list {
    flex-direction: column;
  }

  .ay-cards-desplegables--mobile-stack .ay-cards-desplegables__item,
  .ay-cards-desplegables--mobile-stack .ay-cards-desplegables__item.is-active,
  .ay-cards-desplegables--mobile-stack .ay-cards-desplegables__item:hover,
  .ay-cards-desplegables--mobile-stack .ay-cards-desplegables__item:focus {
    flex: none;
    width: 100%;
  }

  .ay-cards-desplegables--mobile-scroll .ay-cards-desplegables__list,
  .ay-cards-desplegables--mobile-carousel .ay-cards-desplegables__list {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .ay-cards-desplegables--mobile-scroll .ay-cards-desplegables__list::-webkit-scrollbar,
  .ay-cards-desplegables--mobile-carousel .ay-cards-desplegables__list::-webkit-scrollbar {
    display: none;
  }

  .ay-cards-desplegables--mobile-scroll .ay-cards-desplegables__item,
  .ay-cards-desplegables--mobile-scroll .ay-cards-desplegables__item.is-active,
  .ay-cards-desplegables--mobile-scroll .ay-cards-desplegables__item:hover,
  .ay-cards-desplegables--mobile-scroll .ay-cards-desplegables__item:focus {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }

  .ay-cards-desplegables--mobile-carousel .ay-cards-desplegables__item,
  .ay-cards-desplegables--mobile-carousel .ay-cards-desplegables__item.is-active,
  .ay-cards-desplegables--mobile-carousel .ay-cards-desplegables__item:hover,
  .ay-cards-desplegables--mobile-carousel .ay-cards-desplegables__item:focus {
    flex: 0 0 var(--ay-cd-mobile-card-width, 80%);
    scroll-snap-align: start;
  }

  .ay-cards-desplegables--mobile-carousel .ay-cards-desplegables__nav {
    position: absolute;
    z-index: 5;
    left: var(--ay-cd-arrow-side, 12px);
    right: var(--ay-cd-arrow-side, 12px);
    top: var(--ay-cd-arrow-top, 50%);
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
  }

  .ay-cards-desplegables--mobile-carousel .ay-cards-desplegables__arrow {
    pointer-events: auto;
  }
}
