/**
* Company Repeater List – refined visual style
*/

.company-list-wrapper {
  /* No spacing here */
}

.company-list-heading {
  text-transform: uppercase;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 3px;
  color: #6C7A89;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
  padding-left: calc(60px + 1rem); /* for underline offset */
}

.company-list-heading:before {
  content: '';
  position: absolute;
  left: 0;
  top: calc(50% - 1px);
  transform: translateY(-50%);
  width: 60px;
  height: 3px;
  background-color: #6C7A89;
}

@media (max-width: 768px) {
  .company-list-heading {
    padding-left: 0;
    padding-top: 2rem;
  }
  
  .company-list-heading .heading-underline {
    top: 0;
  }
}

.company-list-container {
  display: flex;
  flex-direction: column;
  border-radius: 1rem;
}

.company-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  opacity: 0; /* start invisible */
  transform: translateY(.5rem) scale(0.98); /* start offset */
  animation: fadeSlideUp 0.57s ease-in-out forwards;
  gap: 3rem;
  padding-bottom: 1.35rem;
  padding-top: 1.35rem;
  &:not(:last-child) {
    border-bottom: 1px solid #000;
  }
  &:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    height: 100%;
    width: 100vw;
    background-color: transparent;
    transition: all ease-in-out .21s;
  }
  &:hover {
    &:before {
      background-color: #FAFAFA;
    }
  }
}

.company-name-col {
  flex: 0 0 calc(28% - 1.5rem);
  max-width: calc(28% - 1.5rem);
  position: relative;
}

.company-desc-col {
  flex: 0 0 calc(72% - 1.5rem);
  max-width: calc(72% - 1.5rem);
  position: relative;
}

.company-name {
  font-size: 24px;
  font-weight: 400;
  color: #000;
  line-height: 1.4;
  margin: 0 !important;
}

.company-description {
  font-size: 18px;
  color: #111;
  margin: 0;
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .company-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .company-name-col,
  .company-desc-col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* --- Smooth fade/slide up animation --- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(.5rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* --- Automatic delay assignment for many items --- */
.company-list-item {
  animation-delay: calc(var(--i) * 0.17s); /* incremental delay per item */
}