/* Base Styles */
body, html {
  height: 100vh;
  margin: 0;
  padding: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: bold;
  color: white;
  background: linear-gradient(0deg, rgba(59,59,59,1) 0%, rgba(19,19,20,1) 35%, rgba(0,0,0,1) 100%);
  background-attachment: fixed;
  background-size: 100% 100vh;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: scroll;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* Internet Explorer 10+ */
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Header Styles */
header {
  text-align: center;
  padding: 20px 0;
}

h1 {
  font-size: clamp(20px, 4vw, 24px);
  margin: 0;
}

/* Timeline Container Styles */
.timeline-container {
  position: relative;
  width: 100%;
  height: auto;
  overflow: visible;
  padding: 20px;
  box-sizing: border-box;
}

#line-container {
  position: relative;
  width: 100%;
  min-height: 100%;
  margin: 0 auto;
  overflow: visible;
}

/* Timeline Elements */
.dot {
  position: absolute;
  width: 10px;
  height: 10px;
  background-color: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.line-segment {
  position: absolute;
  background-color: white;
}

.horizontal {
  height: 1px;
}

.vertical {
  width: 1px;
}

.date-label {
  position: absolute;
  font-size: clamp(14px, 3vw, 24px);
  transform: translateY(-120px);
  white-space: nowrap;
  text-align: left;
  cursor: pointer;
  transition: color 0.3s ease;
}

.date-label:hover {
  color: #cccccc;
}

.date-label.right {
  text-align: right;
  transform: translate(-100%, -120px);
}

/* Modified SVG Container Styles */
.svg-container {
  position: absolute;
  width: clamp(150px, 30vw, 250px);
  height: clamp(135px, 27vw, 225px);
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.buildings {
  width: 100%;
  height: 100%;
}

/* Popup Styles */
.popup {
  position: absolute;
  background-color: rgba(37, 37, 37, 0.9);
  border-radius: 8px;
  padding: 15px;
  width: clamp(200px, 50vw, 230px);
  max-width: 90vw;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease, width 0.3s ease, height 0.3s ease, top 0.3s ease;
  z-index: 100;
  transform: translate(-50%, 10px);
}

.popup.show {
  opacity: 1;
  transform: translate(-50%, -110%);
}

.popup.below-date {
  transform: translate(-50%, 0);
}

.popup.expanded {
  width: clamp(200px, 50vw, 230px);
}

.popup h3 {
  margin-top: 0;
  font-size: clamp(16px, 3vw, 18px);
}

.popup p {
  font-size: clamp(12px, 2.5vw, 14px);
  margin-bottom: 10px;
}

.popup .read-more {
  background: none;
  border: none;
  color: #4a90e2;
  cursor: pointer;
  padding: 0;
  font-size: clamp(12px, 2.5vw, 14px);
}

.popup .event-image {
  max-width: 100%;
  height: auto;
  margin-top: 10px;
}

.popup-close {
  position: absolute;
  top: 5px;
  right: 5px;
  background: none;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .timeline-container {
    padding: 15px;
  }
}

@media (max-width: 768px) {
  .timeline-container {
    padding: 10px;
  }

  .date-label {
    transform: translateY(-80px);
  }

  .date-label.right {
    transform: translate(-100%, -80px);
  }
}

@media (max-width: 480px) {
  .timeline-container {
    padding: 5px;
  }

  .date-label {
    transform: translateY(-60px);
  }

  .date-label.right {
    transform: translate(-100%, -60px);
  }

  .popup, .popup.expanded {
    width: 80vw;
    max-width: 280px;
  }
}

