/* ═══════════════════════════════════════════════════
   search.css — DLICT Search Page
   ═══════════════════════════════════════════════════ */

/* ─── Search Hero ─── */
.search-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 48px 0 40px;
  text-align: center;
}
.search-hero h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.search-hero p {
  font-size: .92rem;
  opacity: .9;
}

/* ─── Search Box ─── */
.search-hero-form { max-width: 720px; margin: 0 auto; }
.search-hero-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.search-hero-icon {
  color: var(--primary);
  font-size: 1rem;
  margin-right: 10px;
  flex-shrink: 0;
}
.search-hero-wrap input {
  flex: 1;
  border: 0;
  outline: 0;
  font-size: 1rem;
  padding: 12px 0;
  background: transparent;
  color: var(--text-main);
  min-width: 0;
}
.search-hero-wrap input::placeholder { color: #a0aec0; }
.search-hero-clear {
  color: #94a3b8;
  padding: 8px;
  text-decoration: none;
  transition: color .15s;
}
.search-hero-clear:hover { color: #ef4444; }
.search-hero-btn {
  background: var(--accent);
  color: var(--primary-dark);
  border: 0;
  border-radius: 50px;
  padding: 12px 26px;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.search-hero-btn:hover {
  background: #e0a800;
  transform: scale(1.03);
}

/* ─── Autocomplete ─── */
.ac-box {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.2);
  overflow: hidden;
  text-align: left;
  z-index: 1000;
  max-height: 420px;
  overflow-y: auto;
}
.ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  text-decoration: none;
  color: var(--text-main);
  border-bottom: 1px solid #f1f5f9;
  transition: background .15s;
}
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover { background: #f8fafc; }
.ac-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; background: #f1f5f9;
  font-size: .85rem;
}
.ac-body { flex: 1; min-width: 0; }
.ac-label {
  display: block;
  font-size: .88rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ac-type {
  display: block;
  font-size: .72rem; color: #94a3b8; margin-top: 1px;
}

/* ─── Filter Pills ─── */
.search-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(255,255,255,.15);
  color: #fff;
  text-decoration: none;
  font-size: .82rem;
  border: 1px solid rgba(255,255,255,.25);
  transition: all .2s;
}
.filter-pill:hover {
  background: rgba(255,255,255,.28);
  color: #fff;
}
.filter-pill.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  border-color: #fff;
}

/* ─── Search Summary ─── */
.search-summary {
  font-size: .95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.search-summary strong { color: var(--primary); }

/* ─── Result Sections ─── */
.result-section { margin-bottom: 32px; }
.result-title {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
}
.result-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ─── Result Items ─── */
.result-item {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: var(--text-main);
  transition: all .2s;
}
.result-item:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.result-item-compact { padding: 12px 14px; }

.result-thumb {
  width: 110px; height: 80px; flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  color: #94a3b8;
  font-size: 1.6rem;
}
.result-thumb-wide { width: 130px; height: 74px; }
.result-thumb img { width: 100%; height: 100%; object-fit: cover; }

.result-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  background: #f8fafc;
}

.result-body { flex: 1; min-width: 0; }
.result-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px; flex-wrap: wrap;
}
.result-date { font-size: .75rem; color: var(--text-muted); }

.result-title-text {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--primary-dark);
  margin-bottom: 4px;
}
.result-item:hover .result-title-text { color: var(--primary); }

.result-snippet {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-meta { margin-top: 6px; font-size: .75rem; }

mark {
  background: #fff3a3;
  color: #92400e;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 600;
}

/* ─── Responsive ─── */
@media (max-width: 575px) {
  .search-hero { padding: 32px 0 28px; }
  .search-hero h1 { font-size: 1.4rem; }
  .search-hero-wrap { padding: 4px 4px 4px 16px; }
  .search-hero-btn { padding: 10px 18px; font-size: .82rem; }
  .result-thumb { width: 80px; height: 60px; font-size: 1.2rem; }
  .result-thumb-wide { width: 90px; height: 56px; }
  .result-title-text { font-size: .88rem; }
}