/* ОРІЄНТИР — search page */
:root {
  --or-bg: #0F1818;
  --or-bg-2: #1E2E28;
  --or-green: #3A5A42;
  --or-yellow: #F4D35E;
  --or-text: #F5F5F5;
  --or-muted: #9CA3AF;
  --or-line: rgba(245, 245, 245, 0.18);
  --or-font: "Manrope", system-ui, sans-serif;
  --or-display: "Playfair Display", Georgia, serif;
  --or-script: "Caveat", cursive;
  --or-container: min(1440px, 94vw);
  --or-header-h: var(--site-header-h, 80px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body.orientir-page {
  font-family: var(--or-font);
  background: var(--or-bg);
  color: var(--or-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

html:has(body.orientir-page) {
  background: var(--or-bg);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.or-container {
  width: var(--or-container);
  margin: 0 auto;
}

/* Header */
.or-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--or-header-h);
  background: var(--or-bg);
  border-bottom: 1px solid var(--or-line);
}

.or-header__inner {
  width: var(--site-container, min(1180px, 92vw));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 28px;
}

.or-back {
  grid-column: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--or-font);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  flex-shrink: 0;
  padding: 8px 9px;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.or-back:hover {
  color: #fff;
  opacity: 0.75;
}

.or-logo {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
  font-family: var(--or-font);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.or-logo__icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.or-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  max-width: 12ch;
  color: #fff;
}

.or-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  justify-self: center;
}

.or-nav a {
  font-size: 0.82rem;
  color: rgba(245, 245, 245, 0.88);
  transition: color 0.2s;
}

.or-nav a:hover { color: var(--or-yellow); }

.or-header__actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.or-header__search {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--or-text);
  opacity: 0.85;
}

.or-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid rgba(245, 245, 245, 0.55);
  border-radius: 28px;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.or-btn-outline:hover {
  background: var(--or-yellow);
  border-color: var(--or-yellow);
  color: var(--or-bg);
}

.or-burger {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.or-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--or-text);
  transition: transform 0.25s, opacity 0.25s;
}

.or-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.or-burger.is-open span:nth-child(2) { opacity: 0; }
.or-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.or-hero {
  position: relative;
  min-height: 420px;
  padding: calc(var(--or-header-h) + 48px) 0 0;
  overflow: hidden;
}

.or-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.or-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.85) contrast(1.05);
}

.or-hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(15, 24, 24, 0.92) 0%, rgba(15, 24, 24, 0.72) 42%, rgba(15, 24, 24, 0.35) 68%, rgba(15, 24, 24, 0.55) 100%),
    linear-gradient(180deg, transparent 55%, var(--or-bg) 100%);
}

.or-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  padding-bottom: 56px;
  min-height: 360px;
}

.or-hero__eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--or-muted);
  margin-bottom: 14px;
}

.or-hero__title {
  font-family: var(--or-font);
  font-size: clamp(2.1rem, 4.8vw, 3.35rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.08;
  margin-bottom: 18px;
  color: #fff;
  text-transform: uppercase;
}

.or-hero__lead {
  max-width: 34ch;
  font-size: 0.95rem;
  color: rgba(245, 245, 245, 0.82);
  line-height: 1.65;
}

.or-hero__script {
  font-family: var(--or-script);
  font-size: clamp(1.55rem, 2.5vw, 2.1rem);
  color: rgba(245, 245, 245, 0.92);
  line-height: 1.2;
  text-align: center;
  max-width: 14ch;
  align-self: center;
  padding: 18px 26px 20px;
  border-radius: 28px;
  background: rgba(15, 24, 24, 0.42);
  border: 1px solid rgba(245, 245, 245, 0.12);
  transform: rotate(-3deg);
}

.or-hero__script-line {
  display: block;
}

.or-hero__script-line:first-child {
  transform: rotate(2deg);
  margin-bottom: 2px;
}

.or-hero__script-line:last-child {
  transform: rotate(-1.5deg);
  padding-left: 6px;
}

/* Search panel */
.or-search-panel {
  position: relative;
  z-index: 2;
  margin-top: -28px;
  padding-bottom: 40px;
}

.or-search-box {
  background: var(--or-bg-2);
  border: 1px solid var(--or-line);
  border-radius: 4px;
  padding: 24px 28px 20px;
}

.or-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.or-search-error {
  flex-shrink: 1;
  max-width: min(46%, 280px);
  margin: 0;
  padding: 0 2px;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.25;
  color: #c47070;
  text-align: right;
}

.or-search-error[hidden] {
  display: none;
}

.or-search-input-wrap.has-error {
  border-color: rgba(196, 112, 112, 0.55);
}

.or-search-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 24, 24, 0.55);
  border: 1px solid var(--or-line);
  border-radius: 4px;
  padding: 0 16px;
  min-height: 52px;
}

.or-search-input-wrap svg { flex-shrink: 0; color: var(--or-muted); }

.or-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--or-text);
  font-size: 0.92rem;
  outline: none;
  min-width: 0;
}

.or-search-input::placeholder { color: var(--or-muted); }

.or-search-input::-webkit-search-cancel-button,
.or-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.or-search-clear {
  color: var(--or-muted);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.or-search-clear.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.or-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 28px;
  background: var(--or-yellow);
  color: var(--or-bg);
  border-radius: 28px;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: filter 0.2s, transform 0.15s;
}

.or-btn-primary:hover { filter: brightness(1.05); }
.or-btn-primary:active { transform: scale(0.98); }

.or-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.or-filter label,
.or-filter__label {
  display: block;
  font-size: 0.72rem;
  color: var(--or-muted);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.or-gender-btns {
  display: flex;
  gap: 6px;
  min-height: 44px;
}

.or-gender-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 44px;
  padding: 6px 4px;
  background: rgba(15, 24, 24, 0.55);
  border: 1px solid var(--or-line);
  border-radius: 4px;
  color: var(--or-muted);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.or-gender-btn:hover {
  color: var(--or-text);
  border-color: rgba(245, 245, 245, 0.35);
}

.or-gender-btn.is-active {
  color: var(--or-text);
  border-color: var(--or-yellow);
  background: rgba(244, 211, 94, 0.1);
}

.or-gender-btn__icon {
  flex-shrink: 0;
}

.or-gender-btn__text {
  font-size: 0.68rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.or-filter select,
.or-filter input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  background: rgba(15, 24, 24, 0.55);
  border: 1px solid var(--or-line);
  border-radius: 4px;
  color: var(--or-text);
  font-size: 0.85rem;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.or-filter input {
  background-image: none;
  color-scheme: dark;
}

.or-filter-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--or-muted);
  padding-bottom: 10px;
  white-space: nowrap;
  transition: color 0.2s;
}

.or-filter-clear:hover { color: var(--or-yellow); }

/* Layout */
.or-layout {
  padding: 8px 0 48px;
}

.or-layout__grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  align-items: start;
}

.or-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.or-results-head h2 {
  font-size: 1rem;
  font-weight: 500;
}

.or-results-head h2 span { color: var(--or-muted); font-weight: 400; }

.or-results-head--stats h2 {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--or-muted);
}

.or-results-head--stats h2 strong {
  color: var(--or-text);
  font-weight: 600;
}

/* Results body */
.or-results-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.or-results-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 40px 32px;
  text-align: center;
  background: var(--or-bg-2);
  border: 1px solid var(--or-line);
  border-radius: 2px;
}

.or-results-banner__icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(58, 90, 66, 0.45);
  color: var(--or-yellow);
}

.or-results-banner__text {
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(245, 245, 245, 0.88);
  max-width: 42ch;
  margin: 0;
}

.or-results-banner__text strong {
  color: var(--or-yellow);
  font-weight: 700;
}

.or-results-banner__btn {
  min-width: min(100%, 280px);
}

.or-download-status {
  margin-top: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--or-yellow);
  text-align: center;
}

.or-download-status:not([hidden]) {
  display: block;
}

.or-search-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 64px 24px;
  color: var(--or-muted);
  background: var(--or-bg-2);
  border: 1px solid var(--or-line);
}

.or-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(245, 245, 245, 0.15);
  border-top-color: var(--or-yellow);
  border-radius: 50%;
  animation: or-spin 0.9s linear infinite;
}

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

.or-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--or-muted);
  background: var(--or-bg-2);
  border: 1px solid var(--or-line);
}

/* Toast */
.or-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 200;
  padding: 12px 22px;
  background: var(--or-bg-2);
  border: 1px solid rgba(244, 211, 94, 0.45);
  border-radius: 28px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--or-text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.or-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.or-ext-modal {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.or-ext-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.or-ext-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.or-ext-modal__panel {
  position: relative;
  max-width: 520px;
  width: 100%;
  padding: 24px 28px;
  background: var(--or-bg-2);
  border: 1px solid rgba(244, 211, 94, 0.45);
  border-radius: 4px;
  color: var(--or-text);
}

.or-ext-modal__panel h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.or-ext-modal__panel p {
  margin: 0 0 12px;
  color: var(--or-muted);
  line-height: 1.5;
}

.or-ext-modal__steps {
  margin: 0 0 12px 20px;
  padding: 0;
  line-height: 1.55;
}

.or-ext-modal__steps li {
  margin-bottom: 8px;
}

.or-ext-modal__hint {
  font-size: 0.9rem;
  color: var(--or-gold);
}

/* Sidebar */
.or-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.or-side-card {
  background: var(--or-bg-2);
  border: 1px solid var(--or-line);
  border-radius: 2px;
  padding: 24px;
}

.or-side-card h3 {
  font-family: var(--or-font);
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.08;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}

.or-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.or-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
}

.or-steps__n {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--or-green);
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 600;
}

.or-steps p {
  font-size: 0.84rem;
  color: rgba(245, 245, 245, 0.82);
  line-height: 1.55;
  padding-top: 4px;
}

.or-subscribe-card .or-subscribe__text {
  font-size: 0.84rem;
  color: rgba(245, 245, 245, 0.82);
  line-height: 1.55;
  margin-bottom: 18px;
}

.or-subscribe__btn {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}

.or-side-photo {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  min-height: 200px;
}

.or-side-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 200px;
  filter: saturate(0.8);
}

.or-side-photo__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(15, 24, 24, 0.85) 100%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.or-side-photo__overlay p {
  font-family: var(--or-script);
  font-size: 1.35rem;
  line-height: 1.3;
}

/* CTA card */
.or-cta {
  width: var(--or-container);
  margin: 0 auto 56px;
  padding: 0;
}

.or-cta__inner {
  background: var(--or-bg-2);
  border: 1px solid var(--or-line);
  border-radius: 2px;
  padding: 56px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.or-cta__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  color: var(--or-green);
}

.or-cta__title {
  font-family: var(--or-font);
  font-size: clamp(1.15rem, 2.8vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
}

.or-cta__text {
  font-size: 0.95rem;
  color: var(--or-muted);
  margin-bottom: 24px;
  line-height: 1.6;
  max-width: 36ch;
}

/* Footer */
.or-footer {
  border-top: 1px solid var(--or-line);
  padding: 40px 0 28px;
}

.or-footer__top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
}

.or-footer__top .or-logo { justify-self: start; }
.or-footer__top .or-nav { justify-self: center; }
.or-footer__social {
  display: flex;
  gap: 14px;
  justify-self: end;
}

.or-footer__social a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--or-line);
  border-radius: 50%;
  color: var(--or-muted);
  transition: color 0.2s, border-color 0.2s;
}

.or-footer__social a:hover {
  color: var(--or-yellow);
  border-color: rgba(244, 211, 94, 0.4);
}

.or-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--or-line);
  font-size: 0.78rem;
  color: var(--or-muted);
  flex-wrap: wrap;
}

.or-footer__bottom a:hover { color: var(--or-yellow); }

/* Responsive */
@media (max-width: 1100px) {
  .or-layout__grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .or-logo { font-size: 1.35rem; }
}

@media (max-width: 900px) {
  .or-hero__inner { grid-template-columns: 1fr; }
  .or-hero__script { text-align: left; max-width: none; }
  .or-filters { grid-template-columns: 1fr 1fr; }
  .or-filter-clear { grid-column: 1 / -1; justify-self: start; }
  .or-footer__top { grid-template-columns: 1fr; text-align: center; }
  .or-footer__top .or-logo,
  .or-footer__social { justify-self: center; }
  .or-footer__top .or-nav { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 640px) {
  .or-back span { display: none; }
  .or-search-row { grid-template-columns: 1fr; }
  .or-filters { grid-template-columns: 1fr; }
  .or-results-banner { padding: 32px 20px; }
  .or-cta { margin-bottom: 40px; }
  .or-cta__inner { padding: 40px 20px; }
  .or-cta .or-btn-primary { width: 100%; max-width: 320px; }
}

/* Main site footer on orientir page */
.orientir-page .footer {
  background: var(--or-bg);
  border-top: 1px solid var(--or-line);
  color: var(--or-muted);
  font-family: var(--or-font);
}

.orientir-page .footer-brand p {
  color: rgba(245, 245, 245, 0.82);
  opacity: 1;
}

.orientir-page .footer .logo-name {
  color: var(--or-text);
}

.orientir-page .footer .logo-accent {
  color: var(--or-yellow);
}

.orientir-page .footer h4 {
  color: var(--or-text);
}

.orientir-page .footer a,
.orientir-page .footer li {
  color: var(--or-muted);
  opacity: 1;
}

.orientir-page .footer a:hover {
  color: var(--or-yellow);
  opacity: 1;
}

.orientir-page .footer-bottom {
  border-top-color: var(--or-line);
  color: var(--or-muted);
  opacity: 1;
}
