/* FULLSCREEN HERO HEADER*/

:root {
  --hero-max-w: 1100px;
  --pad: clamp(16px, 3vw, 32px);
  --yellow: #F7E8A4;
}

#hero {
  position: relative;
  height: 100vh;       /* EXACT one screen — fixed */
  width: 100%;
  display: grid;
  place-items: center; /* centers hero-content cleanly */
  text-align: center;
  padding: 0;          /* removes extra top spacing that caused gap */

  background-image:
    linear-gradient(to bottom, rgba(0,0,0,0.35), rgba(0,0,0,0.55)),
    url("../images/Philadelphia And Baltimore.png");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
}

.hero-content {
  max-width: var(--hero-max-w);
  margin: 0 auto;
}

#hero h1 {
  margin: 0 0 0.4em;
  font-size: clamp(28px, 5vw, 44px);
  color: var(--yellow);
  font-weight: 700;
  text-shadow: 0 2px 3px rgba(0,0,0,0.45);
}

#hero h3 {
  margin: 0 0 .8em;
  font-size: clamp(18px, 3vw, 24px);
  color: #fff;
}

#hero p {
  font-size: clamp(14px, 2vw, 19px);
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.55;
  color: #eee;
}

/* GLOBAL*/

body {
  margin: 0;
  font-family: Arial, sans-serif;
}

/* Prevent any horizontal scroll */
html, body {
  overflow-x: hidden !important;
}

#container {
  position: relative;
  width: 100vw;
  height: 100vh;    
  margin-top: 0vh;
}

/* SIDEBAR TITLE*/
#sidebar h2 {
  font-size: 22px;         
  font-weight: 700;
  line-height: 1.1;        
  margin-bottom: 14px;    
  text-align: left;
  width: 75%;           
}

/* FULLSCREEN MAP */
#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
}

/* SIDEBAR (NO SCROLL, FIXED)*/
#sidebar {
  position: absolute;        
  right: 0;
  top: 0;

  width: 30%;
  height: 100vh;
  padding: 10px 18px;

  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);

  overflow: hidden;        /* no vertical or horizontal scroll */
  overflow-x: hidden;      /* prevent Firefox overflow */
  box-sizing: border-box;  /* prevent sidebar expanding */

  z-index: 1000;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
}

/* Title */
#sidebar h2 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
  width: 100%;
}

/* Labels */
#sidebar label {
  font-size: 13px;
  margin: 0 0 2px 0;
  padding: 0;
}

/* Inputs & Selects */
#sidebar input,
#sidebar select {
  width: 100%;
  padding: 6px 8px;
  margin: 0;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}

/* Fix long overflowing address field */
#sidebar input[type="text"] {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  box-sizing: border-box;
}

/* Buttons */
#searchBtn,
#calcBtn,
#clearBtn {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.18);
  margin: 2px 0;
}

#searchBtn,
#calcBtn {
  background: #F7E8A4;
  color: #333;
}

#clearBtn {
  background: #F9F2C7;
  color: #444;
}

/* Results Box */
#results {
  background: rgba(255,255,255,0.6);
  padding: 8px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.3;
  flex: 0 0 auto;
}

/* Instructions Box */
#instructions {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  padding: 6px 8px;
  margin-top: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.10);
  font-size: 11px;
  line-height: 1.3;
  max-height: 22vh;
  overflow-y: auto;
}

#instructions h3 {
  font-size: 12px;
  margin: 0 0 2px 0;
}

#instructions p {
  font-size: 11px;
  margin: 0;
}

/* ------------------------------
   NORTH ARROW
--------------------------------*/
.north-arrow {
  position: absolute;
  bottom: 145px;
  left: 20px;
  background: rgba(255,255,255,0.85);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  color: #222;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  z-index: 1300;
}

/*  MAP LEGEND */
.map-legend {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 1200;
  background: rgba(255, 255, 255, 0.85);
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  font-size: 12px;
  color: #222;
}

.map-legend h4 {
  margin: 0 0 4px 0;
  font-size: 12px;
  font-weight: bold;
}

.map-legend .legend-item {
  display: flex;
  align-items: center;
  margin: 2px 0;
}

.map-legend .legend-color {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 6px;
  border: 1px solid rgba(0,0,0,0.15);
}

.map-legend .legend-label {
  font-size: 11px;
}
