:root {
  --navy: #000066;
  --navy-deep: #000052;
  --blue-soft: #dce8fb;
  --blue-row: rgba(0, 123, 255, 0.5);
  --ink: #202020;
  --muted: #60646c;
  --line: #d9dce3;
  --paper: #ffffff;
  --page: #ffffff;
  --danger: #a82626;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--page);
  color: var(--ink);
  margin: 0;
}

[v-cloak] {
  display: none;
}

.bilingual-nav-link {
  align-items: center;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 4rem;
}

.nav-language-divider {
  border-top: 1px solid currentColor;
  display: block;
  margin: 0.3rem auto;
  opacity: 0.65;
  width: 2.25rem;
}

.search-page {
  margin: 0 auto;
  max-width: 72rem;
  padding: clamp(1.5rem, 3vw, 2.75rem) clamp(1rem, 4vw, 3rem) 4rem;
}

.search-intro {
  margin: 0 auto;
  max-width: 58rem;
  text-align: center;
}

.memorial-dedication {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

.search-intro h1 {
  align-items: center;
  color: var(--navy);
  display: flex;
  flex-wrap: wrap;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  gap: 0.8rem 1.25rem;
  justify-content: center;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

.search-intro h1 span[lang="he"] {
  font-weight: 600;
  letter-spacing: 0;
}

.title-divider {
  align-self: stretch;
  border-left: 1px solid var(--navy);
  opacity: 0.3;
}

.search-intro__summary {
  align-items: center;
  color: var(--navy);
  display: flex;
  flex-wrap: wrap;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 600;
  gap: 0.4rem 0.7rem;
  justify-content: center;
  margin: 1rem 0 0;
}

.search-intro__guidance {
  align-items: start;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  line-height: 1.55;
  margin: 1.15rem 0 0;
  padding-top: 0.9rem;
  text-align: left;
}

.search-intro__guidance span[dir="rtl"] {
  text-align: right;
}

.search-workspace {
  margin-top: clamp(1.25rem, 2.5vw, 2rem);
}

.search-form {
  background: var(--paper);
  border: 1px solid rgba(0, 0, 102, 0.2);
  border-radius: 1rem;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 80, 0.1);
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.search-form:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(168, 199, 244, 0.7), 0 0.75rem 2rem rgba(0, 0, 80, 0.12);
}

.search-form input {
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  min-width: 0;
  outline: 0;
  padding: 1.15rem 1.35rem;
}

.search-form input::placeholder {
  color: #797d86;
}

.search-form button {
  align-items: center;
  background: var(--navy);
  border: 0;
  color: #fff;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: 700;
  gap: 0.45rem;
  padding: 0.8rem 1.35rem;
  transition: background-color 150ms ease;
}

.search-form button:hover,
.search-form button:focus-visible {
  background: var(--navy-deep);
}

.search-form button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.search-form button svg {
  fill: none;
  height: 1.2rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
  width: 1.2rem;
}

.search-options {
  align-items: center;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

.search-options label {
  color: var(--navy);
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  text-align: right;
}

.search-options small {
  color: var(--muted);
  font-weight: 400;
}

.search-options input {
  background: var(--paper);
  border: 1px solid rgba(0, 0, 102, 0.3);
  border-radius: 0.6rem;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  padding: 0.45rem;
  text-align: center;
  width: 4.25rem;
}

.search-options input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(168, 199, 244, 0.65);
  outline: 0;
}

.results-heading {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin: 1.75rem 0 0.65rem;
}

.results-heading p {
  margin: 0;
}

.results-heading strong {
  color: var(--navy);
  display: block;
  font-size: 1.15rem;
}

.results-heading strong + span,
.results-heading__hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.search-result-groups {
  display: grid;
  gap: 1.8rem;
}

.search-result-group__heading {
  align-items: baseline;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  margin: 0 0 0.6rem;
}

.search-result-group__heading h2 {
  color: var(--navy);
  font-size: 1.25rem;
  margin: 0;
}

.search-result-group__heading span {
  color: var(--muted);
  font-size: 0.85rem;
}

.search-results {
  border-radius: 1rem;
  box-shadow: 0 0.65rem 1.75rem rgba(0, 0, 80, 0.1);
  list-style: none;
  margin: 0;
  overflow: hidden;
  padding: 0;
}

.search-result {
  background: var(--paper);
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 23%);
  padding: 1.25rem 1.4rem;
}

.search-result:nth-child(even) {
  background: var(--blue-row);
}

.search-result + .search-result {
  border-top: 1px solid rgba(0, 0, 102, 0.12);
}

.search-result__context {
  color: var(--muted);
  display: flex;
  font-size: 0.85rem;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin: 0 0 0.25rem;
}

.search-result h3 {
  color: var(--navy);
  font-size: 1.25rem;
  margin: 0 0 0.45rem;
}

.search-result__excerpt {
  line-height: 1.55;
  margin: 0;
}

.search-result__match {
  color: inherit;
  font-weight: 700;
}

.search-result__source-note {
  color: var(--muted);
}

.search-result__actions {
  align-content: center;
  border-left: 1px solid rgba(0, 0, 102, 0.15);
  display: grid;
  gap: 0.55rem;
  padding-left: 1rem;
}

.search-result__source {
  align-items: center;
  border: 1px solid rgba(0, 0, 102, 0.35);
  border-radius: 999px;
  color: var(--navy);
  display: flex;
  gap: 0.45rem;
  justify-content: center;
  line-height: 1.3;
  padding: 0.48rem 0.75rem;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.search-result__source:hover,
.search-result__source:focus-visible {
  background: var(--blue-soft);
  color: var(--navy);
  text-decoration: none;
}

.search-result__source svg {
  fill: none;
  height: 1.15rem;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1.15rem;
}

.search-result__actions form {
  margin: 0;
}

.search-result__actions form button,
.purchase-all button {
  background: var(--navy);
  border: 1px solid var(--navy);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.48rem 0.75rem;
  transition: background-color 150ms ease;
  width: 100%;
}

.search-result__actions form button:hover,
.search-result__actions form button:focus-visible,
.purchase-all button:hover,
.purchase-all button:focus-visible {
  background: var(--navy-deep);
}

.search-message {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 1rem;
  color: var(--muted);
  padding: 3rem 1.5rem;
  text-align: center;
}

.search-message--error {
  color: var(--danger);
}

.results-footer {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.load-more-results {
  background: var(--paper);
  border: 1px solid rgba(0, 0, 102, 0.3);
  border-radius: 999px;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.6rem 1rem;
}

.load-more-results:hover,
.load-more-results:focus-visible {
  background: var(--navy);
  color: #fff;
}

.load-more-results:disabled {
  cursor: wait;
  opacity: 0.55;
}

.search-pagination {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 0;
}

.search-pagination > span {
  color: var(--muted);
  min-width: 7rem;
  text-align: center;
}

.search-pagination button {
  background: var(--paper);
  border: 1px solid rgba(0, 0, 102, 0.3);
  border-radius: 999px;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0.55rem 1rem;
  transition: background-color 150ms ease, color 150ms ease;
}

.search-pagination button:hover:not(:disabled),
.search-pagination button:focus-visible:not(:disabled) {
  background: var(--navy);
  color: #fff;
}

.search-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.purchase-all {
  display: grid;
  gap: 0.25rem;
  margin: 0;
}

.purchase-all button {
  padding-inline: 1rem;
  max-width: 100%;
  text-align: center;
}

.purchase-all__saving {
  color: #2f6b3f;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.search-result__book {
  color: var(--navy);
  font-weight: 650;
}

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (min-width: 992px) {
  .site-navbar__primary {
    margin-right: auto;
  }

  .site-navbar__utilities {
    margin-left: auto;
  }
}

@media (min-width: 992px) and (max-width: 1300px) {
  .navbar-nav .nav-item.mx-5 {
    margin-left: 1.6rem !important;
    margin-right: 1.6rem !important;
  }
}

@media (max-width: 991.98px) {
  .navbar-nav .nav-item.mx-5 {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

@media (max-width: 720px) {
  .search-page {
    padding-top: 1.35rem;
  }

  .search-intro h1 {
    display: grid;
    gap: 0.55rem;
  }

  .title-divider {
    border-left: 0;
    border-top: 1px solid var(--navy);
    justify-self: center;
    width: 3.5rem;
  }

  .search-intro__summary span[aria-hidden="true"] {
    display: none;
  }

  .search-intro__summary span {
    flex-basis: 100%;
  }

  .search-intro__guidance {
    gap: 0.75rem;
    grid-template-columns: 1fr;
  }

  .search-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .search-form button span {
    display: none;
  }

  .search-form button {
    padding-inline: 1.15rem;
  }

  .search-options {
    align-items: flex-end;
  }

  .search-options label {
    max-width: 15rem;
  }

  .results-heading {
    align-items: start;
    display: block;
  }

  .results-heading__hint {
    display: block;
    margin-top: 0.35rem !important;
  }

  .search-result {
    gap: 0.75rem;
    grid-template-columns: 1fr;
    padding: 1.1rem 1.15rem;
  }

  .search-result__actions {
    border-left: 0;
    border-top: 1px solid rgba(0, 0, 102, 0.12);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
    padding-top: 0.7rem;
  }

  .results-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .load-more-results {
    width: 100%;
  }

  .search-pagination {
    gap: 0.5rem;
  }

  .search-pagination > span {
    font-size: 0.85rem;
    min-width: 5.5rem;
  }

  .search-pagination button {
    padding-inline: 0.8rem;
  }
}

@media (max-width: 400px) {
  .search-result__actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Site-aligned presentation. Keep the established two-column result-card layout. */
:root {
  --navy: #080b53;
  --navy-deep: #151a75;
  --blue-soft: #dce8fb;
  --blue-row: #f4f7fc;
  --ink: #202020;
  --muted: #62656d;
  --line: #dedede;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: #fff;
}

.site-icon {
  display: inline-block;
  flex: 0 0 auto;
  fill: currentColor;
  height: 1em;
  overflow: visible;
  vertical-align: -0.125em;
  width: 1em;
}

.site-navbar__cart {
  align-items: center;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  flex: 0 0 2.75rem;
  height: 2.75rem;
  justify-content: center;
  margin-left: 0.5rem;
  margin-right: 0.75rem;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  width: 2.75rem;
}

.site-navbar__cart:hover,
.site-navbar__cart:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
  color: #fff;
  text-decoration: none;
}

.site-navbar__cart .site-icon {
  font-size: 1.05rem;
}

.search-page {
  flex: 1 0 auto;
  max-width: 1110px;
  padding: clamp(1.4rem, 3vw, 2.4rem) 1rem 3.5rem;
}

.search-intro {
  max-width: 920px;
}

.memorial-dedication {
  margin-bottom: 0.7rem;
}

.search-intro h1 {
  font-size: clamp(1.85rem, 3.5vw, 2.55rem);
  font-weight: 400;
}

.search-intro__summary {
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin-top: 0.7rem;
}

.search-intro__guidance {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
}

.search-workspace {
  margin-top: 1.25rem;
}

.search-form {
  border-color: rgba(8, 11, 83, 0.24);
  border-radius: 0.7rem;
  box-shadow: 0 4px 17px rgba(0, 0, 0, 0.12);
}

.search-form:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(50, 115, 200, 0.2), 0 4px 17px rgba(0, 0, 0, 0.14);
}

.search-form button,
.search-result__actions form button,
.purchase-all button {
  background: var(--navy);
  border-color: var(--navy);
}

.results-heading strong {
  font-weight: 600;
}

.search-results {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.search-result,
.search-result:nth-child(even) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  box-shadow: 0 4px 14px rgba(8, 11, 83, 0.09);
  padding: 1.15rem 1.25rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.search-result:hover {
  border-color: rgba(8, 11, 83, 0.32);
  box-shadow: 0 7px 18px rgba(8, 11, 83, 0.13);
  transform: translateY(-2px);
}

.search-result + .search-result {
  border-top-color: var(--line);
}

.search-result:last-child:nth-child(odd) {
  width: calc(50% - 0.425rem);
  grid-column: 1 / -1;
  justify-self: center;
}

.search-result__context {
  gap: 0.35rem 0.8rem;
}

.search-result h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

.search-result__actions {
  align-content: initial;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-left: 0;
  border-top: 1px solid rgba(8, 11, 83, 0.12);
  margin-top: 1rem;
  padding: 0.75rem 0 0;
}

.search-result__source,
.search-result__actions form button,
.purchase-all button,
.search-pagination button {
  border-radius: 999px;
}

.search-footer {
  flex: 0 0 auto;
  background: var(--navy);
  color: #fff;
  padding: 1.25rem 1rem 0.8rem;
  text-align: center;
}

.search-footer__inner {
  display: grid;
  max-width: 1110px;
  margin: 0 auto 0.7rem;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
}

.search-footer p {
  margin: 0;
}

.search-footer p:first-child {
  text-align: left;
}

.search-footer p:last-child {
  text-align: right;
}

.search-footer a {
  color: #fff;
  text-decoration: none;
}

.search-footer a:hover,
.search-footer a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

@keyframes search-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-intro,
.search-workspace {
  animation: search-enter 320ms ease both;
}

.search-workspace {
  animation-delay: 60ms;
}

@media (max-width: 720px) {
  .search-results {
    grid-template-columns: 1fr;
  }

  .search-result:last-child:nth-child(odd) {
    width: auto;
    grid-column: auto;
  }

  .search-footer__inner {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .search-footer p:first-child,
  .search-footer p:last-child {
    text-align: center;
  }
}

@media (max-width: 991.98px) {
  .navbar-toggler {
    order: 1;
  }

  .site-navbar__cart {
    order: 2;
    margin-left: auto;
    margin-right: 0.25rem;
  }

  .navbar-collapse {
    flex-basis: 100%;
    order: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-intro,
  .search-workspace {
    animation: none;
  }

  .search-result:hover {
    transform: none;
  }
}
