/* Page Layout - Prevent Scrollbars */
html, body {
  overflow: hidden;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  background-color: #F4F5FF;
}

/* Modern Navbar Styles - Centered */
.navbar {
  background: linear-gradient(90deg, #c81912, #a00000);
  padding: 15px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  max-width: 800px; /* Limit width for larger screens */
  margin: 0 auto; /* Center the navbar */
}

.navbar a {
  text-decoration: none;
  color: white;
  font-size: 16px;
  font-weight: 500;
  padding: 10px 15px;
  margin: 0 5px;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  background: transparent;
  border: none;
  width: auto !important;
}

.navbar a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: white;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.navbar a:hover {
  background: transparent;
  color: white;
  transform: translateY(-2px);
}

.navbar a:hover:after {
  width: 70%;
}

.navbar a.active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.navbar a.active:after {
  width: 70%;
}

/* Timeline Container Adjustments */
#timeline {
  width: 90%;
  max-width: 1000px;
  height: 4px;
  background: linear-gradient(to right, #f0f2f5, #e6e9ed);
  position: relative;
  border-radius: 6px;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
  margin: 110px 0 50px; /* Increased top margin to move timeline down */
  padding-top: 30px; /* Added padding to make room for year labels */
}

.timeline-event {
  position: absolute;
  top: 25px; /* Moved down to align with the new timeline position */
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background: #c81912;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  z-index: 5;
  transition: transform 0.2s ease;
}



.timeline-marker {
  width: 4px;
  height: 4px;
  background: #ffffff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Base styles for all timeline text */
.timeline-text {
  position: absolute;
  line-height: 1.2;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  transition: transform 0.2s ease;
  background-color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  z-index: 6;
  transform-origin: left center;
  transform: rotate(-90deg);
  width: auto;
  min-width: 90px;
  border-left: 2px solid #c81912;
  top: 45px; /* Adjusted to align with the new timeline position */
  left: 0;
  transform-origin: left top;
}

/* All labels will use the bottom positioning */
.timeline-text-top, .timeline-text-bottom {
  transform: rotate(-90deg) translateY(0%);
}

.timeline-line {
  position: absolute;
  top: 45px; /* Moved down to match the event dots */
  left: 0;
  transform: translateY(-50%);
  height: 2px;
  width: 100%;
  background: #ddd;
  z-index: 3;
}

/* Container for each timeline item */
.timeline-item {
  position: absolute;
  width: 2px;
  transform: translateX(-1px);
}

/* Adjust positioning for labels */
.timeline-item:nth-child(even) .timeline-text,
.timeline-item:nth-child(odd) .timeline-text {
  transform: rotate(-90deg) translateX(-100%);
  top: 45px; /* All labels at same position below timeline */
}

/* Year display */
.timeline-year {
  position: absolute;
  font-size: 11px;
  font-weight: 500;
  color: #333;
  top: -30px;
  left: 50%;
  transform: translateX(-20%) rotate(270deg);
  background-color: #fff;
  padding: 2px 5px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  z-index: 10;
  min-width: 35px;
  text-align: center;
  transform-origin: bottom center;
}

/* Content Area Styles */
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1; /* Take remaining space */
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 10px 0;
  color: #333;
}

p {
  font-size: 16px;
  line-height: 1.5;
  color: #666;
  text-align: center;
  max-width: 600px;
  margin: 5px 0;
}

/* Responsive Adjustments */
@media only screen and (max-width: 768px) {
  .navbar {
    padding: 10px 0;
  }
  
  .navbar a {
    font-size: 14px;
    padding: 8px 10px;
    margin: 0 2px;
  }
  
  #timeline {
    width: 95%;
    margin-top: 90px;
    padding-top: 20px;
  }
  
  .timeline-text {
    font-size: 11px;
    padding: 3px 6px;
    min-width: 80px;
  }
  
  .timeline-year {
    font-size: 10px;
    transform: translateX(-50%) rotate(90deg);
    top: -26px;
    padding: 2px 4px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  p {
    font-size: 14px;
    max-width: 90%;
  }
}

/* Extra small screens */
@media only screen and (max-width: 480px) {
  .navbar a {
    font-size: 12px;
    padding: 6px 8px;
    margin: 0 1px;
  }
  
  h1 {
    font-size: 20px;
  }
}