/* ═══════════════════════════════════════════════════════════════
   Search Member Page — Redesigned
   ═══════════════════════════════════════════════════════════════ */

/* Hero Banner */
.search-hero {
  background: linear-gradient(135deg, #0D3B1A, #1A6B2E);
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.search-hero-pattern {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20h40M20 0v40' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='0.5'/%3E%3C/svg%3E");
  pointer-events: none;
}
.search-hero-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}
.search-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: white;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}
.search-hero-subtitle {
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  margin: 0 0 1rem;
}
.search-breadcrumb {
  font-size: 0.9rem;
}
.search-breadcrumb a {
  color: var(--gold);
  text-decoration: none;
}
.search-breadcrumb a:hover {
  text-decoration: underline;
}
.search-breadcrumb span {
  color: rgba(255,255,255,0.7);
  margin: 0 0.35rem;
}

/* Search Section */
.search-page-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

/* Search Panel Card */
.search-panel {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(26,107,46,0.08);
  padding: 2rem;
  margin-top: -2rem;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(26,107,46,0.1);
}
.search-input-wrap {
  position: relative;
  margin-bottom: 1.25rem;
}
.search-input-wrap i {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--text-muted);
  pointer-events: none;
}
.search-input-wrap input {
  width: 100%;
  height: 56px;
  padding: 0 1.25rem 0 3rem;
  border: 2px solid #d4e5d8;
  border-radius: 12px;
  font-size: 1.05rem;
  font-family: inherit;
  background: #fff;
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input-wrap input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}
.search-input-wrap input:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 4px rgba(26,107,46,0.15);
}

/* Filter Row */
.search-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.search-filters select {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 2px solid #d4e5d8;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--text-dark);
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235A6B52' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}
.search-filters select:focus {
  outline: none;
  border-color: var(--green-mid);
}
.search-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  background: linear-gradient(135deg, var(--green-mid), var(--green-bright));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(26,107,46,0.35);
}
.search-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26,107,46,0.45);
}

/* Advanced Filters */
.search-advanced-toggle {
  display: inline-block;
  margin-top: 1rem;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}
.search-advanced-toggle:hover {
  text-decoration: underline;
}
.search-advanced-toggle i {
  margin-left: 0.25rem;
  transition: transform 0.2s;
}
.search-advanced-toggle.expanded i {
  transform: rotate(180deg);
}
.search-advanced {
  display: none;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}
.search-advanced.visible {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}
.search-advanced input {
  padding: 0.65rem 1rem;
  border: 2px solid #d4e5d8;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}
.search-advanced input:focus {
  outline: none;
  border-color: var(--green-mid);
}

/* Featured Members */
.search-featured-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 2.5rem 0 1.5rem;
  text-align: center;
}
.search-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.search-featured-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid rgba(26,107,46,0.08);
  border-left: 4px solid var(--green-mid);
}
.search-featured-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  text-decoration: none;
  color: var(--text-dark);
}
.search-featured-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  display: block;
  border: 3px solid var(--gold);
}
.search-featured-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}
.search-featured-role {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.search-featured-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-mid);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.search-featured-card:hover .search-featured-link {
  color: var(--green-bright);
}

/* Live Results (AJAX) */
#live-results {
  margin-top: 1.5rem;
}
.search-live-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 992px) {
  .search-live-results {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .search-live-results {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .search-filters {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-advanced.visible {
    grid-template-columns: 1fr;
  }
  .search-featured-grid {
    grid-template-columns: 1fr;
  }
  .search-panel {
    padding: 1.5rem;
    margin-top: -1.5rem;
  }
}
@media (max-width: 480px) {
  .search-filters {
    grid-template-columns: 1fr;
  }
  .search-hero {
    height: auto;
    padding: 2rem 1rem;
  }
}

/* ═══════════════════════════════════════════════════════════════
   Search Results Page
   ═══════════════════════════════════════════════════════════════ */
.search-results-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.search-results-count {
  color: var(--gold);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.search-results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.search-results-sort {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.search-results-sort label {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.search-results-sort select {
  padding: 0.5rem 1rem;
  border: 2px solid #d4e5d8;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
  color: var(--text-dark);
  cursor: pointer;
}
.search-results-sort select:focus {
  outline: none;
  border-color: var(--green-mid);
}
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.search-result-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  border: 1px solid rgba(26,107,46,0.08);
  border-left: 4px solid var(--green-mid);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.search-result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  text-decoration: none;
  color: var(--text-dark);
}
.search-result-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--gold);
}
.search-result-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
}
.search-result-gen {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.search-result-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}
.search-result-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--green-light);
  color: var(--green-mid);
  margin-bottom: 0.75rem;
}
.search-result-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--green-mid);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
}
.search-result-card:hover .search-result-link {
  color: var(--green-bright);
}

/* Empty State */
.search-empty-state {
  text-align: center;
  padding: 4rem 2rem;
}
.search-empty-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  background: var(--green-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-mid);
  font-size: 3rem;
}
.search-empty-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 0.5rem;
}
.search-empty-text {
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.search-empty-suggest {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Pagination */
.search-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}
.search-pagination a,
.search-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  border: 2px solid #d4e5d8;
  background: white;
  color: var(--text-dark);
}
.search-pagination a:hover {
  border-color: var(--green-mid);
  color: var(--green-mid);
  text-decoration: none;
}
.search-pagination .active {
  background: linear-gradient(135deg, var(--green-mid), var(--green-bright));
  border-color: var(--green-mid);
  color: white;
}
.search-pagination .disabled,
.search-pagination span.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  color: var(--text-muted);
}

@media (max-width: 992px) {
  .search-results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .search-results-grid {
    grid-template-columns: 1fr;
  }
  .search-results-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
