.expandable-cards-widget * {
  box-sizing: border-box;
}

.expandable-cards-widget .boe-container {
  display: flex;
  width: 100%;
  min-height: 500px;
  gap: 20px;
  padding: 0;
}

.expandable-cards-widget .boe-item {
  flex: 0 0 63px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat;
  background-blend-mode: multiply !important;
  opacity: 0.5;
}



.expandable-cards-widget .boe-item.active {
  flex: 1;
  padding: 30px;
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.expandable-cards-widget .boe-item .boe-item-header {
  justify-content: flex-end;
  align-items: flex-start;
  flex-direction: column;
  z-index: 5;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.expandable-cards-widget .boe-item.active .boe-item-header {
  height: auto;
}


.expandable-cards-widget .boe-item.active .boe-item-title {
  transform: rotate(0deg);
  writing-mode: horizontal-tb;
  text-orientation: initial;
  font-size: 20px;
  margin-top: 16px;
  margin-bottom: 0;
  text-align: left;
  background: linear-gradient(90deg, #FF4DD6 0%, #748DFF 100%);
    background-clip: border-box;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent !important;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.expandable-cards-widget .boe-item.active .boe-item-content {
  opacity: 1;
  visibility: visible;
  background: transparent;
  height: auto;
  overflow: visible;
  z-index: 4;
}

.expandable-cards-widget .boe-item:not(.active) .boe-item-header {
  position: relative !important;
  justify-content: flex-end !important;
  align-items: center !important;
  flex-direction: column !important;
  padding: 20px 10px !important;
}

.expandable-cards-widget .boe-item-title-wrapper {
  position: relative;
  z-index: 2;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.expandable-cards-widget .boe-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  writing-mode: sideways-lr;
  text-orientation: mixed;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.expandable-cards-widget .boe-item:not(.active) .boe-item-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  pointer-events: none;
  height: 0;
  overflow: hidden;
  padding: 40px 40px 40px 40px;
}


.expandable-cards-widget .boe-item-description {
  font-size: 16px;
  color: #ffffff;
  line-height: 1.5;
  margin: 0;
  opacity: 0.9;
}

.expandable-cards-widget .boe-item:nth-child(1) {
  background: linear-gradient(45deg, #667eea, #764ba2);
}

.expandable-cards-widget .boe-item:nth-child(1) .boe-item-header {
  background: transparent;
}

.expandable-cards-widget .boe-item:nth-child(2) {
  background: linear-gradient(45deg, #f093fb, #f5576c);
}

.expandable-cards-widget .boe-item:nth-child(2) .boe-item-header {
  background: transparent;
}

.expandable-cards-widget .boe-item:nth-child(3) {
  background: linear-gradient(45deg, #4facfe, #00f2fe);
}

.expandable-cards-widget .boe-item:nth-child(3) .boe-item-header {
  background: transparent;
}

.expandable-cards-widget .boe-item:nth-child(4) {
  background: linear-gradient(45deg, #43e97b, #38f9d7);
}

.expandable-cards-widget .boe-item:nth-child(4) .boe-item-header {
  background: transparent;
}

.expandable-cards-widget .boe-item:nth-child(5) {
  background: linear-gradient(45deg, #fa709a, #fee140);
}

.expandable-cards-widget .boe-item:nth-child(5) .boe-item-header {
  background: transparent;
}

.expandable-cards-widget .boe-item-header {
  outline: none;
}

.expandable-cards-widget .boe-item:hover,
  .expandable-cards-widget .boe-item.active {
    opacity: 1;
  }


@media (max-width: 768px) {
  .expandable-cards-widget .boe-container {
    flex-direction: column;
    min-height: auto;
    gap: 10px;
  }

  .expandable-cards-widget .boe-item:hover {
    flex: none;
  }

  .expandable-cards-widget .boe-item.active {
    flex: none;
  }

  .expandable-cards-widget .boe-item.active .boe-item-header {
    position: static;
    padding: 0;
  }

  .expandable-cards-widget .boe-item.active .boe-item-content {
    opacity: 1;
    max-height: 200px;
    padding: 0;
  }

  .expandable-cards-widget .boe-item-description {
    font-size: 0.85rem;
    padding: 20px 0;
  }

  .expandable-cards-widget .boe-item-content {
    position: static;
    transform: none;
    opacity: 0;
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
    transition: all 0.3s ease;
  }

  .expandable-cards-widget .boe-item {
    flex: none;
    min-height: 80px;
  }
  .expandable-cards-widget .boe-item:hover,
  .expandable-cards-widget .boe-item.active {
    flex: none;
  }
  
  .expandable-cards-widget .boe-item-header {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    min-height: 80px;
  }
  .expandable-cards-widget .boe-item:not(.active) .boe-item-header {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 20px !important;
  }
  .expandable-cards-widget .boe-item-title-wrapper {
    flex: 1;
  }
  .expandable-cards-widget .boe-item-title {
    text-orientation: initial;
    font-size: 0.9rem;
    transform: none;
    writing-mode: horizontal-tb;
  }
}
