.timeline-slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

/* Main content layout with glass morphism */
.timeline-content-wrapper {
  display: grid;
  gap: 50px;
  margin-top: 80px;
  z-index: 2;
  border-radius: 20px;
  width: 100%;
  align-items: flex-start;
  grid-template-columns: 0.5fr 1fr;
}

/* Left column - Enhanced Chart */
.timeline-chart-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.timeline-chart-container {
  position: relative;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: timeline-slideInLeft 1s ease-out forwards;
}

/* Modern 3D Donut Chart */
.timeline-donut-chart {
  position: relative;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  transform: perspective(1000px) rotateX(10deg);
  transition: transform 0.3s ease;
}

.timeline-donut-segment {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.timeline-total-hours {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 5;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(59, 130, 246, 0.2);
}

.timeline-hours-number {
  display: block;
  font-size: 2.8em;
  font-weight: 700;
  color: var(--heading-color, #1e3a8a);
  line-height: 1;
}

.timeline-hours-text {
  display: block;
  font-size: 1em;
  color: var(--secondary-color, #64748b);
  font-weight: 300;
}

/* Improved Pie Chart with conic-gradient */
.timeline-pie-chart {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.timeline-pie-segment {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(
    from calc(3.6deg * var(--offset)),
    var(--color) 0deg calc(3.6deg * var(--percentage)),
    transparent calc(3.6deg * var(--percentage)) 360deg
  );
  transition: transform 0.3s ease;
}

.timeline-segment-tooltip {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* Modern Legend with enhanced styling */
.timeline-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 30px;
  width: 100%;
  max-width: 500px;
}

.timeline-legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
}

.timeline-legend-color {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.timeline-color-analyse {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.timeline-color-design {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.timeline-color-impl {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.timeline-color-test {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.timeline-color-doc {
  background: linear-gradient(135deg, #ef4444, #f87171);
}

.timeline-legend-text {
  font-size: 0.95em;
  color: #1e293b;
  font-weight: 500;
  white-space: nowrap;
}

/* Right column - Enhanced Gantt Chart */
.timeline-gantt-column {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 30px;
}

.timeline-gantt-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.95),
    rgba(248, 250, 252, 0.9)
  );
  backdrop-filter: blur(20px);
  border-radius: 20px;
  padding: 35px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 100%;
  position: relative;
  overflow: hidden;
  animation: timeline-slideInRight 1s ease-out forwards;
  align-self: flex-start;
  height: fit-content;
}

.timeline-gantt-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    #3b82f6,
    #8b5cf6,
    #10b981,
    #f59e0b,
    #ef4444
  );
  border-radius: 20px 20px 0 0;
}

.timeline-card-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(100, 116, 139, 0.1);
}

.timeline-gantt-title {
  font-weight: 700;
  font-size: 1.6em;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

/* Enhanced Gantt Chart Timeline */
.timeline-gantt-timeline {
  position: relative;
  width: 100%;
  height: 40px;
  margin-bottom: 25px;
  background: linear-gradient(
    to right,
    rgba(59, 130, 246, 0.1),
    rgba(139, 92, 246, 0.1)
  );
  border-radius: 8px;
  padding: 0 10px;
}

.timeline-timeline-marker {
  position: absolute;
  top: -5px;
  transform: translateX(-50%);
  font-size: 0.85em;
  font-weight: 600;
  color: #475569;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-timeline-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    #3b82f6,
    #8b5cf6,
    #10b981,
    #f59e0b,
    #ef4444
  );
  border-radius: 0 0 8px 8px;
}

/* Enhanced Gantt Rows */
.timeline-gantt-rows {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline-gantt-row {
  position: relative;
  width: calc(100% + 20px);
  height: 45px;
  display: flex;
  align-items: center;
  background: rgba(248, 250, 252, 0.5);
  border-radius: 10px;
  transition: background-color 0.3s ease;
}

.timeline-row-label {
  width: 130px;
  font-weight: 600;
  font-size: 1em;
  color: #334155;
  text-align: left;
  padding-right: 20px;
}

.timeline-row-chart {
  flex: 1;
  position: relative;
  height: 35px;
  border-radius: 8px;
  background: rgba(226, 232, 240, 0.3);
}

.timeline-gantt-bar {
  position: absolute;
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.9em;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: timeline-expandWidth 1.5s ease-out forwards;
  transform-origin: left;
  transform: scaleX(0);
  position: relative;
  overflow: hidden;
}

.timeline-gantt-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: timeline-shimmer 2s infinite;
}

.timeline-bar-analyse {
  background: linear-gradient(135deg, #3b82f6, #60a5fa, #93c5fd);
  animation-delay: 0.3s;
}

.timeline-bar-design {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa, #c4b5fd);
  animation-delay: 0.6s;
}

.timeline-bar-impl {
  background: linear-gradient(135deg, #10b981, #34d399, #6ee7b7);
  animation-delay: 0.9s;
}

.timeline-bar-test {
  background: linear-gradient(135deg, #f59e0b, #fbbf24, #fcd34d);
  animation-delay: 1.2s;
}

.timeline-bar-doc {
  background: linear-gradient(135deg, #ef4444, #f87171, #fca5a5);
  animation-delay: 1.5s;
}

@keyframes timeline-expandWidth {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* Progress Indicator */
.timeline-gantt-progress {
  position: absolute;
  top: 30px;
  left: 120px;
  width: calc(100% - 120px);
  height: calc(100% - 30px);
  pointer-events: none;
}

.timeline-progress-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(100, 116, 139, 0.1);
  z-index: 1;
}

.timeline-progress-marker {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-color, #3b82f6);
  transform: translate(50%, -50%);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
  z-index: 2;
}

.timeline-progress-tooltip {
  position: absolute;
  top: -30px;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.8em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline-decorative-circle {
  position: absolute;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.1);
  animation: timeline-float 8s infinite ease-in-out;
}

.timeline-circle-1 {
  top: 10%;
  left: 5%;
  width: 180px;
  height: 180px;
}

.timeline-circle-2 {
  bottom: 15%;
  right: 10%;
  width: 120px;
  height: 120px;
  animation-duration: 12s;
}

.timeline-decorative-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: 50px 50px;
  background-image: linear-gradient(
      to right,
      rgba(59, 130, 246, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  opacity: 0.4;
}

/* Animations */
@keyframes timeline-float {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(5deg);
  }
  100% {
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes timeline-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes timeline-fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes timeline-slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes timeline-slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes timeline-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Final modern enhancements */
.timeline-slide.timeline-revealed {
  animation: timeline-slideIn 0.8s ease-out forwards;
}

.timeline-slide::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    transparent 48%,
    rgba(255, 255, 255, 0.03) 49%,
    rgba(255, 255, 255, 0.03) 51%,
    transparent 52%
  );
  background-size: 20px 20px;
  pointer-events: none;
  opacity: 0.6;
}

/* Glass morphism enhancement for containers */
.timeline-chart-container::before,
.timeline-gantt-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.1)
  );
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Improved text readability */
.timeline-gantt-title,
.timeline-donut-number {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Smooth transitions for all interactive elements */
* {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
.timeline-legend-item:focus,
.timeline-donut-segment:focus,
.timeline-gantt-bar:focus {
  outline: 2px solid rgba(59, 130, 246, 0.7);
  outline-offset: 2px;
}

/* Finale Projektplanung Timeline Slide - Isolierte Styles mit verbessertem Randabstand */
.timeline-slide {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
}

.timeline-slide-badge {
  display: inline-block;
  background: linear-gradient(
    135deg,
    var(--primary-color, #3b82f6),
    var(--primary-light, #60a5fa)
  );
  color: white;
  font-size: 14px;
  font-weight: 500;
  padding: 5px 15px;
  border-radius: 20px;
  margin-bottom: 15px;
  position: relative;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

/* Left column - Donut Chart */
.timeline-chart-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.timeline-donut-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
}

/* Donut Chart */
.timeline-donut-chart {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
}

.timeline-donut-segment {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

/* Enhanced segment colors with gradients and shadows */
.timeline-segment-impl {
  background: conic-gradient(
    from 0deg,
    #059669 0%,
    #10b981 26.25%,
    #34d399 52.5%,
    transparent 52.5% 100%
  );
  z-index: 5;
  filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.3));
}

.timeline-segment-doc {
  background: conic-gradient(
    from 189deg,
    #dc2626 0%,
    #ef4444 8.125%,
    #f87171 16.25%,
    transparent 16.25% 100%
  );
  z-index: 4;
  filter: drop-shadow(0 4px 8px rgba(239, 68, 68, 0.3));
}

.timeline-segment-design {
  background: conic-gradient(
    from 247.5deg,
    #7c3aed 0%,
    #8b5cf6 6.25%,
    #a78bfa 12.5%,
    transparent 12.5% 100%
  );
  z-index: 3;
  filter: drop-shadow(0 4px 8px rgba(139, 92, 246, 0.3));
}

.timeline-segment-analyse {
  background: conic-gradient(
    from 292.5deg,
    #2563eb 0%,
    #3b82f6 5%,
    #60a5fa 10%,
    transparent 10% 100%
  );
  z-index: 2;
  filter: drop-shadow(0 4px 8px rgba(59, 130, 246, 0.3));
}

.timeline-segment-test {
  background: conic-gradient(
    from 328.5deg,
    #d97706 0%,
    #f59e0b 4.375%,
    #fbbf24 8.75%,
    transparent 8.75% 100%
  );
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(245, 158, 11, 0.3));
}

.timeline-donut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(255, 255, 255, 0.8),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05);
  z-index: 10;
  border: 3px solid rgba(255, 255, 255, 0.8);
}

.timeline-donut-number {
  font-size: 4.5em;
  font-weight: 800;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-donut-label {
  font-size: 1.5em;
  color: #64748b;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Legend */
.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  width: 100%;
}

.timeline-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.timeline-color-analyse {
  background-color: #3b82f6;
}

.timeline-color-design {
  background-color: #8b5cf6;
}

.timeline-color-impl {
  background-color: #10b981;
}

.timeline-color-test {
  background-color: #f59e0b;
}

.timeline-color-doc {
  background-color: #ef4444;
}

.timeline-legend-text {
  font-size: 0.9em;
  color: #334155;
}

/* Right column - Gantt Chart */
.timeline-gantt-column {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 20px; /* Zusätzlicher Abstand um die Gantt-Spalte */
}

.timeline-gantt-card {
  background: white;
  border-radius: 12px;
  padding: 30px 50px; /* Erhöhtes Padding für mehr Abstand zum Rand */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 90%; /* Verhindert, dass die Karte zu breit wird */
  margin: 0 auto; /* Zentriert die Karte */
}

.timeline-gantt-title {
  font-size: 1.4em;
  font-weight: 600;
  color: #4338ca;
  margin: 0 0 25px 0;
  text-align: center;
}

/* Gantt Chart */
.timeline-gantt-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0 15px; /* Zusätzlicher Innenabstand */
}

/* Timeline - jetzt mit der ersten Phase beginnend */
.timeline-gantt-timeline {
  position: relative;
  height: 40px;
  margin-bottom: 20px;
  margin-left: 150px; /* Passt zur Breite der Labels */
  max-width: calc(
    100% - 150px
  ); /* Verhindert, dass die Timeline zu breit wird */
}

.timeline-timeline-marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 0.9em;
  color: #64748b;
}

.timeline-timeline-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #e2e8f0;
}

.timeline-timeline-end {
  position: absolute;
  right: 0;
  bottom: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #3b82f6;
}

/* Gantt Rows */
.timeline-gantt-rows {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeline-gantt-row {
  display: flex;
  align-items: center;
  height: 40px;
}

.timeline-row-label {
  width: 136px;
  font-weight: 500;
  font-size: 1em;
  color: #334155;
  padding-right: 15px;
  text-align: right;
}

.timeline-row-chart {
  flex: 1;
  position: relative;
  height: 100%;
}

.timeline-gantt-bar {
  position: absolute;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.95em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  animation: timeline-expandWidth 1s ease-out forwards;
  transform-origin: left;
  transform: scaleX(0);
}

.timeline-bar-analyse {
  background: #3b82f6;
  animation-delay: 0.2s;
}

.timeline-bar-design {
  background: #8b5cf6;
  animation-delay: 0.4s;
}

.timeline-bar-impl {
  background: #10b981;
  animation-delay: 0.6s;
}

.timeline-bar-test {
  background: #f59e0b;
  animation-delay: 0.8s;
}

.timeline-bar-doc {
  background: #ef4444;
  animation-delay: 1s;
}

@keyframes timeline-expandWidth {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
