/* Tailwind CSS v3 */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom CSS - pentru compatibilitate cu configurația din tailwind.config.js */

/* Timeline Styles -  Style */
.timeline-container {
  position: relative;
  padding: 3rem 0;
}

/* Hide default line - we create it with JS */
.timeline-container::before {
  display: none;
}

.timeline-item {
  position: relative;
  padding: 2.5rem 0;
}

.timeline-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: #fff;
  border: 3px solid #642270;
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 1);
  z-index: 20;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Inner dot for scale animations */
.timeline-dot-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #642270;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline-item[data-animated="true"] .timeline-dot::after {
  opacity: 1;
}

/* Active dot styling when progress line reaches it */
.timeline-dot-active {
  background: #642270 !important;
  border-color: #642270 !important;
}

.timeline-dot-active::after {
  opacity: 1 !important;
  background: #fff !important;
}

/* Pulse animation for active dots using box-shadow only */
.timeline-dot-active {
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0% {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 1), 0 0 0 0 rgba(100, 34, 112, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 1),
      0 0 0 20px rgba(100, 34, 112, 0.15);
  }
  100% {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 1), 0 0 0 0 rgba(100, 34, 112, 0);
  }
}

/* Smooth transition for dot state changes */
.timeline-dot {
  transition: background-color 0.3s ease, border-color 0.3s ease,
    opacity 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 768px) {
  .timeline-dot {
    left: 20px;
  }
}

.timeline-content {
  width: calc(50% - 50px);
  padding: 1.5rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
  text-align: left;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-right: auto;
  text-align: right;
}

.timeline-item:nth-child(even) .timeline-year {
  text-align: right;
}

@media (max-width: 768px) {
  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px !important;
    text-align: left !important;
  }

  .timeline-item:nth-child(even) .timeline-content {
    margin-right: 0 !important;
  }

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

  .timeline-item {
    padding: 1em 0;
  }
}

.timeline-year {
  color: #642270;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.timeline-description {
  color: #4b5563;
  line-height: 1.7;
  font-size: 1rem;
}

/* Timeline visible state */
.timeline-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* Ensure timeline container has min-height */
.timeline-container {
  min-height: 300px;
}

/* Timeline progress line */
.timeline-progress {
  pointer-events: none;
}

.timeline-progress-line {
  pointer-events: none;
}

/* Hover effects for timeline items */
.timeline-content {
  cursor: pointer;
  transition: all 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(100, 34, 112, 0.15);
}

.timeline-dot {
  transition: all 0.3s ease;
}

.timeline-content:hover ~ .timeline-dot,
.timeline-dot:hover {
  transform: scale(1.3);
  box-shadow: 0 0 0 10px rgba(100, 34, 112, 0.1);
}

/* Active timeline items */
.timeline-item[data-animated="true"] .timeline-dot {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(100, 34, 112, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(100, 34, 112, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(100, 34, 112, 0);
  }
}
