@media (min-width: 900px) {
  input,
  textarea {
    padding-bottom: 0.5rem !important;
  }
}

.search-page-section {
  margin-top: 14rem;
  background-color: var(--color-white);
  min-height: 80vh;
}

@media (min-width: 900px) and (max-width: 1199px) {
  .search-page-section {
    margin-top: 10rem;
  }
}

.search-header-block {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-grey-050);
}

.search-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 1rem;
}

.query-text {
  color: var(--color-blue-100);
}

.search-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 15px;
}

.search-stats {
  color: var(--color-grey-300);
  font-size: 0.9rem;
}

.search-refine-form {
  flex-grow: 1;
  max-width: 400px;
}

.custom-search-form {
  width: 100%;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.custom-search-form .search-field {
  width: 100%;
  height: 48px;
  padding: 0 12px !important;
  background-color: var(--color-white);
  border: 1px solid var(--color-grey-200);
  border-radius: 0;
  font-size: 1.2rem;
  color: var(--color-black);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}

.custom-search-form .search-field:focus {
  border-color: var(--color-blue-100);
  box-shadow: 0 0 0 3px rgba(38, 90, 166, 0.1);
  outline: none;
}

.custom-search-form .search-field::placeholder {
  color: var(--color-grey-300);
}

.custom-search-form .search-submit {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 48px;
  background: transparent;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-grey-400);
  transition: color 0.2s;
  z-index: 10;
  padding: 0;
}

.custom-search-form .search-submit:hover {
  color: var(--color-blue-100);
}

.custom-search-form .search-submit svg {
  width: 20px;
  height: 20px;
  display: block;
}

.search-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.search-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--color-grey-010);
}

.search-item:last-child {
  border-bottom: none;
}

.search-item__meta {
  font-size: 0.8rem;
  color: var(--color-grey-300);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-item__type {
  font-weight: 500;
  text-transform: uppercase;
  color: var(--color-grey-400);
}

.search-item__title {
  font-size: 1.375rem;
  line-height: 1.4;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.search-item__title a {
  color: var(--color-blue-100);
  text-decoration: none;
}

.search-item__title a:hover {
  text-decoration: underline;
  color: var(--color-blue-200);
}

.search-item__url {
  font-size: 0.85rem;
  color: var(--color-green-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.5rem;
}

.search-item__excerpt {
  color: var(--color-grey-400);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 95%;
}

.search-item__excerpt strong,
.search-item__excerpt mark {
  background-color: transparent;
  color: var(--color-black);
  font-weight: 700;
}

.search-pagination {
  margin-top: 3rem;
  padding-top: 2rem;
}

.search-pagination .nav-links {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-start;
}

.search-pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0;
  color: var(--color-black);
  border: 1px solid var(--color-grey-050);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.search-pagination .page-numbers.current,
.search-pagination .page-numbers:hover {
  background: var(--color-grey-010);
  border-color: var(--color-grey-200);
  color: var(--color-black);
}

.search-empty-state {
  padding: 3rem 0;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

@media (max-width: 768px) {
  .search-meta-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-refine-form,
  .custom-search-form,
  .custom-search-form .search-field {
    width: 100%;
  }

  .search-refine-form {
    max-width: 100%;
  }

  .search-item__excerpt {
    max-width: 100%;
    font-size: 0.95rem;
  }
}
