/* ==========================================================================
   Search Results Page — loaded only on search pages
   ==========================================================================
   Typography: National (brand) + Source Sans Pro (body)
   Palette: Cardinal #990000, Gold #fc0, neutrals
   ========================================================================== */

/* ==========================================================================
   Layout
   ========================================================================== */

.site-main > .content-area > .content-block {
  max-width: 70rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* ==========================================================================
   Hero Banner
   ========================================================================== */

.search-hero {
  background: #f4f4f4;
  padding: 5rem 2rem 4.5rem;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.search-hero__inner {
  max-width: 70rem;
  margin: 0 auto;
}

.search-hero__title {
  font-family: National, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: #990000;
  margin: 0 0 0.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-hero__accent {
  color: #990000;
}

.search-hero__subtitle {
  font-family: National, Helvetica, Arial, sans-serif;
  font-size: 1.75rem;
  font-weight: 300;
  color: #444;
  margin: 0 0 2rem;
  line-height: 1.3;
}

.search-hero__subtitle strong {
  font-weight: 900;
  color: #000;
}

.search-hero__form {
  margin: 0 auto;
}

/* Mirror the header search bar shape: flat form, pill-shaped input wrapper
   with leading magnifier + trailing return-submit icon. The hidden
   .search-submit text button is the legacy fallback; the visible submit is
   the return icon inside the pill. */
.search-hero__form .site-search {
  display: block;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.search-hero__form .site-search__pill {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  padding: 0.5rem 1.25rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-hero__form .site-search__pill:focus-within {
  border-color: #990000;
  box-shadow: 0 2px 16px rgba(153, 0, 0, 0.1);
}

.search-hero__form .site-search__icon,
.search-hero__form .site-search__return {
  display: inline-flex;
  align-items: center;
  color: #666;
  flex: 0 0 auto;
}

.search-hero__form .site-search__return {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0.375rem;
  margin: -0.375rem;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}
.search-hero__form .site-search__return:hover,
.search-hero__form .site-search__return:focus-visible {
  opacity: 1;
}
.search-hero__form .site-search__return:focus-visible {
  outline: 2px solid #990000;
  outline-offset: 2px;
}

.search-hero__form .search-field {
  flex: 1;
  border: none;
  padding: 0.625rem 0;
  font-size: 1.125rem;
  font-weight: 400;
  color: #222;
  outline: none;
  background: transparent;
  min-width: 0;
}

.search-hero__form .search-field::placeholder {
  color: #999;
}

/* Legacy text-submit button is replaced by the return icon inside the pill. */
.search-hero__form .search-submit {
  display: none;
}

.search-hero__form .search-typeahead-dropdown {
  border-radius: 0.5rem;
  text-align: left;
}

.search-hero__count {
  font-family: National, Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #444;
  margin: 1.5rem 0 0;
  letter-spacing: 0.02em;
}

.search-hero__suggestion {
  font-family: National, Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  font-weight: 300;
  color: #666;
  margin: 1rem 0 0;
}

.search-hero__suggestion a {
  font-weight: 700;
  color: #990000;
  text-decoration: none;
}

.search-hero__suggestion a:hover {
  text-decoration: underline;
}

.search-hero__suggestion-original {
  font-size: 1rem;
  color: #999;
}

.search-hero__suggestion-original a {
  color: #666;
  font-weight: 500;
}

/* ==========================================================================
   Result Cards
   ========================================================================== */

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

.search-results .search-typeahead-empty {
  padding: 4rem 2rem;
  font-family: National, Helvetica, Arial, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #444;
}

.search-result {
  padding: 2rem 0;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.search-result:first-child {
  padding-top: 0;
}

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

.search-result__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.search-result__badge {
  display: inline-block;
  font-family: National, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #990000;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0;
  background: none;
}

.search-result__badge::before {
  content: "\2014\2002";
  color: #ddd;
}

.search-result__badge:first-child::before {
  display: none;
}

.search-result__badge[data-type="people"] {
  color: #990000;
  background: none;
}

.search-result__title {
  font-family: National, Helvetica, Arial, sans-serif;
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  flex-basis: 100%;
}

.search-result__title a {
  color: #000;
  text-decoration: none;
  transition: color 0.2s;
}

.search-result__title a:hover {
  color: #990000;
}

.search-result__excerpt {
  font-size: 1.125rem;
  font-weight: 300;
  color: #444;
  line-height: 1.7;
  margin: 0.5rem 0 0;
  max-width: 55rem;
}

.search-result__meta {
  margin-top: 0.75rem;
}

.search-result__date {
  font-size: 1rem;
  font-weight: 300;
  color: #999;
}

.search-result__score {
  display: inline-block;
  height: 3px;
  max-width: 3rem;
  background: linear-gradient(to right, #990000, #c00);
  border-radius: 2px;
  vertical-align: middle;
  margin-left: 0.5rem;
}

.search-result mark {
  background: rgba(153, 0, 0, 0.07);
  color: inherit;
  padding: 0.125rem 0.1875rem;
  border-radius: 2px;
}

/* ==========================================================================
   Loading Skeleton
   ========================================================================== */

.search-result--skeleton {
  padding: 2rem 0;
  border-bottom: 1px solid #eee;
}

.search-result--skeleton .skeleton-line {
  background: linear-gradient(90deg, #f4f4f4 25%, #eaeaea 50%, #f4f4f4 75%);
  background-size: 200% 100%;
  border-radius: 2px;
  animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.search-result--skeleton .skeleton-badge {
  width: 5rem;
  height: 1rem;
  margin-bottom: 0.75rem;
}

.search-result--skeleton .skeleton-title {
  width: 55%;
  height: 1.5rem;
  margin-bottom: 0.75rem;
}

.search-result--skeleton .skeleton-text {
  width: 85%;
  height: 1rem;
  margin-bottom: 0.5rem;
}

.search-result--skeleton .skeleton-text:last-child {
  width: 60%;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.search-tips {
  margin: 2.5rem 0;
}

.search-tips h3 {
  font-family: National, Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.search-tips ul {
  list-style: none;
  padding-left: 0;
  color: #444;
}

.search-tips li {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  font-weight: 300;
  padding-left: 1.5rem;
  position: relative;
}

.search-tips li::before {
  content: "\2013";
  position: absolute;
  left: 0;
  color: #ccc;
}

.search-browse {
  margin: 2.5rem 0;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.search-browse h3 {
  font-family: National, Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.search-browse__list {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
}

.search-browse__list a {
  font-family: National, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #990000;
  text-decoration: none;
  letter-spacing: 0.02em;
  padding-bottom: 0.125rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.search-browse__list a:hover {
  border-bottom-color: #990000;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.search-results--enhanced .paging-navigation {
  background: none;
  min-height: auto;
  padding: 0;
}

.search-results--enhanced .paging-navigation .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.search-pagination {
  padding: 2.5rem 0;
  border-top: 2px solid #000;
}

.search-pagination__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  height: 3rem;
  padding: 0 0.75rem;
  font-family: National, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #444;
  text-decoration: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  transition:
    color 0.2s,
    border-color 0.2s;
  cursor: pointer;
}

.search-pagination__item:hover:not(.is-disabled):not(.is-current) {
  color: #990000;
  border-bottom-color: #990000;
}

.search-pagination__item.is-current {
  color: #990000;
  border-bottom-color: #990000;
  cursor: default;
}

.search-pagination__item.is-disabled {
  color: #ddd;
  cursor: default;
}

.search-pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 3rem;
  font-size: 1rem;
  color: #ccc;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 54em) {
  .search-hero {
    padding: 6rem 2rem 5.5rem;
  }

  .search-hero__subtitle {
    font-size: 2.25rem;
  }

  .search-result__title {
    font-size: 1.75rem;
  }

  .search-result__excerpt {
    font-size: 1.1875rem;
  }
}

@media (min-width: 70em) {
  .search-hero {
    padding: 7rem 2rem 6.5rem;
  }

  .search-hero__subtitle {
    font-size: 2.75rem;
  }
}
