/* VicTowns Finder — dark navy / black / white / grey theme */

:root {
  --navy-950: #050b16;
  --navy-900: #0a1628;
  --navy-800: #10233d;
  --navy-700: #17304f;
  --blue-500: #2f6fb0;
  --blue-400: #5b9bd8;
  --blue-300: #8fc0ea;
  --grey-50:  #f6f7f9;
  --grey-100: #eceef1;
  --grey-200: #dde1e6;
  --grey-400: #9aa2ad;
  --grey-600: #5b6470;
  --grey-800: #2a2f36;
  --white: #ffffff;
  --black: #06080b;

  --radius: 10px;
  --shadow: 0 8px 24px rgba(5, 11, 22, 0.12);
  --shadow-lg: 0 16px 40px rgba(5, 11, 22, 0.22);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--grey-50);
  color: var(--grey-800);
  line-height: 1.5;
}

/* ---- Hero ---- */
.hero {
  background: linear-gradient(160deg, var(--black) 0%, var(--navy-900) 45%, var(--navy-700) 100%);
  color: var(--white);
  padding: 72px 24px 96px;
  text-align: center;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 40px;
  background: var(--grey-50);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero-inner { max-width: 760px; margin: 0 auto; position: relative; z-index: 1; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--blue-300);
  margin: 0 0 12px;
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero .tagline {
  margin: 0;
  color: var(--grey-200);
  font-size: 1.05rem;
}

/* ---- Search card ---- */
.page {
  max-width: 980px;
  margin: -64px auto 64px;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.search-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 28px 28px 22px;
  border: 1px solid var(--grey-200);
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field-main input { font-size: 1.15rem; padding: 14px 16px; }

.field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grey-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field input {
  border: 1px solid var(--grey-200);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
  background: var(--grey-50);
  color: var(--navy-950);
  transition: border-color .15s, box-shadow .15s;
}

.field input:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(47, 111, 176, 0.18);
  background: var(--white);
}

.field-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.field-small { width: 100px; margin-bottom: 16px; }

.btn-primary, .btn-ghost {
  height: 44px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(160deg, var(--navy-800), var(--black));
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn-primary:hover { filter: brightness(1.15); }

.btn-ghost {
  background: var(--white);
  color: var(--grey-600);
  border-color: var(--grey-200);
}
.btn-ghost:hover { background: var(--grey-100); }

.hint {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--grey-600);
  border-top: 1px solid var(--grey-100);
  padding-top: 12px;
}

/* ---- Results ---- */
.results { margin-top: 32px; }

.results-placeholder, .results-empty {
  text-align: center;
  color: var(--grey-600);
  padding: 40px 20px;
}

.results-meta {
  color: var(--grey-600);
  font-size: 0.9rem;
  margin: 0 4px 14px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.result-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .12s, box-shadow .12s;
}
.result-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.result-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--grey-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.result-thumb img { width: 100%; height: 100%; object-fit: contain; background: var(--white); cursor: zoom-in; }
.result-thumb .no-image { display: none; font-size: 0.78rem; color: var(--grey-400); }
.result-thumb.no-image-mode img { display: none; }
.result-thumb.no-image-mode .no-image { display: block; }

.result-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }

.result-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy-950);
}

.match-row { display: flex; align-items: center; gap: 8px; }
.match-bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--grey-200);
  overflow: hidden;
}
.match-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-400), var(--navy-800));
  border-radius: 999px;
}
.match-pct {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy-800);
  min-width: 40px;
  text-align: right;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue-500);
  text-decoration: none;
}
.map-link:hover { color: var(--navy-800); text-decoration: underline; }

/* ---- Full-size image lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 8, 11, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }

.lightbox-img {
  max-width: min(92vw, 1100px);
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  cursor: default;
  background: var(--white);
}

.lightbox-caption {
  color: var(--grey-200);
  margin-top: 16px;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.18); }

.site-footer {
  text-align: center;
  color: var(--grey-400);
  font-size: 0.8rem;
  padding: 28px 20px 48px;
}

/* ---- Vadmin shared (imported by vadmin/assets too via link) ---- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-matched { background: #e2f0ff; color: var(--navy-800); }
.badge-review { background: #fff2d9; color: #8a5a00; }
.badge-unmatched { background: var(--grey-200); color: var(--grey-600); }
