/* 1. Global Resets & Font */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Rubik', sans-serif; /* Font weight 400, 500, 700 available */
  font-size: 18px;
}

/* 2. Header Section */
.header {
  background-image: url('./images/pattern-bg-desktop.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  height: 300px; /* This gives us room for the overlapping card */
  padding-top: 33px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

h1 {
  color: white;
  font-weight: 500;
  margin-bottom: 30px;
}

/* 3. The Map Placeholder */
#map {
  height: calc(100vh - 300px); /* Takes up the rest of the screen */
  width: 100%;
  background-color: #eee; /* Temporary color so you can see it */
  z-index: 1;
}
/* 4. Search Bar Styling */
.search-container {
  display: flex;
  width: 100%;
  max-width: 555px; /* Keeps it from getting too wide on desktop */
  padding: 0 24px;
}

#search-input {
  flex-grow: 1;
  padding: 18px 24px;
  border: none;
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
  font-family: inherit;
  font-size: 18px; /* Requirement from style-guide.md */
  cursor: pointer;
}

.search-btn {
  background-color: hsl(0, 0%, 0%); /* Very Dark Gray/Black */
  border: none;
  padding: 0 24px;
  border-top-right-radius: 15px;
  border-bottom-right-radius: 15px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-btn:hover {
  background-color: hsl(0, 0%, 17%); /* Gray 950 from style-guide.md */
}

#search-input:focus {
  outline: none; /* Removes the default browser border on click */
}
/* 5. Results Card Positioning */
.results-card {
  background-color: white;
  border-radius: 15px;
  padding: 37px;
  width: 90%;
  max-width: 1110px;
  position: absolute;
  top: 300px; /* Aligns with the bottom of the header */
  transform: translateY(-50%); /* Moves it up by half its own height to overlap */
  z-index: 10; /* Ensures it stays on top of the map */
  
  display: flex;
  justify-content: space-between;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* 6. Individual Result Items */
.result-item {
  flex: 1;
  padding: 0 32px;
  border-right: 1px solid hsla(0, 0%, 58%, 0.3); /* Using Gray 400 with transparency */
}

.result-item:last-child {
  border-right: none;
}

.label {
  color: hsl(0, 0%, 58%); /* Gray 400 */
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}

.data {
  color: hsl(0, 0%, 17%); /* Gray 950 */
  font-size: 26px;
  font-weight: 500;
}
/* 7. Mobile Responsive Styles */
@media (max-width: 768px) {
  .header {
    background-image: url('./images/pattern-bg-mobile.png');
    height: 300px;
    padding-top: 26px;
  }

  h1 {
    font-size: 26px;
    margin-bottom: 24px;
  }

  .results-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    gap: 24px;
    width: calc(100% - 48px); /* Gives some margin on the sides */
  }

  .result-item {
    border-right: none; /* Remove vertical lines on mobile */
    padding: 0;
  }

  .label {
    margin-bottom: 8px;
  }

  .data {
    font-size: 20px;
  }
}