/* ============================================================
   DAILY OPPORTUNITIES — search.css
   Search page — inherits shared tokens from index.css
   Reuses: .listings-grid, .listing-card, .listing-*, .badge-*,
           .btn-apply, .cat-breadcrumb, .cat-results-bar,
           .no-results, .pagination-*, .qf-pill  (index/category)
   This file is ONLY the search-page delta.
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   UTILITIES (self-contained so search.css works standalone)
   ───────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Quick-filter pills — mirrors index.css .qf-pill */
.search-empty-cats .qf-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: #fff;
  border: 1.5px solid var(--border, #E5E7EB);
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted-text, #4B5563);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .2s, color .2s, background .2s, transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.search-empty-cats .qf-pill:hover {
  border-color: var(--green-bright, #43A047);
  color: var(--green-deep, #1B5E20);
  background: var(--green-pale, #F2F7F2);
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────────
   PAGE SHELL
   ───────────────────────────────────────────────────────────── */
.search-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5% clamp(64px, 10vw, 100px);
}

/* ─────────────────────────────────────────────────────────────
   SEARCH HERO
   Dark green header — lighter than homepage hero,
   no decorative orbs, focused on the search form below.
   ───────────────────────────────────────────────────────────── */
.search-hero {
  background: linear-gradient(135deg, var(--green-deep) 0%, #2E7D32 60%, #1B5E20 100%);
  border-radius: 0 0 28px 28px;
  margin: 0 calc(-5vw) 0;
  padding: clamp(36px, 5vw, 64px) 5% clamp(56px, 8vw, 90px);
  position: relative;
  overflow: hidden;
}

/* Dot-grid overlay — matches hero-section */
.search-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

/* Subtle amber orb top-right */
.search-hero::after {
  content: '';
  position: absolute;
  right: -60px; top: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,179,0,.15) 0%, transparent 68%);
  pointer-events: none;
}

.search-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

/* Breadcrumb inside hero — same colour overrides as tag.css */
.search-hero .cat-breadcrumb {
  margin-bottom: 18px;
}
.search-hero .cat-breadcrumb a,
.search-hero .cat-breadcrumb-sep,
.search-hero .cat-breadcrumb-current {
  color: rgba(255,255,255,.65);
}
.search-hero .cat-breadcrumb a:hover { color: #fff; }

.search-hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.search-hero-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(.9rem, 1.8vw, 1.05rem);
  color: rgba(255,255,255,.72);
  margin: 0;
  line-height: 1.6;
}
.search-hero-sub strong { color: #fff; font-weight: 600; }
.search-hero-query { color: var(--amber-bright); }
.search-hero-page  { color: rgba(255,255,255,.55); font-weight: 400; }

/* ─────────────────────────────────────────────────────────────
   SEARCH FORM — floating card below hero
   ───────────────────────────────────────────────────────────── */
.search-form-wrap {
  position: relative;
  z-index: 10;
  margin-top: -32px;
  padding: 0;
  margin-bottom: 8px;
}

.search-box {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 0;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
  transition: border-color .2s, box-shadow .2s;
}

.search-box:focus-within {
  border-color: var(--green-bright);
  box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 0 0 3px rgba(27,94,32,.10);
}

.search-icon {
  display: flex;
  align-items: center;
  padding: 0 14px 0 18px;
  color: var(--green-deep);
  flex-shrink: 0;
  pointer-events: none;
}

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 15px 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: .925rem;
  color: var(--dark-text);
  background: transparent;
  -webkit-appearance: none;
}
.search-input::placeholder { color: var(--light-text); }

/* Clear button — visible only when query is set */
.search-clear-btn {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: .8rem;
  color: var(--light-text);
  text-decoration: none;
  flex-shrink: 0;
  transition: color .18s;
  border: none;
  background: transparent;
  cursor: pointer;
}
.search-clear-btn:hover { color: var(--muted-text); }

.search-submit-btn {
  padding: 0 clamp(18px, 3vw, 28px);
  background: var(--green-deep);
  color: #fff;
  border: none;
  font-family: 'Poppins', sans-serif;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 52px;
  transition: background .2s, transform .15s;
  letter-spacing: .01em;
}
.search-submit-btn:hover  { background: var(--green-mid); }
.search-submit-btn:active { transform: scale(.98); }

/* ─────────────────────────────────────────────────────────────
   RESULTS BAR — slight top spacing override
   ───────────────────────────────────────────────────────────── */
.search-page .cat-results-bar {
  margin-top: 36px;
  margin-bottom: 4px;
}

/* ─────────────────────────────────────────────────────────────
   NO RESULTS — search-specific copy
   Inherits .no-results from category.css
   ───────────────────────────────────────────────────────────── */
.search-no-results {
  margin-top: 40px;
}

/* ─────────────────────────────────────────────────────────────
   EMPTY STATE (no query entered)
   ───────────────────────────────────────────────────────────── */
.search-empty-state {
  text-align: center;
  padding: clamp(40px, 8vw, 80px) 24px;
  max-width: 580px;
  margin: 0 auto;
}

.search-empty-icon {
  color: var(--light-text);
  margin-bottom: 20px;
  opacity: .40;
  display: flex;
  justify-content: center;
}

.search-empty-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.3rem, 2.8vw, 1.6rem);
  font-weight: 700;
  color: var(--dark-text);
  margin: 0 0 12px;
  letter-spacing: -.02em;
}

.search-empty-body {
  font-family: 'DM Sans', sans-serif;
  color: var(--muted-text);
  font-size: .9rem;
  line-height: 1.7;
  margin: 0 0 28px;
}

/* Quick-category pills in empty state — reuse .qf-pill from index.css */
.search-empty-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .search-hero {
    border-radius: 0 0 20px 20px;
    padding: 32px 5% 52px;
  }
  .search-form-wrap { margin-top: -28px; }
  .search-box       { border-radius: 12px; }
  .search-submit-btn {
    padding: 0 18px;
    font-size: .825rem;
  }
  .search-page .cat-results-bar { margin-top: 24px; }
}

@media (max-width: 480px) {
  .search-hero       { margin: 0 -5%; padding: 28px 5% 44px; }
  .search-icon       { padding-left: 12px; }
  .search-input      { font-size: .875rem; padding: 13px 4px; }
  .search-submit-btn { padding: 0 14px; min-height: 46px; }
  .search-empty-cats { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .search-box,
  .search-submit-btn,
  .search-clear-btn {
    transition: none !important;
    animation: none !important;
  }
}