/* companies-section.css */
.companies-section {
  position: relative;
  overflow: hidden;
  padding: 60px 0;
  background-color: #f8f9fa;
}

.section-title {
  font-weight: 700;
  color: #2c3e50;
  position: relative;
  padding-bottom: 15px;
  font-size: 2rem;
  margin-bottom: 40px;
  text-align: center;
}

.section-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #4e73df;
}

.timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  width: 2px;
  background-color: #e9ecef;
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
  z-index: 1;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  margin-bottom: 30px;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-item.current .timeline-card {
  border: 2px solid #4e73df;
}

.timeline-card {
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 2;
}

.timeline-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.company-logo-container {
  position: relative;
  flex: 0 0 80px;
  display: flex;
  justify-content: center;
}

.company-logo {
  width: 100%;
  height: auto;
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
  border-radius: 8px;
  padding: 8px;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
}

.current-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #4e73df;
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.company-details {
  flex: 1;
  min-width: 0;
}

.company-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2c3e50;
  word-break: break-word;
}

.company-position {
  font-size: 0.95rem;
  color: #4e73df;
  font-weight: 500;
  margin-bottom: 4px;
}

.company-period {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 8px;
  font-style: italic;
}

.view-details {
  transition: all 0.2s ease;
  white-space: nowrap;
}

.view-details:hover {
  background-color: #4e73df;
  color: white;
}

.hidden-item {
  display: none;
}

/* Modal Styles */
.company-modal-content {
  padding: 20px;
}

.company-modal-content img {
  max-height: 100px;
  margin: 0 auto 20px;
  display: block;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .timeline::before {
      left: 40px;
  }
  
  .timeline-item {
      width: 100%;
      padding-left: 80px;
      padding-right: 30px;
      text-align: left !important;
  }
  
  .timeline-item:nth-child(even) {
      left: 0;
  }
}

@media (max-width: 768px) {
  .timeline-card {
      flex-direction: column;
      align-items: center;
      text-align: center;
  }
  
  .company-logo-container {
      margin-bottom: 15px;
  }
  
  .company-details {
      text-align: center;
  }
  
  .section-title {
      font-size: 1.75rem;
  }
}

@media (max-width: 576px) {
  .timeline-item {
      padding-left: 50px;
      padding-right: 15px;
  }
  
  .timeline::before {
      left: 20px;
  }
  
  .company-name {
      font-size: 1.1rem;
  }
  
  .company-position, .company-period {
      font-size: 0.85rem;
  }
}