/* ════════════════════════════════════════════
   SEARCH PAGE — search.css
   Depends on styles.css design tokens
════════════════════════════════════════════ */

/* ── Search Hero ─────────────────────────────────────────────────── */
.search-hero {
  background: #0d1b2a;
  padding: 52px 24px 40px;
}
.search-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}
.search-hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 24px;
}
.search-hero-title em {
  color: #00b4d8;
  font-style: normal;
}

/* ── Search Form ─────────────────────────────────────────────────── */
.search-form { position: relative; }

.search-box-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  overflow: visible;
  position: relative;
}

.srp-cat-select {
  border: none;
  background: transparent;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0d1b2a;
  padding: 0 16px 0 20px;
  height: 52px;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  max-width: 160px;
}

.search-divider {
  width: 1px;
  height: 28px;
  background: #d0dce5;
  flex-shrink: 0;
}

.srp-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  color: #0d1b2a;
  padding: 0 16px;
  height: 52px;
  outline: none;
  min-width: 0;
}
.srp-input::placeholder { color: #8fa3b1; }

.srp-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #00b4d8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 4px;
  flex-shrink: 0;
  transition: background 0.2s;
}
.srp-btn:hover { background: #0096b8; }

/* ── Autocomplete Dropdown ───────────────────────────────────────── */
.ac-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.16);
  overflow: hidden;
  z-index: 200;
}
.ac-dropdown.open { display: block; }

.ac-group-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8fa3b1;
  padding: 10px 18px 4px;
}

.ac-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.15s;
}
.ac-item:hover,
.ac-item.focused { background: #f0f9fc; }

.ac-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ac-text {
  flex: 1;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.92rem;
  color: #0d1b2a;
}
.ac-text mark {
  background: none;
  color: #00b4d8;
  font-weight: 700;
}

.ac-sub {
  font-size: 0.78rem;
  color: #8fa3b1;
  flex-shrink: 0;
}

/* ── Category Filter Pills ───────────────────────────────────────── */
.search-cat-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid rgba(255,255,255,0.25);
  color: rgba(255,255,255,0.75);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  background: transparent;
}
.cat-pill:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.cat-pill.active {
  background: var(--pill-color, #00b4d8);
  border-color: var(--pill-color, #00b4d8);
  color: #fff;
}

/* ── Main Results Area ───────────────────────────────────────────── */
.search-main {
  background: #f4f7fb;
  min-height: 60vh;
  padding: 40px 24px 80px;
}
.search-inner {
  max-width: 1120px;
  margin: 0 auto;
}

.results-count {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.92rem;
  color: #6b7f8e;
  margin: 0 0 28px;
}
.results-count strong { color: #0d1b2a; }

/* ── Result Cards Grid ───────────────────────────────────────────── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.result-card {
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(13,27,42,0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.result-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px rgba(13,27,42,0.13);
}

.result-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f4f7fb;
}
.result-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.45s ease;
}
.result-card:hover .result-card-img img { transform: scale(1.06); }
.result-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.85;
}

.result-card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 12px;
  border-radius: 100px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.67rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.result-card-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.result-card-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0d1b2a;
  margin: 0;
  line-height: 1.3;
}

.result-card-desc {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.83rem;
  color: #6b7f8e;
  line-height: 1.5;
  margin: 0 0 14px;
  flex: 1;
}

.result-card-stats {
  display: flex;
  gap: 14px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4a6274;
}

/* ── No Results ──────────────────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 60px 24px;
}
.no-results-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}
.no-results h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.4rem;
  color: #0d1b2a;
  margin: 0 0 10px;
}
.no-results p {
  color: #6b7f8e;
  margin: 0 0 28px;
}
.no-results-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.no-results-cats .cat-pill {
  border-color: var(--pill-color, #00b4d8);
  color: var(--pill-color, #00b4d8);
}
.no-results-cats .cat-pill:hover {
  background: var(--pill-color, #00b4d8);
  color: #fff;
}

/* ── Landing State (no query yet) ───────────────────────────────── */
.search-landing {
  text-align: center;
  padding: 48px 0;
}
.search-landing-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8fa3b1;
  margin: 0 0 20px;
}
.search-landing-cats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.landing-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 130px;
  padding: 24px 16px;
  background: #fff;
  border-radius: 18px;
  border: 2px solid transparent;
  text-decoration: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  transition: all 0.2s;
}
.landing-cat-card:hover {
  border-color: var(--cat-color, #00b4d8);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}
.landing-cat-icon { font-size: 2.2rem; }
.landing-cat-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0d1b2a;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.search-page .site-footer {
  background: #0d1b2a;
  color: rgba(255,255,255,0.55);
  padding: 28px 24px;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.85rem;
}
.search-page .footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.search-page .footer-links { display: flex; gap: 20px; }
.search-page .footer-links a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
}
.search-page .footer-links a:hover { color: #fff; }

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .search-hero { padding: 36px 16px 28px; }

  .srp-cat-select { display: none; }
  .search-divider { display: none; }
  .srp-input { padding-left: 20px; }

  .results-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .landing-cat-card { width: calc(50% - 8px); }
}
