/**
 * Стили для вертикального таймлайна опыта работы
 * Чередующиеся элементы слева и справа от центральной линии
 */

/* ===== СЕКЦИЯ ОПЫТА РАБОТЫ ===== */
.experience-section {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  min-height: fit-content;
  padding: 40px 20px;
}

/* ===== КОНТЕЙНЕР ТАЙМЛАЙНА ===== */
.experience-timeline-container {
  max-width: 1200px;
  width: 100%;
  position: relative;
  padding: 40px 0;
}

/* ===== ЦЕНТРАЛЬНАЯ ЛИНИЯ ТАЙМЛАЙНА ===== */
.experience-timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    rgba(208, 200, 150, 0.3) 0%,
    rgba(208, 200, 150, 0.8) 50%,
    rgba(208, 200, 150, 0.3) 100%
  );
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(208, 200, 150, 0.5);
  z-index: 1;
}

/* ===== ЭЛЕМЕНТЫ ТАЙМЛАЙНА ===== */
.experience-timeline-items {
  position: relative;
  z-index: 2;
}

.experience-item {
  position: relative;
  margin-bottom: 80px;
  width: 100%;
  display: flex;
  align-items: flex-start;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.experience-item:nth-child(1) {
  animation-delay: 0.1s;
}

.experience-item:nth-child(2) {
  animation-delay: 0.3s;
}

.experience-item:nth-child(3) {
  animation-delay: 0.5s;
}

.experience-item:nth-child(4) {
  animation-delay: 0.7s;
}

.experience-item:last-child {
  margin-bottom: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ЧЕРЕДОВАНИЕ ЭЛЕМЕНТОВ СЛЕВА/СПРАВА ===== */
.experience-item:nth-child(odd) {
  flex-direction: row;
}

.experience-item:nth-child(even) {
  flex-direction: row-reverse;
}

/* ===== СОДЕРЖИМОЕ КАРТОЧКИ ОПЫТА ===== */
.experience-item-content {
  width: calc(50% - 40px);
  background: rgba(16, 41, 48, 0.9);
  border-radius: 15px;
  padding: 30px;
  border: 2px solid rgba(208, 200, 150, 0.3);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  position: relative;
}

/* ===== КНОПКА ПОДРОБНЕЕ ===== */
.experience-details-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #d0c896;
  background-image: url('../assets/images/ui/expand.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 50%;
  border: none;
  color: #0e1b21;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 0;
}

.experience-details-btn:hover {
  background: #b8a882;
  background-image: url('../assets/images/ui/expand.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 60%;
}

.details-icon {
  display: block;
  transition: transform 0.3s ease;
}

.experience-details-btn:hover .details-icon {
  transform: rotate(90deg);
}

.experience-item:nth-child(odd) .experience-item-content {
  margin-right: 40px;
}

.experience-item:nth-child(even) .experience-item-content {
  margin-left: 40px;
}

.experience-item-content:hover {
  border-color: #d0c896;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(208, 200, 150, 0.2);
}

/* ===== ТОЧКА НА ЛИНИИ ===== */
.experience-item-point {
  position: absolute;
  left: 50%;
  top: 20px;
  width: 20px;
  height: 20px;
  background: #d0c896;
  border: 4px solid rgba(16, 41, 48, 0.9);
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 3;
  box-shadow: 0 0 15px rgba(208, 200, 150, 0.8);
  transition: all 0.3s ease;
}

.experience-item:hover .experience-item-point {
  transform: translateX(-50%) scale(1.3);
  box-shadow: 0 0 25px rgba(208, 200, 150, 1);
}

/* ===== ПЕРИОД РАБОТЫ ===== */
.experience-period {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 15px;
}

.experience-period-date {
  font-family: 'Besom-2';
  font-size: 1.2rem;
  color: #d0c896;
  margin: 0;
}

.experience-period-duration {
  font-family: 'BellotaText';
  font-size: 0.9rem;
  color: rgba(208, 200, 150, 0.7);
  margin: 0;
}

/* ===== НАЗВАНИЕ КОМПАНИИ ===== */
.experience-company {
  font-family: 'Besom-2';
  font-size: 1.8rem;
  color: #d0c896;
  margin: 0 0 10px 0;
}

/* ===== ГОРОД ===== */
.experience-location {
  font-family: 'BellotaText';
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 15px 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ===== ДОЛЖНОСТЬ ===== */
.experience-position {
  font-family: 'Besom-2';
  font-size: 1.3rem;
  color: #d0c896;
  margin: 0;
}

/* ===== МОДАЛЬНОЕ ОКНО ОПЫТА ===== */
.experience-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.experience-modal.active {
  display: flex;
  opacity: 1;
}

.experience-modal .modal-body {
  grid-template-columns: 1fr;
  overflow-y: auto;
}

.experience-modal-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
  font-family: 'BellotaText';
}

.experience-modal-section {
  background: rgba(0, 0, 0, 0.2);
  padding: 20px;
  border-radius: 10px;
  border-left: 4px solid #d0c896;
}

.experience-modal-section h3 {
  color: #d0c896;
  margin: 0 0 15px 0;
  font-size: 1.2rem;
  font-family: 'Besom-2';
}

.experience-modal-section p {
  color: #ffffff;
  line-height: 1.6;
  margin: 0 0 10px 0;
  font-family: 'BellotaText';
}

.experience-modal-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.experience-modal-section li {
  color: #ffffff;
  padding: 8px 0;
  position: relative;
  padding-left: 25px;
  font-family: 'BellotaText';
  font-size: 0.95rem;
  line-height: 1.6;
}

.experience-modal-section li::before {
  content: '▶';
  color: #d0c896;
  position: absolute;
  left: 0;
  font-size: 0.8rem;
}

.experience-modal-tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.experience-modal-tech-tag {
  background: rgba(208, 200, 150, 0.2);
  color: #d0c896;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 1rem;
  font-family: 'BellotaText';
  border: 1px solid rgba(208, 200, 150, 0.3);
}

/* ===== АДАПТИВНОСТЬ ДЛЯ ПЛАНШЕТОВ ===== */
@media (max-width: 1024px) {
  .experience-item-content {
    width: calc(50% - 30px);
    padding: 25px;
  }

  .experience-item:nth-child(odd) .experience-item-content {
    margin-right: 30px;
  }

  .experience-item:nth-child(even) .experience-item-content {
    margin-left: 30px;
  }

  .experience-company {
    font-size: 1.5rem;
  }

  .experience-position {
    font-size: 1.1rem;
  }
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
  .experience-section {
    padding: 20px 10px;
  }

  .experience-timeline-container {
    padding: 20px 0;
  }

  /* На мобильных - все элементы слева */
  .experience-item {
    flex-direction: row !important;
    margin-bottom: 60px;
  }

  .experience-item-content {
    width: calc(100% - 50px);
    margin-left: 50px !important;
    margin-right: 0 !important;
    padding: 20px;
  }

  .experience-item-point {
    left: 20px;
    width: 16px;
    height: 16px;
    transform: translateX(-50%);
  }

  .experience-timeline-line {
    left: 20px;
    width: 3px;
  }

  .experience-period-date {
    font-size: 1rem;
  }

  .experience-company {
    font-size: 1.3rem;
  }

  .experience-position {
    font-size: 1rem;
  }

  .experience-responsibilities li {
    font-size: 0.9rem;
    padding-left: 20px;
  }
}

/* ===== ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ ===== */
@media (max-width: 480px) {
  .experience-item-content {
    padding: 15px;
    width: calc(100% - 40px);
    margin-left: 40px !important;
  }

  .experience-details-btn {
    width: 30px;
    height: 30px;
    font-size: 1rem;
    top: 10px;
    right: 10px;
  }

  .experience-item-point {
    left: 15px;
    width: 14px;
    height: 14px;
  }

  .experience-timeline-line {
    left: 15px;
    width: 2px;
  }

  .experience-company {
    font-size: 1.1rem;
  }

  .experience-position {
    font-size: 0.95rem;
  }

  .experience-responsibilities li {
    font-size: 0.85rem;
  }

  .experience-tech-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  .experience-modal .modal-body {
    padding: 15px;
  }

  .experience-modal-section {
    padding: 15px;
  }
}
