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

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

.expandable-project-cards-widget .project-card-link {
  flex: 0 0 63px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.5;
}

.expandable-project-cards-widget .project-card {
  height: 100%;
  width: 100%;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat;
  background-blend-mode: multiply !important;
  border-radius: 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  flex-direction: column;
  padding: 20px;
}

.expandable-project-cards-widget .project-card-link.active {
  flex: 1;
  opacity: 1;
}

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

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

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

.expandable-project-cards-widget .project-card-link:hover .project-card-title,
.expandable-project-cards-widget .project-card-link.active .project-card-title {
  transform: rotate(0deg);
  writing-mode: horizontal-tb;
  text-orientation: initial;
  font-size: 20px;
  margin-bottom: 10px;
  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-project-cards-widget .project-card-content {
  opacity: 0;
  visibility: hidden;
  transform: translateY(100%);
  pointer-events: none;
  height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.expandable-project-cards-widget .project-card-link.active .project-card-content {
  opacity: 1;
  visibility: visible;
  background: transparent;
  height: auto;
  overflow: visible;
  z-index: 4;
  transform: none;
}

.expandable-project-cards-widget .project-card-description {
  font-size: 16px;
  color: #ffffff;
  line-height: 1.5;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  opacity: 0.9;
}

.expandable-project-cards-widget .project-card-link:nth-child(1) .project-card:not([style*="background"]) {
  background: linear-gradient(45deg, #667eea, #764ba2);
}

.expandable-project-cards-widget .project-card-link:nth-child(2) .project-card:not([style*="background"]) {
  background: linear-gradient(45deg, #f093fb, #f5576c);
}

.expandable-project-cards-widget .project-card-link:nth-child(3) .project-card:not([style*="background"]) {
  background: linear-gradient(45deg, #4facfe, #00f2fe);
}

.expandable-project-cards-widget .project-card-link:nth-child(4) .project-card:not([style*="background"]) {
  background: linear-gradient(45deg, #43e97b, #38f9d7);
}

.expandable-project-cards-widget .project-card-link:nth-child(5) .project-card:not([style*="background"]) {
  background: linear-gradient(45deg, #fa709a, #fee140);
}

.expandable-project-cards-widget .project-card-link:hover,
.expandable-project-cards-widget .project-card-link.active {
  opacity: 1;
}

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

  .expandable-project-cards-widget .project-card-link {
    flex: none;
    min-height: 80px;
  }

  .expandable-project-cards-widget .project-card-link:hover,
  .expandable-project-cards-widget .project-card-link.active {
    flex: none;
  }

  .expandable-project-cards-widget .project-card-link.active .project-card::before {
    content: '';
    position: absolute;
    background: rgba(0, 0, 0, 0.2);
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }

  .expandable-project-cards-widget .project-card-link.active .project-card-header {
    position: static;
    padding: 0;
  }

  .expandable-project-cards-widget .project-card-link.active .project-card-content {
    opacity: 1;
    max-height: 200px;
    padding: 0;
  }

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

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

  .expandable-project-cards-widget .project-card-header {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    min-height: 80px;
  }
  
  .expandable-project-cards-widget .project-card-title-wrapper {
    flex: 1;
  }
  
  .expandable-project-cards-widget .project-card-title {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    font-size: 0.9rem;
    transform: none;
  }

  .expandable-project-cards-widget .project-card-link:not(.active) .project-card-title {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    font-size: 0.9rem;
    transform: none; /* Ensure no transform on mobile */
  }
}