body {
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}

input,
button,
select,
textarea {
  font-family: inherit;
}

/* === HERO SECTION (center search bar in the middle) === */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  background: linear-gradient(135deg, rgba(0, 38, 89, 0.75), rgba(0, 89, 163, 0.55)),
              url('/assets/title_image.jpg') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.hero-inner {
  max-width: 800px;
  width: 100%;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

/* Natural language form (hero primary) */
.nl-form {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  margin: 0 auto 1rem;
  width: 100%;
  max-width: 680px;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.nl-form input {
  flex: 1 1 auto;
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.5rem;
  font-size: 1.1rem;
  color: #10304f;
}

.nl-form button {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 0.9rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  background: #ffffff;
  color: #0066cc;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.nl-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.toggle-advanced {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 0.5rem 1.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.18s ease;
  margin: 0 auto 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-advanced:hover {
  background: rgba(255, 255, 255, 0.35);
}

.filters-wrapper {
  width: 100%;
  max-width: 760px;
  margin: 0 auto 0.75rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  padding: 1rem;
  box-sizing: border-box;
  transition: max-height 0.25s ease, opacity 0.25s ease;
}

.filters-wrapper.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0;
  overflow: hidden;
  border: none;
}

.filters-wrapper form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.filters-wrapper label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
}

.filters-wrapper label input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #0072ff;
}

.filters-wrapper input,
.filters-wrapper button {
  border-radius: 0.5rem;
  padding: 0.6rem 0.8rem;
  border: none;
  font-size: 1rem;
}

.filters-wrapper input {
  width: 200px;
  max-width: 260px;
}

.filters-wrapper button {
  background: white;
  color: #0072ff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.filters-wrapper button:hover {
  background: #eaeaea;
  transform: translateY(-1px);
}

#results {
  display: none;
  flex-wrap: wrap;
  margin: 2rem -0.5rem 0;
  padding: 0 3%;
}

#results.show {
  display: flex;
}

#results .card {
  flex: 1 1 280px;
  margin: 0 0.5rem 1rem;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

#results .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

#results::after {
  content: '';
  flex: auto;
}

.card-photo {
  width: calc(100% + 2rem);
  margin: -1rem -1rem 0;
  height: 180px;
  object-fit: cover;
  display: block;
}

.detail-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  overflow-y: auto;
}

.detail-modal[hidden] {
  display: none;
}

.detail-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.detail-dialog {
  background: #f8fbff;
  border-radius: 1rem;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  position: relative;
  transform: translateY(18px) scale(0.97);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  overflow-y: auto;
  margin: auto;
}

.detail-modal.show .detail-dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.detail-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
  color: #12385f;
}

.detail-body {
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

.detail-top {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.detail-top > * {
  margin-right: 1.5rem;
  margin-bottom: 1.5rem;
}

.detail-top > *:last-child {
  margin-right: 0;
}

.detail-media {
  flex: 1 1 360px;
  min-width: 320px;
}

.detail-map {
  flex: 1 1 360px;
  min-width: 320px;
}

.detail-media img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 0.75rem;
}

.detail-media.no-photo {
  background: repeating-linear-gradient(45deg, #dfe7ef, #dfe7ef 10px, #f4f7fb 10px, #f4f7fb 20px);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6a7d90;
  font-size: 1rem;
}

.detail-media.no-photo img {
  display: none;
}

.detail-media.no-photo::after {
  content: 'Photo unavailable';
}

.detail-info {
  width: 100%;
  display: flex;
  flex-direction: column;
  color: #10324f;
  margin-top: 1.5rem;
}

.detail-info > * {
  margin-bottom: 0.75rem;
}

.detail-info > *:last-child {
  margin-bottom: 0;
}

.detail-info h3 {
  font-size: 2rem;
  margin: 0;
}

.detail-info p {
  font-size: 1.2rem;
  margin: 0;
}

.detail-map {
  height: 300px;
  min-height: 300px;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .detail-body {
    padding: 1.5rem;
  }

  .detail-top {
    flex-direction: column;
  }

  .detail-info h3 {
    font-size: 1.6rem;
  }

  .detail-info p {
    font-size: 1.05rem;
  }

  .detail-map {
    height: 250px;
    min-height: 250px;
  }
}

/* Space between hero and listings */
main {
  margin-top: 2rem;
}

.results-footnote {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0 3rem;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.6);
}

.results-title {
  margin: 2rem 3% 0.5rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: #0d3054;
  text-align: left;
}
