/* Timeline Wrapper */
.timeline-wrapper {
  padding: 0;
  background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.timeline-section {
  padding: 60px 20px;
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-title {
  text-align: center;
  font-size: 2.8rem;
  font-weight: bold;
  margin-bottom: 50px;
  color: #333;
  position: relative;
  padding-bottom: 20px;
  width: 100%;
}

.timeline-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 5px;
  background: linear-gradient(90deg, #007bff, #0056b3);
  margin: 15px auto 0;
  border-radius: 3px;
}

/* Carousel Container */
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

/* Navigation Buttons */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 100;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.35);
  flex-shrink: 0;
  padding: 0;
  font-size: 0;
  outline: none;
}

.carousel-nav:hover {
  background: linear-gradient(135deg, #0056b3, #003d82);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.5);
  transform: translateY(-50%) scale(1.15);
}

.carousel-nav:active {
  transform: translateY(-50%) scale(0.9);
}

.carousel-nav[style*="pointer-events: none"] {
  opacity: 0.4;
  cursor: not-allowed;
}

.carousel-nav[style*="pointer-events: none"]:hover {
  transform: translateY(-50%);
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.35);
}

.carousel-nav-prev {
  left: 15px;
}

.carousel-nav-next {
  right: 15px;
}

.carousel-nav svg {
  width: 28px;
  height: 28px;
  pointer-events: none;
}

/* Timeline Carousel */
.timeline-carousel {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 30px 70px 30px 70px;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
  display: flex;
  gap: 35px;
  min-width: auto;
  -ms-overflow-style: none;
  scroll-padding: 0;
}

.timeline-carousel::-webkit-scrollbar {
  height: 8px;
}

.timeline-carousel::-webkit-scrollbar-track {
  background: #e8e8e8;
  border-radius: 4px;
}

.timeline-carousel::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #007bff, #0056b3);
  border-radius: 4px;
}

.timeline-carousel::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, #0056b3, #003d82);
}

/* Timeline Items */
.timeline-item {
  position: relative;
  flex: 0 0 400px;
  min-height: 550px;
  animation: slideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

/* Timeline Connectors - Top and Bottom lines */
.timeline-connector-left,
.timeline-connector-right {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, #007bff, #0056b3);
  z-index: 0;
}

.timeline-connector-left {
  width: 30px;
  left: -30px;
  top: 40px;
}

.timeline-connector-right {
  width: 30px;
  right: -30px;
  top: 40px;
}

/* Timeline Content */
.timeline-content {
  background: white;
  padding: 35px;
  border-radius: 16px;
  box-shadow: 0 3px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  border-top: 5px solid #007bff;
  border-left: 1px solid #e0e0e0;
}

.timeline-content:hover {
  box-shadow: 0 12px 40px rgba(0, 123, 255, 0.25);
  transform: translateY(-10px);
  border-left-color: #007bff;
}

.timeline-content img {
  width: 100%;
  height: 267px;
  object-fit: cover;
  border-radius: 8px;
  margin: 15px 0;
}

.timeline-year {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 12px;
  padding: 6px 14px;
  background: #e7f3ff;
  border-radius: 6px;
  align-self: flex-start;
}

.timeline-content h3 {
  font-size: 1.3rem;
  margin: 10px 0;
  color: #333;
  font-weight: 600;
}

.timeline-content p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
}

.timeline-content ul {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin: 0;
  padding-left: 20px;
  flex: 1;
}

.timeline-content li {
  margin-bottom: 8px;
  color: #666;
}

.timeline-content ul ul {
  font-size: 0.85rem;
  margin-top: 8px;
}

/* Scroll Indicator */
.scroll-indicator {
  text-align: center;
  margin-top: 30px;
  padding: 20px 0;
}

.scroll-hint {
  font-size: 0.95rem;
  color: #666;
  margin: 0;
  animation: pulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
  font-weight: 500;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 1400px) {
  .timeline-item {
    flex: 0 0 380px;
    min-height: 530px;
  }

  .timeline-carousel {
    padding: 30px 60px;
    gap: 30px;
  }

  .carousel-nav {
    width: 52px;
    height: 52px;
  }

  .carousel-nav svg {
    width: 26px;
    height: 26px;
  }
}

@media (max-width: 1024px) {
  .timeline-section {
    padding: 50px 15px;
  }

  .timeline-item {
    flex: 0 0 360px;
    min-height: 500px;
  }

  .carousel-nav {
    width: 48px;
    height: 48px;
  }

  .carousel-nav svg {
    width: 24px;
    height: 24px;
  }

  .carousel-nav-prev {
    left: 10px;
  }

  .carousel-nav-next {
    right: 10px;
  }

  .timeline-carousel {
    padding: 25px 55px;
    gap: 25px;
  }

  .timeline-title {
    font-size: 2.2rem;
    margin-bottom: 40px;
  }

  .timeline-content {
    padding: 28px;
  }

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

  .timeline-content ul {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .timeline-wrapper {
    min-height: auto;
    padding: 40px 0;
  }

  .timeline-section {
    padding: 40px 12px;
  }

  .carousel-nav {
    width: 44px;
    height: 44px;
  }

  .carousel-nav svg {
    width: 22px;
    height: 22px;
  }

  .carousel-nav-prev {
    left: 8px;
  }

  .carousel-nav-next {
    right: 8px;
  }

  .timeline-item {
    flex: 0 0 340px;
    min-height: 480px;
  }

  .timeline-carousel {
    padding: 25px 50px;
    gap: 20px;
  }

  .timeline-title {
    font-size: 1.8rem;
    margin-bottom: 35px;
  }

  .timeline-title::after {
    width: 70px;
  }

  .timeline-content {
    padding: 22px;
  }

  .timeline-content img {
    height: 170px;
  }

  .timeline-content h3 {
    font-size: 1.1rem;
    margin: 8px 0;
  }

  .timeline-content ul {
    font-size: 0.8rem;
  }

  .timeline-year {
    font-size: 0.85rem;
  }

  .scroll-hint {
    font-size: 0.75rem;
  }
}

@media (max-width: 600px) {
  .timeline-wrapper {
    min-height: auto;
    padding: 30px 0;
  }

  .timeline-section {
    padding: 30px 10px;
  }

  .carousel-nav {
    width: 40px;
    height: 40px;
  }

  .carousel-nav svg {
    width: 20px;
    height: 20px;
  }

  .carousel-nav-prev {
    left: 5px;
  }

  .carousel-nav-next {
    right: 5px;
  }

  .timeline-item {
    flex: 0 0 320px;
    min-height: 450px;
  }

  .timeline-carousel {
    padding: 20px 45px;
    gap: 15px;
  }

  .timeline-title {
    font-size: 1.6rem;
    margin-bottom: 30px;
  }

  .timeline-content {
    padding: 18px;
  }

  .timeline-content img {
    height: 150px;
    margin: 12px 0;
  }

  .timeline-content h3 {
    font-size: 1rem;
    margin: 6px 0;
  }

  .timeline-content ul {
    font-size: 0.75rem;
    padding-left: 18px;
  }

  .timeline-content li {
    margin-bottom: 6px;
  }

  .timeline-year {
    font-size: 0.8rem;
    padding: 3px 8px;
  }

  .scroll-hint {
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .timeline-wrapper {
    min-height: auto;
  }

  .timeline-section {
    padding: 25px 8px;
  }

  .carousel-nav {
    width: 38px;
    height: 38px;
  }

  .carousel-nav svg {
    width: 18px;
    height: 18px;
  }

  .carousel-nav-prev {
    left: 3px;
  }

  .carousel-nav-next {
    right: 3px;
  }

  .timeline-item {
    flex: 0 0 300px;
    min-height: 420px;
  }

  .timeline-carousel {
    padding: 18px 40px;
    gap: 12px;
  }

  .timeline-title {
    font-size: 1.4rem;
    margin-bottom: 25px;
  }

  .timeline-content {
    padding: 15px;
  }

  .timeline-content img {
    height: 220px;
    margin: 10px 0;
  }

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

  .timeline-content ul {
    font-size: 0.7rem;
    padding-left: 15px;
  }

  .timeline-content li {
    margin-bottom: 4px;
  }

  .timeline-year {
    font-size: 0.75rem;
    padding: 2px 6px;
  }

  .scroll-hint {
    font-size: 0.65rem;
  }

  .timeline-connector-left,
  .timeline-connector-right {
    display: none;
  }
}
