/* Reset and base styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  color: #1a2a4c; /* Navy blue text */
  background-color: #f4f6f8; /* subtle off-white background */
  line-height: 1.6;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  flex-wrap:wrap;
  gap: 12px;
  background-color: #ffffff;
  border-bottom: 4px solid #FF4500; 
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Logo inside header */
.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.header-logo {
  width: clamp(120px, 15vw, 200px); 
}

.header-text h1 {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  color: #1a2a4c;
  margin-bottom: 4px;
}

.header-text p {
  font-size: clamp(.8rem, 1.5vw, 1rem);
  color: #3b4a6b;
}

#distanceDisplay {
  font-weight: 600;
  color: #1a2a4c;
}

/* Main content */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 100px;
}

.map-wrapper {
  width: 100%;
  height: clamp(300px, 50vh, 500px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#map {
  width: 100%;
  height: 100%;
}

#data-panel {
  margin-top: 20px;
}

/* Footer */
.footer {
  background-color: #f0f0f0; 
  color: #1a2a4c;
  padding: 30px 50px 20px 50px;
  font-size: 0.95rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-section {
  flex: 1 1 200px;
}

.footer-logo img {
  width: 120px; /* Make the logo visible but not huge */
  display: block;
  margin-bottom: 10px;
}

.footer-section h4 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.footer-section p {
  margin-bottom: 6px;
  color: #1a2a4c;
}

/* Footer bottom */
.footer-bottom {
  text-align: center;
  font-size: 0.85rem;
  border-top: 1px solid #d0d0d0;
  padding-top: 10px;
  color: #3b4a6b;
}

/* Responsive */
@media (max-width: 768px) {
  .location-card img {
    height: 150px;
  }
 
}
@media (max-width: 900px) {
  .header {
    flex-direction: column;
    gap: 10px;
  }

  .main-content {
    padding: 20px;
  }

   .footer-grid{
    flex-direction: column;
    gap: 12px;
  }
  .footer-section {
    flex: unset;
    width: 100%;
  }

  .footer {
    padding: 20px 15px 15px;
  }
}
/*------------------ Updates Section ---------------------- */
.updates-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.updates-header h2 {
  font-size: 1.4rem;
  color: #1a2a4c;
}
 .updates-header p {
  font-size: .95rem;
  color:#4b5563;
  max-width: 600px;
 }
 @media (max-width: 768px) {
  .updates-header h2 {
    font-size: 1.2rem;
  }

  .updates-header p {
    font-size: .85rem;
  }
 }
/* ----------------- Data Panel / Sidebar ----------------- */
#data-panel {
  flex: 1;                 /* 25% width on desktop */
  background: #fff;
  overflow-y: auto;
  border-left: 1px solid #e5e7eb;
  min-height: 0;           
  padding: 0.5rem;
}

/* ----------------- Location Cards ----------------- */
.location-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.location-card {
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.location-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Updated location card images */
.location-card img {
  width: 100%;
  height: 250px;             /* fixed card image height */
  object-fit: cover;
  object-position:center 30%;      /* top half shows for taller images */
  border-bottom: 1px solid #e5e7eb;
  transition: transform 0.3s ease;
}

.location-card img.landscape {
  object-position: center;   /* center landscape images */
  height: auto;              /* allow full height */
}
.card-info {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.card-info h3 { font-size: 1rem; font-weight: 600; color: #111827; }
.card-info p { font-size: 0.875rem; color: #4b5563; }
.card-meta { font-size: 0.75rem; color: #6b7280; }

/* ----------------- Mile Marker ----------------- */
.mile-marker {
  background: white;
  border: 2px solid #222;
  border-radius: 999px;
  padding: 4px 8px;
  min-width: 36px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: #111;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.mile-marker::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 5px 0 5px;
  border-style: solid;
  border-color: #222 transparent transparent transparent;
}
.mile-marker.passed {
  background: gold;
  border-color: gold;
}

/* ----------- Mapbox controls ---------*/
/* Fix Mapbox control container */
.mapboxgl-ctrl-group {
  display: flex;
  flex-direction: column; 
}

.mapboxgl-ctrl-group button {
  display: flex !important;
  align-items: center;
  justify-content: flex-start;

  width: auto !important;        /* allows text to show */
  height: auto !important;

  padding: 10px 14px;
  gap: 8px;

  font-size: 14px;
  white-space: nowrap;

  background: white;
  color: #1a2a4c;
  border: none;
  cursor: pointer;
}

/* Remove Mapbox forced square behavior */
.mapboxgl-ctrl-group button:not(:last-child) {
  border-bottom: 1px solid #eee;
}

/* ICON */
.mapboxgl-ctrl-group button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* TEXT */
.mapboxgl-ctrl-group button span {
  display: inline-block;
}


.mapboxgl-ctrl button.active {
  background-color: #1DA1F2 !important;
  color: white;
}

.mapboxgl-ctrl-group button:hover {
  background-color: #f4f6f8;
}