* {
  box-sizing: border-box;
}

html {
  font-size: 14.4px;
}

@media (min-width: 650px) {
  html {
    font-size: 14.4px;
  }
}

@media (min-width: 920px) {
  html {
    font-size: 18px;
  }
}

@media (min-width: 1640px) {
  html {
    font-size: 20.7px;
  }
}

html,
body {
  margin: 0;
  padding: 0;
  font-weight: 400;
}

body {
  font-family: "Raleway", sans-serif;
  font-size: 1rem;
  color: #000;
  background: #fff;
}

.boxed {
  margin-left: auto;
  margin-right: auto;
  max-width: 85rem;
  width: 100%;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .boxed {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .boxed {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

.search-results {
  padding-bottom: 3rem;
}

.search-results-form {
  background: linear-gradient(270deg, #00ebc8 0%, #2d73b9 50%, #0a1950 100%);
  padding: 3rem 0;
}

@media (min-width: 768px) {
  .search-results-form {
    padding: 4rem 0;
  }
}

.search-results-form__form {
  position: relative;
}

.search-results-form__input {
  font-family: inherit;
  font-size: clamp(2.25rem, calc(0.5rem + 5vw), 4rem);
  line-height: 1;
  display: inline-block;
  width: 100%;
  padding: 0 1.25rem 1.5rem 4rem;
  color: #fff;
  font-weight: 400;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  border-radius: 0;
  appearance: none;
}

@media (min-width: 768px) {
  .search-results-form__input {
    padding-left: 6rem;
  }
}

.search-results-form__input::placeholder {
  opacity: 1;
  color: #fff;
}

.search-results-form__input:focus {
  outline: none;
}

.search-results-form__submit {
  position: absolute;
  left: 0;
  top: calc(50% - 0.5rem);
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  border-radius: 100%;
  background: none;
}

@media (min-width: 768px) {
  .search-results-form__submit {
    width: 4rem;
    height: 4rem;
  }
}

.search-results-form__submit:hover {
  cursor: pointer;
}

.search-results-form__submit svg {
  width: 100%;
  height: 100%;
}

.search-results-heading {
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.2;
  margin: 1.5rem 0 2rem;
  color: rgba(0, 0, 0, 0.5);
}

.search-results-heading span {
  color: #0a1950;
  font-weight: 600;
  text-decoration: underline;
}

@media (min-width: 768px) {
  .search-results-heading {
    font-size: 2rem;
    margin-top: 2rem;
  }
}

.search-results-controls {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 8vmin;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #d4d4d4;
}

@media (min-width: 1024px) {
  .search-results-controls {
    flex-direction: row;
    gap: 2rem;
  }
}

.search-results-filter,
.search-results-sort {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.search-results-filter > div,
.search-results-sort > div {
  width: 100%;
}

.search-results-filter select,
.search-results-sort select {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 1024px) {
  .search-results-filter,
  .search-results-sort {
    flex-direction: row;
    gap: 1.25rem;
  }

  .search-results-filter > div,
  .search-results-sort > div {
    width: 25%;
    max-width: 225px;
  }

  .search-results-sort {
    justify-content: flex-end;
  }
}

.search-results-sort span {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.5px;
  line-height: 1;
}

.search-results-filter__reset a {
  font-size: 14px;
  color: #000;
  text-decoration: underline;
  font-weight: 500;
  transition: opacity 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.search-results-filter__reset a:hover {
  opacity: 0.5;
}

.styled-select {
  position: relative;
  background-color: transparent;
  appearance: none;
  outline: none;
  cursor: pointer;
  border: 1px solid #d4d4d4;
  border-radius: 25px;
  padding: 8px 3rem 8px 25px;
  min-height: 45px;
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  background-image: linear-gradient(45deg, transparent 50%, #0a1950 50%), linear-gradient(135deg, #0a1950 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.styled-select:focus,
.styled-select:active {
  background-color: #f8f8fa;
}

.search-results-items {
  border-top: 1px solid #d4d4d4;
}

.search-item {
  width: 100%;
  border-bottom: 1px solid #d4d4d4;
}

.search-item a {
  text-decoration: inherit;
  color: inherit;
}

.search-item-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.25rem 0;
}

@media (min-width: 768px) {
  .search-item-inner {
    flex-direction: row;
  }
}

a.search-item-inner {
  transition: opacity 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}

a.search-item-inner:hover {
  opacity: 0.8;
}

.search-item-figure {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  margin: 0;
  background-color: #f8f8fa;
  aspect-ratio: 16 / 9;
}

@media (min-width: 768px) {
  .search-item-figure {
    max-width: 20rem;
    width: 40%;
  }
}

.search-item-figure__thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.5rem;
  transition: opacity 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.search-item-figure__info {
  position: absolute;
  bottom: 0;
  left: 0;
  max-width: 90%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #0a1950;
  color: #fff;
  padding: 0.7rem 1.25rem 0.7rem 0.7rem;
  border-radius: 8px;
  border-bottom-left-radius: 0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
}

.search-item-figure__info span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-item-figure__info svg {
  width: 13px;
  height: 13px;
  margin-bottom: 2px;
}

.search-item-body {
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .search-item-body {
    width: 60%;
    max-width: 35rem;
  }
}

.search-item-content {
  flex-grow: 1;
}

.search-item-heading {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4;
}

.search-item-excerpt {
  margin: 1rem 0 0;
}

.search-item-excerpt p {
  font-size: 0.85rem;
  line-height: 1.5;
  font-weight: 400;
  margin: 0;
}

.search-item-footer {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.5rem;
  row-gap: 0.3rem;
  margin-top: auto;
  padding-top: 2.5rem;
}

.search-item-footer > div {
  padding: 6px 16px;
  border: 1px solid #d4d4d4;
  border-radius: 25px;
  line-height: 1;
  font-size: 12px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.search-item-footer > div:not(:first-child) {
  background-color: #f1f5f9;
}

.loading,
.search-results-no-content-found {
  padding: 2rem;
  margin-top: 1rem;
  width: 100%;
  text-align: center;
  color: rgba(0, 0, 0, 0.5);
}

.loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #d4d4d4;
  border-top-color: #0a1950;
  border-radius: 50%;
  margin: 0 auto 0.8rem;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
