/* === Search Page === */

.search-page {
  padding-bottom: 80px;
}

/* --- Hero --- */
.search-hero {
  padding: 100px 0 40px !important;
  text-align: center;
}

.search-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--main-bg-color);
  margin-bottom: 30px;
}

/* --- Search form --- */
.search-form {
  max-width: 680px;
  margin: 0 auto;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 50px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  padding: 6px 6px 6px 20px;
  gap: 12px;
  transition: box-shadow 0.3s ease;
}

.search-input-wrap:focus-within {
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.14);
}

.search-input-icon {
  flex-shrink: 0;
  color: var(--dark-text-color);
}

.search-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  color: var(--main-bg-color);
  background: transparent;
  padding: 12px 0;
}

.search-input-wrap input::placeholder {
  color: #aab5b5;
}

.search-input-wrap button {
  flex-shrink: 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  padding: 14px 32px;
  background: var(--gold-color);
  color: #fff;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    transform 0.25s ease;
}

.search-input-wrap button:hover {
  background-color: #d4b200;
  transform: translateY(-1px);
}

/* --- Results --- */
.search-results {
  padding: 20px 0;
}

.search-hint {
  text-align: center;
  font-size: 17px;
  color: var(--dark-text-color);
  padding: 40px 0;
}

.search-count {
  font-size: 15px;
  color: var(--dark-text-color);
  margin-bottom: 30px;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  max-width: 860px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
  text-decoration: none;
  color: var(--dark-text-color);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background-color 0.2s;
}

.search-result-item:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.search-result-item:hover h3 {
  color: var(--gold-color);
}

.search-result-img {
  width: 180px;
  height: 120px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--border-radius);
}

.search-result-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.search-result-item:hover .search-result-img img {
  transform: scale(1.05);
}

.search-result-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-result-tag {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-color);
}

.search-result-body h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--main-bg-color);
  transition: color 0.25s;
}

.search-result-body p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--dark-text-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-meta {
  display: flex;
  gap: 6px;
  font-size: 13px;
  color: #999;
}

/* --- Empty state --- */
.search-empty {
  text-align: center;
  padding: 40px 0;
}

.search-empty-title {
  font-family: "Montserrat", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--main-bg-color);
  margin-bottom: 12px;
}

.search-empty-hint {
  font-size: 16px;
  color: var(--dark-text-color);
  margin-bottom: 30px;
}

.search-topics-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.search-topic-link {
  display: inline-block;
  padding: 10px 22px;
  background: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--main-bg-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

.search-topic-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  color: var(--gold-color);
}

/* --- Homepage search bar (inline) --- */
.home-search {
  padding: 0;
  margin-top: -30px;
  position: relative;
  z-index: 5;
}

.home-search-inner {
  max-width: 680px;
  margin: 0 auto;
}

/* === Responsive === */

@media (max-width: 768px) {
  .search-result-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .search-result-img {
    width: 100%;
    height: 180px;
  }
  .search-result-body h3 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .search-input-wrap {
    flex-wrap: wrap;
    border-radius: var(--border-radius);
    padding: 12px;
    gap: 10px;
  }
  .search-input-wrap input {
    width: 100%;
  }
  .search-input-wrap button {
    width: 100%;
    text-align: center;
  }
  .search-input-icon {
    display: none;
  }
}
