/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: #f5f5f5;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header,
footer {
  background-color: #ffffff;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #333;
}

footer {
  font-size: 0.9rem;
  color: #777;
}

/* Timeline Container */
#timeline-container {
  padding: 20px;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 20px;
  border-radius: 8px;
}

/* Runs Grid Container */
#runs-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 20px;
  flex: 1;
}

/* Run Card Styles */
.run-card {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  background-color: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.run-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Map Container */
.run-map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  /*            pointer-events: none; */
}

/* Overlay for Hover */
.run-overlay {
  position: absolute;
  top: 0; /* Cover from the top */
  left: 0;
  width: 100%;
  height: 100%; /* Cover the full height */
  background: transparent; /* No background color */
  color: rgba(255, 255, 255, 0.6); /* 60% opacity white */
  font-weight: bold; /* Bold text */
  font-size: 2rem; /* Adjust font size as needed */
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
  display: flex; /* Use flexbox for centering */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  z-index: 10; /* Ensure overlay is above the map */
  pointer-events: none; /* Allow events to pass through */
}

.run-card:hover .run-overlay {
  opacity: 1; /* Show overlay on hover */
}

/* Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #ffffff;
  margin: auto;
  padding: 20px;
  border-radius: 8px;
  max-width: 800px;
  width: 90%;
  position: relative;
}

.close-button {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  color: #aaa;
  cursor: pointer;
  transition: color 0.2s;
}

.close-button:hover {
  color: #000;
}

#modal-map {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  margin-bottom: 20px;
}

#modal-info {
  font-size: 1rem;
  color: #555;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  #runs-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding: 15px;
  }
}

/* Slider Container */
#slider-container {
    margin-bottom: 20px;
    text-align: center;
}

/* Slider Container */
#slider-container {
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#end-date-label,
#start-date-label {
    font-weight: bold;
    color: #333;
}

#date-slider {
    width: 80%;
    max-width: 600px;
    height: 8px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    border-radius: 5px;
    /* Ensure the slider is reversed */
    direction: rtl;
}

#date-slider:hover {
    opacity: 1;
}
