/* =====================================================
   File: public/css/landing/18-search.css
   Search dropdown + results page — RTL, complete, polished
===================================================== */

/* --- Suggestions dropdown --- */
.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.24), 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 2000;
  /* ✅ Above hero and header scroll */
  max-height: min(320px, 45vh);
  /* ✅ Limit height as requested */
  overflow-y: auto;
  direction: rtl;
  text-align: right;
}

.suggestions-header {
  padding: 12px 16px;
  background: rgba(17, 24, 39, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.suggestions-title {
  font-weight: 800;
  font-size: 14px;
  color: #111827;
  font-family: "Cairo", sans-serif;
}

.suggestions-hint {
  font-size: 11px;
  font-weight: 700;
  color: rgba(17, 24, 39, 0.5);
  font-family: "Tajawal", sans-serif;
}

.suggestions-list {
  padding: 6px 8px;
}

.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 2px;
  border-radius: 10px;
  color: #111827;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.suggestion-item:last-child {
  margin-bottom: 0;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: rgba(245, 158, 11, 0.1);
  color: #0b3a78;
}

.suggestion-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.suggestion-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(11, 58, 120, 0.08);
  font-size: 15px;
}

.suggestion-item:hover .suggestion-icon,
.suggestion-item.active .suggestion-icon {
  background: rgba(245, 158, 11, 0.2);
}

.suggestion-text {
  font-weight: 700;
  font-size: 14px;
  font-family: "Tajawal", sans-serif;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

/* Category label removed from suggestions — no yellow/orange tag */

.suggestions-footer {
  padding: 10px 16px;
  background: rgba(17, 24, 39, 0.04);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: "Tajawal", sans-serif;
}

.suggestions-footer a {
  color: var(--accent-orange, #ff9f00);
  font-weight: 800;
  text-decoration: none;
}

.suggestions-footer a:hover {
  text-decoration: underline;
}

/* Loading / empty state */
.search-suggestions .suggestion-loading,
.search-suggestions .suggestion-empty {
  padding: 16px 14px;
  color: rgba(17, 24, 39, 0.6);
  font-weight: 700;
  font-size: 14px;
  font-family: "Tajawal", sans-serif;
  text-align: right;
  direction: rtl;
}

/* =========================
   Search results page (IJF-style)
========================= */
.search-results-page {
  padding: 32px 0 64px;
  direction: rtl;
  min-height: 50vh;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, transparent 120px);
}

.search-results-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.search-results-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(245, 158, 11, 0.25);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-results-heading {
  font-weight: 900;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  margin: 0;
  color: #111827;
  font-family: "Cairo", sans-serif;
  line-height: 1.3;
}

.search-results-heading .search-query {
  color: var(--accent-orange, #ff9f00);
  word-break: break-word;
}

.search-results-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(245, 158, 11, 0.12);
  color: #0b3a78;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.search-results-back:hover {
  background: rgba(245, 158, 11, 0.22);
  color: #0b3a78;
  transform: translateY(-1px);
}

.search-results-back-icon {
  font-size: 1.1rem;
}

/* No results */
.search-results-none {
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.search-results-none-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.7;
}

.search-results-none-text {
  font-weight: 800;
  font-size: 1.2rem;
  color: #111827;
  margin: 0 0 8px;
}

.search-results-none-hint {
  font-size: 0.95rem;
  color: rgba(17, 24, 39, 0.65);
  margin: 0 0 24px;
}

.search-results-none-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent-orange, #ff9f00);
  color: #111827;
  font-weight: 800;
  text-decoration: none;
  border-radius: 12px;
  transition: filter 0.2s ease, transform 0.15s ease;
}

.search-results-none-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  color: #111827;
}

/* Sections */
.search-results-section {
  margin-top: 28px;
}

.search-results-section:first-of-type {
  margin-top: 0;
}

.search-results-section-title {
  font-weight: 900;
  font-size: 1.2rem;
  margin: 0 0 12px;
  color: #111827;
  font-family: "Tajawal", sans-serif;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-results-section-icon {
  font-size: 1.25rem;
}

.search-results-section-count {
  font-weight: 700;
  font-size: 0.9rem;
  color: rgba(17, 24, 39, 0.55);
}

.search-results-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.search-results-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  color: #111827;
  text-decoration: none;
  font-weight: 700;
  font-family: "Tajawal", sans-serif;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease, color 0.15s ease;
}

.search-results-row:last-child {
  border-bottom: none;
}

.search-results-row:hover {
  background: rgba(245, 158, 11, 0.08);
  color: var(--accent-orange, #ff9f00);
}

.search-results-row-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-results-row-arrow {
  flex-shrink: 0;
  font-size: 1rem;
  opacity: 0.6;
  transition: transform 0.15s ease;
}

.search-results-row:hover .search-results-row-arrow {
  transform: translateX(-4px);
  opacity: 1;
}

.search-results-empty {
  padding: 20px 18px;
  margin: 0;
  color: rgba(17, 24, 39, 0.55);
  font-weight: 700;
  font-size: 0.95rem;
}

.search-results-pagination {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.search-results-pagination nav[role="navigation"] {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.search-results-pagination .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-results-pagination a,
.search-results-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.search-results-pagination a {
  background: rgba(245, 158, 11, 0.12);
  color: #0b3a78;
}

.search-results-pagination a:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #0b3a78;
}

.search-results-pagination span {
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
}

.search-results-pagination .disabled span {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .search-results-header {
    flex-direction: column;
    align-items: stretch;
  }

  .search-results-back {
    justify-content: center;
  }

  .search-results-row {
    padding: 12px 14px;
  }
}