.benefits-section {
  --benefits-gray-bg: var(--color-gray-bg, #e4e7ea);
  background-color: var(--benefits-gray-bg);
  overflow: hidden;
}

.benefits-section .benefits-slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% + 240px);
  max-width: none;
  min-height: 280px;
  height: 280px;
  margin-right: -120px;
  margin-left: -120px;
  overflow: hidden;
  background-color: #002633;
  background-image: url('/wp-content/themes/vialietuva/assets/images/karjera/pixel-back.png'),
    linear-gradient(90deg, #005063 0%, #002633 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: 100% 100%, 100% 100%;
}

.benefits-section .elementor-element:not(:where(.benefits-section, .benefits-container)),
.benefits-section .elementor-widget-container {
  padding: 0;
  margin: 0;
  min-width: 0;
  box-sizing: border-box;
}

.benefits-section .benefits-bg-layer {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background-color: #002633;
  background-image: url('/wp-content/themes/vialietuva/assets/images/karjera/pixel-back.png'),
    linear-gradient(90deg, #005063 0%, #002633 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size: 100% 100%, 100% 100%;
}

.benefits-section .benefits-bg-gradient,
.benefits-section .benefits-bg-image {
  display: none;
}

.benefits-section .benefits-cards {
  position: relative;
  z-index: 2;
}

.benefits-section .benefit-card {
  box-sizing: border-box;
  flex: 0 1 0%;
  min-width: 0;
  overflow: hidden;
  border: 0;
  cursor: pointer;
  transition: flex-grow 0.4s cubic-bezier(0.25, 1, 0.5, 1),
    flex 0.4s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s ease;
}

.benefits-section .benefit-card:active {
  background-color: #003542;
}

.benefits-section .benefit-content {
  display: flex;
  flex-direction: column;
}

.benefits-section .benefit-icon {
  flex-shrink: 0;
}

.benefits-section .benefit-icon img {
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.benefits-section .benefit-title {
  white-space: normal;
  transition: max-width 0.35s ease, width 0.35s ease;
}

.benefits-section .benefit-card.active .benefit-title,
.benefits-section .benefit-card:hover .benefit-title {
  white-space: normal;
}

.benefits-section .benefit-toggle {
  display: none;
}

.benefits-section .benefit-desc {
  display: block;
  max-height: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease 0.05s,
    max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), margin-top 0.3s ease;
}

.benefits-section .benefit-card.active .benefit-desc,
.benefits-section .benefit-card:hover .benefit-desc {
  max-height: 240px;
  margin-top: 8px;
  opacity: 1;
  pointer-events: auto;
  white-space: normal;
}

@media (max-width: 1024px) {
  .benefits-section .benefits-container {
    max-width: 100%;
  }

  .benefits-section .benefits-header {
    padding-right: 20px;
    padding-left: 20px;
  }

  .benefits-section .benefits-slider-wrapper {
    width: 100%;
    height: auto;
    min-height: 0;
    margin-right: 0;
    margin-left: 0;
    padding-right: 20px;
    padding-left: 20px;
    box-sizing: border-box;
    overflow: visible;
    background-repeat: repeat, no-repeat;
    background-size: auto 100%, 100% 100%;
  }

  .benefits-section .benefits-bg-layer,
  .benefits-section .benefits-bg-gradient,
  .benefits-section .benefits-bg-image {
    display: none;
  }

  .benefits-section .benefits-cards {
    overflow: hidden;
  }

  .benefits-section .benefit-card {
    flex: none;
    width: 100%;
    min-height: 132px;
    height: auto;
    overflow: visible;
    position: relative;
    transition: background-color 0.2s ease;
  }

  .benefits-section .benefit-card:nth-child(even) {
    min-height: 160px;
  }

  .benefits-section .benefit-card:nth-child(3),
  .benefits-section .benefit-card:nth-child(5) {
    min-height: 132px;
  }

  .benefits-section .benefit-card:first-child.active {
    min-height: 186px;
  }

  .benefits-section .benefit-desc {
    display: none;
    margin-top: 10px;
    color: #fff;
    text-align: left;
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .benefits-section .benefit-card.active .benefit-desc {
    display: block;
    opacity: 1;
  }

  .benefits-section .benefit-toggle {
    position: absolute;
    z-index: 5;
    top: 50%;
    right: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    transform: translateY(-50%);
    pointer-events: none;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
      transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .benefits-section .benefit-toggle .elementor-widget-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
  }

  .benefits-section .benefit-toggle-icon {
    display: block;
    width: 28px;
    height: 28px;
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .benefits-section .benefit-card.active .benefit-toggle {
    top: 32px;
    transform: none;
  }

  .benefits-section .benefit-card.active .benefit-toggle-icon {
    transform: rotate(45deg);
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .benefits-section .benefits-container {
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (min-width: 1025px) {
  .benefits-section .benefits-slider-wrapper > .elementor-widget-vialietuva_benefits_tabs {
    width: min(1150px, calc(100% - 240px));
    max-width: 1150px;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (min-width: 1441px) {
  .benefits-section .benefits-container {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
  }

  .benefits-section .benefits-header {
    width: 100%;
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
  }

  .benefits-section .benefits-slider-wrapper {
    width: calc(100% + 240px);
    margin-right: -120px;
    margin-left: -120px;
  }

}
