*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Outfit", sans-serif;
  background: #efe9ae;
  overflow-x: hidden;
  padding: 60px 20px;
}

#back-button {
    background: rgba(255, 255, 255, 0.447);
    color: #480a0a;
    padding: 12px 20px;
    width: fit-content;
    margin-left: 8.2rem;
    margin-bottom: 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.436);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

#back-button a {
    color: #480a0a;
    text-decoration: none;
}

#back-button:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.page-header {
  text-align: center;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(-30px);
  animation: fadeInDown 1s ease forwards;
}

.page-header h1 {
  font-size: 3.5rem;
  color: #7c2900;
  margin: 0;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.page-header h1::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: #ffac81;
  border-radius: 2px;
}

.decorative-elements {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
}

.floating-shape {
  position: absolute;
  opacity: 0.15;
  animation: float 6s ease-in-out infinite;
}

.shape1 {
  width: 60px;
  height: 60px;
  background: #ffac81;
  border-radius: 50%;
  top: 10%;
  left: 5%;
  animation-delay: 0s;
}

.shape2 {
  width: 40px;
  height: 40px;
  background: #7c2900;
  border-radius: 50%;
  top: 70%;
  right: 8%;
  animation-delay: 2s;
}

.shape3 {
  width: 50px;
  height: 50px;
  background: #ffac81;
  transform: rotate(45deg);
  top: 40%;
  right: 15%;
  animation-delay: 4s;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes fadeInDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.timeline::before {
  content: '';
  position: absolute;
  width: 4px;
  background: linear-gradient(180deg, #7c2900 0%, #ffac81 100%);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  width: 100%;
  margin-bottom: 80px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.timeline-content {
  position: relative;
  width: 45%;
  padding: 35px;
  background: #ffac81;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(124, 41, 0, 0.15);
  transition: all 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: 0;
  border-top-left-radius: 30px;
  border-bottom-left-radius: 30px;
  border-top-right-radius: 100px;
  border-bottom-right-radius: 100px;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 55%;
  border-top-right-radius: 30px;
  border-bottom-right-radius: 30px;
  border-top-left-radius: 100px;
  border-bottom-left-radius: 100px;
}

.timeline-content:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(124, 41, 0, 0.25);
}

.timeline-date {
  display: inline-block;
  padding: 8px 20px;
  background: #7c2900;
  color: #efe9ae;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.timeline-content h2 {
  margin: 0 0 15px 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #7c2900;
  line-height: 1.4;
}

.timeline-content p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.7;
  color: #3d1500;
}

.timeline-marker {
  position: absolute;
  width: 24px;
  height: 24px;
  background: #ffffff;
  border: 4px solid #7c2900;
  border-radius: 50%;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 0 8px rgba(255, 172, 129, 0.3);
  transition: all 0.3s ease;
}

.timeline-item.visible .timeline-marker {
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 8px rgba(255, 172, 129, 0.3);
  }

  50% {
    box-shadow: 0 0 0 15px rgba(255, 172, 129, 0);
  }
}

.timeline-icon {
  position: absolute;
  width: 60px;
  height: 60px;
  background: #efe9ae;
  border: 3px solid #7c2900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  top: 25px;
  z-index: 3;
  transition: all 0.3s ease;
}

.timeline-item:nth-child(odd) .timeline-icon {
  right: -30px;
}

.timeline-item:nth-child(even) .timeline-icon {
  left: -30px;
}

.timeline-item.visible .timeline-icon {
  animation: rotate 3s ease-in-out infinite;
}

@keyframes rotate {

  0%,
  100% {
    transform: rotate(0deg);
  }

  25% {
    transform: rotate(-10deg);
  }

  75% {
    transform: rotate(10deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-header h1 {
    font-size: 2.5rem;
  }

  .timeline::before {
    left: 30px;
  }

  .timeline-item {
    margin-bottom: 60px;
  }

  .timeline-content {
    width: calc(100% - 90px);
    margin-left: 90px !important;
    border-radius: 20px !important;
    border-top-right-radius: 80px !important;
    border-bottom-right-radius: 80px !important;
    padding: 25px;
  }

  .timeline-marker {
    left: 30px;
    transform: translateX(-50%);
  }

  .timeline-icon {
    left: 0 !important;
    right: auto !important;
  }

  .timeline-content h2 {
    font-size: 1.2rem;
  }

  .timeline-content p {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  body {
    padding: 40px 15px;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .timeline-content {
    padding: 20px;
  }
}